gift-0.1.14/0000777000175200001440000000000010220511633007522 500000000000000gift-0.1.14/Doc/0000777000175200001440000000000010220511620010223 500000000000000gift-0.1.14/Doc/TeX/0000777000175200001440000000000010153634072010737 500000000000000gift-0.1.14/Doc/TeX/CVS/0000777000175200001440000000000010153634072011372 500000000000000gift-0.1.14/Doc/TeX/CVS/Root0000644000175200001440000000005410153634072012153 00000000000000muellerw@subversions.gnu.org:/cvsroot/gift/ gift-0.1.14/Doc/TeX/CVS/Repository0000644000175200001440000000001510153634072013404 00000000000000gift/Doc/TeX gift-0.1.14/Doc/TeX/CVS/Entries0000644000175200001440000000011110153634072012633 00000000000000/WeightingFunctionDocumentation.tex/1.1.1.1/Mon Jul 22 07:09:28 2002// D gift-0.1.14/Doc/TeX/TeX.dfPackage0000644000175200001440000000036610153634072013147 00000000000000package id77n5xd39zkzn5d39zydne; /** @version 2.0 @physicalPackage @__modelType diagram */ class diagram { }/** @__tags @shapeType ClassDiagram */ class __tags { }/** @__options */ class __options { }/** @__positions */ class __positions { }gift-0.1.14/Doc/TeX/WeightingFunctionDocumentation.tex0000644000175200001440000000622210153634072017564 00000000000000\documentclass[10pt]{article} \usepackage{xspace} \usepackage{amstex} \usepackage{a4} \usepackage{epsfig} \usepackage{cite} % Im Moment leer %Marking a text passage as ToDo \newcommand{\ToDo}[1]{\marginpar{{\tt ToDo}}\underline{#1}} \newcommand{\interval}[1]{{\iota_{#1}}} \newcommand{\discrete}{\delta} \newcommand{\continuous}{\varphi} \newcommand{\continuousVec}{{\vec\varphi}} \newcommand{\sdev}{\sigma} \newcommand{\GaussF}[1]{G_{#1}} \newcommand{\Gauss}[2]{\GaussF{#1}\left({#2}\right)} \newcommand{\GaussFSdev}{\GaussF{\sdev}} \newcommand{\etal}{{\em et al.}} \newcommand{\mybox}[2]{ \begin{figure} \epsfig{file=#1.eps,width=12cm} \caption{\label{#1}{\em #2}} \end{figure} } \newcommand{\strich}{^\prime} \newcommand{\ImageToDiscreteFeatures}{\Lambda} \newcommand{\CumulativeDistributionFunction}{\Phi} \newcommand{\eg}{\emph{e.g.}\@\xspace} \newcommand{\ie}{\emph{i.e.}\@\xspace} \newcommand{\etc}{\emph{etc.}\@\xspace} \newcommand{\ldq}{\lq\lq} \newcommand{\rdq}{\rq\rq\xspace} \newcommand{\df}{\mathrm{df}} \newcommand{\cf}{\mathrm{cf}} \newcommand{\wf}{\mathrm{wf}} \newcommand{\nf}{\mathrm{nf}} \newcommand{\tf}{\mathrm{tf}} \newcommand{\lf}{\mathrm{lcf}} \newcommand{\abs}{\mathrm{abs}} \begin{document} \title{GIFT's current weighting schemes} \author{Wolfgang M\"uller} \maketitle For the combination of query image weights GIFT uses the formula: \[ \df_{qj}=\sum_{i=1}^N \df_{ij}\cdot R_i \] I define the normalization factor: \[ \nf:=\sum_i \abs(R_i); \] For scoring GIFT uses: \[ s_{k_{new}}=s_{k_{old}} + \wf(q,k,j) \] $\wf$ is here the weighting function. Before giving a table of weighting functions I define some helper functions which depend on the collection frequency of an image and the kind of feature (block or histogram) as well as on the actual query and the actual document. The standard factor for a document $k$, query $q$ and feature $j$: \[ \wf^{0}_{kqj}:= \begin{cases} \frac{sgn(\tf_{qj})}{\nf}&\text{for block features}\\ \frac 1{\nf}\cdot sgn(\tf_{qj})\cdot \min \left\{\abs\left(\frac{\tf_{qj}}{\nf}\right), \tf_{kj}\right\}& \text{for histogram features}\\ \end{cases} \] There arise two different logarithmic factors of the collection frequency: \[ \lf_{1j}=\begin{cases} \log(\frac 1{\cf_j})& \text{for block features}\\ 1 & \text{for histogram features}\\ \end{cases} \] and \[ \lf_{2j}=\begin{cases} \log(\frac 1{\cf_j}-1+\epsilon)& \text{for block features}\\ 1 & \text{for histogram features}\\ \end{cases} \] where the $\epsilon$ is added to avoid overflows. The weighting schemes presently coded are: \begin{tabular}{|c|p{3cm}|l|} \hline 2&Best weighted probabilistic weight & $\left(0.5+\frac{0.5 \tf_{kj}}{\max_j \tf_{kj}}\right)\cdot\lf_{2j}\cdot \wf^0_{qkj}$\\\hline 3&Classical idf weight & $\left(\lf_{1j}\right)^2\cdot \wf^0_{qkj}$\\\hline 4&Binary term independence & $\lf_{2j}\cdot \wf^0_{qkj}$\\\hline 5&Standard tf weight& $\frac 1{\sqrt{\sum_i\tf_{qi}^2}}\cdot\wf^0_{qkj}\cdot \begin{cases} {\tf_{kj}\cdot\tf_{qj}}&\text{for block features}\\ 1 &\text{for historgram features}\\ \end{cases}$\\\hline 6&Coordination level&$\wf^0_{qkj}$\\\hline \end{tabular} \end{document} gift-0.1.14/Doc/CodingRules/0000777000175200001440000000000010220502727012451 500000000000000gift-0.1.14/Doc/CodingRules/CVS/0000777000175200001440000000000010153634072013110 500000000000000gift-0.1.14/Doc/CodingRules/CVS/Root0000644000175200001440000000005410153634072013671 00000000000000muellerw@subversions.gnu.org:/cvsroot/gift/ gift-0.1.14/Doc/CodingRules/CVS/Repository0000644000175200001440000000002510153634072015123 00000000000000gift/Doc/CodingRules gift-0.1.14/Doc/CodingRules/CVS/Entries0000644000175200001440000000005610153634072014361 00000000000000/template.cc/1.2/Mon Jul 22 07:09:28 2002// D gift-0.1.14/Doc/CodingRules/CodingRules.dfPackage0000644000175200001440000000036610153634072016403 00000000000000package id36b9zd39zkzn5d39zydjs; /** @version 2.0 @physicalPackage @__modelType diagram */ class diagram { }/** @__tags @shapeType ClassDiagram */ class __tags { }/** @__options */ class __options { }/** @__positions */ class __positions { }gift-0.1.14/Doc/CodingRules/template.cc0000644000175200001440000000217310220502727014512 00000000000000/* for each file: we would like to have the following header (underneath the GPL header) This should be equal for corresponding cc and h files. */ /** * * put the kdoc documentation here: * * * modification history: * * $Log: template.cc,v $ * Revision 1.2 2001/12/11 17:26:21 muellerw * making the make dist target work out * * Revision 1.1.1.1 2001/02/01 11:22:29 muellerw * gift-0.1.6pre: first version in GNU.org CVS * * Revision 1.1.1.1 2000/11/22 08:44:06 muellerw * Imported: gift-0.1.5-epsilon * * Revision 1.1.1.1 2000/03/22 12:57:11 muellerw * first GNU version plus half a day *: * * * compiler defines used: * * */ /* for functions in headers: */ /** * * put some KDOC documentation here * * modification history: * put changes of the INTERFACE * or of the SEMANTICS here * */ /* for each function in *.cc files we would like to have: */ //---------------------------------------- /*= 40 times '-' */ /** * * put some KDOC documentation here * * * modification history: * all modifications * */ /** ... and in additions to that update change log */ gift-0.1.14/Doc/gift-guide.sgml0000644000175200001440000005714110220503576013072 00000000000000
GIFT user's guide Wolfgang Müller 0.1.14, 2005-03-24 The GIFT is a content based image retrieval system. Introduction

Caveat: THIS PROGRAM NEEDS MORE PREREQUISITES THAN OTHER GNU PACKAGES (see below). At present, it installs neither info files nor man pages. However, otherwise the install procedure tries to be GNU conformant.

GIFT is a content based image retrieval system (CBIRS). It gives the user the possibility to index and search images without having to annotate them first. Indexing is done using image properties such as color and texture.

The query is one or multiple image examples.

Content based image retrieval (CBIRS) is presently an area of vivid research interest, yielding many different systems.

Our system is different from other systems with respect to the indexing method. We use very many very simple features which are translated into some kind of "pseudo text" for each image. On this representation we use inverted files as indexing technique. In our opinion this representation has two great advantages: The representation is very flexible, in that it allows good incorporation of relevance feedback. The representation is very flexible, in that it will allow completely integrated treatment of text (ASCII, HTML etc.) and images. both at a reasonable speed, which we hope to increase further. The current implementation still leaves room for optimization.

This document will be the user's guide to the GIFT content based image retrieval system. It is aimed at the user of such a system. Its companion document will be a programmer's manual elaborating details of interfacing etc. and a document describing the communication protocol, MRML, which we use for the communication between the user interface and the image retrieval system.

MRML - Why we publish GIFT this way

One big problem of CBIRS research is the non-existence of a common benchmark, measuring the quality of retrieval results. In our project we have both worked on reasonable measures for benchmarks, and on software for performing this. A precondition for a common benchmark is a common interface (in the programming sense of the word), permitting the connection of the benchmarking program to the benchmarked program. MRML is an XML based language providing such an interface.

The other great effect of such an interface language is the possibility to create GUIs for CBIRS which can be used by all MRML compliant servers. Charmer provided by our partners at EPFL (contact details in the Author field) is a very beautiful interface which will equally become free software.

We (EPFLausanne and CUI, Geneva) provide this software with the goal of promoting the use of MRML. Wide-spread use of MRML could both help scientists (less work and easier exchange) and normal users (easy combination of software packages from different sources. Think, for example, of a GIMP plug-in which would help the user organize his images).

In fact, the idea of having interested real-world users test a system like ours is very attractive, as data about real users are hard to get. We hope to motivate users to share anonymized, preprocessed log files in order to help us improve our systems.

Installation

Caveat: THIS PROGRAM NEEDS MORE PREREQUISITES THAN OTHER GNU PACKAGES. However, otherwise the install procedure is GNU conformant.

Please tell us about any bugs in the installation procedure.

The current distribution typically runs GNU/Linux machines of diverse flavours.

Get installed: you have received the package gift-0.1.x.tgz. Now: New: we have added a Perl script which tries to fetch the perl prerequisites, as well as SnakeCharmer. It uses the CPAN (comprensive Perl archive network) module for installing. This module might ask you plenty of questions. For successful installing and running we need a recent g++ (we suggest 3.3, we need definitely younger than gcc 2.8) Image Magick (the feature extraction uses it to convert image formats to PPM files.) Perl younger than 5.003 (you get that at www.cpan.org) Currently we use the Perl modules Parse-Yapp-1.05 XML-Parser-2.34 libxml-perl-0.07 XML-RegExp-0.03 XML-SAX-0.12 XML-Writer-0.4 XML-Handler-EasyTree-Traversal XML-Handler-Trees-0.02 XML-DOM-1.43 XML-XQL-0.68 Text-Iconv-1.2 libnet (if not already provided by your GNU/Linux distribution) libwww (if not already provided by your GNU/Linux distribution)

If this is too much for you to handle, please ask for the gift prerequisites package and help us develop and test it. is a good place to discuss this

doxygen (optional, for system documentation) Unpack it by doing tar -xzvf gift-VERSION.tgz Follow the install instructions in the file INSTALL The configuration script provides the following options: --enable-interactive this enables an interactive script that installs the prerequisites at some default locations. It makes use of the Perl CPAN module. You should have a man page about that on your system. --enable-multi-threading enables multithreading. If this option is enabled, the configurescript checks automatically, if it can use multithreading. If this is the case, the script will enable multithreading support. Currently this is less stable than I would like it to be. However, on multiprocessor machines a very interesting option, as query processing will be distributed over the processors. If you have installed doxygen, You can now look at the system documentation by typing lynx Doc/autoDoc/HTML/hier.html. Unpack now the charmer archive: tar -xvf Charmer-0.2.tar Run the configuration script cd Charmer-0.2;perl write-applet-frame.pl

Prepare and run the server

We assume that you have successfully installed GIFT. Now you want to start the server, I suppose. But first you have to give to GIFT an image collection.

$GIFT_HOME: where the configuration data goes

By default, the indexing data of the collections, as well as the configuration files reside in your home directory.

To change this default, set the environment variable GIFT_HOME the to absolute path of the directory where you want your gift-indexing-data etc. to reside and put the line:

export GIFT_HOME=/absolute/path/to/my_gift_home

into your .bashrc

Now you are ready to index a collection.

Indexing a collection

The vanilla way of indexing a collection is by typing gift-add-collection.pl /absolute/name/of/a/directory/tree/containing/images/. This script will then create the appropriate configuration files and index directories in your home directory (or in $GIFT_HOME). Please note that it should be possible to index all images within your home directory tree by typing gift-add-collection.pl ~.

The script, as it is now takes 20-30 seconds per image to create the base indexing data for inverted file creation. The inverted file creation itself will take about 5 minutes to about an hour, depending on the size of the collection. The biggest collections we have indexed so far are 13000 images. This took our fast server two days. 500 images get indexed on my portable AMD-K6-2-based computer in less than 3 hours.

Indexing in multiple runs

If you have to index a large collection or if you are indexing your collection on a portable computer, indexing a collection in one run becomes inacceptable. If you stop the gift-add-collection.pl during feature generation and indexing, you can resume by simply restarting the program. On restart, it will check each file if it was correctly generated and resume operation at the first file which was not correctly generated.

Handling files in public_html

Most web server configurations have for each user a directory which is published on the web (if the file permissions are set accordingly). On most systems this directory is ~/public_html, and the associated URL is http://localhost/~your_username/ . gift-add-collection.pl takes these settings into account. If an image file ~/public_html/a_fileare encountered, gift-add-collection.pl will generate a http://localhost/~your_username/a_fileurl. for files which are elsewhere, urls of the kind file:/a/path/another_file will be generated. If you are not happy with the settings, we suggest you to run gift-add-collection.pl --help and to read the "Digging in the indexing files" section of this document.

Starting the server

When the indexing is done, you can start the GIFT server: gift. At the time of writing, gift will output tons of debugging output on the screen. Most of the time it also will tell you why it dies, if it dies. In the cases known to me, reasons for dying are usually inappropriate config file locations, as well as the untrapped possibilty to nuke the server using faulty XML or a non-exsistent session ID.

It will start up, and it will listen on the socket 12789 for connecting clients.

While 12789 is the port number by default, you can override this default port number by giving it as the first parameter. In addition to that you can override GIFT_HOME by giving it as parameter to the GIFT, for example: gift 12888 /usr/local/share/shared-gift-collections/

Getting started with the Charmer interface

The installation is not yet GNU-ish: Simply unpack the archive and do: cd Charmer-0.2;perl write-applet-frame.pl Start the Charmer interface by typing cd Charmer-0.2;appletviewer Charmer.html Note that you have to cd into the directory where Charmer resides. Otherwise you would have to play with CLASSPATHs. Click on the button which symbolizes a handshake. Fill in the request: In the first line you give the host and the port, separated by a colon (e.g. localhost:12789). In the second line you give a username. This serves for opening a session under your name. We plan to add persistent user management to gift, to make it possible for the user to choose between different sessions. As a reaction to pressing OK in the request, the interface changes: It now gives you a choice between different algorithms and collections. In this case all the algorithms are weighting functions for ranked queries on inverted files. However, in principle, you can put anything there. Click the dice symbol. You will get a random selection of images from the collection you chose. You now have the possibility to click on one or multiple of these images (they will get a green frame when clicked), and send a query for them by clicking on the binoculars button. Getting back your query result, you are able to improve it. You can either click on some of the query results (thus adding "positive" images to your query) or click the right mouse button on an image and use the menu that pops up to indicate that you want to exclude them from further consideration. To clear your query, press the button with the curved arrow, this deletes yur query, but does not clear the display of the result set.

Troubleshooting No connection

On connecting to a remote server, you do not get the choice between different algorithms (and at least one collection).

Be aware, that an applet can only connect to the server it came from. So you have to see to it that your appletviewer fetches the SnakeCharmer applet from the remote server.

Instead of images, I see empty frames

There are several possible reasons for this

Wrong image file format

For generality, we allow quite a number of image formats: files with the extension png, gif, jpg, jpeg, eps, and ppm. unfortunately JAVA is only able to digest GIF and JPEG.

Problems have been reported with recent JREs and SnakeCharmer. These were due to security problems (below). JAVA security gets in our way

JAVA 1.1.x and JAVA 1.2 have different security concepts. While in JAVA 1.1.x the appletviewer does not load any remote IDs (at least I had once trouble with that), JAVA 1.2's appletviewer is extremely restrictive, as restrictive as a browser would be. As a consequence, you have to put your images and thumbnails into a web-published area, if you want to see anything.

See the "digging in the indexing files" section for more information

JAVA 1.4-1.5 security

Problems have been reported on which were due to bad installations of JAVA. Please make sure that the security policies of the JRE are accessible to the appletviewer. Ample documentation about security policy files can be found at SUN's site. Digging in the indexing files url2fts.xml

MRML is based on URLs. Based on the url, it will see if it knows already the image, if the image is in the indexed collection etc. . If the image is unknown, it will create new features for finding a corresponding image etc. . As a consequence, if you move images that have been indexed from one directory to another, you will have to change the translation table from url to feature file. This resides in the "url2fts.xml" files.

Where is the url2fts.xml for a given collection?

Assuming you have a collection containing images from /this/is/a/path/to/my_collection/ You will find the indexing data in the directory ${VIPER_HOME:-$HOME}/gift-indexing-data/my_collection/ The translation table from URL to feature file resides in ${VIPER_HOME:-$HOME}/gift-indexing-data/my_collection/url2fts.xml

Modifying url2fts.xml for moving a collection

Do emacs \ ${VIPER_HOME:-$HOME}/gift-indexing-data/my_collection/url2fts.xml What you get to see is a long table of the structure <image url-postfix="IMAGEURL" thumbnail-url-postfix="THUMBNAILURL" feature-file-name="NAME_OF_THE_FEATURE_FILE" /> Clearly, if you move the images from one location to another, you have to adjust image_location and thumbnail_location. Usually this amounts to a simple query-replace operation.

For example: at my place I have the collection TSR500, and the first line looks like this: <image url-postfix="http://localhost/~muellerw/images/TSR500/b_1002_scaled_small.jpg" thumbnail-url-postfix="http://localhost/~muellerw/images/TSR500_thumbnails/b_1002_scaled_small_thumbnail_jpg.jpg" feature-file-name="/home/muellerw/gift-indexing-data/TSR500/b_1002_scaled_small_jpg.fts" /> If I want to move this collection from ~muellerw/public_html/TSR500/ to ~muellerw/public_html/TSR501/ all I have to do is to replace each string images/TSR500 by images/TSR501 in urls2fts (and to restart the GIFT, of course).

JAVA: file:/... URLs vs. http://.. URLs

In my humble experience, old (1.1.x) appletviewers had problems with http:// URLs. "Problems" means, that they simply were neither downloaded nor displayed. "Uncool", in a word. The opposite now happens with a recent (1.2) appletviewer. The images are shown, if they come by http from a location on the local host, they will not be shown, if they are specified by a file:/... URL. This renders giving defaults which work for everybody impossible. We give possibilites to specify all this in gift-add-collection.pl (try --help for viewing the options). However, if you are experiencing trouble you can simply do replacement of URLs in the url2fts.xml file, as described in the section above.

How to analyze GIFT

In any case, if you are interested in adding anything to the GIFT, we would be happy to hear from you. Please mail the maintainer, Wolfgang Müller: Wolfgang.Mueller@cui.unige.ch . He will be happy to help.

We use doxygen as a system documentation tool. This means we put JAVADoc like comments into the headers. If you want to find out, what the different classes are doing we suggest you to run doxygen on libInvertedFile/include/*.h and just browse. Comments in the *.cc files are usually shorter and only geared towards implementation. Later we plan to include a script which synchronizes comments between the headers and the prototypes in the *.cc files.

For the developer there are several alternatives: use as much code as possible Then inherit something from CAccessor (access to a given indexation method and database) and/or CQuery (using this method to actually process queries). It would be useful then to understand how CSessionManager works. If you have suggestions to change what we have, please notify us and help us release. We are currently improving the factory design for accessors. This should make enhancing GIFT much easier. Intermediate: use the parsing code, but not much more. The knowledge about MRML is in the ...handler functions in CSessionManager and CCommunicationHandler/Server. This might serve as an inspiration. As little code as possible: Simply take the DTD. If you make a server, try, if gift-mrml-client.pl works with your system. Try to make it work seamlessly with an unmodified version of the charmer interface. Always: patches are welcome. If you are missing MRML functionality, we would be also very interested in providing this functionality or helping you in providing it yourself. Please contact the maintainer of GIFT/Charmer as named in the AUTHORS file.

We are currently putting together some documentation which will include a "gift extension howto". This is going hand in hand with some redesign of the session manager, in order to make cooperation easier.

ToDo List

As you see, the version number of GIFT is quite low. It implies, that we see many areas which need more work.

Code and documentation quality

proper generation and installation of .info and .texinfo files Improve use of libtool Class graph of GIFT More documentation in the headers Port MRML tech report from LaTeX to SGML to have it in high quality on line for development Write script to synchronize prototype comments used in the cc file with the declaration in the include file.

Known shortcomings

Features to be added soon (OK this has been "soon" for three years now!)

Adding images during runtime Persistent administration of sessions, including interaction history. Here we will have to choose a database to link GIFT to (probably the GPLed version of MySQL or PostgreSQL). Otherwise, we waste simply too much time on issues which are not really image processing.

Interesting things to be added

More flexible interfaces for both GIFT and Charmer, allowing them better to grow together with MRML. (Partly fixed, there is a new interface for CQuery and CAccessor which is quite flexible. We now need something like that for Charmer, too). APIs for XML parsing Feature: granting rights to users Making an MRML interface a plug-in to the GIMP

MRML

We would like to add (at least) the following features to MRML Add image to collection during query Query by annotation is soon to be integrated Queries and transmission of segments A format for transmitting relevance information for benchmarks ...

Research

search for better feature sets. The current feature set is still the very first version. add fast flexible browsing support

Call for participation

It is obvious that a group of three people cannot attack all this. However, we are hoping for help both from users and scientists. While users probably will be most interested in treating as many file types as possible, scientists may profit from enhancing the capabilities of MRML as well as a persistent session management, which would permit learning about each user and thus improve query performance.

Contact details GIFT

GIFT has been developed at

Centre Universitaire d'Informatique

Vision Group

24, rue du General Dufour

1211 Geneva 4

by (in the "order of appearance" in the group) Dr. David McG. Squire, Wolfgang Mueller, Henning Mueller, Dr. Stephane Marchand-Maillet, supervised by Prof. Dr. Thierry Pun

See the AUTHORS file for information on who did what

gift-0.1.14/Doc/configuring-and-hacking-the-gift.sgml0000644000175200001440000017026610153634072017234 00000000000000
Configuring and hacking the GIFT Wolfgang Müller 0.1.2 of this document, 12 of November 2002 The GIFT (ex: Viper) is a content based image retrieval (CBIRS) tool. It has been developed at the University of Geneva. See the README and AUTHORS for more details. This manual gives information to the advanced user and the hacker (in the sense of "programmer") on how to configure the GIFT. To the hacker and the scientist it gives information on how to include new query engines into the GIFT framework. Introduction

Probably the following article is easier to understand, if you once have indexed and tested a collection using the GIFT. In the appendix, there is an example gift-config.mrml file, but I guess it's easiest to understand, if you know what things look like on your system

The GIFT has been designed to maximize flexibility, both for users and developers. This document explains, how GIFT can be configured (levering this flexibility), and how the configuration files are digested in the interior workings of GIFT.

The basic structure

The basic structure of the GIFT is given by the capabilities of our protocol MRML, and these in turn are given by the basic requirements of a multi-user image retrieva system.

Just imagine us entering GIFT at the front door: we want to enable the system to know who we are in order to memorize who has used which configuration. Otherwise somebody choosing an option would choose the option for anyone else. We want the user to be able to open and close sessions, to choose between different collections and algorithms etc. .

We want to be able to choose between different collections

What's more, we want to be able to combine different query engines to increase their strenght and weaken their weaknesses.

Given these requirements we end up with a system, which is able to construct during runtime trees of query engines, where the leaves are query engines, and the inner nodes assemble the results. To make things easy for simple clients, we want to be able to provide reasonable default value. A simple client should enable the user to provide just the ID of an algorithm as configuration. A complicated client might specify a whole very elaborate tree.

This flexibility creates a couple of small practical configuration problems: How do we specify which collection can be used with which query engine? How do we specify which node can be father of which node in the tree How do we provide reasonable the values in a flexible manner?

Given, that about all this information has to be sent to a client if it asks for it, and the format which is used for sending this information is MRML, the we chose a modified version of MRML as the configuration file format. This is quite nice for us: explaining MRML explains the configuration and vice versa

The structure of gift-config.mrml

Now let's look at an actual gift-config.mrml. It begins telling us it's MRML. That's only partly true, as it does not fully conform with the DTD. However, almost every tag is MRML.

It starts with the usual XML document header

<?xml version="1.0" standalone="no" ?>

We don't give it an XML doctype, because this is DTD-less non-validated XML. If we give it an XML doctype, this won't hurt or better things, as the parser will not validate anyway.

Then there follows a comment wich tells you what this really is. No surprises. The top-level element of the file is

<mrml>

containing one <cui-configuration> element. The sense of using a <cui-configuration> element is twofold: it is some sort of comment of its content if (accidentally) sent as a message, a query processor will discard the whole content.

The element itself contains two elements. A list of algorithms (algorithm-list) and a list of collections (collection-list). Let's start the explanation with the collection-list as it's easier to explain and prepares the ground for the algorithm-list:

collection-list

The collection-list contains a list of image collections, as the name might suggest. Each collection this list is specified by a collection element. Let's look at one of these elements:

<collection collection-id="c-17-44-14-22-8-100-5-265-0" collection-name="minidb" cui-number-of-images="10" cui-base-dir="/home/muellerw/gift-indexing-data/minidb/" cui-inverted-file-location="InvertedFile.db" cui-offset-file-location="InvertedFileOffset.db" cui-feature-description-location= "InvertedFileFeatureDescription.db" cui-feature-file-location="url2fts" > <query-paradigm-list> <query-paradigm type="inverted-file"/> </query-paradigm-list> </collection>

We see: The collection element has lots of attributes. Most of them are nonstandard MRML. They are extensions. Let us start withe two only attributes which are standard: collection-id: this is a machine-readable name of the collection. It is a unique collection identifier for a given server. collection-name: is a name which is human-readable. It is not necessarily unique, and it is intended to be shown to the users on MRML clients. The nonstandard attributes are not for external use. They just tell GIFT where to look for files. So they are interesting for you who are setting up a GIFT server. cui-number-of-images: the number of images in the collection. This might be interesting for some collections that use strange indexing schemes (like e.g. distance matrices that are expressed as a flat list of distances, and where you need the size of the matrix to get at the size information). Needless to say, minidb is a very small collection. cui-base-dir: Usually you will put indexing files for one collection into one directory. This will be the base directory of the collection. cui-inverted-file-location: the inverted file indexing minidb is stored in /home/muellerw/gift-indexing-data/minidb/InvertedFile.db cui-offset-file-location: analog, the location of the file that contains pointers into the inverted file. cui-feature-description-location: this file contains information which features have which type (color blocks, color histograms, texture blocks, texture histograms, enumerated by 0..3) cui-feature-file-location: it should be cui-url-to-feature-file-location, but we put some limit to the lenght of tagnames. This file assigns to each image URL contained in the collection a feature file location. The feature file contains a list of the characterstics of the image, which then will be used to query the inverted file The collection element contains a query-paradigm-list element. This element and its contents specify which algorithms go with which collections. An algorithm is allowed to use a collection, if their query paradigms lists match. Two lists (A and B) of query paradigms match, if at least one item (i.e. a query-paradigm tag) of list A matches an item of list B. Two query-paradigm tags I and K match, if there is no attribute (named N) that is both set in I and K, and where the value of N is different in tag I and in tag K. In our case, the query-paradigm-list of an algorithm that wants to use the collection minidb, has to contain either a query-paradigm tag that has the attribute type not set, or a query-paradigm tag that has the type attribute set to inverted-file.

algorithm-list

We have seen that the collection-list is a list of collections. Now we will look at the algorithm list which happens to be (surprise!) a list of algorithm specifications. The only reason why this is more complicated that the algorithm list is that the algorithm specifiactions are more complicated. Let's look at what we want to achieve: We want to be able to combine algorithms with each other. If possible, GIFT should be query engine and meta query engine at the same time. We want to provide reasonable default values. Somebody choosing a given algorithm should not need to specify everything We want to give GIFT the opportunity to send information about property sheets to its clients. I guess that you can already feel that things get a bit more complex than with collections.

Algorithms and sub-algorithms

The requirements amount to having a tree of query processors where each node hands down the query to its children, collects the result and hands it up to its ancestor. Of course each node is allowed to process the query all by itself. Typically only the leaf nodes will actually process the query, and the inner nodes will be specialised in disptching and assembling queries and results.

This structure is easily expressed by a tree of <algorithm> tags. The basic idea is very simple: one node, one query processor. All this gets constructed in the moment a configure-session message reaches the server.

Complications are introduced by the fact that we would like to have reasonable default behaviour: <configure-session session-id="my-current-session"> <algorithm algorithm-id="my-algorithm"> </configure-session> Should result in a resonable configuration of the session with id my-current-session (note that typically, session IDs are not human readable. Session names are.). What's more, we want to save us from having to do too much cut-and-paste in our configuration files. This is why we implemented lexical scoping and a simple kind of inheritance:

Firstly, attributes are resolved in a way similar to programming languages with lexical scoping. If an attribute A is not contained in a given node N, the GIFT will try to find the attribute in all the ancestors, starting with the immediate ancestor of N, and ending with the root node of the algorithm tree.

Each algorithm contains an algorithm-id attribute, an algorithm-type. This corresponds to the identification tasks we have to perform: As we already stated, the client will want to build a tree of algorithm elements. Each node will have to have a known type. This type provides the default values of the <algorithm> attributes, as well as descendants for the attribute tag, if needed. The type is identified using the algorithm-type attribute. The tree of algorithms possibly contains multiple items of the same type. We want to give the client the possibility to discern the different instances of the same algorithm. For this we need the algorithm-id attribute.

This is already quite flexible, but the algorithm tag contains more. Property sheets.

Property sheets

Property sheets are necessary, as we do not want MRML clients and users to one fat set of parameters that are to be fed to the <algorithm> specification. GIFT was built as a system for research, and SnakeCharmer was made to accomodate the needs of both the CIRCUS and the Viper groups in Lausanne and Geneva. Research typically means, n people wanting to explor n*n ideas. You cannot expect to know useful parameter sets before you have considered the problem thorroughly. We did not want to limit the freedom of programmers, so we invented a simple-to-implement property sheet specification.

As you can see in the following example, as with algorithm, a property sheet is made of property sheets. Again, let us look at our premises: We want to be able to show which values an be changed by the user. There should be some dialog dynamics: not everything should be visible/clickable all the time. The property sheet specification should contain information concerning the MRML (i.e. XML) to be generated by the property sheet. In short, because of property sheets the programmer of an MRML client has to know very nothing about how an algorithm is to be configured. Let's look more closely at the example: <property-sheet property-sheet-id="cui-p-1" property-sheet-type="subset" send-type="none" minsubsetsize="0" maxsubsetsize="1"> <property-sheet property-sheet-id="cui-p0" caption="Modify default configuration" property-sheet-type="set-element" send-type="none"> <property-sheet property-sheet-id="cui-p15" caption="Prune at % of features" property-sheet-type="numeric" send-type="attribute" send-name="cui-pr-percentage-of-features" from="20" to="100" step="5" send-value="70"/> <property-sheet property-sheet-id="cui-p1" property-sheet-type="subset" send-type="none" minsubsetsize="1" maxsubsetsize="4"> <property-sheet property-sheet-id="cui-p12" send-boolean-inverted="yes" caption="Colour blocks" property-sheet-type="set-element" send-type="attribute" send-name="cui-block-color-blocks" send-value="yes"/> <property-sheet property-sheet-id="cui-p14" send-boolean-inverted="yes" caption="Gabor blocks" property-sheet-type="set-element" send-type="attribute" send-name="cui-block-texture-blocks" send-value="yes"/> <property-sheet property-sheet-id="cui-p13" send-boolean-inverted="yes" caption="Gabor histogram" property-sheet-type="set-element" send-type="attribute" send-name="cui-block-texture-histogram" send-value="yes"/> <property-sheet property-sheet-id="cui-p11" send-boolean-inverted="yes" caption="Colour histogram" property-sheet-type="set-element" send-type="attribute" send-name="cui-block-color-histogram" send-value="yes"/> </property-sheet> </property-sheet> </property-sheet>

Each element is identified using an id (this is not used in the current MRML clients, but it's potentially very useful). Each property sheet item has a type. It is the choice of the implementer how to display such types. [NOTE: FOR THE MOMENT, I REFER YOU TO THE MRML SPECIFICATION WHICH CAN BE DOWNLOADED ON . I hope to include the relevant parts into this document soon. Presently, some chapter about adding new collections seem to me more important.]

query-paradigm-list and allows-children

These two tags work exactly as described in the part about collections. The evident use of these tags is to make algorithms use only collections with matchin query-paradigm-list, and children with a matching query-paradigm-list contained in the allows-children tags. "Good" clients such as SnakeCharmer will propose only algorithm-collection combinations that are allowed by the query-paradigm-list.

For "legacy" reasons, an empty or nonexsisting allows-children tag matches everything.

Assembling everything: what happens during configuration

I've just described the building blocks of configuration, in this section I will give a summary of what happens during configuration, intended to allow you to skip the section about adding query engines to the GIFT if you are not interested in doing so.

A <configure-session> message contains among other things an algorithm element. In the following we will call this element the in-element. In a similar way, we will call an attribute A in-element/@A The GIFT will process the in-element: Making a configuration tree: GIFT gets from its algorithm collection the <algorithm> corresponding to in-element/algorithm-type. Let us call this element the conf-element GIFT overrides all attributes in the conf-element using the corresponding attributes from the in-element If the in-element has any children that are elements of type algorithm the children of type algorithm of the conf-element are replaced by the children of the in-element The same procedure is repeated for the then-current children of the conf-element Scoping: the attribute sets of the element are merged according to the scoping rules described above Query engine construction: the resulting parse tree is visited. At each <algorithm> node encountered, a query engine is constructed. Which query engine is used is defined by the algorithm/@cui-base-type attribute. The parameter given to this query engine are all attributes of the <algorithm> element

Adding C++ query engines to the GIFT

As you have seen when playing with GIFT and SnakeCharmer, GIFT lets you open and close sessions, and lets you configure this session. As a consequence, we have to maintain the configuration for each user. To phrase it more positively: we have the possibility to learn about each user, and it's up to you to provide him with the best performance possible.

Before getting into detail, let us first define some nomenclature. In the following, I will talk about two kinds of entities Accessors: accessors are specialised on the access on the indexing structure you chose. They are intended to be stateless, if at all possible, and in any case they keep no information which might be session specific. Query processors these are the entities, that receive the queries, talk to the accessors, rank the results and give them back. They contain all the necessary information to serve the user (or, of course, pointers to this necessary information).

The GIFT features a plugin mechanism that lets you include new query engines into the GIFT without changing a single line of the interior workings of GIFT. This mechanism needs the possibility of dynamic loading on your system (GNU/Linux has this capability, for example). When doing static linking, you will have to add less than ten lines of code for each query engine used.

In the following we will describe how to make accessor and query plugins. This boils down to writing classes in C++. More simply, it is also possible to write query processors in Perl.

How to write an Accessor plugin

The class treating the collection inside the GIFT is the CAccessor class, and it's descendants. The goal of CAccessor is to handle the access to a collection. The accessor is not supposed to do any learning, nothing fancy. It is supposed to provide the query processors with the necessary access functions like giving the features that belong to a given image, and giving a random list of images. In the following we will treat a small example. If you are interested in this, please consult the documentation generated by doxygen to find out more.

libGIFTAcHierarchy: a simple hierarchy accessor

Our example is in the directory libGIFTAcHierarchy. Please look at the name: lib: it's a library GIFT: it's for the GIFT Ac: it's an accessor Hierarchy: it's an accessor for accessing hierarchy . The simple plugin manager I wrote will scan the $(libdir), i.e. the directory in which GIFT installs it's libraries (typically either /usr/local/lib or PREFIX/lib, where PREFIX is the path you chose when running ./configure --prefix PREFIX). Each file whose name starts with "libGIFTAc" and which ends with ".so" will be tested for correct plugin behaviour. How this works, will be described below.

In libGIFTAcHierarchy/cc, you will find three *.cc files: plug_in_fo.cc: this file contains the plugin-information about this class. CAFHierarchy.cc: the filename indicates that the class that is defined in this file is inherited from CAccessorFactory. This class is what's used when we are linking statically. CAcHierarchy.cc: the filename tells us that the class defined in this file is inherited from CAccessor. This class does the real work.

plug_in_fo.cc

plug_in_fo.cc contains two functions, libGIFTAcHierarchy_getClassName, and libGIFTAcHierarchy_makeAccessor. Please note: the prefix of the function names, (i.e. libGIFTAcHierarchy) is the same as the name of the library. If this is not the case, the plugin is not recognized. Make sure both functions are linked using C linking (extern "C"). Otherwise, C++ name mangling gets in our way.

The name returned by libGIFTAcHierarchy_getClassName() has to be unique. No other GIFT plugin should return the the same name for getClassName. If encountering the same name twice, the GIFT exits on startup.

libGIFTAcHierarchy_getClassName() just returns an accesor of the desired type (CAcHierarchy). The parameter taken by this function is the same as any CAccessor constructor. More to this in one of the next sections.

CAFHierarchy

This does essentially the same as plug_in_fo.cc. It's just expressed in C++, inheriting from CAccessorFactory.cc . If you want to provide the opportunity to link your accessor statically to the GIFT, you need to put a line like (new CAFHierarchy->registerFactory(*this)) into libMRML/cc/CAccessorFactoryContainer.cc. In the constructor there are enough lines to "inspire" you how to add your new line. Of course, there have to be some #ifdef to make sure that there are no conflicts between static and dynamic linking. You have to make sure that the GIFT never tries both.

CAcHierarchy.cc and its <collection> element

This file contains the accessor. The real stuff. This accessor adresses the case that you have some sort of hierarchy defined over your image collection. Let's say you did some clustering on different levels, and you want to have a query engine which displays the cluster centers at each level.

For moving in the hierarchy, you need some state. The system has to know where you are. However, this is not the work of the accessor. The accessor is just going to tell us how to get from one position within the hierarchy to another position within the hierarchy.

To summarise what this accessor is doing: on initialisation, it reads the hierarchy description from an XML file. Almost all the functions of this accessor are done for performing this task. The only function which is actually used during querying is the getChildren function, which returns the child nodes for a given state. I do not want to go into the details of the inner workings of this accessor. This accessor is better described in the doxygen-generated documentation (you find it in Doc/autoDoc/HTML).

What is interesting here, is rather the configuration aspect. How does the accessor know how to configure itself?. This is very simple: the only parameter to the constructor of any accessor, is an CXMLElement. CXMLElement is a class for XML parse trees that contain all nodes and attributes contained in an XML element. The XML element given to your accessor (in this case to the CAcHierarchy accessor) on construction is exactly the <collection> element in the gift-config.mrml file that has the collection-id as choosen by the user. This means, any attribute you add to the gift-config file, is directly accessible by your accessor. In our case the will just take two attributes of the collection element and combine them to the file name from which the hierarchy file will be loaded: init(inCollectionElement .stringReadAttribute(mrml_const::cui_base_dir).second +inCollectionElement .stringReadAttribute(mrml_const::cui_hierarchy_file_location).second); The attribues are read using the stringReadAttribute function (to be found in the doxygen documentation of CXMLElement). mrml_const::cui_base_dir and mrml_const::cui_hierarchy_file_location are string constants which correspond to "cui-base-dir" and "cui-hierarchy-file" respectively. These string constants are extracted from the MRML DTD and converted to C++ constants, in order to make typographical errors detectable for the compiler.

The hierarchy file loaded by the init function contains all necessary information to set up the hierarchy, in particular, it contains also the URLs of theimagaes present in the collection.

Some summarizing remarks Typing

Query engines have to be implemented in a class that inherits from CAccessor by single inheritance (to allow safe downcasting).

How to obtain parameters

The GIFT provides your accessor with the parse tree containing the collection XML element corresponding in gift-config.mrml to the collection you want to access using the accessor. It's your responsability to get from this XML element the information you need. It's also your reponsability to put the information into the configuration file, first. An example how this can be done is gift-add-collection.pl which is used to add collections that are indexed in an inverted file.

Administrative code

The fact that your accessor will be used as a plugin, forces you to provide a plug_in_fo.cc file, containing the functions libGIFTAcAndYouChooseTheRestOfTheName_getClassName, libGIFTAcAndYouChooseTheRestOfTheName_makeAccessor. If you want to make your plugin work also with static linking, (at least currently) you will have to add also an accessor factory class that makes instances of your accessor.

Interfacing with query engines:

The kernel of the GIFT does not know anything about your query processor. Which functions your query processor is going to use, is already within the responsibility of the query processor designer.

Accessor lifecycle

The accessor is constructed when the first query processor requests a given collection and a given accesors, and it is typically shared by multipe query engines. The accessor is destroyed when the last query engine needing the accessor is destroyed.

Makefiles

All GNU tools are configured using GNU autoconf or automake (actually, this is a requirement for getting accepted as a GNU package). This means, the Makefiles are generated during a run of ./configure. So: never touch Makefiles, always use Makefile.ams. I suggest getting inspired by the different Makefile.ams as well as configure.in. Look at the last few lines of ./configure.in (the AC_OUTPUT instruction) Makefile.am libGIFTAcHierarchy/Makefile.am libGIFTAcHierarchy/cc/Makefile.am

How to write an Query Proccessor plugin

The class processing queries inside the GIFT is the CQuery class, and it's descendants. The query processor contains all the intelligence neede for processing queries. In this section we will continue the small hierarchy query example. If you are interested in this, please consult the documentation generated by doxygen to find out more. As you probably noticed, this is heavily cut and pasted from the previous section. This is done to give save work and to keep the structure so similar that you can spot the differences easily.

libGIFTQuHierarchy: browsing fixed hierarchies

Our example is in the directory libGIFTQuHierarchy. Please look at the name: lib: it's a library GIFT: it's for the GIFT Qu: it's a Query processor Hierarchy: it's an query processor for hierarchies . The simple plugin manager I wrote will scan the $(libdir), i.e. the directory in which GIFT installs it's libraries (typically either /usr/local/lib or PREFIX/lib, where PREFIX is the path you chose when running ./configure --prefix PREFIX). Each file whose name starts with "libGIFTQu" and which ends with ".so" will be tested for correct plugin behaviour. How this works, will be described below.

In libGIFTQuHierarchy/cc, you will find three *.cc files: plug_in_fo.cc: this file contains the plugin-information about this class. CQHierarchy.cc: the filename tells us that the class defined in this file is inherited from CQuery. This class does the real work.

plug_in_fo.cc

This works exactly as for accessors. The only difference is that on construction, CQuery needs other parameters than CAccessor.

plug_in_fo.cc contains two functions, libGIFTQuHierarchy_getClassName, and libGIFTQuHierarchy_makeQuery. Please note: the prefix of the function names, (i.e. libGIFTQuHierarchy) is the same as the name of the library. If this is not the case, the plugin is not recognized. Make sure both functions are linked using C linking (extern "C"). Otherwise, C++ name mangling gets in our way.

The name returned by libGIFTQuHierarchy_getClassName() has to be unique. No other GIFT Query plugin should return the the same name for getClassName. If encountering the same name twice, the GIFT exits on startup.

libGIFTQuHierarchy_makeQuery() just returns a query engine of the desired type (CAcHierarchy). The parameter taken by this function is the same as any CQuery constructor. More to this in one of the next sections.

Static linking

If you want to enable static linking for your query engine you have to add a line to libMRML/cc/CBaseTypeFactory.cc.

The same rules apply as for adding something to CAccessorFactoryCollection.cc

CQHierarchy.cc

This file contains the hierarchy browsing engine.

The query processor itself

It does very little, as you can see in the query processing function, fastQuery. It maintains the current path and implements move operations. The most complex in this query processor are the loops that scan the input parameter (the CXMLElement inQuery) for useful parameters. Please consult the appendix and the doxygen-generated documentation for information about how to use the class CXMLElement. The documentation in the implementation of the CQHierarchy should also provide some help.

As a general note, the functions fastQuery and query receive as parameter the contents of the query-step MRML element. The comments in the function fastQuery provide useful information on how this information can be used.

Now, let us focus on the construction process. There are two routines you typically will implement. The constructor (CQHierarchy::CQHierarchy in this case) and the setAlgorithm function.

The constructor

The constructor calls the constructor of CQuery from which it inherits. The CQuery::CQuery constructur sets mProxy accordingly (as an aside, this is where the parameter inAccessorCollection is necessary). mProxy is really an open-close administrator for collections. It makes sure that the query engine is finding a well-configured collection with the right type. The mProxy->openAccessor opens the collection using a CAcHierarchy accessor. So we see, which accessor is used is the choice of the query engine. Of course, CQHierarchy could make use of the inAlgorithm parameter. However, in this simple case, this is not necessary.

setAlgorithm

Presently, if a session received a <configure-session> message, it is completely reconfigured. This means, the whole tree of query engines is rebuilt. setAlgorithm is a function which was made for reconfiguring sessions. It is not used yet, however, this is intended for the future.

In our case, this function does nothing but close the old accessor and open a new one, if the collection ID changes (as compared to the previous configuration)

Some summarizing remarks Typing

Query engines have to be implemented in a class that inherits from CQuery by single inheritance (to allow safe downcasting).

How to obtain parameters

The GIFT provides your accessor with the parse tree containing the algorithm XML element. This is built from components that are specified in gift-config.mrml. The whole process has been described above. It's your responsability to get from this XML element the information you need. It's also your reponsability to put the information into the configuration file, first.

Administrative code

The fact that your query engine will be used as a plugin, forces you to provide a plug_in_fo.cc file, containing the functions libGIFTAcAndYouChooseTheRestOfTheName_getClassName, libGIFTAcAndYouChooseTheRestOfTheName_makeQuery. If you want to make your plugin work also with static linking, (at least currently) you will have to add a line into libMRML/cc/CBaseTypeFactory that instantiates your query engine.

Interfacing with query engines:

The kernel of the GIFT does not know anything about your query processor. Which functions your query processor is going to use, is already within the responsibility of the query processor designer.

CQuery lifecycle

The query processor is constructed when a <configure-session> message is received. Each session owns its own tree of query processors. A tree of query processors is destroyed, when the next <configure-session> message is received for the same session.

Makefiles

All GNU tools are configured using GNU autoconf or automake (actually, this is a requirement for getting accepted as a GNU package). This means, the Makefiles are generated during a run of ./configure. So: never touch Makefiles, always use Makefile.ams. I suggest getting inspired by the different Makefile.ams as well as configure.in. Look at the last few lines of ./configure.in (the AC_OUTPUT instruction) Makefile.am libGIFTQuHierarchy/Makefile.am libGIFTQuHierarchy/cc/Makefile.am

Adding Perl query engines to the GIFT

Perl being my favourite language for prototyping, I found it desirable to be able to include query engines into the gift that are implemented in Perl. In my eyes, this has two major positive consequences: You are now able to write prototypes in Perl. Perl/GIFT interface is very simple, yet powerful, giving you all information a C++ query engine would get. This makes it very simple for you to make the step from your private prototype to the web demo. Perl is very popular as a glue language. Assuming you have a content-based tool which is already running, and you want to use the GIFT/SnakeCharmer infrastructure, the GIFT/Perl link will get you interfaced very quickly. Thes are the "plusses", and in my eyes, the drawbacks are not important: If I had known more about Perl from the start, the C++ side of the interface would be less complex. But I guess you don't care as the Perl side would be used in the same way anyway. You cannot assume Perl to threadsafe. As a consequence, query processing of Perl queries parallel and quasi-parallel to other (Perl or non-Perl) queries is impossible. That is, if you want speed, you have to do things in C++. However, this insight is not new and applies to about any application. The only way I made things work without memory leaks was to load all scripts involved on instantiation of the first Perl query. The Perl interpreter is stays instantiated at all times. This makes things less dynamic as I would like them to be, but it's not very disturbing in daily work. All in all, I have found the GIFT/Perl link an extremely useful tool. Now, let's go a bit into detail.

C++-side of the Perl/GIFT interface

The C++-side of the interface is implemented in the CQPerl class. It does the following things: On construction, it constructs a the Perl interpreter (if this has not been done yet by another CQPerl object) it loads the file given in the attribute algorithm/@cui-perl-script-file into the new interpreter (only if this interpreter has been newly constructed). in any case, it will construct a Perl object (PO in the following)of the class given by algorithm/@cui-perl-package The complete <algorithm> element is given to the PO calling the PO's setAlgorithm method. The complete <collection> element is given to the PO calling the PO's setCollection method. The PO is invited to use the configuration data we just gave to it: we call the configure method on the PO. If the function query is called on the CQPerl object, it will call the function given by algorithm/cui-perl-query-function on the PO. Currently, this value should stay fixed to processGIFTQueryCall. Otherwise you would have to change the CGIFTLink class. If an empty query is received, the function the CQPerl object will call the function given by algorithm/cui-perl-random-query-function on the PO. Currently, this value should stay fixed to processGIFTRandomQueryCall. Otherwise you would have to change the CGIFTLink class.

The Perl side of the GIFT/Perl interface

The Perl side of the interface is quickly described. But before that we need just a couple of definitions. Let us call PO->query the function that will be provided by you to process queries. It receives as a parameter a pointer to self (i.e. the PO), as well as a reference to a <query-step> MRML element. It gives back a <query-result> MRML element in exactly the same representation which will be described below. PO->randomQuery is the function that will be provided by you to process queries for a given number of random elements from the collection. It receives exactly the same parameters as PO->query. It returns its result in the same manner. configure does not receive any parameters, however, it can expect $self->{configure} and $self->{algorithm} to be set. It does not return any value at present. Please note, that (at the current state) if you call die in your Perl script, the GIFT dies, too. So please recover gracefully, except for errors that need to be noticed (e.g. misconfiguration).

Important files

If you want to add your own query engine written in Perl, I would suggest you to look at scripts/perl/CGIFTLink.pre-pm There is quite a long POD section, which you can turn in a man page using pod2man. The code could also be interesting for its simplicity. (You can also look at processGIFTQueryCall, if you like, but be warned that one could do these things more beautifully.) scripts/perl/CGLDistanceMatrix.pre-pm This is a query processor that reads a pre-calculated distance matrix and uses it to process next-neighbour queries by simple lookup. And, as always gift-config.mrml

Processing MRML using string constants

It becomes clear very quickly that in processing XML you are often using string constants in situations, in which you would use variables in C++, stringReadAttribute("algorithm-id") for retrieving an attribute with the name "algorithm-id" from an XML element. This is convenient and simple, however, the compiler looses ability to do type checking for you, and you are forced to have changes in the MRML DTD being followed by the same changes in the program.

This problem is adressed by a tool, that automatically generates the files libMRML/cc/mrml_const.cc libMRML/include/mrml_const.h when make is used in the dtd/ directory. These files contain the declaration and the definition of a C++-class named mrml_const that contains static const members. Each of these member is named as an element/attribute of the MRML DTD, and the name of the string constant is closely related to the value of the string constant. All that is changed is that a "-" will be replaced by a "_". For example, "algorithm-id" becomes "mrml_const::algorithm_id". That's more verbose than the string-based notation ("algorithm-id") however, now the compiler can report your typographical errors.

So: if you use any new MRML tags, Add the tags to the MRML DTD in dtd/mrml.dtd Call the makefile in dtd Implement these tags in your query processors and accesssors using #include "mrml.h"

CXMLElement

Please browse the doxygen-generated documentation

An example gift-config.mrml

<mrml> <cui-configuration> <algorithm-list> <!--COMMENT The new definiton of the default algorithm The default algorithm performs in fact a meta query of several inverted file queries. Each sub-query of the meta query is specialised on one of the feature groups Color histogram Color block Gabor histogram Gabor block Each one of them is pruned in adifferent way. (this is the goal of the operation) --> <algorithm algorithm-id="a-structured-annotation" algorithm-type="a-structured-annotation" algorithm-name="Structured_Annotation.pl" collection-id="c-17-44-14-22-8-100-5-265-0" cui-base-type="perl" cui-perl-script-file="/home/muellerw/generate-template/all-known-mods.pl" cui-perl-query-function="processGIFTQueryCall" cui-perl-package="CVLFast" cui-perl-random-function="processGIFTRandomQueryCall" cui-weighting-function="ClassicalIDF" > <query-paradigm-list> <query-paradigm type="structured-annotation"/> </query-paradigm-list> <allows-children> <query-paradigm-list> <query-paradigm type="NONE"/> </query-paradigm-list> </allows-children> <property-sheet property-sheet-id="cui-p-1" property-sheet-type="subset" send-type="none" minsubsetsize="0" maxsubsetsize="1"> <property-sheet property-sheet-id="cui-p0" caption="Modify default configuration" property-sheet-type="set-element" send-type="none"/> </property-sheet> </algorithm> <algorithm algorithm-id="a-quickhunter" algorithm-type="a-quickhunter" algorithm-name="QuickHunter" collection-id="c-17-44-14-22-8-100-5-265-0" cui-base-type="perl" cui-perl-script-file= "/home/muellerw/generate-template/all-known-mods.pl" cui-perl-package="CVLQuickHunter" cui-perl-query-function="processGIFTQueryCall" cui-perl-random-function="processGIFTRandomQueryCall" cui-weighting-function="ClassicalIDF" > <query-paradigm-list> <query-paradigm type="distance-matrix"/> </query-paradigm-list> <property-sheet property-sheet-id="cui-p-1" property-sheet-type="subset" send-type="none" minsubsetsize="0" maxsubsetsize="1"> <property-sheet property-sheet-id="cui-p0" caption="Modify default configuration" property-sheet-type="set-element" send-type="none"/> </property-sheet> </algorithm> <algorithm algorithm-id="a-gift-link-demo" algorithm-type="a-gift-link-demo" algorithm-name="Gift-Link-Demo" collection-id="c-17-44-14-22-8-100-5-265-0" cui-base-type="perl" cui-perl-script-file= "/home/muellerw/generate-template/all-known-mods.pl" cui-perl-package="CGIFTLink" cui-perl-query-function="processGIFTQueryCall" cui-perl-random-function="processGIFTRandomQueryCall" cui-weighting-function="ClassicalIDF" > <query-paradigm-list> <query-paradigm type="distance-matrix"/> </query-paradigm-list> <property-sheet property-sheet-id="cui-p-1" property-sheet-type="subset" send-type="none" minsubsetsize="0" maxsubsetsize="1"> <property-sheet property-sheet-id="cui-p0" caption="Modify default configuration" property-sheet-type="set-element" send-type="none"/> </property-sheet> </algorithm> <!-- cui-pr-modulo="4" cui-pr-modulo-class="0" --> <algorithm algorithm-id="adefault" algorithm-type="adefault" algorithm-name="Classical IDF" collection-id="c-17-44-14-22-8-100-5-265-0" cui-block-color-histogram="no" cui-block-color-blocks="no" cui-block-texture-histogram="no" cui-block-texture-blocks="no" cui-base-type="inverted_file" cui-weighting-function="ClassicalIDF" > <query-paradigm-list> <query-paradigm type="inverted-file"/> </query-paradigm-list> <property-sheet property-sheet-id="cui-p-1" property-sheet-type="subset" send-type="none" minsubsetsize="0" maxsubsetsize="1"> <property-sheet property-sheet-id="cui-p0" caption="Modify default configuration" property-sheet-type="set-element" send-type="none"> <property-sheet property-sheet-id="cui-p15" caption="Prune at % of features" property-sheet-type="numeric" send-type="attribute" send-name="cui-pr-percentage-of-features" from="20" to="100" step="5" send-value="70"/> <property-sheet property-sheet-id="cui-p1" property-sheet-type="subset" send-type="none" minsubsetsize="1" maxsubsetsize="4"> <property-sheet property-sheet-id="cui-p12" send-boolean-inverted="yes" caption="Colour blocks" property-sheet-type="set-element" send-type="attribute" send-name="cui-block-color-blocks" send-value="yes"/> <property-sheet property-sheet-id="cui-p14" send-boolean-inverted="yes" caption="Gabor blocks" property-sheet-type="set-element" send-type="attribute" send-name="cui-block-texture-blocks" send-value="yes"/> <property-sheet property-sheet-id="cui-p13" send-boolean-inverted="yes" caption="Gabor histogram" property-sheet-type="set-element" send-type="attribute" send-name="cui-block-texture-histogram" send-value="yes"/> <property-sheet property-sheet-id="cui-p11" send-boolean-inverted="yes" caption="Colour histogram" property-sheet-type="set-element" send-type="attribute" send-name="cui-block-color-histogram" send-value="yes"/> </property-sheet> </property-sheet> </property-sheet> </algorithm><!-- adefault --> <!-- cui-pr-modulo="2" cui-pr-modulo-class="0"--> <algorithm algorithm-id="a-sepnorm" algorithm-type="a-sepnorm" algorithm-name="Separate Normalisation" collection-id="c-17-44-14-22-8-100-5-265-0" cui-block-color-histogram="no" cui-block-color-blocks="no" cui-block-texture-histogram="no" cui-block-texture-blocks="no" cui-base-type="multiple" cui-weighting-function="ClassicalIDF" > <algorithm algorithm-id="sub1" algorithm-type="sub1" algorithm-name="sub1" cui-block-color-blocks="yes" cui-block-texture-histogram="yes" cui-block-texture-blocks="yes" cui-base-type="inverted_file" /> <algorithm algorithm-id="sub2" algorithm-type="sub2" algorithm-name="sub2" cui-block-color-histogram="yes" cui-block-texture-histogram="yes" cui-block-texture-blocks="yes" cui-base-type="inverted_file" /> <algorithm algorithm-id="sub3" algorithm-type="sub3" algorithm-name="sub3" cui-block-color-histogram="yes" cui-block-color-blocks="yes" cui-block-texture-blocks="yes" cui-base-type="inverted_file" /> <algorithm algorithm-id="sub4" algorithm-type="sub4" algorithm-name="sub4" cui-block-color-histogram="yes" cui-block-color-blocks="yes" cui-block-texture-histogram="yes" cui-base-type="inverted_file" /> <query-paradigm-list> <query-paradigm type="inverted-file"/> </query-paradigm-list> <property-sheet property-sheet-id="cui-p-1" property-sheet-type="subset" send-type="none" minsubsetsize="0" maxsubsetsize="1"> <property-sheet property-sheet-id="cui-p0" caption="Modify default configuration" property-sheet-type="set-element" send-type="none"> <property-sheet property-sheet-id="cui-p15" caption="Prune at % of features" property-sheet-type="numeric" send-type="attribute" send-name="cui-pr-percentage-of-features" from="20" to="100" step="5" send-value="70"/> <property-sheet property-sheet-id="cui-p1" property-sheet-type="subset" send-type="none" minsubsetsize="1" maxsubsetsize="4"> <property-sheet property-sheet-id="cui-p12" send-boolean-inverted="yes" caption="Colour blocks" property-sheet-type="set-element" send-type="attribute" send-name="cui-block-color-blocks" send-value="yes"/> <property-sheet property-sheet-id="cui-p14" send-boolean-inverted="yes" caption="Gabor blocks" property-sheet-type="set-element" send-type="attribute" send-name="cui-block-texture-blocks" send-value="yes"/> <property-sheet property-sheet-id="cui-p13" send-boolean-inverted="yes" caption="Gabor histogram" property-sheet-type="set-element" send-type="attribute" send-name="cui-block-texture-histogram" send-value="yes"/> <property-sheet property-sheet-id="cui-p11" send-boolean-inverted="yes" caption="Colour histogram" property-sheet-type="set-element" send-type="attribute" send-name="cui-block-color-histogram" send-value="yes"/> </property-sheet> </property-sheet> </property-sheet> </algorithm><!-- adefault --> </algorithm-list> <collection-list listid="1"> <!-- automatically added by v_add_collection.pl --> <collection collection-id="c-17-44-14-22-8-100-5-265-0" collection-name="minidb" cui-number-of-images="10" cui-base-dir="/home/muellerw/gift-indexing-data/minidb/" cui-inverted-file-location="InvertedFile.db" cui-offset-file-location="InvertedFileOffset.db" cui-feature-description-location= "InvertedFileFeatureDescription.db" cui-feature-file-location="url2fts" > <query-paradigm-list> <query-paradigm type="inverted-file"/> </query-paradigm-list> </collection> <!-- automatically added by v_add_collection.pl --> <collection collection-id="TSR500" collection-name="TSR500" cui-number-of-images="506" cui-base-dir="/home/muellerw/gift-indexing-data/TSR500/" cui-inverted-file-location="InvertedFile.db" cui-offset-file-location="InvertedFileOffset.db" cui-feature-description-location= "InvertedFileFeatureDescription.db" cui-feature-file-location="url2fts" > <query-paradigm-list> <query-paradigm type="structured-annotation"/> <query-paradigm type="inverted-file"/> <query-paradigm type="distance-matrix"/> </query-paradigm-list> </collection> <!-- automatically added by v_add_collection.pl --> <collection collection-id="c-57-23-13-4-9-100-3-277-0" collection-name="Lausanne6100" cui-number-of-images="6100" cui-base-dir="/home/muellerw/gift-indexing-data/Lausanne6100/" cui-inverted-file-location="InvertedFile.db" cui-offset-file-location="InvertedFileOffset.db" cui-feature-description-location= "InvertedFileFeatureDescription.db" cui-feature-file-location="url2fts" > <query-paradigm-list> <query-paradigm type="inverted-file"/> </query-paradigm-list> </collection> <!-- xxyx gift-add-collection xyxx DEPENDS ON THIS LINE --> </collection-list> </cui-configuration> </mrml> <!-- this is for xemacs to make it start up in the right mode. it does the right thing, but complains --> <!-- ;;; Local Variables: *** --> <!-- ;;; mode: sgml *** -->

Hacking Viper

Viper is GIFT's main query engine the one that gets used and configured out-of-the box. This section is addressing question, on how to extend Viper for testing your own feature sets

gift-0.1.14/Doc/GIFTClassGraph/0000777000175200001440000000000010153634072012740 500000000000000gift-0.1.14/Doc/GIFTClassGraph/CVS/0000777000175200001440000000000010153634072013373 500000000000000gift-0.1.14/Doc/GIFTClassGraph/CVS/Root0000644000175200001440000000005410153634072014154 00000000000000muellerw@subversions.gnu.org:/cvsroot/gift/ gift-0.1.14/Doc/GIFTClassGraph/CVS/Repository0000644000175200001440000000003010153634072015402 00000000000000gift/Doc/GIFTClassGraph gift-0.1.14/Doc/GIFTClassGraph/CVS/Entries0000644000175200001440000000024610153634072014645 00000000000000/GIFTClassGraph.eps/1.1.1.1/Mon Jul 22 07:09:28 2002// /GIFTClassGraph.fig/1.1.1.1/Mon Jul 22 07:09:28 2002// /GIFTClassGraph.ps/1.1.1.1/Mon Jul 22 07:09:28 2002// D gift-0.1.14/Doc/GIFTClassGraph/GIFTClassGraph.dfPackage0000644000175200001440000000036510153634072017150 00000000000000package ids7ubd39zkzn5d39zydkv; /** @version 2.0 @physicalPackage @__modelType diagram */ class diagram { }/** @__tags @shapeType ClassDiagram */ class __tags { }/** @__options */ class __options { }/** @__positions */ class __positions { }gift-0.1.14/Doc/GIFTClassGraph/GIFTClassGraph.ps0000644000175200001440000002372110153634072015726 00000000000000%!PS-Adobe-2.0 %%Title: GIFTClassGraph.ps %%Creator: fig2dev Version 3.2 Patchlevel 1 %%CreationDate: Thu Oct 7 10:59:14 1999 %%For: muellerw@pc7143 (Wolfgang Mueller) %%Orientation: Landscape %%BoundingBox: 30 73 565 768 %%Pages: 1 %%BeginSetup %%IncludeFeature: *PageSize A4 %%EndSetup %%Magnification: 1.0000 %%EndComments /$F2psDict 200 dict def $F2psDict begin $F2psDict /mtrx matrix put /col-1 {0 setgray} bind def /col0 {0.000 0.000 0.000 srgb} bind def /col1 {0.000 0.000 1.000 srgb} bind def /col2 {0.000 1.000 0.000 srgb} bind def /col3 {0.000 1.000 1.000 srgb} bind def /col4 {1.000 0.000 0.000 srgb} bind def /col5 {1.000 0.000 1.000 srgb} bind def /col6 {1.000 1.000 0.000 srgb} bind def /col7 {1.000 1.000 1.000 srgb} bind def /col8 {0.000 0.000 0.560 srgb} bind def /col9 {0.000 0.000 0.690 srgb} bind def /col10 {0.000 0.000 0.820 srgb} bind def /col11 {0.530 0.810 1.000 srgb} bind def /col12 {0.000 0.560 0.000 srgb} bind def /col13 {0.000 0.690 0.000 srgb} bind def /col14 {0.000 0.820 0.000 srgb} bind def /col15 {0.000 0.560 0.560 srgb} bind def /col16 {0.000 0.690 0.690 srgb} bind def /col17 {0.000 0.820 0.820 srgb} bind def /col18 {0.560 0.000 0.000 srgb} bind def /col19 {0.690 0.000 0.000 srgb} bind def /col20 {0.820 0.000 0.000 srgb} bind def /col21 {0.560 0.000 0.560 srgb} bind def /col22 {0.690 0.000 0.690 srgb} bind def /col23 {0.820 0.000 0.820 srgb} bind def /col24 {0.500 0.190 0.000 srgb} bind def /col25 {0.630 0.250 0.000 srgb} bind def /col26 {0.750 0.380 0.000 srgb} bind def /col27 {1.000 0.500 0.500 srgb} bind def /col28 {1.000 0.630 0.630 srgb} bind def /col29 {1.000 0.750 0.750 srgb} bind def /col30 {1.000 0.880 0.880 srgb} bind def /col31 {1.000 0.840 0.000 srgb} bind def end save 11.0 60.5 translate 90 rotate 1 -1 scale /cp {closepath} bind def /ef {eofill} bind def /gr {grestore} bind def /gs {gsave} bind def /sa {save} bind def /rs {restore} bind def /l {lineto} bind def /m {moveto} bind def /rm {rmoveto} bind def /n {newpath} bind def /s {stroke} bind def /sh {show} bind def /slc {setlinecap} bind def /slj {setlinejoin} bind def /slw {setlinewidth} bind def /srgb {setrgbcolor} bind def /rot {rotate} bind def /sc {scale} bind def /sd {setdash} bind def /ff {findfont} bind def /sf {setfont} bind def /scf {scalefont} bind def /sw {stringwidth} bind def /tr {translate} bind def /tnt {dup dup currentrgbcolor 4 -2 roll dup 1 exch sub 3 -1 roll mul add 4 -2 roll dup 1 exch sub 3 -1 roll mul add 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} bind def /shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul 4 -2 roll mul srgb} bind def /reencdict 12 dict def /ReEncode { reencdict begin /newcodesandnames exch def /newfontname exch def /basefontname exch def /basefontdict basefontname findfont def /newfont basefontdict maxlength dict def basefontdict { exch dup /FID ne { dup /Encoding eq { exch dup length array copy newfont 3 1 roll put } { exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall newfont /FontName newfontname put newcodesandnames aload pop 128 1 255 { newfont /Encoding get exch /.notdef put } for newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat newfontname newfont definefont pop end } def /isovec [ 8#200 /grave 8#201 /acute 8#202 /circumflex 8#203 /tilde 8#204 /macron 8#205 /breve 8#206 /dotaccent 8#207 /dieresis 8#210 /ring 8#211 /cedilla 8#212 /hungarumlaut 8#213 /ogonek 8#214 /caron 8#220 /dotlessi 8#230 /oe 8#231 /OE 8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling 8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis 8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot 8#255 /endash 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus 8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph 8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine 8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf 8#276 /threequarters 8#277 /questiondown 8#300 /Agrave 8#301 /Aacute 8#302 /Acircumflex 8#303 /Atilde 8#304 /Adieresis 8#305 /Aring 8#306 /AE 8#307 /Ccedilla 8#310 /Egrave 8#311 /Eacute 8#312 /Ecircumflex 8#313 /Edieresis 8#314 /Igrave 8#315 /Iacute 8#316 /Icircumflex 8#317 /Idieresis 8#320 /Eth 8#321 /Ntilde 8#322 /Ograve 8#323 /Oacute 8#324 /Ocircumflex 8#325 /Otilde 8#326 /Odieresis 8#327 /multiply 8#330 /Oslash 8#331 /Ugrave 8#332 /Uacute 8#333 /Ucircumflex 8#334 /Udieresis 8#335 /Yacute 8#336 /Thorn 8#337 /germandbls 8#340 /agrave 8#341 /aacute 8#342 /acircumflex 8#343 /atilde 8#344 /adieresis 8#345 /aring 8#346 /ae 8#347 /ccedilla 8#350 /egrave 8#351 /eacute 8#352 /ecircumflex 8#353 /edieresis 8#354 /igrave 8#355 /iacute 8#356 /icircumflex 8#357 /idieresis 8#360 /eth 8#361 /ntilde 8#362 /ograve 8#363 /oacute 8#364 /ocircumflex 8#365 /otilde 8#366 /odieresis 8#367 /divide 8#370 /oslash 8#371 /ugrave 8#372 /uacute 8#373 /ucircumflex 8#374 /udieresis 8#375 /yacute 8#376 /thorn 8#377 /ydieresis] def /Times-Roman /Times-Roman-iso isovec ReEncode /$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def /$F2psEnd {$F2psEnteredState restore end} def %%EndProlog $F2psBegin 10 setmiterlimit n -1000 9787 m -1000 -1000 l 12228 -1000 l 12228 9787 l cp clip 0.06299 0.06299 sc %%Page: 1 1 % Arc 7.500 slw gs n 2700.0 7875.0 225.0 180.0 0.0 arc gs col0 s gr gr % Arc gs n 4501.0 4275.0 225.0 90.0 -90.0 arc gs col0 s gr gr % Arc gs n 5625.0 1350.0 225.0 90.0 -90.0 arc gs col0 s gr gr % Arc gs n 2025.0 6075.0 225.0 180.0 0.0 arc 2025.0 6075.0 l 1800.0 6075.0 l gs col0 s gr gr % Arc gs n 10125.0 6300.0 225.0 -90.0 90.0 arc 10125.0 6300.0 l 10125.0 6075.0 l gs col0 s gr gr % Polyline gs clippath 3795 1695 m 3825 1575 l 3855 1695 l 3855 1560 l 3795 1560 l cp clip n 3825 1575 m 3825 2025 l gs col0 s gr gr % arrowhead n 3795 1695 m 3825 1575 l 3855 1695 l col0 s % Polyline n 4950 1350 m 5625 1350 l gs col0 s gr % Polyline n 3825 4275 m 4500 4275 l gs col0 s gr % Polyline gs clippath 2895 2820 m 2925 2700 l 2955 2820 l 2955 2685 l 2895 2685 l cp clip n 2925 2700 m 2925 3825 l gs col0 s gr gr % arrowhead n 2895 2820 m 2925 2700 l 2955 2820 l col0 s % Polyline gs clippath 3570 4620 m 3600 4500 l 3630 4620 l 3630 4485 l 3570 4485 l cp clip n 3600 4500 m 3600 5625 l gs col0 s gr gr % arrowhead n 3570 4620 m 3600 4500 l 3630 4620 l col0 s % Polyline n 2700 7200 m 2700 7875 l gs col0 s gr % Polyline n 2250 8100 m 2250 7875 l 2700 7875 l gs col0 s gr % Polyline n 3150 8100 m 3150 7875 l 2700 7875 l gs col0 s gr % Polyline n 225 8100 m 2475 8100 l 2475 8775 l 225 8775 l cp gs col0 s gr % Polyline n 2925 8100 m 5175 8100 l 5175 8775 l 2925 8775 l cp gs col0 s gr % Polyline n 1575 6525 m 3825 6525 l 3825 7200 l 1575 7200 l cp gs col0 s gr % Polyline n 3150 5625 m 5400 5625 l 5400 6300 l 3150 6300 l cp gs col0 s gr % Polyline n 4951 3825 m 4501 3825 l 4501 4950 l 4951 4950 l gs col0 s gr % Polyline n 4951 4500 m 7201 4500 l 7201 5175 l 4951 5175 l cp gs col0 s gr % Polyline n 4951 3375 m 7201 3375 l 7201 4050 l 4951 4050 l cp gs col0 s gr % Polyline n 6075 900 m 5625 900 l 5625 2025 l 6075 2025 l gs col0 s gr % Polyline n 6075 1575 m 8325 1575 l 8325 2250 l 6075 2250 l cp gs col0 s gr % Polyline n 6075 450 m 8325 450 l 8325 1125 l 6075 1125 l cp gs col0 s gr % Polyline n 2700 2025 m 4950 2025 l 4950 2700 l 2700 2700 l cp gs col0 s gr % Polyline n 1575 3825 m 3825 3825 l 3825 4500 l 1575 4500 l cp gs col0 s gr % Polyline n 2700 900 m 4950 900 l 4950 1575 l 2700 1575 l cp gs col0 s gr % Polyline n 450 4725 m 2700 4725 l 2700 5400 l 450 5400 l cp gs col0 s gr % Polyline gs clippath 2220 4620 m 2250 4500 l 2280 4620 l 2280 4485 l 2220 4485 l cp clip n 2250 4500 m 2250 4725 l gs col0 s gr gr % arrowhead n 2220 4620 m 2250 4500 l 2280 4620 l col0 s % Polyline n 2025 6525 m 2025 6075 l gs col0 s gr % Polyline n 2025 5850 m 2025 5400 l gs col0 s gr % Polyline n 9675 6300 m 11025 6300 l gs col0 s gr % Polyline gs clippath 10905 7620 m 11025 7650 l 10905 7680 l 11040 7680 l 11040 7620 l cp clip n 9675 7650 m 11025 7650 l gs col0 s gr gr % arrowhead n 10905 7620 m 11025 7650 l 10905 7680 l col0 s /Times-Roman-iso ff 180.00 scf sf 1350 8550 m gs 1 -1 sc (CInvertedFileAccessor) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman-iso ff 180.00 scf sf 4050 8550 m gs 1 -1 sc (CDistanceMatrixAccessor) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman-iso ff 180.00 scf sf 2700 6975 m gs 1 -1 sc (CAcURL2FTS) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman-iso ff 180.00 scf sf 6076 4950 m gs 1 -1 sc (CIFQuickAndDirtyHunter) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman-iso ff 180.00 scf sf 7200 2025 m gs 1 -1 sc (CAlgorithmCollection) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman-iso ff 180.00 scf sf 7200 900 m gs 1 -1 sc (CAccessorCollection) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman-iso ff 180.00 scf sf 3825 2475 m gs 1 -1 sc (CSessions) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman-iso ff 180.00 scf sf 3825 1350 m gs 1 -1 sc (CSessionManager) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman-iso ff 180.00 scf sf 4275 6075 m gs 1 -1 sc (CAlgorithm) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman-iso ff 180.00 scf sf 2700 4275 m gs 1 -1 sc (CQuery) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman-iso ff 180.00 scf sf 1575 5175 m gs 1 -1 sc (CAccessor) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman-iso ff 180.00 scf sf 6076 3825 m gs 1 -1 sc (CInvertedFileQuery) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman-iso ff 180.00 scf sf 450 450 m gs 1 -1 sc (The classes used by the server, which are not "helper classes") col0 sh gr /Times-Roman-iso ff 180.00 scf sf 450 675 m gs 1 -1 sc (i.e. which have a lifespan of more than a few seconds.) col0 sh gr /Times-Roman-iso ff 180.00 scf sf 8325 6300 m gs 1 -1 sc (Pidgin-UML:) col0 sh gr /Times-Roman-iso ff 180.00 scf sf 9675 6300 m gs 1 -1 sc (a) col0 sh gr /Times-Roman-iso ff 180.00 scf sf 11025 6300 m gs 1 -1 sc (b) col0 sh gr /Times-Roman-iso ff 180.00 scf sf 9675 6975 m gs 1 -1 sc ("a inherits from b") col0 sh gr /Times-Roman-iso ff 180.00 scf sf 9675 8100 m gs 1 -1 sc ("a is contained in b") col0 sh gr $F2psEnd rs showpage gift-0.1.14/Doc/GIFTClassGraph/GIFTClassGraph.eps0000644000175200001440000001436610153634072016100 00000000000000%!PS-Adobe-2.0 EPSF-2.0 %%Title: GIFTClassGraph.eps %%Creator: fig2dev Version 3.2 Patchlevel 1 %%CreationDate: Thu Oct 7 10:48:38 1999 %%For: muellerw@pc7143 (Wolfgang Mueller) %%Orientation: Portrait %%BoundingBox: 0 0 513 535 %%Pages: 0 %%BeginSetup %%EndSetup %%Magnification: 1.0000 %%EndComments /$F2psDict 200 dict def $F2psDict begin $F2psDict /mtrx matrix put /col-1 {0 setgray} bind def /col0 {0.000 0.000 0.000 srgb} bind def /col1 {0.000 0.000 1.000 srgb} bind def /col2 {0.000 1.000 0.000 srgb} bind def /col3 {0.000 1.000 1.000 srgb} bind def /col4 {1.000 0.000 0.000 srgb} bind def /col5 {1.000 0.000 1.000 srgb} bind def /col6 {1.000 1.000 0.000 srgb} bind def /col7 {1.000 1.000 1.000 srgb} bind def /col8 {0.000 0.000 0.560 srgb} bind def /col9 {0.000 0.000 0.690 srgb} bind def /col10 {0.000 0.000 0.820 srgb} bind def /col11 {0.530 0.810 1.000 srgb} bind def /col12 {0.000 0.560 0.000 srgb} bind def /col13 {0.000 0.690 0.000 srgb} bind def /col14 {0.000 0.820 0.000 srgb} bind def /col15 {0.000 0.560 0.560 srgb} bind def /col16 {0.000 0.690 0.690 srgb} bind def /col17 {0.000 0.820 0.820 srgb} bind def /col18 {0.560 0.000 0.000 srgb} bind def /col19 {0.690 0.000 0.000 srgb} bind def /col20 {0.820 0.000 0.000 srgb} bind def /col21 {0.560 0.000 0.560 srgb} bind def /col22 {0.690 0.000 0.690 srgb} bind def /col23 {0.820 0.000 0.820 srgb} bind def /col24 {0.500 0.190 0.000 srgb} bind def /col25 {0.630 0.250 0.000 srgb} bind def /col26 {0.750 0.380 0.000 srgb} bind def /col27 {1.000 0.500 0.500 srgb} bind def /col28 {1.000 0.630 0.630 srgb} bind def /col29 {1.000 0.750 0.750 srgb} bind def /col30 {1.000 0.880 0.880 srgb} bind def /col31 {1.000 0.840 0.000 srgb} bind def end save -13.0 554.0 translate 1 -1 scale /cp {closepath} bind def /ef {eofill} bind def /gr {grestore} bind def /gs {gsave} bind def /sa {save} bind def /rs {restore} bind def /l {lineto} bind def /m {moveto} bind def /rm {rmoveto} bind def /n {newpath} bind def /s {stroke} bind def /sh {show} bind def /slc {setlinecap} bind def /slj {setlinejoin} bind def /slw {setlinewidth} bind def /srgb {setrgbcolor} bind def /rot {rotate} bind def /sc {scale} bind def /sd {setdash} bind def /ff {findfont} bind def /sf {setfont} bind def /scf {scalefont} bind def /sw {stringwidth} bind def /tr {translate} bind def /tnt {dup dup currentrgbcolor 4 -2 roll dup 1 exch sub 3 -1 roll mul add 4 -2 roll dup 1 exch sub 3 -1 roll mul add 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} bind def /shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul 4 -2 roll mul srgb} bind def /$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def /$F2psEnd {$F2psEnteredState restore end} def %%EndProlog $F2psBegin 10 setmiterlimit n -1000 9787 m -1000 -1000 l 9337 -1000 l 9337 9787 l cp clip 0.06299 0.06299 sc % Arc 7.500 slw gs n 2700.0 7875.0 225.0 180.0 0.0 arc gs col0 s gr gr % Arc gs n 4501.0 4275.0 225.0 90.0 -90.0 arc gs col0 s gr gr % Arc gs n 5625.0 1350.0 225.0 90.0 -90.0 arc gs col0 s gr gr % Arc gs n 2025.0 6075.0 225.0 180.0 0.0 arc 2025.0 6075.0 l 1800.0 6075.0 l gs col0 s gr gr % Polyline n 3825 1575 m 3825 2025 l gs col0 s gr % Polyline n 4950 1350 m 5625 1350 l gs col0 s gr % Polyline n 3825 4275 m 4500 4275 l gs col0 s gr % Polyline n 2925 2700 m 2925 3825 l gs col0 s gr % Polyline n 3600 4500 m 3600 5625 l gs col0 s gr % Polyline n 3600 7200 m 3600 7425 l gs col0 s gr % Polyline n 2700 7200 m 2700 7875 l gs col0 s gr % Polyline n 2250 8100 m 2250 7875 l 2700 7875 l gs col0 s gr % Polyline n 3150 8100 m 3150 7875 l 2700 7875 l gs col0 s gr % Polyline n 225 8100 m 2475 8100 l 2475 8775 l 225 8775 l cp gs col0 s gr % Polyline n 2925 8100 m 5175 8100 l 5175 8775 l 2925 8775 l cp gs col0 s gr % Polyline n 1575 6525 m 3825 6525 l 3825 7200 l 1575 7200 l cp gs col0 s gr % Polyline n 3150 5625 m 5400 5625 l 5400 6300 l 3150 6300 l cp gs col0 s gr % Polyline n 4951 3825 m 4501 3825 l 4501 4950 l 4951 4950 l gs col0 s gr % Polyline n 4951 4500 m 7201 4500 l 7201 5175 l 4951 5175 l cp gs col0 s gr % Polyline n 4951 3375 m 7201 3375 l 7201 4050 l 4951 4050 l cp gs col0 s gr % Polyline n 6075 900 m 5625 900 l 5625 2025 l 6075 2025 l gs col0 s gr % Polyline n 6075 1575 m 8325 1575 l 8325 2250 l 6075 2250 l cp gs col0 s gr % Polyline n 6075 450 m 8325 450 l 8325 1125 l 6075 1125 l cp gs col0 s gr % Polyline n 2700 2025 m 4950 2025 l 4950 2700 l 2700 2700 l cp gs col0 s gr % Polyline n 1575 3825 m 3825 3825 l 3825 4500 l 1575 4500 l cp gs col0 s gr % Polyline n 2700 900 m 4950 900 l 4950 1575 l 2700 1575 l cp gs col0 s gr % Polyline n 450 4725 m 2700 4725 l 2700 5400 l 450 5400 l cp gs col0 s gr % Polyline n 2250 4500 m 2250 4725 l gs col0 s gr % Polyline n 2025 6525 m 2025 6075 l gs col0 s gr % Polyline n 2025 5850 m 2025 5400 l gs col0 s gr /Times-Roman ff 180.00 scf sf 1350 8550 m gs 1 -1 sc (CInvertedFileAccessor) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman ff 180.00 scf sf 4050 8550 m gs 1 -1 sc (CDistanceMatrixAccessor) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman ff 180.00 scf sf 2700 6975 m gs 1 -1 sc (CAcURL2FTS) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman ff 180.00 scf sf 6076 4950 m gs 1 -1 sc (CIFQuickAndDirtyHunter) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman ff 180.00 scf sf 7200 2025 m gs 1 -1 sc (CAlgorithmCollection) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman ff 180.00 scf sf 7200 900 m gs 1 -1 sc (CAccessorCollection) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman ff 180.00 scf sf 3825 2475 m gs 1 -1 sc (CSessions) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman ff 180.00 scf sf 3825 1350 m gs 1 -1 sc (CSessionManager) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman ff 180.00 scf sf 4275 6075 m gs 1 -1 sc (CAlgorithm) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman ff 180.00 scf sf 2700 4275 m gs 1 -1 sc (CQuery) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman ff 180.00 scf sf 1575 5175 m gs 1 -1 sc (CAccessor) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman ff 180.00 scf sf 6076 3825 m gs 1 -1 sc (CInvertedFileQuery) dup sw pop 2 div neg 0 rm col0 sh gr /Times-Roman ff 180.00 scf sf 450 450 m gs 1 -1 sc (The classes used by the server, which are not "helper classes") col0 sh gr /Times-Roman ff 180.00 scf sf 450 675 m gs 1 -1 sc (i.e. which have a lifespan of more than a few seconds.) col0 sh gr $F2psEnd rs gift-0.1.14/Doc/GIFTClassGraph/GIFTClassGraph.fig0000644000175200001440000000761210153634072016052 00000000000000#FIG 3.2 Landscape Center Metric A4 100.00 Single -2 1200 2 5 1 0 1 0 7 100 0 -1 0.000 0 0 0 0 2700.000 7875.000 2475 7875 2700 7650 2925 7875 5 1 0 1 0 7 100 0 -1 0.000 0 0 0 0 4501.000 4275.000 4501 4500 4276 4275 4501 4050 5 2 0 1 0 7 100 0 -1 0.000 0 0 0 0 2025.000 6075.000 1800 6075 2025 5850 2250 6075 5 2 0 1 0 7 100 0 -1 0.000 0 0 0 0 10125.000 6300.000 10125 6075 10350 6300 10125 6525 6 5310 450 8370 2250 5 1 0 1 0 7 100 0 -1 0.000 0 0 0 0 5625.000 1350.000 5625 1575 5400 1350 5625 1125 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 4 6075 900 5625 900 5625 2025 6075 2025 2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 6075 1575 8325 1575 8325 2250 6075 2250 6075 1575 2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 6075 450 8325 450 8325 1125 6075 1125 6075 450 4 1 0 100 0 0 12 0.0000 4 180 1635 7200 2025 CAlgorithmCollection\001 4 1 0 100 0 0 12 0.0000 4 135 1620 7200 900 CAccessorCollection\001 -6 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 1 2 0 0 1.00 60.00 120.00 3825 1575 3825 2025 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 4950 1350 5625 1350 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 3825 4275 4500 4275 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 1 2 0 0 1.00 60.00 120.00 2925 2700 2925 3825 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 1 2 0 0 1.00 60.00 120.00 3600 4500 3600 5625 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 2700 7200 2700 7875 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 3 2250 8100 2250 7875 2700 7875 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 3 3150 8100 3150 7875 2700 7875 2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 225 8100 2475 8100 2475 8775 225 8775 225 8100 2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 2925 8100 5175 8100 5175 8775 2925 8775 2925 8100 2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 1575 6525 3825 6525 3825 7200 1575 7200 1575 6525 2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 3150 5625 5400 5625 5400 6300 3150 6300 3150 5625 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 4 4951 3825 4501 3825 4501 4950 4951 4950 2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 4951 4500 7201 4500 7201 5175 4951 5175 4951 4500 2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 4951 3375 7201 3375 7201 4050 4951 4050 4951 3375 2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 2700 2025 4950 2025 4950 2700 2700 2700 2700 2025 2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 1575 3825 3825 3825 3825 4500 1575 4500 1575 3825 2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 2700 900 4950 900 4950 1575 2700 1575 2700 900 2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 450 4725 2700 4725 2700 5400 450 5400 450 4725 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 1 2 0 0 1.00 60.00 120.00 2250 4500 2250 4725 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 2025 6525 2025 6075 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 2025 5850 2025 5400 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 9675 6300 11025 6300 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2 0 0 1.00 60.00 120.00 9675 7650 11025 7650 4 1 0 100 0 0 12 0.0000 4 135 1770 1350 8550 CInvertedFileAccessor\001 4 1 0 100 0 0 12 0.0000 4 135 2055 4050 8550 CDistanceMatrixAccessor\001 4 1 0 100 0 0 12 0.0000 4 135 1110 2700 6975 CAcURL2FTS\001 4 1 0 100 0 0 12 0.0000 4 135 810 3825 2475 CSessions\001 4 1 0 100 0 0 12 0.0000 4 180 1395 3825 1350 CSessionManager\001 4 1 0 100 0 0 12 0.0000 4 180 870 4275 6075 CAlgorithm\001 4 1 0 100 0 0 12 0.0000 4 180 585 2700 4275 CQuery\001 4 1 0 100 0 0 12 0.0000 4 135 855 1575 5175 CAccessor\001 4 1 0 100 0 0 12 0.0000 4 165 1170 6076 3825 CQInvertedFile\001 4 0 0 100 0 0 12 0.0000 4 180 4755 450 450 The classes used by the server, which are not "helper classes"\001 4 0 0 100 0 0 12 0.0000 4 180 4125 450 675 i.e. which have a lifespan of more than a few seconds.\001 4 0 0 100 0 0 12 0.0000 4 180 1020 8325 6300 Pidgin-UML:\001 4 0 0 100 0 0 12 0.0000 4 90 90 9675 6300 a\001 4 0 0 100 0 0 12 0.0000 4 135 90 11025 6300 b\001 4 0 0 100 0 0 12 0.0000 4 135 1380 9675 6975 "a inherits from b"\001 4 0 0 100 0 0 12 0.0000 4 135 1515 9675 8100 "a is contained in b"\001 4 1 0 100 0 0 12 0.0000 4 180 960 6076 4950 CQBayesian\001 gift-0.1.14/Doc/Makefile.am0000644000175200001440000000255110153634072012212 00000000000000 gift-guide.info: gift-guide.sgml -test "@SGML2INFO@" && @SGML2INFO@ gift-guide.sgml configuring-and-hacking-the-gift.info: configuring-and-hacking-the-gift.sgml -test "@SGML2INFO@" && @SGML2INFO@ configuring-and-hacking-the-gift.sgml gift-guide.txt: gift-guide.sgml -test "@SGML2TXT@" && @SGML2TXT@ gift-guide.sgml configuring-and-hacking-the-gift.txt: configuring-and-hacking-the-gift.sgml -test "@SGML2TXT@" && @SGML2TXT@ configuring-and-hacking-the-gift.sgml gift-guide.dvi: gift-guide.sgml -test "@SGML2LATEX@" && @SGML2LATEX@ --output=dvi gift-guide.sgml configuring-and-hacking-the-gift.dvi: configuring-and-hacking-the-gift.sgml -test "@SGML2LATEX@" && @SGML2LATEX@ --output=dvi configuring-and-hacking-the-gift.sgml # note that Doxyfile is generated from Doxyfile.in # by running ./configure system-doc: Doxyfile -mkdir autoDoc -mkdir autoDoc/HTML -test "@DOXYGEN@" && @DOXYGEN@ noinst_DATA = system-doc configuring-and-hacking-the-gift.info configuring-and-hacking-the-gift.txt configuring-and-hacking-the-gift.dvi gift-guide.dvi gift-guide.txt gift-guide.info CLEANFILES= gift-guide.info gift-guide.dvi configuring-and-hacking-the-gift.info configuring-and-hacking-the-gift.dvi autoDoc/HTML/* autoDoc/rtf/* autoDoc/man/*/* autoDoc/latex/* EXTRA_DIST= Doxyfile.in TeX CodingRules GIFTClassGraph configuring-and-hacking-the-gift.sgml gift-guide.sgmlgift-0.1.14/Doc/Makefile.in0000644000175200001440000002545710220474072012232 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = Doc DIST_COMMON = $(srcdir)/Doxyfile.in $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = Doxyfile SOURCES = DIST_SOURCES = DATA = $(noinst_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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ noinst_DATA = system-doc configuring-and-hacking-the-gift.info configuring-and-hacking-the-gift.txt configuring-and-hacking-the-gift.dvi gift-guide.dvi gift-guide.txt gift-guide.info CLEANFILES = gift-guide.info gift-guide.dvi configuring-and-hacking-the-gift.info configuring-and-hacking-the-gift.dvi autoDoc/HTML/* autoDoc/rtf/* autoDoc/man/*/* autoDoc/latex/* EXTRA_DIST = Doxyfile.in TeX CodingRules GIFTClassGraph configuring-and-hacking-the-gift.sgml gift-guide.sgml all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(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 Doc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Doc/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh Doxyfile: $(top_builddir)/config.status $(srcdir)/Doxyfile.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 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 $(DATA) 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -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 gift-guide.info: gift-guide.sgml -test "@SGML2INFO@" && @SGML2INFO@ gift-guide.sgml configuring-and-hacking-the-gift.info: configuring-and-hacking-the-gift.sgml -test "@SGML2INFO@" && @SGML2INFO@ configuring-and-hacking-the-gift.sgml gift-guide.txt: gift-guide.sgml -test "@SGML2TXT@" && @SGML2TXT@ gift-guide.sgml configuring-and-hacking-the-gift.txt: configuring-and-hacking-the-gift.sgml -test "@SGML2TXT@" && @SGML2TXT@ configuring-and-hacking-the-gift.sgml gift-guide.dvi: gift-guide.sgml -test "@SGML2LATEX@" && @SGML2LATEX@ --output=dvi gift-guide.sgml configuring-and-hacking-the-gift.dvi: configuring-and-hacking-the-gift.sgml -test "@SGML2LATEX@" && @SGML2LATEX@ --output=dvi configuring-and-hacking-the-gift.sgml # note that Doxyfile is generated from Doxyfile.in # by running ./configure system-doc: Doxyfile -mkdir autoDoc -mkdir autoDoc/HTML -test "@DOXYGEN@" && @DOXYGEN@ # 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: gift-0.1.14/Doc/Doxyfile.in0000644000175200001440000001246610153634075012302 00000000000000# Doxygen configuration generated by Doxywizard version 0.1 #--------------------------------------------------------------------------- # General configuration options #--------------------------------------------------------------------------- PROJECT_NAME = @PACKAGE@ PROJECT_NUMBER = @VERSION@ OUTPUT_DIRECTORY = autoDoc OUTPUT_LANGUAGE = English DISABLE_INDEX = NO EXTRACT_ALL = NO EXTRACT_PRIVATE = NO EXTRACT_STATIC = YES HIDE_UNDOC_MEMBERS = NO HIDE_UNDOC_CLASSES = NO BRIEF_MEMBER_DESC = YES REPEAT_BRIEF = YES ALWAYS_DETAILED_SEC = NO FULL_PATH_NAMES = NO STRIP_FROM_PATH = INTERNAL_DOCS = NO CLASS_DIAGRAMS = YES SOURCE_BROWSER = NO INLINE_SOURCES = NO STRIP_CODE_COMMENTS = YES CASE_SENSE_NAMES = NO HIDE_SCOPE_NAMES = NO VERBATIM_HEADERS = YES SHOW_INCLUDE_FILES = YES JAVADOC_AUTOBRIEF = YES INHERIT_DOCS = YES INLINE_INFO = YES SORT_MEMBER_DOCS = YES TAB_SIZE = 8 ENABLED_SECTIONS = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- QUIET = NO WARNINGS = YES WARN_IF_UNDOCUMENTED = YES WARN_FORMAT = "$file:$line: $text" #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- INPUT = ../GIFTServer ../libMRML ../libGIFTAcURL2FTS ../libGIFTAcInvertedFile ../libGIFTQuInvertedFile ../libGIFTAcHierarchy ../libGIFTQuHierarchy ../libGIFTQuPerl ../libGIFTAcPerl FILE_PATTERNS = *.h RECURSIVE = YES EXCLUDE = EXCLUDE_PATTERNS = EXAMPLE_PATH = EXAMPLE_PATTERNS = IMAGE_PATH = INPUT_FILTER = #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- ALPHABETICAL_INDEX = YES COLS_IN_ALPHA_INDEX = 5 IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- GENERATE_HTML = YES HTML_OUTPUT = HTML HTML_HEADER = HTML/DoxygenHeader.html HTML_FOOTER = HTML/DoxygenFooter.html HTML_STYLESHEET = HTML_ALIGN_MEMBERS = YES GENERATE_HTMLHELP = NO #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- GENERATE_LATEX = YES LATEX_OUTPUT = latex COMPACT_LATEX = NO PAPER_TYPE = a4wide EXTRA_PACKAGES = LATEX_HEADER = PDF_HYPERLINKS = YES LATEX_BATCHMODE = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- GENERATE_RTF = NO RTF_OUTPUT = rtf COMPACT_RTF = NO RTF_HYPERLINKS = NO RTF_STYLESHEET_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- GENERATE_MAN = YES MAN_OUTPUT = man MAN_EXTENSION = .3gift #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- ENABLE_PREPROCESSING = YES MACRO_EXPANSION = NO EXPAND_ONLY_PREDEF = NO SEARCH_INCLUDES = YES INCLUDE_PATH = PREDEFINED = EXPAND_AS_DEFINED = #--------------------------------------------------------------------------- # Configuration::addtions related to external references #--------------------------------------------------------------------------- TAGFILES = GENERATE_TAGFILE = ALLEXTERNALS = NO PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- HAVE_DOT = NO CLASS_GRAPH = YES COLLABORATION_GRAPH = YES INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES GRAPHICAL_HIERARCHY = YES DOT_PATH = MAX_DOT_GRAPH_WIDTH = 1024 MAX_DOT_GRAPH_HEIGHT = 1024 #--------------------------------------------------------------------------- # Configuration::addtions related to the search engine #--------------------------------------------------------------------------- SEARCHENGINE = NO CGI_NAME = search.cgi CGI_URL = DOC_URL = DOC_ABSPATH = BIN_ABSPATH = /usr/local/bin/ EXT_DOC_PATHS = gift-0.1.14/dtd/0000777000175200001440000000000010220511621010272 500000000000000gift-0.1.14/dtd/Makefile.am0000644000175200001440000000056210153634075012263 00000000000000 noinst_DATA= ../libMRML/cc/mrml_const.cc # # making a new mrml_const.cc if mrml.dtd has been changed # ../libMRML/cc/mrml_const.cc: mrml.dtd $(PERL) ../scripts/perl/gift-dtd-to-keywords.pl ../dtd/mrml.dtd mrml mrml_const charmer.mrml mv mrml_const.h ../libMRML/include mv mrml_const.cc ../libMRML/cc mv mrml_const.java ../ EXTRA_DIST=mrml.dtd data_DATA=mrml.dtdgift-0.1.14/dtd/Makefile.in0000644000175200001440000002471710220474073012277 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = dtd DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__installdirs = "$(DESTDIR)$(datadir)" dataDATA_INSTALL = $(INSTALL_DATA) DATA = $(data_DATA) $(noinst_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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ noinst_DATA = ../libMRML/cc/mrml_const.cc EXTRA_DIST = mrml.dtd data_DATA = mrml.dtd all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(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 dtd/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu dtd/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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-dataDATA: $(data_DATA) @$(NORMAL_INSTALL) test -z "$(datadir)" || $(mkdir_p) "$(DESTDIR)$(datadir)" @list='$(data_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(datadir)/$$f'"; \ $(dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/$$f"; \ done uninstall-dataDATA: @$(NORMAL_UNINSTALL) @list='$(data_DATA)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f '$(DESTDIR)$(datadir)/$$f'"; \ rm -f "$(DESTDIR)$(datadir)/$$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)$(datadir)"; 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: -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-dataDATA 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-dataDATA 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-dataDATA 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-dataDATA uninstall-info-am # # making a new mrml_const.cc if mrml.dtd has been changed # ../libMRML/cc/mrml_const.cc: mrml.dtd $(PERL) ../scripts/perl/gift-dtd-to-keywords.pl ../dtd/mrml.dtd mrml mrml_const charmer.mrml mv mrml_const.h ../libMRML/include mv mrml_const.cc ../libMRML/cc mv mrml_const.java ../ # 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: gift-0.1.14/dtd/mrml.dtd0000644000175200001440000004306710153634075011702 00000000000000 ]> gift-0.1.14/NEWS0000644000175200001440000000506710153634075010160 000000000000000.1.11 Unfortunately I have tested uploading to savannah using a faulty 0.1.10. As removing files from savannah is not possible, overwriting neither (apparently), I bump the version number to 0.1.11 0.1.10 The current version should digest very large collections now. It is tested with small collections only, but the relevant parts of the code use streampos instead of int now. THIS MEANS YOU HAVE TO RUN gift-generate-inverted-file in all directories that contain an InvertedFileOffset.db file, i.e. for all collections currently maintained by your GIFT instance. The numbering system will become less weird now. We won't do subsubsub versions (e.g. +x epsilon) any more, as this is not compatible with e.g. Gentoo ebuilds. 0.1.9+5epsilon Fixed annoying bug with which you could hang GIFT by closing the connection too quickly. Changes in gift-guide.sgml 0.1.9+4epsilon License bug. Updated gift-guide.sgml concerning perl and url2fts.xml 0.1.9+3epsilon this fixes some anoying stuff found in 0.1.9 by testers. We hope some 0.1.10 out soon. 0.1.9 more bugfixes. Internationalization is on the way, there should be no problem any more regaring umlauts in files that are indexed. We kicked out the expat from the current release, so you have to have one preinstalled to run the GIFT. The perl parts need now the modules XML::XQL and Text::Iconv. Check out the gift-install-prerequisites.pl script if you have more questions. WARNING: Not yet BSD ready. 0.1.8 fixed some bugs with the make dist target. Same as last version, but *should* compile now without any tweaking on gcc v3.0.2 (and hopefully later?) and gcc v2.95. 0.1.7 some exception cleanup, some steps towards user authentification (server using multiple sockets). 0.1.6pre4 cleaning up the cvs, making make dist work for more easily making more frequent releases ... mainly bug fixes, including some very very hard to find trouble in memory allocation when multithreading 0.1.5 Plugin support. Multithreading support, try ./configure --enable-multi-threading for using this feature Interactive script for automatic installation of prerequisites: SnakeCharmer Perl modules. Try ./configure --enable-interactive for using this feature Better socket code. Got rid of some emabarassing workarounds. 0.1.4 improvement of Perl query engine 0.1.3 first "preliminarily GNUed version for the FSF" There are a couple of bugfixes and new features, as well as a change of the name from Viper to GIFT 0.1 sourcecode evaluation package for the FSF gift-0.1.14/pthread-compile-test-program.cc0000644000175200001440000000322610220502727015453 00000000000000#define _GNU_SOURCE #include #include #include #include #include #include using namespace std; pthread_t gThread1; pthread_t gThread2; pthread_mutex_t gMutex=PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; pthread_mutexattr_t gMutexAttribute; list gTestList; void test2(void){ pthread_mutex_lock(&gMutex); cout << "i" << flush; pthread_mutex_unlock(&gMutex); } void* test(void* inValue){ cout << "Began thread " << *((int*)inValue) << endl; for(int i=0; i<10; i++){ pthread_mutex_lock(&gMutex); cout << "t" << *((int*) inValue) << "," << i << flush; test2(); gTestList.push_back(i); pthread_mutex_unlock(&gMutex); } cout << "Thread terminated " << inValue << endl; } int g1(1); int g2(2); int main(void){ void* lThreadReturn; pthread_mutexattr_init(&gMutexAttribute); assert(!(pthread_mutexattr_settype(&gMutexAttribute, PTHREAD_MUTEX_RECURSIVE_NP))); pthread_mutex_init(&gMutex, &gMutexAttribute); assert(!pthread_create(&gThread1, NULL, &test, (void*)&g1)); cout << "Created thread 1" << endl; assert(!pthread_create(&gThread2, NULL, &test, (void*)&g2)); cout << "Created thread 2" << endl; int lErrno=pthread_join(gThread1,&lThreadReturn); if(lErrno){ cout << strerror(lErrno) << endl; } cout << "Joined thread 1" << endl; lErrno=pthread_join(gThread2,&lThreadReturn); if(lErrno){ cout << strerror(lErrno) << endl; } cout << "Joined thread 2" << endl; lErrno=pthread_mutex_destroy(&gMutex); if(lErrno){ cout << strerror(lErrno) << endl; } cout << "End of test program" << endl; return 0; } gift-0.1.14/depcomp0000755000175200001440000002752510220223620011022 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000 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., 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. # Originally written by Alexandre Oliva . 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 # `libtool' can also be set to `yes' or `no'. depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`} 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. 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. stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$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" ;; tru64) # The Tru64 AIX 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. tmpdepfile1="$object.d" tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'` if test "$libtool" = yes; then "$@" -Wc,-MD else "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a space and a tab 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 proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. test -z "$dashmflag" && dashmflag=-M ( IFS=" " case " $* " in *" --mode=compile "*) # this is libtool, let us make it quiet for arg do # cycle over the arguments case "$arg" in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi 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) # 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;; -*) ;; *) set fnord "$@" "$arg"; shift;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tail +3 "$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 proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. ( IFS=" " case " $* " in *" --mode=compile "*) for arg do # cycle over the arguments case $arg in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi 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 proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. ( IFS=" " case " $* " in *" --mode=compile "*) for arg do # cycle over the arguments case $arg in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi 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 gift-0.1.14/FeatureExtraction/0000777000175200001440000000000010220511634013157 500000000000000gift-0.1.14/FeatureExtraction/gift_features.h0000644000175200001440000000137210220502727016101 00000000000000#ifndef _GIFT_FEATURES #define _GIFT_FEATURES /* feature classes */ #define COL_POS 0 /* a colour in a specific position (and at a specific scale) */ #define COL_HST 1 /* the proportion of a given colour */ #define GABOR_POS 2 /* the value of a Gabor filter in a particular position */ #define GABOR_HST 3 /* the proportion of a particular value of a Gabor filter in the image */ #define FREQ_MAX 0xff /* since we will use FLOATS to store frequencies we want high resolution (WM) */ typedef unsigned int freq_type; typedef struct _FEATURE_DATA { int id; freq_type frequency; /* i.e. f = frequency/FREQ_MAX */ } FEATURE_DATA; /* use primitive hacks by Wolfgang for adapting to Wolfgang's code */ #define WOLFGANG_HACK #endif gift-0.1.14/FeatureExtraction/extract_features.c0000644000175200001440000000476110153634147016631 00000000000000#include #include #include #include #include #include #include #include "gift_features.h" //#include "extract_features.proto" #define numH 18 #define numS 3 #define numV 3 #define numGrey 4 int main(int argc, char *argv[]) { char *in_fname, *out_fname; char *point_pos; FILE *ppm_file; PPM *im_rgb, *im_hsv, *im_quant; int *colmap, colmap_size; enum file_types ppm_type; enum ppm_error the_error; switch(argc) { case 2: in_fname = argv[1]; break; default: fprintf(stderr, "Usage: %s ppm_file \n\n", argv[0]); exit(1); break; } if ((ppm_file = fopen (in_fname, "r")) == NULL) { fprintf(stderr, "Can't open file: %s", in_fname); exit(1); } /* now get the filename prefix */ out_fname = (char *)malloc((strlen(in_fname) + 10)*sizeof(char)); if ((point_pos = strchr(in_fname, '.')) == NULL) { fprintf(stderr, "File %s has no ""."" - can't generate features filename\n\n", in_fname); exit(1); } else { /* must find the *last* "." in the filename */ point_pos = &in_fname[strlen(in_fname)]; while (*point_pos != '.') { point_pos--; } strncpy(out_fname, in_fname, (int)(point_pos - in_fname)); strcat(out_fname, ".fts"); } #ifdef DEBUG fprintf(stderr, "Features will be written to file %s\n", out_fname); #endif /* read the rgb image from we are going to extract features */ switch(ppm_type = read_magic_no(ppm_file)) { case PGM_ASC: case PPM_ASC: case PGM_RAW: case PPM_RAW: if ((the_error = read_ppm(ppm_file, &im_rgb, ppm_type)) != PPM_OK) { ppm_handle_error(the_error); exit(1); } break; default: fprintf(stderr, "Unrecognized file type.\n"); exit(1); break; } /* convert it to hsv */ if ((the_error = rgb2hsv_ppm(im_rgb, &im_hsv)) != PPM_OK) { ppm_handle_error(the_error); exit(1); } /* quantize the image */ colmap_size = numH*numS*numV + numGrey; if ((the_error = hsv_quantize_ppm(im_hsv, &im_quant, &colmap, numH, numS, numV, numGrey)) != PPM_OK) { ppm_handle_error(the_error); exit(1); } /* initialise the variables required for the feature extraction */ init_feature_variables(colmap_size); /* extract the features */ extract_mode_features(im_quant, colmap, colmap_size); extract_gabor_features(im_hsv); /* write them to the file */ if ((the_error = write_mode_features(out_fname, colmap_size)) != PPM_OK) { ppm_handle_error(the_error); exit(1); } /* everything is OK */ destroy_ppm(&im_hsv); destroy_ppm(&im_quant); free(colmap); exit(0); } gift-0.1.14/FeatureExtraction/quantize.c0000644000175200001440000000743310153634147015120 00000000000000#include #include enum ppm_error hsv_quantize_ppm(PPM *im_hsv, PPM **im_quant, int **colmap, int numH, int numS, int numV, int numG) { int i; int num_bins; int iH, iS, iV, iG; double H, S, V, G; double Hstep = 360/(double)numH, Sstep = 1/(double)numS, Vstep = 1/(double)numV, Gstep = 255/(double)numG; int coords[3], rows[3], colmap_index; const double not_one = 0.99999999; /* quantise an HSV image in PPM format. The output is a PGM image, im_quant, containing indices into an HSV colour map, colmap. */ /* note that greys are a special case - they occur when H == S == 0 under my scheme, and must be treated separately */ /* create the colourmap, giving the "centre" value of each bin */ num_bins = numH*numS*numV + numG; if (num_bins > 256) { fprintf(stderr, "hsv_quantise_ppm: "); return(TOO_MANY_BINS); } rows[HUE] = numH; rows[SATURATION] = numS; rows[VALUE] = numV; *colmap = (int *)malloc(3*num_bins*sizeof(int)); for (iV = 0, V = Vstep/2; iV < numV; iV++, V += Vstep) { coords[VALUE] = iV; for (iS = 0, S = Sstep/2; iS < numS; iS++, S += Sstep) { coords[SATURATION] = iS; for (iH = 0, H = Hstep/2; iH < numH; iH++, H += Hstep) { coords[HUE] = iH; colmap_index = coords_to_count(coords, rows, 3); (*colmap)[3*colmap_index + HUE] = (int)rint(255.0*H/360.0); (*colmap)[3*colmap_index + SATURATION] = (int)rint(255.0*S); (*colmap)[3*colmap_index + VALUE] = (int)rint(255.0*V); } } } for (iG = 0, G = Gstep/2; iG < numG; iG++, G += Gstep) { colmap_index = numH*numS*numV + iG; (*colmap)[3*colmap_index + HUE] = 0; (*colmap)[3*colmap_index + SATURATION] = 0; (*colmap)[3*colmap_index + VALUE] = (int)rint(G); } /* create the PGM */ *im_quant = new_ppm(); add_comment((*im_quant), "# HSV quantized image.\n"); (*im_quant)->type = PGM_RAW; (*im_quant)->width = im_hsv->width; (*im_quant)->height = im_hsv->height; (*im_quant)->max_col_comp = 255; (*im_quant)->bytes_per_pixel = 1; (*im_quant)->pixel = (byte *)malloc((*im_quant)->width*(*im_quant)->height*sizeof(byte)); /* now go over each pixel in the input image, and put it in the appropriate bin */ for (i = 0; i < im_hsv->width*im_hsv->height; i++) { H = (double)im_hsv->pixel[3*i + HUE]/255.0; /* no point in multiplying by 360, as would just have to divide again below */ S = (double)im_hsv->pixel[3*i + SATURATION]/255.0; V = (double)im_hsv->pixel[3*i + VALUE]/255.0; if ((H == 0) && (S == 0)) { /* i.e. it's a grey pixel */ (*im_quant)->pixel[i] = (byte)numH*numS*numV + (byte)floor(not_one*V*numG); } else { coords[HUE] = (int)floor(not_one*H*numH); coords[SATURATION] = (int)floor(not_one*S*numS); coords[VALUE] = (int)floor(not_one*V*numV); (*im_quant)->pixel[i] = (byte)coords_to_count(coords, rows, 3); } } return(PPM_OK); } enum ppm_error colmap2rgb_ppm(PPM *im_quant, int *colmap, int num_bins, PPM **im_rgb) { /* take a PGM image im_quant whose entries are indices into the colour map colmap, and convert this to an RGB PPM image stored in im_rgb. */ /* note that this routine is also used for HSV images */ int i; /* create the PPM */ (*im_rgb) = new_ppm(); add_comment((*im_rgb), "# Image created from a quantised image.\n"); (*im_rgb)->type = PPM_RAW; (*im_rgb)->width = im_quant->width; (*im_rgb)->height = im_quant->height; (*im_rgb)->max_col_comp = 255; (*im_rgb)->bytes_per_pixel = 3; (*im_rgb)->pixel = (byte *)malloc(3*(*im_rgb)->width*(*im_rgb)->height*sizeof(byte)); for (i = 0; i < (*im_rgb)->width*(*im_rgb)->height; i++) { (*im_rgb)->pixel[3*i + RED] = colmap[3*im_quant->pixel[i] + RED]; (*im_rgb)->pixel[3*i + GREEN] = colmap[3*im_quant->pixel[i] + GREEN]; (*im_rgb)->pixel[3*i + BLUE] = colmap[3*im_quant->pixel[i] + BLUE]; } return(PPM_OK); } gift-0.1.14/FeatureExtraction/rgb2hsv_utils.c0000644000175200001440000001456410153634147016060 00000000000000#include #include #include "ppm.h" double max3(double v1, double v2, double v3) { double max; max = (v1 > v2) ? v1 : v2; max = (max > v3) ? max : v3; return(max); } double min3(double v1, double v2, double v3) { double min; min = (v1 < v2) ? v1 : v2; min = (min < v3) ? min : v3; return(min); } void count_to_coords(int *coords, int c, int *r, int d) { int i; for (i = 0; i < d; i++) { coords[i] = c % r[i]; c = (c - coords[i])/r[i]; } } int coords_to_count(int *coords, int *r, int d) { int i, count; count = 0; for (i = d - 1; i >= 0; i--) count = r[i]*count + coords[i]; return(count); } /* David Squire 980922 */ void rgb2hsv(double R, double G, double B, double *H, double *S, double *V) { double H1, S1, V1, R1, G1, B1; double max, min, diff; max = max3(R, G, B); min = min3(R, G, B); diff = max - min; if (max == 0) H1 = S1 = V1 = 0; else { V1 = max; S1 = diff/max; if (S1 == 0) /* H1 is undefined, but give it a value anyway */ H1 = 0; else { #ifdef HSV_TRAVIS R1 = (max - R)/diff; G1 = (max - G)/diff; B1 = (max - B)/diff; if ((R == max) && (G == min)) H1 = 5 + B1; else { if ((R == max) && (G != min)) H1 = 1 - G1; else { if ((G == max) && (B == min)) H1 = 1 + R1; else { if ((G == max) && (B != min)) H1 = 3 - B1; else { if (R == max) H1 = 3 + G1; else H1 = 5 - R1; } } } } H1 *= 60; /* convert to range [0, 360] degrees */ #else /* assume Foley & VanDam HSV */ if (R == max) H1 = (G - B)/diff; if (G == max) H1 = 2 + (B - R)/diff; if (B == max) H1 = 4 + (R - G)/diff; H1 *= 60; /* convert to range [0, 360] degrees */ if (H1 < 0) H1 += 360; #endif } } *H = H1; *S = S1; *V = V1; } void hsv2rgb(double H, double S, double V, double *R, double *G, double *B) { int i; double f, p, q, t; /* assume Foley & VanDam HSV */ if ((S == 0) && (H == 0)) *R = *G = *B = V; if (H == 360) H = 0; H /= 60; i = (int)floor(H); f = H - i; p = V*(1 - S); q = V*(1 - S*f); t = V*(1 - S*(1 - f)); switch(i) { case 0: *R = V, *G = t, *B = p; break; case 1: *R = q, *G = V, *B = p; break; case 2: *R = p, *G = V, *B = t; break; case 3: *R = p, *G = q, *B = V; break; case 4: *R = t, *G = p, *B = V; break; case 5: *R = V, *G = p, *B = q; break; default: break; } } /* Converts a colour PPM image im_rgb, assumed to be in RGB format to im_hsv in HSV format. It is assumed that space has already been allocated for im_hsv. */ /* David Squire 980922 */ enum ppm_error rgb2hsv_ppm(PPM *im_rgb, PPM **im_hsv) { double R, G, B; double H, S, V; double max, min, diff; long i, num_pixels; double max_col; if (im_rgb->bytes_per_pixel != 3) { fprintf(stderr, "rgb2hsv_ppm: "); return(THREE_PLANES_NEEDED); } /* create the hsv image */ /* make space for an HSV image of the same size as that read */ (*im_hsv) = new_ppm(); (*im_hsv)->type = PPM_RAW; (*im_hsv)->width = im_rgb->width; (*im_hsv)->height = im_rgb->height; (*im_hsv)->max_col_comp = im_rgb->max_col_comp; (*im_hsv)->bytes_per_pixel = 3; (*im_hsv)->pixel = (byte *)malloc(3*(*im_hsv)->width*(*im_hsv)->height*sizeof(byte)); max_col = (double)im_rgb->max_col_comp; num_pixels = im_rgb->width*im_rgb->height; for (i = 0; i < num_pixels; i++) { R = (double)im_rgb->pixel[3*i + RED]/max_col; G = (double)im_rgb->pixel[3*i + GREEN]/max_col; B = (double)im_rgb->pixel[3*i + BLUE]/max_col; rgb2hsv(R, G, B, &H, &S, &V); /* now convert back to bytes and store in output image */ (*im_hsv)->pixel[3*i + HUE] = (byte)rint((H/360.0)*max_col); (*im_hsv)->pixel[3*i + SATURATION] = (byte)rint(S*max_col); (*im_hsv)->pixel[3*i + VALUE] = (byte)rint(V*max_col); } add_comment((*im_hsv), "# Image converted from RGB to HSV format.\n"); return(PPM_OK); } enum ppm_error hsv2rgb_ppm(PPM *im_hsv, PPM **im_rgb) { double R, G, B; double H, S, V; double max, min, diff; long i, num_pixels; double max_col; if (im_hsv->bytes_per_pixel != 3) { fprintf(stderr, "hsv2rgb_ppm: "); return(THREE_PLANES_NEEDED); } /* create the rgb image */ /* make space for an HSV image of the same size as that read */ (*im_rgb) = new_ppm(); (*im_rgb)->type = PPM_RAW; (*im_rgb)->width = im_hsv->width; (*im_rgb)->height = im_hsv->height; (*im_rgb)->max_col_comp = im_hsv->max_col_comp; (*im_rgb)->bytes_per_pixel = 3; (*im_rgb)->pixel = (byte *)malloc(3*(*im_rgb)->width*(*im_rgb)->height*sizeof(byte)); max_col = (double)(*im_rgb)->max_col_comp; num_pixels = (*im_rgb)->width*(*im_rgb)->height; for (i = 0; i < num_pixels; i++) { /* convert from bytes to doubles in [0, 360], [0, 1], [0, 1] */ H = 360*(double)im_hsv->pixel[3*i + HUE]/max_col; S = (double)im_hsv->pixel[3*i + SATURATION]/max_col; V = (double)im_hsv->pixel[3*i + VALUE]/max_col; hsv2rgb(H, S, V, &R, &G, &B); /* now convert back to bytes and store in output image */ (*im_rgb)->pixel[3*i + RED] = (byte)rint(R*max_col); (*im_rgb)->pixel[3*i + GREEN] = (byte)rint(G*max_col); (*im_rgb)->pixel[3*i + BLUE] = (byte)rint(B*max_col); } add_comment((*im_rgb), "# Image converted from HSV to RGB format.\n"); return(PPM_OK); } void polar_to_hsv(double x, double y, int dim, double *H, double *S) { double theta, radius; theta = atan2(y, x); if (y < 0) theta += 2*M_PI; *H = 180*theta/M_PI; radius = hypot(x, y)/((double)dim/2); if (radius > 1) *H = *S = 0; else *S = radius; } PPM *hsv_test_pattern(int dim, double V) { PPM *im_hsv; int i, j; double x, y, H, S; /* create space for the test pattern */ im_hsv = new_ppm(); add_comment(im_hsv, "# HSV test pattern. In HSV format.\n"); im_hsv->type = PPM_RAW; im_hsv->width = im_hsv->height = dim; im_hsv->max_col_comp = 255; im_hsv->bytes_per_pixel = 3; im_hsv->pixel = (byte *)malloc(3*dim*dim*sizeof(byte)); /* now set the HSV values for each pixel */ for (i = 0; i < dim; i++) { /* rows */ y = (dim - i) - dim/2; for (j = 0; j < dim; j++) { /* columns */ x = j - dim/2; polar_to_hsv(x, y, dim, &H, &S); im_hsv->pixel[3*i*dim + 3*j + HUE] = (byte)rint(((double)H/360.0)*255.0); im_hsv->pixel[3*i*dim + 3*j + SATURATION] = (byte)rint((double)S*255.0); im_hsv->pixel[3*i*dim + 3*j + VALUE] = (byte)rint((double)V*255.0); } } return(im_hsv); } gift-0.1.14/FeatureExtraction/write_feature_descs.c0000644000175200001440000000321010153634147017273 00000000000000#include #include #include #include #include #include #include //#include "extract_features.proto" int main(int argc, char *argv[]) { FILE *ppm_file; PPM *im_hsv, *im_quant; int *colmap, colmap_size; enum file_types ppm_type; enum ppm_error the_error; int numH, numS, numV, numGrey; switch(argc) { case 5: numH = atoi(argv[1]); numS = atoi(argv[2]); numV = atoi(argv[3]); numGrey = atoi(argv[4]); break; case 1: numH = 18; numS = 3; numV = 3; numGrey = 4; break; default: fprintf(stderr, "Usage: %s [numH, numS, numV, numGrey] < ppm_file \n\n", argv[0]); exit(1); break; } ppm_file = stdin; /* read the hsv image from we are going to extract features */ switch(ppm_type = read_magic_no(ppm_file)) { case PGM_ASC: case PPM_ASC: case PGM_RAW: case PPM_RAW: if ((the_error = read_ppm(ppm_file, &im_hsv, ppm_type)) != PPM_OK) { ppm_handle_error(the_error); exit(1); } break; default: fprintf(stderr, "Unrecognized file type.\n"); exit(1); break; } /* quantize the image */ colmap_size = numH*numS*numV + numGrey; if ((the_error = hsv_quantize_ppm(im_hsv, &im_quant, &colmap, numH, numS, numV, numGrey)) != PPM_OK) { ppm_handle_error(the_error); exit(1); } /* initialise the variables required for the feature extraction */ init_feature_variables(colmap_size); /* write them to the file */ if ((the_error = write_feature_descriptions(stdout, colmap, colmap_size)) != PPM_OK) { ppm_handle_error(the_error); exit(1); } /* everything is OK */ destroy_ppm(&im_hsv); destroy_ppm(&im_quant); free(colmap); exit(0); } gift-0.1.14/FeatureExtraction/gabor.c0000644000175200001440000001226010153634147014344 00000000000000#include #include #include #include #include #include #include #include "gabor.h" /* note that all this is taken from the paper JaH98 in ~/tex/bib/squizz.bib */ /* (with my corrections!) */ static double ***kernel11 = NULL; static double ***kernel12 = NULL; static double ***kernel21 = NULL; static double ***kernel22 = NULL; static int kernal_size[num_gabor_scales] = {gabor_kernel_size_0, gabor_kernel_size_1, gabor_kernel_size_2}; void save_norm_double_pgm(double *double_im, int w, int h, char *fname) { PPM *im; float *norm_im; int i; FILE *outfile; int the_error; /* copy the image, and then normalise the contrast */ norm_im = (float *)malloc(w*h*sizeof(float)); for (i = 0; i < w*h; i++) norm_im[i] = (float)double_im[i]; normaliseContrast(norm_im, w*h); im = new_ppm(); im->type = PGM_RAW; im->width = w; im->height = h; im->max_col_comp = 255; im->bytes_per_pixel = 1; im->pixel = (byte *)malloc(w*h*sizeof(byte)); for (i = 0; i < w*h; i++) im->pixel[i] = (byte)norm_im[i]; outfile = fopen(fname, "wb"); if ((the_error = write_ppm(outfile, im, PGM_RAW)) != PPM_OK) { ppm_handle_error(the_error); exit(1); } fclose(outfile); destroy_ppm(&im); free(norm_im); } void create_filter_kernels() { int i, j, n; int x, x_c; double u0, u, v, sigma, theta; char fname[256]; /* allocate space for all the filter kernels */ kernel11 = (double ***)malloc(num_gabor_scales*sizeof(double **)); kernel12 = (double ***)malloc(num_gabor_scales*sizeof(double **)); kernel21 = (double ***)malloc(num_gabor_scales*sizeof(double **)); kernel22 = (double ***)malloc(num_gabor_scales*sizeof(double **)); for (i = 0; i < num_gabor_scales; i++) { kernel11[i] = (double **)malloc(num_gabors_per_scale*sizeof(double *)); for (j = 0; j < num_gabors_per_scale; j++) kernel11[i][j] = (double *)malloc(kernal_size[i]*sizeof(double)); kernel12[i] = (double **)malloc(num_gabors_per_scale*sizeof(double *)); for (j = 0; j < num_gabors_per_scale; j++) kernel12[i][j] = (double *)malloc(kernal_size[i]*sizeof(double)); kernel21[i] = (double **)malloc(num_gabors_per_scale*sizeof(double *)); for (j = 0; j < num_gabors_per_scale; j++) kernel21[i][j] = (double *)malloc(kernal_size[i]*sizeof(double)); kernel22[i] = (double **)malloc(num_gabors_per_scale*sizeof(double *)); for (j = 0; j < num_gabors_per_scale; j++) kernel22[i][j] = (double *)malloc(kernal_size[i]*sizeof(double)); } /* now set the values of the kernels */ u0 = u00; for (i = 0; i < num_gabor_scales; i++) { sigma = sigma_m(u0); for (j = 0; j < num_gabors_per_scale; j++) { theta = j*theta_step; u = u0*cos(theta); v = u0*sin(theta); x_c = kernal_size[i]/2; /* since sizes are odd, this gives the centre value */ for (x = 0; x < kernal_size[i]; x++) { /* note that x is "y" for kernels 12 and 22 */ kernel11[i][j][x] = (1/(sqrt(2*M_PI)*sigma)*exp(-sq((x - x_c))/(2*sq(sigma)))*cos(2*M_PI*u*(x - x_c))); kernel12[i][j][x] = (1/(sqrt(2*M_PI)*sigma)*exp(-sq((x - x_c))/(2*sq(sigma)))*cos(2*M_PI*v*(x - x_c))); kernel21[i][j][x] = (1/(sqrt(2*M_PI)*sigma)*exp(-sq((x - x_c))/(2*sq(sigma)))*sin(2*M_PI*u*(x - x_c))); kernel22[i][j][x] = (1/(sqrt(2*M_PI)*sigma)*exp(-sq((x - x_c))/(2*sq(sigma)))*sin(2*M_PI*v*(x - x_c))); } } u0 = u0/2; } } void gabor_filter(double *image, int width, int height, int filter_scale, int n_theta, double *output) { double *conv; int x, y, t_x, t_y; int i; /* create the filter kernels, if it has not already been done */ if (kernel11 == NULL) create_filter_kernels(); conv = (double *)calloc(width*height, sizeof(double)); /* first convolution */ for (x = 0; x < width; x++) { for (y = 0; y < height; y++) { output[y*width + x] = 0; /* might as well be here */ for (t_x = -kernal_size[filter_scale]/2; t_x <= kernal_size[filter_scale]/2; t_x++) { if (((x - t_x) >= 0) && ((x - t_x) < width)) { conv[y*width + x] += kernel11[filter_scale][n_theta][t_x + kernal_size[filter_scale]/2]*image[y*width+ (x - t_x)]; } } } } /* second convolution */ for (x = 0; x < width; x++) { for (y = 0; y < height; y++) { for (t_y = -kernal_size[filter_scale]/2; t_y <= kernal_size[filter_scale]/2; t_y++) { if (((y - t_y) >= 0) && ((y - t_y) < height)) output[y*width + x] += kernel12[filter_scale][n_theta][t_y + kernal_size[filter_scale]/2]*conv[(y - t_y)*width + x]; } } } for (i = 0; i < width*height; i++) conv[i] = 0; /* third convolution */ for (x = 0; x < width; x++) { for (y = 0; y < height; y++) { for (t_x = -kernal_size[filter_scale]/2; t_x <= kernal_size[filter_scale]/2; t_x++) { if (((x - t_x) >= 0) && ((x - t_x) < width)) { conv[y*width + x] += kernel21[filter_scale][n_theta][t_x + kernal_size[filter_scale]/2]*image[y*width + (x - t_x)]; } } } } /* fourth convolution */ for (x = 0; x < width; x++) { for (y = 0; y < height; y++) { for (t_y = -kernal_size[filter_scale]/2; t_y <= kernal_size[filter_scale]/2; t_y++) { if (((y - t_y) >= 0) && ((y - t_y) < height)) output[y*width + x] -= kernel22[filter_scale][n_theta][t_y + kernal_size[filter_scale]/2]*conv[(y - t_y)*width + x]; } } } free(conv); } gift-0.1.14/FeatureExtraction/gabor.h0000644000175200001440000000076410220502727014350 00000000000000#define sq(x) ((x)*(x)) /* note that all this is taken from the paper JaH98 in ~/tex/bib/squizz.bib */ /* with my corrections! */ /* define the functions which determine the parameters of the filter back */ #define num_gabor_scales 3 #define gabor_kernel_size_0 9 #define gabor_kernel_size_1 17 #define gabor_kernel_size_2 35 #define num_gabors_per_scale 4 #define theta_step (M_PI/num_gabors_per_scale) #define u00 (0.5/(1.0 + 1.0/3.0)) #define sigma_m(u) (3.0*sqrt(2.0*log(2.0))/(2.0*M_PI*u)) gift-0.1.14/FeatureExtraction/Makefile.am0000644000175200001440000000271710175456304015151 00000000000000# -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # libraries david_sources = extract_block_features.c gabor.c rgb2hsv_utils.c quantize.c AM_CPPFLAGS= -I$(top_srcdir)/libSquirePPM/ -I$(top_srcdir)/libSquireFFT/ -D NO_FLAT_FEATURES gift_extract_features_SOURCES = $(david_sources) extract_features.c gift_write_feature_descs_SOURCES= $(david_sources) write_feature_descs.c gift_extract_features_LDADD = -L../libSquirePPM -lSquirePPM -lm gift_write_feature_descs_LDADD= -L../libSquirePPM -lSquirePPM -lm bin_PROGRAMS = gift-extract-features gift-write-feature-descs EXTRA_DIST= gabor.h gabor_old.h gift_features.hgift-0.1.14/FeatureExtraction/Makefile.in0000644000175200001440000004346010220474072015153 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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@ # -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # libraries SOURCES = $(gift_extract_features_SOURCES) $(gift_write_feature_descs_SOURCES) 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 = : host_triplet = @host@ bin_PROGRAMS = gift-extract-features$(EXEEXT) \ gift-write-feature-descs$(EXEEXT) subdir = FeatureExtraction DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am__objects_1 = extract_block_features.$(OBJEXT) gabor.$(OBJEXT) \ rgb2hsv_utils.$(OBJEXT) quantize.$(OBJEXT) am_gift_extract_features_OBJECTS = $(am__objects_1) \ extract_features.$(OBJEXT) gift_extract_features_OBJECTS = $(am_gift_extract_features_OBJECTS) gift_extract_features_DEPENDENCIES = am_gift_write_feature_descs_OBJECTS = $(am__objects_1) \ write_feature_descs.$(OBJEXT) gift_write_feature_descs_OBJECTS = \ $(am_gift_write_feature_descs_OBJECTS) gift_write_feature_descs_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/extract_block_features.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/extract_features.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/gabor.Po ./$(DEPDIR)/quantize.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/rgb2hsv_utils.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/write_feature_descs.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(gift_extract_features_SOURCES) \ $(gift_write_feature_descs_SOURCES) DIST_SOURCES = $(gift_extract_features_SOURCES) \ $(gift_write_feature_descs_SOURCES) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ david_sources = extract_block_features.c gabor.c rgb2hsv_utils.c quantize.c AM_CPPFLAGS = -I$(top_srcdir)/libSquirePPM/ -I$(top_srcdir)/libSquireFFT/ -D NO_FLAT_FEATURES gift_extract_features_SOURCES = $(david_sources) extract_features.c gift_write_feature_descs_SOURCES = $(david_sources) write_feature_descs.c gift_extract_features_LDADD = -L../libSquirePPM -lSquirePPM -lm gift_write_feature_descs_LDADD = -L../libSquirePPM -lSquirePPM -lm EXTRA_DIST = gabor.h gabor_old.h gift_features.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(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 FeatureExtraction/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu FeatureExtraction/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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 gift-extract-features$(EXEEXT): $(gift_extract_features_OBJECTS) $(gift_extract_features_DEPENDENCIES) @rm -f gift-extract-features$(EXEEXT) $(LINK) $(gift_extract_features_LDFLAGS) $(gift_extract_features_OBJECTS) $(gift_extract_features_LDADD) $(LIBS) gift-write-feature-descs$(EXEEXT): $(gift_write_feature_descs_OBJECTS) $(gift_write_feature_descs_DEPENDENCIES) @rm -f gift-write-feature-descs$(EXEEXT) $(LINK) $(gift_write_feature_descs_LDFLAGS) $(gift_write_feature_descs_OBJECTS) $(gift_write_feature_descs_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extract_block_features.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extract_features.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gabor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quantize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rgb2hsv_utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_feature_descs.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@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(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@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(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@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(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: 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) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -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-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-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-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-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: gift-0.1.14/FeatureExtraction/extract_block_features.c0000644000175200001440000005020210153634147017772 00000000000000/* -*- mode: c -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include #include #include #include #include #include "gabor.h" //#include "extract_features.proto" #define square(x) ((x)*(x)) /* This determines the number of bands into which the gabor filter energies * are quantized. /* #define num_gabor_ranges 16 */ #define num_gabor_ranges 10 const int image_size = 256; const int smallest_colour_block = 16; const int gabor_block_size = 16; int num_colour_scales; int num_total_colour_blocks; int *num_blocks_at_scale; int **col_counts; int *col_histogram; byte *block_mode; int num_colours_seen = 0; /* This specifies the bands into which the gabor filter energies are * quantized. /* double gabor_ranges[num_gabor_ranges] = {0.0625, 0.125, 0.25, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100000}; */ double gabor_ranges[num_gabor_ranges] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 100000}; int ***block_gabor_class; int ***gabor_histogram; void init_feature_variables(int colmap_size) { int i, j, k; int r, r1; int sqrt_num_blocks_at_this_scale; /* colour features */ r = image_size/smallest_colour_block; num_colour_scales = rint(log((double)r)/log(2.0)); num_total_colour_blocks = rint((double)square(r)*4.0*(1 - 1/pow(4.0, (double)num_colour_scales))/3.0); block_mode = (byte *)malloc(num_total_colour_blocks*sizeof(byte)); col_counts = (int **)malloc(num_total_colour_blocks*sizeof(int *)); col_histogram = (int *)malloc(colmap_size*sizeof(int)); num_blocks_at_scale = (int *)malloc(num_colour_scales*sizeof(int)); k = 0; num_blocks_at_scale[0] = square(r); for (i = 0; i < num_colour_scales; i++) { for (j = 0; j < num_blocks_at_scale[i]; j++) { col_counts[k++] = (int *)malloc(colmap_size*sizeof(int)); } if (i != num_colour_scales - 1) num_blocks_at_scale[i+1] = num_blocks_at_scale[i]/4; } #ifdef DEBUG fprintf(stderr, "num_total_colour_blocks: %d\n", num_total_colour_blocks); #endif /* Gabor features */ block_gabor_class = (int ***)malloc(num_gabor_scales*sizeof(int **)); gabor_histogram = (int ***)malloc(num_gabor_scales*sizeof(int **)); for (i = 0; i < num_gabor_scales; i++) { block_gabor_class[i] = (int **)malloc(num_gabors_per_scale*sizeof(int *)); gabor_histogram[i] = (int **)malloc(num_gabors_per_scale*sizeof(int *)); for (j = 0; j < num_gabors_per_scale; j++) { block_gabor_class[i][j] = (int *)malloc(square(image_size/gabor_block_size)*sizeof(int)); gabor_histogram[i][j] = (int *)calloc(num_gabor_ranges, sizeof(int)); } } } void extract_gabor_features(PPM *im_hsv) { int i, j, x, y, k; int scale, orientation; int energy_class; PPM *value_plane; double *value_image_dbl, *filtered_image; double gabor_mean; /* for Gabor features, this is what I'm going to do: - Apply each of the 12 filters (3 scales, 4 orientations) to each pixel in the image. - Use 16x16 blocks only. - In each block find the rms energy of each filter. - quantize these into num_gabor_ranges levels, as specified in the array gabor_ranges[] */ /* make a float version of the value plane of the image */ value_image_dbl = (double *)malloc(im_hsv->width*im_hsv->height*sizeof(double)); filtered_image = (double *)malloc(im_hsv->width*im_hsv->height*sizeof(double)); value_plane = ppm_plane(im_hsv, VALUE); for (i = 0; i < im_hsv->width*im_hsv->height; i++) { value_image_dbl[i] = (double)(value_plane->pixel[i]); } destroy_ppm(&value_plane); /* apply each filter to the image */ for (scale = 0; scale < num_gabor_scales; scale++) { for (orientation = 0; orientation < num_gabors_per_scale; orientation++) { /* filter the image */ gabor_filter(value_image_dbl, im_hsv->width, im_hsv->height, scale, orientation, filtered_image); /* extract the rms energy for each block */ k = 0; /* block counter */ for (y = 0; y < im_hsv->height; y += gabor_block_size) { for (x = 0; x < im_hsv->width; x += gabor_block_size) { gabor_mean = 0; for (i = 0; (i < gabor_block_size) && (y+i < im_hsv->height); i++) { for (j = 0; (j < gabor_block_size) && (x+j < im_hsv->height); j++) { gabor_mean += square((filtered_image[(y + i)*im_hsv->width + (x + j)])); } } gabor_mean /= square(gabor_block_size); gabor_mean = sqrt(gabor_mean); /* find the energy class for this block */ for (energy_class = 0; energy_class < num_gabor_ranges; energy_class++) { if (gabor_mean < gabor_ranges[energy_class]) break; } /* store this class in the appropriate place */ block_gabor_class[scale][orientation][k] = energy_class; /* increment the histogram entry for this combination */ gabor_histogram[scale][orientation][energy_class]++; k++; /* increment block counter */ } } } } } void extract_mode_features(PPM *im, int *colmap, int colmap_size) { int i, j, k, last_k, k1, m, n, r, x, y; byte colour; int scale, block_size, num_blocks, old_num_blocks; int max_count, mode_index; int b1, b2, b3, b4; #ifdef GENERATE_BLOCK_IMAGES PPM *out_image, *out_image_hsv, *out_image_rgb; enum ppm_error the_error; FILE *outfile; char out_fname[256]; #endif #ifdef GENERATE_BLOCK_IMAGES /* make space for an HSV image of the same size as that read */ out_image = new_ppm(); out_image->type = PGM_RAW; out_image->width = im->width; out_image->height = im->height; out_image->max_col_comp = im->max_col_comp; out_image->bytes_per_pixel = 1; out_image->pixel = (byte *)malloc(out_image->width*out_image->height*sizeof(byte)); #endif /* first extract the lowest level blocks, directly from the pixels of the PGM image */ scale = 0; block_size = smallest_colour_block; num_blocks = square(image_size/block_size); k = last_k = 0; for (y = 0; y < im->height; y += block_size) { for (x = 0; x < im->width; x += block_size) { for (n = 0; n < colmap_size; n++) { col_counts[k][n] = 0; } for (i = 0; (i < block_size) && (y+i < im->height); i++) { for (j = 0; (j < block_size) && (x+j < im->width); j++) { colour = im->pixel[(y + j)*im->width + (x + i)]; col_counts[k][colour]++; } } /* find the mode */ max_count = mode_index = 0; for (n = 0; n < colmap_size; n++) { if (col_counts[k][n] > max_count) { max_count = col_counts[k][n]; mode_index = n; } } block_mode[k] = mode_index; k++; } } #ifdef GENERATE_BLOCK_IMAGES /* generate an image with this */ k1 = 0; for (y = 0; y < im->height; y += block_size) { for (x = 0; x < im->width; x += block_size) { for (i = 0; i < block_size; i++) { for (j = 0; j < block_size; j++) { out_image->pixel[(y + j)*im->width + (x + i)] = block_mode[k1]; } } k1++; } } /* convert from the colour map to an HSV image */ if ((the_error = colmap2rgb_ppm(out_image, colmap, colmap_size, &out_image_hsv)) != PPM_OK) { ppm_handle_error(the_error); exit(1); } /* convert to RGB */ if ((the_error = hsv2rgb_ppm(out_image_hsv, &out_image_rgb)) != PPM_OK) { ppm_handle_error(the_error); exit(1); } /* write it */ sprintf(out_fname, "blocks_%dx%d.ppm", block_size, block_size); outfile = fopen(out_fname, "wb"); if ((the_error = write_ppm(outfile, out_image_rgb, PPM_RAW)) != PPM_OK) { ppm_handle_error(the_error); exit(1); } fclose(outfile); destroy_ppm(&out_image_rgb); destroy_ppm(&out_image_hsv); #endif /* now do the other scales */ for (scale = 1; scale < num_colour_scales; scale++) { block_size *= 2; num_blocks /= 4; r = (int)sqrt((double)num_blocks); for (i = 0; i < num_blocks; i++) { m = (i/r)*2*r; /* note: this first is *integer* division */ b1 = last_k + 2*i + m; b2 = last_k + 2*i + m + 1; b3 = last_k + 2*i + m + 2*r; b4 = last_k + 2*i + m + 2*r + 1; max_count = mode_index = 0; for (n = 0; n < colmap_size; n++) { col_counts[k + i][n] = col_counts[b1][n] + col_counts[b2][n] + col_counts[b3][n] + col_counts[b4][n]; if (col_counts[k + i][n] > max_count) { max_count = col_counts[k + i][n]; mode_index = n; } } block_mode[k + i] = mode_index; } #ifdef GENERATE_BLOCK_IMAGES /* generate an image with this */ for (y = 0; y < im->height; y += block_size) { for (x = 0; x < im->width; x += block_size) { for (i = 0; i < block_size; i++) { for (j = 0; j < block_size; j++) { out_image->pixel[(y + j)*im->width + (x + i)] = block_mode[k1]; } } k1++; } } /* convert from the colour map to an HSV image */ if ((the_error = colmap2rgb_ppm(out_image, colmap, colmap_size, &out_image_hsv)) != PPM_OK) { ppm_handle_error(the_error); exit(1); } /* convert to RGB */ if ((the_error = hsv2rgb_ppm(out_image_hsv, &out_image_rgb)) != PPM_OK) { ppm_handle_error(the_error); exit(1); } /* write it */ sprintf(out_fname, "blocks_%dx%d.ppm", block_size, block_size); outfile = fopen(out_fname, "wb"); if ((the_error = write_ppm(outfile, out_image_rgb, PPM_RAW)) != PPM_OK) { ppm_handle_error(the_error); exit(1); } fclose(outfile); destroy_ppm(&out_image_rgb); destroy_ppm(&out_image_hsv); #endif last_k = k; k += num_blocks; } /* now finally consolidate all the colour counts to produce the histogram for the whole image */ k -= num_blocks; for (n = 0; n < colmap_size; n++) col_histogram[n] = col_counts[k][n] + col_counts[k + 1][n] + col_counts[k + 2][n] + col_counts[k + 3][n]; } enum ppm_error write_mode_features(char *out_fname, int colmap_size) { FILE *out_file = NULL; int feature_index; int block_features_offset; int scale, orientation, energy_class; int num_features; FEATURE_DATA *feature; int i; /***** count the features *****/ /* we know that there will be a mode color for each block */ num_features = num_total_colour_blocks; /* and there will be one for each non-zero histogram entry. Convert histogram entries to range [0, FREQ_MAX] while we're at it */ for (i = 0; i < colmap_size; i++) { col_histogram[i] = (int)(rint(FREQ_MAX*(double)col_histogram[i]/(double)(square(image_size)))); if (col_histogram[i] != 0) num_features++; } #ifdef NO_FLAT_FEATURES /* count the block entries which are not of class zero (which indicates a filter response too low to write), and the non-zero gabor histogram entries */ for (scale = 0; scale < num_gabor_scales; scale++) { for (orientation = 0; orientation < num_gabors_per_scale; orientation++) { /* blocks */ for (i = 0; i < square((image_size/gabor_block_size)); i++) { if (block_gabor_class[scale][orientation][i] != 0) num_features++; } /* histogram */ for (energy_class = 0; energy_class < num_gabor_ranges; energy_class++) { if (gabor_histogram[scale][orientation][energy_class] != 0) num_features++; } } } #else /* here we ARE storing features for filter responses in the lowest * energy band, so the number of block features is fixed (and v. * large!). We also count the non-zero gabor histogram entries */ /* blocks */ num_features += num_gabor_scales*num_gabors_per_scale*square((image_size/gabor_block_size)); /* histogram */ for (scale = 0; scale < num_gabor_scales; scale++) { for (orientation = 0; orientation < num_gabors_per_scale; orientation++) { for (energy_class = 0; energy_class < num_gabor_ranges; energy_class++) { if (gabor_histogram[scale][orientation][energy_class] != 0) num_features++; } } } #endif #ifdef DEBUG fprintf(stderr, "Image contains %d features.\n", num_features); #endif /* allocate space to store the features */ feature = (FEATURE_DATA *)malloc(num_features*sizeof(FEATURE_DATA)); /***** store the features in the array *****/ feature_index = 0; /* colour block features */ for (i = 0; i < num_total_colour_blocks; i++) { /* note that each block can have colmap_size values */ feature[feature_index].id = i*colmap_size + (int)block_mode[i]; feature[feature_index].frequency = FREQ_MAX; /* binary features */ feature_index++; } block_features_offset = num_total_colour_blocks*colmap_size; /* colour histogram features */ for (i = 0; i < colmap_size; i++) { if (col_histogram[i] != 0) { feature[feature_index].id = block_features_offset + i; feature[feature_index].frequency = (freq_type)col_histogram[i]; feature_index++; } } block_features_offset += colmap_size; /* gabor block features */ for (scale = 0; scale < num_gabor_scales; scale++) { for (orientation = 0; orientation < num_gabors_per_scale; orientation++) { /* blocks */ for (i = 0; i < square((image_size/gabor_block_size)); i++) { #ifdef NO_FLAT_FEATURES if (block_gabor_class[scale][orientation][i] != 0) { feature[feature_index].id = block_features_offset + block_gabor_class[scale][orientation][i]; feature[feature_index].frequency = FREQ_MAX; feature_index++; } #else feature[feature_index].id = block_features_offset + block_gabor_class[scale][orientation][i]; feature[feature_index].frequency = FREQ_MAX; feature_index++; #endif block_features_offset += num_gabor_ranges; } } } /* gabor histogram features */ for (scale = 0; scale < num_gabor_scales; scale++) { for (orientation = 0; orientation < num_gabors_per_scale; orientation++) { for (energy_class = 0; energy_class < num_gabor_ranges; energy_class++) { if (gabor_histogram[scale][orientation][energy_class] != 0) { feature[feature_index].id = block_features_offset; feature[feature_index].frequency = (freq_type)rint(FREQ_MAX*(double)gabor_histogram[scale][orientation][energy_class]/(double)square((image_size/gabor_block_size))); feature_index++; } block_features_offset++; } } } #ifdef DEBUG fprintf(stderr, "%d features found.\n", feature_index); fprintf(stderr, "block_features_offset = %d.\n", block_features_offset); #endif /***** now write the file *****/ /* open it */ if ((out_file = fopen(out_fname, "wb")) == NULL) { fprintf(stderr, "Error opening file %s for writing.\n\n", out_fname); return(FILE_OPEN_ERROR); } /* write the number of features */ if (fwrite(&num_features, sizeof(int), 1, out_file) != 1) { fprintf(stderr, "Error writing file %s.\n\n", out_fname); return(FILE_WRITE_ERROR); } /** HACK: convert all this features to floats. WARNING: we write here floats into an integer field of a structure Why is this necessary? The original version rounds at many places So we cannot just set FREQ_MAX=1. (WM)*/ for(i=0; itype = PPM_RAW; hsv_image->width = 256; hsv_image->height = 256; hsv_image->max_col_comp = 255; hsv_image->bytes_per_pixel = 3; hsv_image->pixel = (byte *)malloc(3*256*256*sizeof(byte)); hsv_quantize_ppm(hsv_image, &qimage, &colmap, 18, 3, 3, 4); destroy_ppm(&hsv_image); /* now write the block images */ k = 0; block_size = smallest_colour_block; num_blocks = square(image_size/block_size); for (scale = 0; scale < num_colour_scales; scale++) { for (y = 0; y < 256; y += block_size) { for (x = 0; x < 256; x += block_size) { for (i = 0; i < block_size; i++) { for (j = 0; j < block_size; j++) { qimage->pixel[(y + j)*256 + (x + i)] = block_mode[k]; } } k++; } } /* convert from the colour map to an HSV image */ if ((the_error = colmap2rgb_ppm(qimage, colmap, colmap_size, &hsv_image)) != PPM_OK) { ppm_handle_error(the_error); exit(1); } /* convert to RGB */ if ((the_error = hsv2rgb_ppm(hsv_image, &rgb_image)) != PPM_OK) { ppm_handle_error(the_error); exit(1); } /* write it */ sprintf(out_fname, "fts2blocks_%dx%d.ppm", block_size, block_size); outfile = fopen(out_fname, "wb"); if ((the_error = write_ppm(outfile, rgb_image, PPM_RAW)) != PPM_OK) { ppm_handle_error(the_error); exit(1); } fclose(outfile); destroy_ppm(&hsv_image); destroy_ppm(&rgb_image); block_size *= 2; num_blocks /= 4; } } enum ppm_error write_feature_descriptions(FILE *out_file, int *colmap, int colmap_size) { int feature_index = 0; int block_size; int i, j, k; int scale, orientation; /* block features */ block_size = smallest_colour_block; for (i = 0; i < num_colour_scales; i++) { for (j = 0; j < num_blocks_at_scale[i]; j++) { for (k = 0; k < colmap_size; k++) { fprintf(out_file, "%d %d COL_POS block size = %dx%d position = %d H,S,V = %d, %d, %d\n", feature_index, COL_POS, block_size, block_size, j, colmap[3*k + HUE], colmap[3*k + SATURATION], colmap[3*k + VALUE]); feature_index++; } } block_size *= 2; } /* colour histogram features */ for (i = 0; i < colmap_size; i++) { fprintf(out_file, "%d %d COL_HST H,S,V = %d, %d, %d\n", feature_index, COL_HST, colmap[3*i + HUE], colmap[3*i + SATURATION], colmap[3*i + VALUE]); feature_index++; } /* gabor block features */ for (scale = 0; scale < num_gabor_scales; scale++) { for (orientation = 0; orientation < num_gabors_per_scale; orientation++) { /* blocks */ for (i = 0; i < square((image_size/gabor_block_size)); i++) { for (j = 0; j < num_gabor_ranges; j++) { fprintf(out_file, "%d %d GABOR_POS block size = %dx%d position = %d SCALE, ORIENTATION, ENERGY = %d, %d, %f\n", feature_index, GABOR_POS, gabor_block_size, gabor_block_size, i, scale, orientation, gabor_ranges[j]); feature_index++; } } } } /* gabor histogram features */ for (scale = 0; scale < num_gabor_scales; scale++) { for (orientation = 0; orientation < num_gabors_per_scale; orientation++) { for (j = 0; j < num_gabor_ranges; j++) { fprintf(out_file, "%d %d GABOR_HST SCALE, ORIENTATION, ENERGY UPPER BOUND = %d, %d, %f\n", feature_index, GABOR_HST, scale, orientation, j); feature_index++; } } } /* everything is OK if we got this far */ return(PPM_OK); } gift-0.1.14/FeatureExtraction/gabor_old.h0000644000175200001440000000077310220502727015206 00000000000000#define sq(x) ((x)*(x)) /* note that all this is taken from the paper JaH98 in ~/tex/bib/squizz.bib */ /* define some constants for the filter bank */ #define theta_step M_PI/4 /* define the functions which determine the parameters of the filter back */ #define u00 (0.5/(1.0 + tan(B_theta))) #define sigma_m(u) (sqrt(2.0*log(2.0))/(3*u*tan(B_theta))) #define num_gabor_scales 3 #define gabor_kernel_size_0 9 #define gabor_kernel_size_1 17 #define gabor_kernel_size_2 35 #define num_gabors_per_scale 4 gift-0.1.14/notice.java0000644000175200001440000000156410153634147011603 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva 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 */ gift-0.1.14/notice.c0000644000175200001440000000156510153634147011105 00000000000000/* -*- mode: c -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva 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 */ gift-0.1.14/notice.h0000644000175200001440000000170710220502727011101 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ gift-0.1.14/aclocal.m40000644000175200001440000075443510220474067011331 00000000000000# generated automatically by aclocal 1.8.5 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # 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. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 47 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 s/^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 M$VC, # 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 "$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_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Check if we have a version mismatch between libtool.m4 and ltmain.sh. # # Note: This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined. # We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually # calls AC_LIBTOOL_CONFIG and creates libtool. # _LT_VERSION_CHECK # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_VERSION_CHECK # ----------------- AC_DEFUN([_LT_VERSION_CHECK], [AC_MSG_CHECKING([for correct ltmain.sh version]) if test -z "$ltmain"; then AC_MSG_RESULT(no) echo echo "*** [Gentoo] sanity check failed! ***" echo "*** \$ltmain is not defined, please check the patch for consistency! ***" echo exit 1 fi gentoo_lt_version="1.5.10" gentoo_ltmain_version=`grep '^[[:space:]]*VERSION=' $ltmain | sed -e 's|^[[:space:]]*VERSION=||'` if test "$gentoo_lt_version" != "$gentoo_ltmain_version"; then AC_MSG_RESULT(no) echo echo "*** [Gentoo] sanity check failed! ***" echo "*** libtool.m4 and ltmain.sh have a version mismatch! ***" echo "*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) ***" echo echo "Please run:" echo echo " libtoolize --copy --force" echo echo "if appropriate, please contact the maintainer of this" echo "package (or your distribution) for help." echo exit 1 else AC_MSG_RESULT(yes) fi ])# _LT_VERSION_CHECK # _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"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _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_LINK_IFELSE(AC_LANG_PROGRAM,[ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # 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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; 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-*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-*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-*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* ;; *-*-linux*) # Test if the compiler is 64bit echo 'int i;' > conftest.$ac_ext lt_cv_cc_64bit_output=no if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *"ELF 64"*) lt_cv_cc_64bit_output=yes ;; 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 ;; 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]) printf "$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}? :&$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 if test ! -s conftest.err; 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_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The compiler 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 else $2=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* ) # 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 *BSD fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. 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` ;; 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); */ } exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_unknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" 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 LDFLAGS="$LDFLAGS $link_static_flag" 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_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 printf "$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}? :&$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 if test ! -s out/conftest.err; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . $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" 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_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" if test "$GCC" = yes; then 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 ';' >/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. 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 else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' 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 ;; linux*) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 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 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 -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else $archive_expsym_cmds="$archive_cmds" fi else ld_shlibs=no fi ;; *) 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)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi 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 ;; kfreebsd*-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='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 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 ;; *) # from 3.2 on shlibpath_overrides_runpath=no 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' ;; 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*) 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=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi case $host_cpu:$lt_cv_cc_64bit_output in powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/X11R6/lib64" sys_lib_search_path_spec="/lib64 /usr/lib64 /usr/local/lib64 /usr/X11R6/lib64" ;; esac # 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' # Find out which ABI we are using (multilib Linux x86_64 hack). libsuff= case "$host_cpu" in x86_64*) echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 ;; esac fi rm -rf conftest* ;; *) ;; esac sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; knetbsd*-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='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=no 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" ;; sco3.2v5*) version_type=osf 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 ;; 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.2uw2* | sysv4.3* | sysv5*) 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 ;; 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_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [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 # 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 dll's 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 recognise 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 recognise 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 GNU ld's 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; 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)/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 ;; 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*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 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 ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | 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_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/${ac_tool_prefix}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" 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 LIBLTDL # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. 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 LIBLTDL # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. 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 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. # 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;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER # # Check for any special shared library compilation flags. # _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= if test "$GCC" = no; then case $host_os in sco3.2v5*) _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' ;; esac fi if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : else AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no fi fi # # Check to make sure the static flag actually works. # AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 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($1) # Report which librarie types wil actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. ac_ext=cc # 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;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # 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 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 unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 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' 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 $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${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 $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_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' # -bexpall does not export symbols beginning with underscore (_) _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds it's shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi 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}--image-base=0x10000000 ${wl}--out-implib,$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}--image-base=0x10000000 ${wl}--out-implib,$lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) case "$host_os" in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case "$cc_basename" in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's _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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _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* | kfreebsd*-gnu) # 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 case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; *) _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' ;; esac fi case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; *) _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*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) _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 ia64*|hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) _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 ;; 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 ${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}${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*) 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 _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' ;; 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' ;; 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' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) _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' ;; 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 ${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}${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 ${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 $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}${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 ;; sco*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case $cc_basename in CC) # 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 ;; 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(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -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} -nolib ${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 C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes # 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 -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' # 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' fi ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 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_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$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 # 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., 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. # 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 s/^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 # 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 # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" # 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([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 the above into a raw symbol and a C symbol. symxfrm='\1 \2\3 \3' # 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*) 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* | sysv5*) symcode='[[BDRT]]' ;; 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 # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | 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). _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)= ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case "$cc_basename" in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu) # 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)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_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)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; 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*) 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) # 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' ;; 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' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; sco*) case $cc_basename in CC) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; *) ;; esac ;; 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 ;; unixware*) ;; 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* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; 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' ;; 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* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux*) case $CC 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' ;; 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' ;; 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' ;; sco3.2v5*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' ;; solaris*) _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' ;; 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* | sysv5*) _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 ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= 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 ;; 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}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -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}--image-base=0x10000000 ${wl}--out-implib,$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}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) 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 ;; 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 ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds" 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 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 -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds" fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; *) 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)" = yes; then 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 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 "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 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' 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 $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${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 $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_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' # -bexpall does not export symbols beginning with underscore (_) _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds it's shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${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' fix_srcfile_path='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case "$host_os" in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case "$cc_basename" in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's _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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _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* | kfreebsd*-gnu) _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* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -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*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no # 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(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 ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) _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 ;; 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 ${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)=: ;; sco3.2v5*) _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)='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then _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 _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]].*) ;; *) # 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 ;; 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.2uw2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv5*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now _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' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' ;; 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 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 # # 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* printf "$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) 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) ]) # 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 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 && break 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_MSG_RESULT([$SED]) ]) # -*- Autoconf -*- # Copyright (C) 2002, 2003 Free Software Foundation, Inc. # Generated from amversion.in; do not edit by hand. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 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.8"]) # 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.8.5])]) # AM_AUX_DIR_EXPAND # Copyright (C) 2001, 2003 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 6 # 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])]) # serial 7 -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 # 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # 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 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. #serial 2 # _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 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # 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 ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //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"]) ]) # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 7 # 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 -*- # 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. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 11 # 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_MISSING_PROG(AMTAR, tar) 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([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]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. # Copyright (C) 2001, 2003 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. 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)]) # -*- Autoconf -*- # Copyright (C) 2003 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 1 # 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])]) # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 8 # AM_PATH_LISPDIR # --------------- AC_DEFUN([AM_PATH_LISPDIR], [ # If set to t, that means we are running in a shell under Emacs. # If you have an Emacs named "t", then use the full path. test x"$EMACS" = xt && EMACS= AC_CHECK_PROGS([EMACS], [emacs xemacs], [no]) AC_ARG_VAR([EMACS], [the Emacs editor command]) AC_ARG_VAR([EMACSLOADPATH], [the Emacs library search path]) AC_ARG_WITH([lispdir], [ --with-lispdir override the default lisp directory], [ lispdir="$withval" AC_MSG_CHECKING([where .elc files should go]) AC_MSG_RESULT([$lispdir])], [ AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir], [ if test $EMACS != "no"; then if test x${lispdir+set} != xset; then # If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly # Some emacsen will start up in interactive mode, requiring C-x C-c to exit, # which is non-obvious for non-emacs users. # Redirecting /dev/null should help a bit; pity we can't detect "broken" # emacsen earlier and avoid running this altogether. AC_RUN_LOG([$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' conftest.out]) am_cv_lispdir=`sed -n \ -e 's,/$,,' \ -e '/.*\/lib\/x*emacs\/site-lisp$/{s,.*/lib/\(x*emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \ -e '/.*\/share\/x*emacs\/site-lisp$/{s,.*/share/\(x*emacs/site-lisp\),${datadir}/\1,;p;q;}' \ conftest.out` rm conftest.out fi fi test -z "$am_cv_lispdir" && am_cv_lispdir='${datadir}/emacs/site-lisp' ]) lispdir="$am_cv_lispdir" ]) AC_SUBST([lispdir]) ])# AM_PATH_LISPDIR AU_DEFUN([ud_PATH_LISPDIR], [AM_PATH_LISPDIR]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # 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 ]) # -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # 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 ]) # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # Copyright (C) 2003, 2004 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # 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 # Keeping the `.' argument allows $(mkdir_p) to be used without # argument. Indeed, we sometimes output rules like # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more # expensive solution, as it forces Make to start a sub-shell.) 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 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # _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. # # Copyright (C) 1996, 1997, 2000, 2001, 2003 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # 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)]) # AM_PROG_INSTALL_STRIP # Copyright (C) 2001, 2003 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # 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])]) m4_include([acinclude.m4]) gift-0.1.14/libGIFTAcInvertedFile/0000777000175200001440000000000010220511625013510 500000000000000gift-0.1.14/libGIFTAcInvertedFile/cc/0000777000175200001440000000000010220511626014076 500000000000000gift-0.1.14/libGIFTAcInvertedFile/cc/CAcIFFileSystem.cc0000644000175200001440000013300610220502727017200 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CAcIFFileSystem - class for the basic access to * the inverted file and the generation of the inverted file * **************************************** * * modification history: * * WM 260600 renamed file and class to reflect new architecture * HM removed some screen output * HM 010499 changed to find error * HM 090399 created the documentation * WM 10 98 created most of the content * **************************************** * * compiler defines used: * * _NO_PRINT_OFFSET_CHECK ? * _NO_CHECK_OFFSET_FILE ? * _NO_CHECK_CONSISTENCY do NOT check consistency after * generating inverted file * _NO_FIDPRINT ? * _NO_DIDPRINT ? * _NO_PRINT_ID ? * * _NO_PRINT_INIT * * IGNORE_UNKNOWN_URLS unknown images are considered to have an empty feature list * ****************************************/ #include #include //show which error makes reads fail! #include // for getpid #include "libMRML/include/mrml_const.h" // for parsing #include #include // for sprintf #include #include #include #include #include #include "libMRML/include/my_assert.h" #include "libGIFTAcInvertedFile/include/merge_sort_streams.h" //newGenerateInvertedFile #include "libGIFTAcInvertedFile/include/CIFBuilderTriplet.h" //newGenerateInvertedFile #include "libGIFTAcInvertedFile/include/CDocumentFrequencyList.h" #include "libGIFTAcInvertedFile/include/CAcIFFileSystem.h" #include "libGIFTAcInvertedFile/include/CInvertedFileChunk.h" #include #include #include #include #include "libGIFTAcInvertedFile/include/CIFListStart.h" #include "libMRML/include/CXMLElement.h" // constructor #include "libMRML/include/directory.h" // the install locations etc. as determined by ./configure #define _NO_PRINT_OFFSET_CHECK #define _NO_CHECK_OFFSET_FILE #define _NO_CHECK_CONSISTENCY #define _NO_CONSISTENCYPRINT #define _NO_FIDPRINT #define _NO_DIDPRINT #define _NO_PRINT_ID #define _NO_PRINT_INIT extern class CMutex* gMutex; /** used for reading the offset file */ typedef struct{ unsigned int mUInt1; unsigned int mUInt2; } SUIntUInt; /** used for reading the offset file */ typedef struct{ unsigned int mUInt1; //unsigned int mUInt2; streampos mStreampos; } SUIntStreampos; /*************************************** * * () * **************************************** * * modification history * * * ****************************************/ /* to test if the inverted file accessor is OK */ bool CAcIFFileSystem::operator()()const{ /**/gMutex->lock(); bool lReturnValue(mURL2FTS && mInvertedFile && *mInvertedFile && mOffsetFile && mURL2FTS->operator bool()); /**/gMutex->unlock(); return lReturnValue; }; /*************************************** * * generateInvertedFile - the inverted file is generated here * **************************************** * * modification history * * * ****************************************/ bool CAcIFFileSystem::generateInvertedFile(){ /**/gMutex->lock(); // open the feature description file // cout << "I want to use/generate the files:" << mInvertedFileName << endl << mOffsetFileName << endl << mURL2FTS->getURLToFeatureFileName() << endl << mFeatureDescriptionFileName << endl; ofstream lNewInvertedFile(mInvertedFileName.c_str()); ofstream lNewOffsetFile(mOffsetFileName.c_str()); /* if one of the files does not open correctly */ if(!(mURL2FTS->operator bool() && mFeatureDescriptionFile && lNewInvertedFile && lNewOffsetFile)){ cerr << "I could not open the necessary files for" << "generating an inverted file"; /**/gMutex->unlock(); return false; } cout << "files successfully opened" << flush << endl; bool lError=false; //Local: A hash of Inverted File Chunks by the feature ID map lInvertedFileHash; /// Meaning additional document information CADIHash lADI; list lAllAccessorElements; mURL2FTS->getAllAccessorElements(lAllAccessorElements); /* process this for all the images in the file URL to Feature file name */ for(list::const_iterator i=lAllAccessorElements.begin(); i!=lAllAccessorElements.end(); i++){ //This variable is used in the for loop to translate positions in the map into IDs int lDocumentID=i->getID(); cout << endl << "Processing File: " << lDocumentID << flush; cout << " " << *i << "..." << flush << endl; cout << "h" << flush << endl; /* use the second part of the map as the file name for the next feature file */ ifstream lFeatureFile(i->getFeatureFileName().c_str()); lADI[lDocumentID]=CAdditionalDocumentInformation(i->getFeatureFileName().c_str()); unsigned int lNumberOfFeatures=0; /* reads the number of features out of the file */ lFeatureFile.read((char*)&lNumberOfFeatures, sizeof(lNumberOfFeatures)); double lMaxDocumentFrequency=0; double lDocumentFrequencySquareSum=0; //Read features for one image if(lFeatureFile) { /* for each feature in the file */ for(unsigned int j=0; j1/1000000000); assert(lElement.getDocumentFrequency()<=1); //Adjust values which depend on the document Frequency //in the Additional Document Information lADI[lDocumentID]. adjustDF(lElement.getDocumentFrequency()); /* this adds a feature into the inverted file list of features */ lInvertedFileHash[lElement.getID()]. addElement(lDocumentID, lElement.getDocumentFrequency()); } } cout << "...finished" << flush << endl; //one or more errors... if(!lFeatureFile){ lError=true; cout << "Error reading file " << i->getFeatureFileName() << "!" << endl; } } // For each Inverted file chunk: this means for each feature // including the documents containing this feature // Write it and its offset for(map::const_iterator i=lInvertedFileHash.begin(); i!=lInvertedFileHash.end() && lNewInvertedFile; i++) { assert((*i).second.size()); //find out the ID of the feature TID lFeatureID=(*i).first; //writing the offset { // this is the position of the next feature in the inverted file streampos lPos(lNewInvertedFile.tellp()); /* updating the offset file */ writeOffsetFileElement(lFeatureID, lPos, lNewOffsetFile); cout << endl << "Writing Chunk for Feature ID " << hex << lFeatureID << ". The Offset is 0x" << hex << lPos << dec << "=" << lPos << endl; } // Writing the next piece of the inverted file { /* this writes the actual data for the feature, meaning the list of all the documents containg this feature */ bool lSuccessfullyWritten(((*i).second).writeBinary(lNewInvertedFile, lFeatureID, mURL2FTS->size())); if(!lSuccessfullyWritten) cout << "!!!!!!!!!!!Error in writing Inverted File at Feature" << lFeatureID << flush << endl; } } /* end of the loop for all the features */ if(!lNewInvertedFile){ cout << "ERROR in writing INVERTED FILE" << endl; } lNewInvertedFile.close(); lNewOffsetFile.close(); { //maybe calculate the ADI for each type of feature independently //could be useful //the value for the document frequency is known only //when one is ready to write. This has just now been the case, //and so... //For each feature for(map::iterator iChunk=lInvertedFileHash.begin(); iChunk!=lInvertedFileHash.end(); iChunk++) { /* for each document frequency (each document) for this feature */ for(CInvertedFileChunk::iterator iDocumentFrequency=(*iChunk).second.begin(); iDocumentFrequency!=(*iChunk).second.end(); iDocumentFrequency++) { //The document for which we want to calculate the sum TID lDID=(*iDocumentFrequency).first; /* if the document frequency does exist bigger than zero */ if((*iDocumentFrequency).second!=0) { double lDFLogICF= (*iDocumentFrequency).second * (-log((*iChunk).second.getCollectionFrequency(mURL2FTS->size()))); assert(((*iChunk).second).size()!=0); assert((*iChunk).second.getCollectionFrequency(mURL2FTS->size())); lADI[lDID].adjustSquareDFLogICF(lDFLogICF*lDFLogICF); } /* end of the if */ } } } /* bracket with no meaning */ //as last thing give as output the Additional Document Information /* writes the additional document information */ assert(lADI.output()); cout << "ADI WRITTEN ****************************************" << endl << endl; #ifndef _NO_CHECK_CONSISTENCY cout << "BEFORE checking inverted file consistency" << flush; assert(checkConsistency()); cout << "AFTER checking inverted file consistency" << endl << "The check was successful" << endl; #endif /**/gMutex->unlock(); return(!lError); } /** add a pair of FeatureID,Offset to the open offset file (helper function for inverted file construction) */ void CAcIFFileSystem::writeOffsetFileElement(TID inFeatureID, streampos inPosition, ostream& inOpenOffsetFile){ /**/gMutex->lock();/** used for reading the offset file */ SUIntStreampos lWriter; lWriter.mUInt1=inFeatureID; lWriter.mStreampos=inPosition; #ifndef _NO_PRINT_OFFSET_CHECK lWriter.mUInt2=int(inPosition); #endif // inOpenOffsetFile.write((char*)&inFeatureID, // sizeof(TID)); // inOpenOffsetFile.write((char*)&inPosition, // sizeof(streampos)); inOpenOffsetFile.write((char*)&lWriter, sizeof(lWriter)); std::cout << "[inFeatureID:" << sizeof(TID) << "/" << inFeatureID << ";inPosition:" << sizeof(streampos) << "/" << inPosition << "==" << int(inPosition) << "]" << sizeof(lWriter) << endl; /**/gMutex->unlock(); }; /*************************************** * * newGenerateInvertedFile - the inverted file is generated here * **************************************** * * modification history * * * ****************************************/ bool CAcIFFileSystem::newGenerateInvertedFile(){ /**/gMutex->lock(); // open the feature description file // cout << "NEWGEN I want to use/generate the files:" << mInvertedFileName << endl << mOffsetFileName << endl << mURL2FTS->getURLToFeatureFileName() << endl << mFeatureDescriptionFileName << endl; ofstream lNewInvertedFile(mInvertedFileName.c_str()); ofstream lNewOffsetFile(mOffsetFileName.c_str()); /* if one of the files does not open correctly */ if(!(mURL2FTS->operator bool() && mFeatureDescriptionFile && lNewInvertedFile && lNewOffsetFile)){ cerr << "I could not open the necessary files for" << "generating an inverted file"; /**/gMutex->unlock(); return false; } cout << "files successfully opened" << flush << endl; bool lError=false; /// Meaning additional document information CADIHash lADI; string lAuxiliaryName1(mTemporaryIndexingFileBase+"gift-auxiliary-1"); string lAuxiliaryName2(mTemporaryIndexingFileBase+"gift-auxiliary-2"); ofstream lAuxOutputStream(lAuxiliaryName1.c_str()); list lAllAccessorElements; mURL2FTS->getAllAccessorElements(lAllAccessorElements); /* process this for all the images in the file URL to Feature file name */ for(list::const_iterator i=lAllAccessorElements.begin(); i!=lAllAccessorElements.end(); i++){ //This variable is used in the for loop to translate positions in the map into IDs int lDocumentID=i->getID(); cout << endl << "Processing File: " << lDocumentID << flush; cout << " " << *i << "..." << flush << endl; cout << "h" << flush << endl; /* use the second part of the map as the file name for the next feature file */ ifstream lFeatureFile(i->getFeatureFileName().c_str()); lADI[lDocumentID]=CAdditionalDocumentInformation(i->getFeatureFileName().c_str()); unsigned int lNumberOfFeatures=0; /* reads the number of features out of the file */ lFeatureFile.read((char*)&lNumberOfFeatures, sizeof(lNumberOfFeatures)); double lMaxDocumentFrequency=0; double lDocumentFrequencySquareSum=0; //Read features for one image if(lFeatureFile){ /* for each feature in the file */ for(unsigned int j=0; jgetFeatureFileName() << "!" << endl; } } if(!lAuxOutputStream){ cout << "ERROR in writing AUXILIARY FILE" << endl; } lAuxOutputStream.close(); /* now sort the file of the triplets which we just have created the first name is the name of the auxiliary file which we just wrote, the second name is the one of another auxiliary file which we need because we do not do any in-place-merging. the result of this is supposed to be in gift-auxiliary-1. */ cout << "before mergesort " << flush << endl; string lLastFileUsed(merge_sort_streams(lAuxiliaryName1.c_str(), lAuxiliaryName2.c_str())); cout << "after mergesort. The last file I used was " << lLastFileUsed << flush << endl; /* now read the file buildertriplet by buildertriplet. each time the ID changes, we are finished with one list */ ifstream lInAuxiliaryFile(lLastFileUsed.c_str()); cout << "Opening sorted stream for reading. State (should be '1'): " << lInAuxiliaryFile << endl; if(lInAuxiliaryFile){ // the right starting conditions for // the following do-loop. CIFBuilderTriplet lOldTriplet(0,0,0); CIFBuilderTriplet lTriplet(0,0,0); // read the first IFBuilder Triplet from the sorted // triplet file lInAuxiliaryFile.read((char*)&lTriplet, sizeof(lTriplet)); do{ CInvertedFileChunk lChunk; TID lFeatureID; //Read now the list for one feature from //the auxiliary file { do{ lOldTriplet=lTriplet; lFeatureID=lOldTriplet.mFeatureID; lChunk.addElement(lOldTriplet.mDocumentID, lOldTriplet.mDocumentFrequency); lInAuxiliaryFile.read((char*)&lTriplet, sizeof(lTriplet)); }while(lInAuxiliaryFile && (lTriplet.mFeatureID ==lOldTriplet.mFeatureID)); /* special case for very last feature */ if((!lInAuxiliaryFile) && (!lTriplet.isIdentical(lOldTriplet))){ lChunk.addElement(lTriplet.mDocumentID, lTriplet.mDocumentFrequency); lFeatureID=lTriplet.mFeatureID; }else{ lFeatureID=lOldTriplet.mFeatureID; } } // Write this chunk just read as the next piece of the inverted file { /* this writes the current position and the current feature ID into the offset file */ writeOffsetFileElement(lFeatureID, lNewInvertedFile.tellp(), lNewOffsetFile); /* this writes the actual data for the feature, meaning the list of all the documents containg this feature */ cout //<< endl << "Writing Chunk for Feature ID " << hex << lFeatureID << ". The Offset is 0x" << hex << lNewInvertedFile.tellp() << dec << "=" << lNewInvertedFile.tellp() << endl; bool lSuccessfullyWritten(lChunk.writeBinary(lNewInvertedFile, lFeatureID, mURL2FTS->size())); if(!lSuccessfullyWritten) cout << "!!!!!!!!!!!Error in writing Inverted File at Feature" << lFeatureID << flush << endl; } /* Now use this data also for creating additional document information for each document frequency (each document) for this feature */ for(CInvertedFileChunk::iterator iDocumentFrequency=lChunk.begin(); iDocumentFrequency!=lChunk.end(); iDocumentFrequency++){ //The document for which we want to calculate the sum TID lDID=(*iDocumentFrequency).first; /* if the document frequency does exist bigger than zero */ if((*iDocumentFrequency).second!=0){ double lDFLogICF= (*iDocumentFrequency).second * (-log(lChunk.getCollectionFrequency(mURL2FTS->size()))); assert((lChunk).size()!=0); assert(lChunk.getCollectionFrequency(mURL2FTS->size())); //Adjust values which depend on the document Frequency //in the Additional Document Information lADI[lDID]. adjustDF(iDocumentFrequency->second); lADI[lDID].adjustSquareDFLogICF(lDFLogICF*lDFLogICF); } /* end of the if */ }// for each document in the list for one feature }while(lInAuxiliaryFile);//while there is still data in the auxiliary file }else{ cout << "ERROR in reading sorted auxiliary file" << endl; } if(!lNewInvertedFile){ cout << "ERROR in writing INVERTED FILE" << endl; /**/gMutex->unlock(); return false; } lNewInvertedFile.close(); lNewOffsetFile.close(); //as last thing give as output the Additional Document Information /* writes the additional document information */ cout << "NEW WRITING ADI ****************************************" << endl; assert(lADI.output()); cout << "NEW ADI WRITTEN ****************************************" << endl << endl; cout << "BEFORE checking inverted file consistency" << flush; assert(checkConsistency()); cout << "AFTER checking inverted file consistency" << endl << "The check was successful" << endl; #ifndef _NO_CHECK_CONSISTENCY #endif // delete the helper files created by merge_sort_streams unlink("gift-auxiliary-1"); unlink("gift-auxiliary-2"); /**/gMutex->unlock(); return(!lError); } /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ CAcIFFileSystem::CAcIFFileSystem(const CXMLElement& inCollectionElement): mURL2FTS(new CAcURL2FTS(inCollectionElement)), mOffsetFileName(inCollectionElement.stringReadAttribute(mrml_const::cui_base_dir).second +inCollectionElement.stringReadAttribute(mrml_const::cui_offset_file_location).second), mInvertedFileName(inCollectionElement.stringReadAttribute(mrml_const::cui_base_dir).second +inCollectionElement.stringReadAttribute(mrml_const::cui_inverted_file_location).second), mFeatureDescriptionFileName(inCollectionElement.stringReadAttribute(mrml_const::cui_base_dir).second +inCollectionElement.stringReadAttribute(mrml_const::cui_feature_description_location).second), mTemporaryIndexingFileBase(inCollectionElement.stringReadAttribute(mrml_const::cui_base_dir).second), mInvertedFile(0), #ifdef V295 mInvertedFileBuffer(0), #else mInvertedFileBuffer(""), #endif mMaximumFeatureID(0){ /**/gMutex->lock(); if(inCollectionElement.stringReadAttribute(mrml_const::cui_generate_inverted_file).first && inCollectionElement.boolReadAttribute(mrml_const::cui_generate_inverted_file).second){ newGenerateInvertedFile(); }else{ bool lSuccessfulStart(inCollectionElement.stringReadAttribute(mrml_const::cui_base_dir).first && inCollectionElement.stringReadAttribute(mrml_const::cui_feature_file_location).first && inCollectionElement.stringReadAttribute(mrml_const::cui_offset_file_location).first && inCollectionElement.stringReadAttribute(mrml_const::cui_inverted_file_location).first); if(lSuccessfulStart && init(inCollectionElement.boolReadAttribute(mrml_const::cui_in_memory).first && inCollectionElement.boolReadAttribute(mrml_const::cui_in_memory).second)){ cout << "CInvertedFile succuessfully initialised. Parameters:" << mInvertedFileName << endl << mOffsetFileName << endl << mURL2FTS->getURLToFeatureFileName() << endl << mFeatureDescriptionFileName << endl << endl; #ifndef _NO_PRINT_INIT { cout << "DIAGNOSE" << flush << endl; cout << "The current size of mURLToID is " << mURLToID.size() << endl; cout << "All elements:" << endl; int lCount=1; for(string_TID_map::const_iterator i=mURLToID.begin(); i!=mURLToID.end(); i++){ cout << "," << lCount++ << flush; } lCount=1; for(string_TID_map::const_iterator i=mURLToID.begin(); i!=mURLToID.end(); i++){ cout << lCount++ << ":" << flush << i->first << "->" << i->second << flush << endl << flush; } } #endif }; #ifndef _NO_PRINT_INIT checkNPrint(); cout << "Constructor left" << endl; #endif } /**/gMutex->unlock(); } /*************************************** * * init - initialization needed for the inverted file * **************************************** * * modification history * * * ****************************************/ bool CAcIFFileSystem::init(bool inMemory) { /**/gMutex->lock(); try{ mMaximumFeatureID=0; cout << "Opening _" << mInvertedFileName << "_"; if(inMemory){ ifstream lInvertedFile(mInvertedFileName.c_str()); if(lInvertedFile){ cout << endl << "(TRYING TO READ THE WHOLE FILE INTO MEMORY" << endl; lInvertedFile.seekg(0,ios::end); size_t lFileSize=lInvertedFile.tellg(); #ifdef V295 mInvertedFileBuffer=new char[lFileSize]; #else mInvertedFileBuffer="x"; mInvertedFileBuffer.resize(lFileSize); #endif lInvertedFile.seekg(0,ios::beg); #ifdef V295 lInvertedFile.read(mInvertedFileBuffer, lFileSize); #else // this is a kludge but speed does not matter here for(int i=0;ioperator bool() //was the superclass well constructed? && mFeatureDescriptionFile && mOffsetFile && *mInvertedFile); assert(mURL2FTS->size()); cout << endl << "Current success status" << lRetVal << endl; { list lAllAccessorElements; mURL2FTS->getAllAccessorElements(lAllAccessorElements); //for each element in the database for(list::const_iterator i=lAllAccessorElements.begin(); i!=lAllAccessorElements.end(); i++){ TID lID =i->getID(); string lURL=i->getURL(); pair lFeatureFileName=mURL2FTS->URLToFFN(lURL); assert(lFeatureFileName.first); mDocumentInformation .insert(make_pair(lID, CAdditionalDocumentInformation(lFeatureFileName.second))); lRetVal = lRetVal && mDocumentInformation[lID].input(); } } cout << "URLFile " << mURL2FTS->getURLToFeatureFileName() << " processed. Current success status" << lRetVal << endl; /* erase the offset file */ mIDToOffset.erase(mIDToOffset.begin(), mIDToOffset.end()); mOffsetFile.seekg(0); /* while there is no end of file for the offsets */ while(mOffsetFile){ SUIntStreampos lVal; /* read a value into the offset file */ mOffsetFile.read((char*)&lVal,sizeof(lVal)); if(mOffsetFile){ // actually useful code here! ;-I unsigned int lFeatureID=lVal.mUInt1; streampos lOffset(lVal.mStreampos);//FIXME streampos mMaximumFeatureID=(mMaximumFeatureID < lFeatureID)?lFeatureID:mMaximumFeatureID; mIDToOffset[lFeatureID]=lOffset; #ifndef _NO_PRINT_OFFSET_CHECK // hexdump of the characters read for(int i=0;iseekg(lOffset); //read the list start chunk //(by constructing an instance of the list start cunk) CIFListStart lListStart(*mInvertedFile); //checking it if(lListStart.getFeatureID()!=lFeatureID){ cout << "[ERROR" << flush << hex << lFeatureID << "," << hex << lListStart.getFeatureID() << dec << "]" << flush; assert(0); } #ifndef _NO_PRINT_OFFSET_CHECK else{ cout << "-" << flush; } #endif //And setting up the translation table from feature //ID to collection frequency mFeatureToCollectionFrequency[lListStart.getFeatureID()]= lListStart.getCollectionFrequency(); /* assert(mFeatureToCollectionFrequency[lListStart.getFeatureID()]);*/ } #ifndef _NO_CHECK_OFFSET_FILE #endif } // if the file is valid --> ID is valid! } cout << "OffsetFile " << mOffsetFileName << " processed. Current success status: " << lRetVal << endl; { /* as long as there is no end of file */ while(mFeatureDescriptionFile){ TID lFeatureID; unsigned int lType; mFeatureDescriptionFile >> lFeatureID >> lType; mFeatureDescription[lFeatureID]=lType; } /* end of while */ } cout << "FeatureDescriptionFile " << mFeatureDescriptionFileName << " processed: " << mFeatureDescription.size() << " elements in hash." << endl << "Initialisation successful? Returning " << lRetVal << endl; #ifndef _NO_PRINT_INIT checkNPrint(); #endif /**/gMutex->unlock(); return lRetVal; }catch(...){ cerr << "caught here " << endl; } }; /*************************************** * * FeatureToCollectionFrequency - Returns the collection frequency for a given feature * **************************************** * * modification history * * * ****************************************/ double CAcIFFileSystem:: FeatureToCollectionFrequency(TFeatureID inFeatureID)const{ /**/gMutex->lock(); if((mFeatureToCollectionFrequency.find(inFeatureID))!= mFeatureToCollectionFrequency.end()) { assert(0<(*(mFeatureToCollectionFrequency.find(inFeatureID))).second); double lReturnValue((*(mFeatureToCollectionFrequency.find(inFeatureID))).second); /**/gMutex->unlock(); return lReturnValue; } else { /**/gMutex->unlock(); return 1; } } /*************************************** * * DIDToMaxDocumentFrequency - return the maximum document frequency for a given document ID * **************************************** * * modification history * * * ****************************************/ double CAcIFFileSystem::DIDToMaxDocumentFrequency(TID inID)const{ /**/gMutex->lock(); if(mDocumentInformation.find(inID)!=mDocumentInformation.end()) { double lReturnValue((*mDocumentInformation.find(inID)).second.getMaximumDF()); /**/gMutex->unlock(); return lReturnValue; } else { assert(1==0); /**/gMutex->unlock(); return 1; } }; /*************************************** * * DIDToDFSquareSum - returns the Document frequency squaresum for a given document ID * **************************************** * * modification history * * * ****************************************/ /// returns the Document frequency squaresum for a given document ID double CAcIFFileSystem::DIDToDFSquareSum(TID inID)const{ /**/gMutex->lock(); if(mDocumentInformation.find(inID)!=mDocumentInformation.end()){ double lReturnValue(mDocumentInformation.find(inID)->second.getDFSquareSum()); /**/gMutex->unlock(); return lReturnValue; }else{ assert(1+1==0); /**/gMutex->unlock(); return 1; } } /*************************************** * * DIDToSquareDFLogICFSum - returns this function for a given document ID * **************************************** * * modification history * * * ****************************************/ double CAcIFFileSystem::DIDToSquareDFLogICFSum(TID inID)const{ if(mDocumentInformation.find(inID)!=mDocumentInformation.end()){ /**/gMutex->lock(); double lReturnValue((*mDocumentInformation.find(inID)) .second.getSquareDFLogICFSum()); /**/gMutex->unlock(); return lReturnValue; }else{ assert(1+1+1==0); /**/gMutex->unlock(); return 1; } }; /*************************************** * * FeatureToList - returns a list of document frequencies (documents) for a given feature ID * **************************************** * * modification history * * * ****************************************/ CDocumentFrequencyList* CAcIFFileSystem:: FeatureToList(TFeatureID inFeatureID)const { /**/gMutex->lock(); CDocumentFrequencyList* lRetVal=0; { mInvertedFile->clear(); //Find the list of URL-IDs for the feature if(mIDToOffset.find(inFeatureID)!=mIDToOffset.end()){ mInvertedFile->seekg((*mIDToOffset.find(inFeatureID)).second); assert(*mInvertedFile); /* if the inverted file has been able to be opened */ if(*mInvertedFile){ //read the beginning chunk of the list; CIFListStart lListStart(*mInvertedFile); // lRetVal=new CDocumentFrequencyList(lListStart.getNumberOfElements()); if(lListStart.getFeatureID()!=inFeatureID){ cerr << "Feature " << hex << inFeatureID << " not found."; /**/gMutex->unlock(); return 0; } #ifndef _NO_DIDPRINT cout << endl; #endif lRetVal->readBinary(*mInvertedFile); #ifndef _NO_DIDPRINT cout << endl; #endif } }else{ cerr << "II:Feature " << hex << inFeatureID << " not found." << mIDToOffset.size() << endl; /**/gMutex->unlock(); return 0; } } /**/gMutex->unlock(); return lRetVal; }; /*************************************** * * findWithinStream - needed for checking the consistency * **************************************** * * modification history * * * ****************************************/ ///needed for checking the consistency bool CAcIFFileSystem::findWithinStream(TID inFeatureID, TID inDocumentID, double inDocumentFrequency)const{ /**/gMutex->lock(); bool lRetVal=false; //Find the list of URL-IDs for the feature if(mIDToOffset.find(inFeatureID)!=mIDToOffset.end()) /* end points to the element after the last one for a list */ { /* seekg searches the file position to read (get) */ mInvertedFile->seekg((*mIDToOffset.find(inFeatureID)).second); /* if the file is correctly opened */ if(*mInvertedFile){ //read the beginning chunk of the list of documents //which contain a given feature CIFListStart lStart(*mInvertedFile); int lFeatureID = lStart.getFeatureID(); double lCollectionFrequency= lStart.getCollectionFrequency(); int lEndFor = lStart.getNumberOfElements(); cout << endl << "Feature:" << inFeatureID << "Size of CIFListStart:" << sizeof(lStart) << endl << "Position in inverted file: " << hex << mInvertedFile->tellg() << endl; if(lFeatureID!=inFeatureID){ cerr << "Feature " << hex << inFeatureID << " not found." << flush; assert(0==1); /**/gMutex->unlock(); return 0; }else{ cout << "ENDFOR=" << lEndFor << "!" << flush << endl; /* checks the document list for one feature */ for(int i=0; iunlock(); return lRetVal; }; /*************************************** * * checkConsistency - checks if the data in the inverted file is the same as in the single files * **************************************** * * modification history * * * ****************************************/ bool CAcIFFileSystem::checkConsistency() { /**/gMutex->lock(); #ifndef _NO_CONSISTENCYPRINT cout << "I am now checking the consistency between" << endl << "Feature files and the Inverted File" << endl << "Initialising..."; init(false); cout << "...done"; bool lRetVal=true; //for each image (URL) for(string_string_map::const_iterator i=mURL2FTS->mURLToFFN.begin(); i!=mURL2FTS->mURLToFFN.end(); i++) { CDocumentFrequencyList* lFeatures=URLToFeatureList((*i).first); cout << "FeatureFilename:-" << (*i).first << "-" << endl << flush; assert(lFeatures); TID lDocumentID=(*mURL2FTS->mURLToID.find((*i).first)).second; /* for every feature of one image */ for(CDocumentFrequencyList::const_iterator j=lFeatures->begin(); j!=lFeatures->end(); j++) { /* looks if it really in the inverted file */ lRetVal &= findWithinStream((*j).getID(), lDocumentID, (*j).getDocumentFrequency()); assert(lRetVal); } /* end for each feature of the image */ } /* end for each image */ /**/gMutex->unlock(); return lRetVal; #else /**/gMutex->unlock(); return true; #endif } /*************************************** * * URLToFeatureList - * returns the feature list (with document IDs) for a given URL * **************************************** * * modification history * * * ****************************************/ CDocumentFrequencyList* CAcIFFileSystem::URLToFeatureList(string inURL)const { /**/gMutex->lock(); #ifdef PRINT_ADI cout < lID=URLToID(inURL); if(!lID.first){//i.e. the URL is not part of the collection #ifdef IGNORE_UNKNOWN_URLS CDocumentFrequencyList* lReturnValue(0); #else pid_t lPID= getpid(); char lFeatureFileName[30]; sprintf(lFeatureFileName,"/tmp/testFTS-%d.fts",int(lPID)); system(string(string(__PERL_LOCATION__)+" "+string(__EXECBINDIR__)+"/gift-url-to-fts.pl "+inURL+" "+lFeatureFileName).c_str()); CDocumentFrequencyList* lReturnValue(this->getFeatureFile(lFeatureFileName)); #endif if(!lReturnValue){ lReturnValue=new CDocumentFrequencyList(); } /**/gMutex->unlock(); return lReturnValue; // { // cout << endl << "this= " << this << endl; // checkNPrint(); // cout << "could not find ID for URL " // << inURL << endl; // cout << "The current size of mURLToID is " << mURLToID.size() << endl; // cout << "All elements:" // << endl; // int lCount=1; // for(string_TID_map::const_iterator i=mURLToID.begin(); // i!=mURLToID.end(); // i++){ // cout << "," // << lCount++ // << flush; // } // lCount=1; // for(string_TID_map::const_iterator i=mURLToID.begin(); // i!=mURLToID.end(); // i++){ // cout << lCount++ // << ":" // << flush // << i->first // << "->" // << i->second // << flush // << endl // << flush; // } // } } my_assert(lID.first,inURL.c_str()); /**/gMutex->unlock(); return DIDToFeatureList(lID.second); }; CDocumentFrequencyList* CAcIFFileSystem::getFeatureFile(string inFileName)const{ /**/gMutex->lock(); CDocumentFrequencyList* lRetVal(0); /* if the filename has a size bigger than one, meaning it is defined */ if(inFileName.size()) { /* a file with the given file name */ ifstream lFile(inFileName.c_str()); unsigned int lNumberOfFeatures(0); if(lFile){ lFile.read((char*)&lNumberOfFeatures, sizeof(lNumberOfFeatures)); if(lFile && (lRetVal=new CDocumentFrequencyList(lNumberOfFeatures))){ lRetVal->readBinary(lFile); } } } /* end of if the URL was proper */ /**/gMutex->unlock(); return lRetVal; } /*************************************** * * DIDToFeatureList - returns the feature list for a special image with a document ID * **************************************** * * modification history * * * ****************************************/ CDocumentFrequencyList* CAcIFFileSystem::DIDToFeatureList(TID inDID)const{ /**/gMutex->lock(); #ifdef PRINT_ADI cout <second.output(cout); cout << ":ADI)" << endl; #endif CDocumentFrequencyList* lRetVal=0; /* tests if URL is found */ pair lFeatureFileName=mURL2FTS->IDToFFN(inDID); if(lFeatureFileName.first){ lRetVal=this->getFeatureFile(lFeatureFileName.second); } /* end of the if statement */ if(!lRetVal){ lRetVal=new CDocumentFrequencyList(0); } /**/gMutex->unlock(); return lRetVal; }; /*************************************** * * IDToURL - return the URL for an image for a given image ID * **************************************** * * modification history * * * ****************************************/ string CAcIFFileSystem::IDToURL(TID inID)const { /**/gMutex->lock(); pair lElement=mURL2FTS->IDToAccessorElement(inID); if(lElement.first){ /**/gMutex->unlock(); return lElement.second.getURL(); } else { cerr << "Error in Conversion from ID " << inID << " to URL." << endl; /**/gMutex->unlock(); return mrml_const::error; } } /*************************************** * * getFeatureDescription - returns the feature description for a given feature ID * **************************************** * * modification history * * * ****************************************/ unsigned int CAcIFFileSystem::getFeatureDescription(TID inID)const{ /**/gMutex->lock(); if(mFeatureDescription.find(inID)!=mFeatureDescription.end()){ unsigned int lReturnValue((*mFeatureDescription.find(inID)).second); /**/gMutex->unlock(); return lReturnValue; }else{ cout << "[UnknownFeature: " << inID << "]" << flush; /** debugging code */ cout << mFeatureDescription.size() << flush; /** /debugging code */ /**/gMutex->unlock(); return 0; } } /*************************************** * * Destructor * **************************************** * * modification history * * * ****************************************/ CAcIFFileSystem::~CAcIFFileSystem(){ cout << "CAcIFFileSystem::~CAcIFFileSystem() called " << endl << flush; /**/gMutex->lock(); /**/gMutex->unlock(); }; TID CAcIFFileSystem::getMaximumFeatureID()const{ return mMaximumFeatureID; }; /** Getting a list of all features contained in this */ list* CAcIFFileSystem::getAllFeatureIDs()const{ /**/gMutex->lock(); list* lReturnValue=new list(); if(lReturnValue){ for(CIDToOffset::const_iterator i=mIDToOffset.begin(); i!=mIDToOffset.end(); i++){ lReturnValue->push_back(i->first); } } lReturnValue->sort(); /**/gMutex->unlock(); return lReturnValue; } /** List of the IDs of all documents present in the inverted file */ void CAcIFFileSystem::getAllIDs(list& outIDList)const{ /**/gMutex->lock(); mURL2FTS->getAllIDs(outIDList); /**/gMutex->unlock(); }; /** List of triplets (ID,imageURL,thumbnailURL) of all the documents present in the inverted file */ void CAcIFFileSystem::getAllAccessorElements(list& outAccessorElementList)const{ /**/gMutex->lock(); mURL2FTS->getAllAccessorElements(outAccessorElementList); /**/gMutex->unlock(); }; /** get a given number of random AccessorElement's @param inoutResultList the list which will contain the result @param inSize the desired size of the inoutResultList */ void CAcIFFileSystem::getRandomIDs(list& outRandomIDList, list::size_type inSize)const{ /**/gMutex->lock(); mURL2FTS->getRandomIDs(outRandomIDList, inSize); /**/gMutex->unlock(); }; /** For drawing random sets. Why is this part of an CAccessorImplementation? The way the accessor is organised might influence the way random sets can be drawn. At present everything happens in RAM, but we do not want to be fixed on that. @param inoutResultList the list which will contain the result @param inSize the desired size of the inoutResultList */ void CAcIFFileSystem::getRandomAccessorElements(list& outResult, list::size_type inSize)const{ /**/gMutex->lock(); mURL2FTS->getRandomAccessorElements(outResult, inSize); /**/gMutex->unlock(); }; /** * * Translate a DocumentID to an accessor Element * */ pair CAcIFFileSystem::IDToAccessorElement(TID inID)const{ /**/gMutex->lock(); pair lReturnValue(mURL2FTS->IDToAccessorElement(inID)); /**/gMutex->unlock(); return lReturnValue; }; /** The number of images in this accessor */ int CAcIFFileSystem::size()const{ /**/gMutex->lock(); int lReturnValue(mURL2FTS->size()); /**/gMutex->unlock(); return lReturnValue; }; /** The number of images in this accessor */ pair CAcIFFileSystem::URLToID(const string& inURL)const{ /**/gMutex->lock(); pair lReturnValue(mURL2FTS->URLToID(inURL)); /**/gMutex->unlock(); return lReturnValue; }; CAcIFFileSystem::operator bool() const{ /**/gMutex->lock(); bool lReturnValue(this->operator()()); /**/gMutex->unlock(); return lReturnValue; } gift-0.1.14/libGIFTAcInvertedFile/cc/CDocumentFrequencyList.cc0000644000175200001440000000657210220502727020734 00000000000000/*************************************** * * CDocumentFrequencyList * **************************************** * * modification history: * * HM 090399 created the documentation * WM 10 98 created the file **************************************** * * compiler defines used: * * ****************************************/ #include "libGIFTAcInvertedFile/include/CDocumentFrequencyList.h" #include // debugging #include "libMRML/include/CMutex.h" extern CMutex* gMutex; #ifdef __CDFL_MEM_DEBUG__ int gSize=0; int gInSize=0; #endif /*************************************** * * writeBinary * **************************************** * * modification history * * * ****************************************/ CDocumentFrequencyList::CDocumentFrequencyList(size_t inSize): #ifdef _CDocumentFrequencyListIsArray mContent(new CDocumentFrequencyElement[inSize]) #else #ifdef _CDocumentFrequencyListIsVector vector(inSize) #else //otherwhise ignore the parameter list() #endif #endif { mSize=inSize; #ifdef _CDocumentFrequencyListIsArray mEnd=mContent+inSize; #endif #ifdef __CDFL_MEM_DEBUG__ gSize+=size(); gInSize+=inSize; #endif }; CDocumentFrequencyList::CDocumentFrequencyList(): #ifdef _CDocumentFrequencyListIsVector vector() #else #ifdef _CDocumentFrequencyListIsList //otherwhise ignore the parameter list() #endif #endif #ifdef _CDocumentFrequencyListIsArray mContent(new CDocumentFrequencyElement[1])// will this work? #endif { #ifdef _CDocumentFrequencyListIsArray mSize=0; mEnd=mContent; #endif #ifdef __CDFL_MEM_DEBUG__ gSize+=size(); gInSize+=0; #endif }; CDocumentFrequencyList::~CDocumentFrequencyList(){ #ifdef _CDocumentFrequencyListIsArray delete[] mContent; #endif #ifdef __CDFL_MEM_DEBUG__ gSize-=size(); gInSize-=mSize; cout << "[S" << gSize << "," << gInSize << "]" << flush; #endif } bool CDocumentFrequencyList::writeBinary(ostream& outStream)const{ bool lRetVal=true; #ifdef _CDocumentFrequencyListIsArray outStream.write((char*)mContent,size()*sizeof(CDocumentFrequencyElement)); #else for(const_iterator i=begin(); i!=end(); i++){ lRetVal= lRetVal && (*i).writeBinary(outStream); } #endif return lRetVal; }; bool CDocumentFrequencyList::readBinary(istream& inStream){ #ifdef _CDocumentFrequencyListIsList for(unsigned int i=0; ilock(); // cout << "|[" << getpid() << flush; inStream.read((char*)begin(),size()*sizeof(CDocumentFrequencyElement)); //cout << "]" << flush; unlock(); } #endif return bool(inStream); }; #ifdef _CDocumentFrequencyListIsArray CDocumentFrequencyList::iterator CDocumentFrequencyList::begin(){ return mContent; } CDocumentFrequencyList::iterator CDocumentFrequencyList::end(){ return mEnd; } CDocumentFrequencyList::const_iterator CDocumentFrequencyList::begin()const{ return mContent; } CDocumentFrequencyList::const_iterator CDocumentFrequencyList::end()const{ return mEnd; } size_t CDocumentFrequencyList::size()const{ return mSize; } void CDocumentFrequencyList::setEnd(CDocumentFrequencyElement* inEnd){ mEnd=inEnd; mSize=mEnd-mContent; } #endif gift-0.1.14/libGIFTAcInvertedFile/cc/CIFListStart.cc0000644000175200001440000000533410220502727016603 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CIFListStart * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #include #include "libGIFTAcInvertedFile/include/CIFListStart.h" #include /*************************************** * * constructor * **************************************** * * modification history * * * ****************************************/ /// CIFListStart::CIFListStart(istream& inStream){ inStream.read((char*)this, sizeof(*this)); assert(mCollectionFrequency && mNumberOfElements); }; /*************************************** * * getFeatureID * **************************************** * * modification history * * * ****************************************/ /// TID CIFListStart::getFeatureID()const{ return mFeatureID; }; /*************************************** * * getCollectionFrequency * **************************************** * * modification history * * * ****************************************/ /// double CIFListStart::getCollectionFrequency()const{ return mCollectionFrequency; }; /*************************************** * * getNumberOfElements * **************************************** * * modification history * * * ****************************************/ unsigned int CIFListStart::getNumberOfElements()const{ return mNumberOfElements; }; /*************************************** * * getNumberOfReservedElements * **************************************** * * modification history * * * ****************************************/ unsigned int CIFListStart::getNumberOfReservedElements()const{ return mNumberOfReservedElements; }; gift-0.1.14/libGIFTAcInvertedFile/cc/CDocumentFrequencyElement.cc0000644000175200001440000001544110220502727021405 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CDocumentFrequencyElement * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * _IS_FLOAT_FEATURE_ features have float document frequencies * _NO_PRINTOUT_WRITE_BINARY we do not want to be kept posted about * the progress of the binary writing * ****************************************/ #include "libGIFTAcInvertedFile/include/CDocumentFrequencyElement.h" #include "FeatureExtraction/gift_features.h" #include #include #define _IS_FLOAT_FEATURE_ #define _NO_PRINTOUT_WRITE_BINARY /* */ static unsigned const int sFREQ_MAX=(FREQ_MAX); /*************************************** * * input * **************************************** * * modification history * * * ****************************************/ bool CDocumentFrequencyElement::input(istream& inStream){ inStream >> mContent.mID >> mContent.mDocumentFrequency; return inStream; }; /*************************************** * * output * **************************************** * * modification history * * * ****************************************/ bool CDocumentFrequencyElement::output(ostream& outStream)const{ outStream << mContent.mID << " " << mContent.mDocumentFrequency << endl; return outStream; }; /*************************************** * * writeBinary * **************************************** * * modification history * * * ****************************************/ bool CDocumentFrequencyElement::writeBinary(ostream& outStream)const{ #ifndef _IS_FLOAT_FEATURE_ outStream.write(&mContent.mID, sizeof(mContent.mID)); unsigned int lDF=(unsigned int)(mContent.mDocumentFrequency*sFREQ_MAX); outStream.write(&lDF, sizeof(lDF)); #else #ifndef _NO_PRINTOUT_WRITE_BINARY cout << "[" << sizeof(*this) << ";" << getID() << ";" << getDocumentFrequency() << "]"; #endif outStream.write((char*)this, sizeof(*this)); #endif return outStream; }; /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ CDocumentFrequencyElement::CDocumentFrequencyElement(istream& inStream){ if(inStream){ #ifndef _IS_FLOAT_FEATURE_ #error "things here should not be compiled any more " //old, slow, ugly struct{ TID mFeatureID; unsigned int mContent.mDocumentFrequency; }lVal; inStream.read(&lVal, sizeof(lVal)); //FIXME HACK FIXME for curing a misunderstanding between davids and my programs... //lVal.mContent.mDocumentFrequency&=sFREQ_MAX; mContent.mDocumentFrequency=float(lVal.mContent.mDocumentFrequency)/sFREQ_MAX; if(mContent.mDocumentFrequency>1.0001){ cout << "DocumentFrequency is wrong:" << mContent.mDocumentFrequency << ">1.0001" << "Better?" << mContent.mDocumentFrequency/(1<<24) << endl << flush; } assert(mContent.mDocumentFrequency<1.0001); mContent.mID=lVal.mFeatureID; #else //new fast beautiful inStream.read((char*)&mContent, sizeof(mContent)); #ifdef PRINT cout << "[ID0x" << hex << mContent.mID << dec << ",DF" << mContent.mDocumentFrequency << "--" << sizeof(*this) << "]" << flush ; #endif #endif } } /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ CDocumentFrequencyElement::CDocumentFrequencyElement(TID inID, float inDocumentFrequency){ mContent.mDocumentFrequency=inDocumentFrequency; mContent.mID=inID; } /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ CDocumentFrequencyElement::CDocumentFrequencyElement(const CDocumentFrequencyElement& inElement){ mContent.mDocumentFrequency=inElement.mContent.mDocumentFrequency; mContent.mID=inElement.mContent.mID; } /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ CDocumentFrequencyElement::CDocumentFrequencyElement(){ mContent.mDocumentFrequency=0; mContent.mID=0; } /*************************************** * * getID * **************************************** * * modification history * * * ****************************************/ TID CDocumentFrequencyElement::getID()const{ return mContent.mID; }; /*************************************** * * getDocumentFrequency * **************************************** * * modification history * * * ****************************************/ float CDocumentFrequencyElement::getDocumentFrequency()const{ return mContent.mDocumentFrequency; }; /*************************************** * * getIntegerDocumentFrequency * **************************************** * * modification history * * * ****************************************/ unsigned int CDocumentFrequencyElement::getIntegerDocumentFrequency()const{ return (unsigned int)(mContent.mDocumentFrequency*sFREQ_MAX); }; /*************************************** * * setDocumentFrequency * **************************************** * * modification history * * * ****************************************/ /// void CDocumentFrequencyElement::setDocumentFrequency(float inDF){ mContent.mDocumentFrequency=inDF; }; /*************************************** * * divideDocumentFrequency * **************************************** * * modification history * * * ****************************************/ void CDocumentFrequencyElement::divideDocumentFrequency(float inDivisor){ mContent.mDocumentFrequency/=inDivisor; }; gift-0.1.14/libGIFTAcInvertedFile/cc/CAFIFMySQL.cc0000644000175200001440000000062510220502727016024 00000000000000#ifdef __GIFT_WITH_MYSQL__ #include "libGIFTAcInvertedFile/include/CAFIFMySQL.h" #include "libGIFTAcInvertedFile/include/CAcIFMySQL.h" /** */ CAccessor* CAFIFMySQL::makeAccessor(const CXMLElement& inConfiguration)const{ //presently there's no choice cout << "éééMAKING MYSQL" << endl; return new CAcIFMySQL(inConfiguration); }; /** */ CAFIFMySQL::CAFIFMySQL(){ mName="if_mysql"; }; #endif gift-0.1.14/libGIFTAcInvertedFile/cc/CAcIFMySQL.cc0000644000175200001440000005145410220502727016067 00000000000000// -*- mode: c++ -*- #ifdef __GIFT_WITH_MYSQL__ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libGIFTAcInvertedFile/include/CAcIFMySQL.h" #include #include #include #include #include #include #include "libMRML/include/mrml_const.h" #include "libMRML/include/CXMLElement.h" #include "libGIFTAcInvertedFile/include/CDocumentFrequencyElement.h" sql_create_3 (documentFeatureConnection, 1, 3, int, documentID, int, featureID, double, docFreq); sql_create_8 (documentTable, 1, 8, int, documentID, int, nbrFeatures, string, url, string, urlThumbnail, string, urlFeatureFile, string, FeaturesAndDocFreq, string, XMLdocumentDesc, string, keywords); /** Constructor */ CAcIFMySQL::CAcIFMySQL(const CXMLElement& inCE): cnx(0), mURL2FTS(new CAcURL2FTS(inCE)), // analyse the Connection Element inCE GdbName(inCE.stringReadAttribute(mrml_const::cui_sql_database_name).second), GdbHost(inCE.stringReadAttribute(mrml_const::cui_sql_host).second), GdbUser(inCE.stringReadAttribute(mrml_const::cui_sql_username).second), GdbPassword(inCE.stringReadAttribute(mrml_const::cui_sql_password).second) { cout << endl << "MYSQL getting connected" << endl; bool createNewDB=false; // create connection object try { string GdbName2Select = GdbName; // keep copy for selecting db later cnx = new Connection(use_exceptions); // try to make the connection without choosing the database yet try { GdbName = ""; cnx->connect(GdbName.c_str(),GdbHost.c_str(),GdbUser.c_str(),GdbPassword.c_str()); cout << "Connection to '" << GdbHost << "' for user '" ; cout << GdbUser << "' ok\n"; } catch (BadQuery er) { cerr << "Connection to '" << GdbHost << "' for user '" ; cerr << GdbUser << "' failed!\n" << er.error << endl; exit(0); } // select the database bool dbExists = selectDB(GdbName2Select); if (!dbExists) if (createNewDB) createDB(GdbName); else exit(0); } catch (BadQuery er) { cerr << "Creating Connection object failed. Program aborted!\n"; cerr << er.error << endl; exit(0); } } /** Destructor */ CAcIFMySQL::~CAcIFMySQL() { delete cnx; } /** select a database : returns true if selecting successful or chosen database already selected, returns false if failure */ bool CAcIFMySQL::selectDB(string ldbName){ bool outcome; if (ldbName == GdbName) { cout << "Selecting database '" << ldbName << "': db already in use.\n"; return true; } else GdbName = ldbName; outcome = cnx->select_db(ldbName.c_str()); if (outcome) { cout << "Selecting database '" << ldbName << "' ok\n"; return true; } else { cout << "Selecting database '" << ldbName << "' failed!\n"; return false; } } /** create an empty database : returns true if success, returns false if attempt to create currently selected database or failure with creation */ bool CAcIFMySQL::createDB(string ldbName) { bool outcome; if (ldbName == GdbName) { cout << "Creating database '" << ldbName << "': db currently in use.\n"; return false; } outcome = cnx->create_db(ldbName.c_str()); if (outcome) { cout << "Creating database '" << ldbName << "' ok\n"; return true; } else { cout << "Creating database '" << ldbName << "' failed!\n"; return false; } } /** drop a database : returns true if success, returns false if attempt to drop currently selected database or failure with dropping */ bool CAcIFMySQL::dropDB(string ldbName) { bool outcome; if (ldbName == GdbName) { cout << "Dropping database '" << ldbName << "' impossible:\n"; cout << "This db is currently in use.\n"; return false; } outcome = cnx->drop_db(ldbName.c_str()); if (outcome) { cout << "Dropping database '" << ldbName << "' ok\n"; return true; } else { cout << "Dropping database '" << ldbName << "' failed!\n"; return false; } } /** initialise tables for GIFT database */ void CAcIFMySQL::initialiseGIFTTables ( bool replaceExistingTables, bool getGIFTData, string giftDataPath ){ // tablelist will be filled with the GIFT table declarations list tableList; // define description table tableList.push_back ( "CREATE TABLE databaseDescription (" "name varchar(30) NOT NULL," "description varchar(255)," "nbrIndexedImages int UNSIGNED DEFAULT '0' NOT NULL," "nbrImagesInDB int UNSIGNED DEFAULT '0' NOT NULL, " "nbrFeatures int UNSIGNED DEFAULT '0' NOT NULL," "PRIMARY KEY (name)," "INDEX nameIndex (name) )" ); // define documentTable tableList.push_back ( "CREATE TABLE documentTable (" "documentID int UNSIGNED NOT NULL," "nbrFeatures int UNSIGNED," "url varchar(100) NOT NULL," "urlThumbnail varchar(100)," "urlFeatureFile varchar(100)," "FeaturesAndDocFreq blob," "XMLdocumentDesc blob," "keywords varchar(255)," "PRIMARY KEY (documentID)," "INDEX documentIDindex (documentID)," "INDEX urlIndex (url) )" ); // define featureTable tableList.push_back ( "CREATE TABLE featureTable (" "featureID int UNSIGNED NOT NULL," "featureDescr varchar(100)," "collectionFreq real," "minimumDocFreq real," "maximumDocFreq real," "documentID_DocFreq blob," "nbrDocumentsWithFeature int," "XMLfeatureDesc blob," "PRIMARY KEY (featureID)," "INDEX featureIDindex (featureID) )" ); // define documentFeatureConnection table tableList.push_back ( "CREATE TABLE documentFeatureConnection (" "documentID int UNSIGNED NOT NULL," "featureID int UNSIGNED NOT NULL," "docFreq real NOT NULL," "PRIMARY KEY (documentID, featureID)," "INDEX documentIDindex (documentID)," "INDEX featureIDindex (featureID) )" ); // define annotationTable_1 tableList.push_back ( "CREATE TABLE annotationTable_1 (" "documentID int UNSIGNED NOT NULL," "text varchar(127) NOT NULL," "docFreq real," "PRIMARY KEY (documentID)," "INDEX documentIDindex (documentID) )" ); // define annotationTable_2 tableList.push_back ( "CREATE TABLE annotationTable_2 (" "featureID int UNSIGNED NOT NULL," "text varchar(127) NOT NULL," "PRIMARY KEY (featureID)," "INDEX featureIDindex (featureID) )" ); // execute creation of the tableList and load corresponding inFile if existing list::iterator i; string currentDef, tableName, fileToLoad; Query query = cnx->query(); for (i = tableList.begin(); i != tableList.end(); i++) { currentDef = *i; tableName = currentDef.substr(13,currentDef.find(" (") - 13); // if table already exists, drop it if required if (recordCount(tableName) >= 0) if (replaceExistingTables) { try { query << "drop table " << tableName; query.execute(RESET_QUERY); cout << "Dropped existing '" << tableName << "'\n"; } catch (BadQuery er) { cerr << er.error << " (skipped this table)\n"; continue; } } if (recordCount(tableName) < 0){ // table doesn't exist try { // create new table query << currentDef << endl; query.execute(RESET_QUERY); cout << "Created new '" << tableName << "'\n"; // construct name of file to load fileToLoad = giftDataPath + "/" + tableName + ".in"; // check if fileToLoad exists ifstream inFile(fileToLoad.c_str()); if (inFile) // file exists => load it into table { query << "LOAD DATA INFILE '" << fileToLoad << "' INTO TABLE " << tableName << " FIELDS TERMINATED BY ' '"; try { query.execute(RESET_QUERY); cout << "-> corresponding file found and loaded ok\n"; } catch (BadQuery er) { cerr << "Error loading file into table: " << er.error << endl; continue; } } } catch (BadQuery er) { cerr << "Error creating '" << tableName << " : " << er.error << endl; continue; } } else cout << "Kept existing '" << tableName << "'\n"; } // end for every table loop } /** returns number of rows or -1 if table not existing or not accessible */ int CAcIFMySQL::recordCount(string ltableName)const{ try { Query query = cnx->query(); query << "select count(*) as nbrRows from " << ltableName; Result res = query.store(RESET_QUERY); Row row = res.fetch_row(); return (row["nbrRows"]); } catch (BadQuery er) { return -1; } } /** Translate a DocumentID to a URL (for output) */ string CAcIFMySQL::IDToURL(TID inID)const { if (recordCount("documentTable") > 0) { try { Query query = cnx->query(); query << "SELECT url FROM documentTable WHERE documentID = '" << inID << "'"; Result res = query.store(RESET_QUERY); Row row = res.fetch_row(); return string(row["url"]); } catch (BadQuery er) { cerr << "Error: " << er.error << endl; return ""; } } else { cerr << "Impossible to convert documentID " << inID << " to URL "; cerr << "(documentTable empty or not correctly accessible) !\n"; return ""; } } /** Translate an URL to its document ID - returns 0 if error */ pair CAcIFMySQL::URLToID(const string& inURL)const { if (recordCount("documentTable") > 0) { try { Query query = cnx->query(); query << "SELECT documentID FROM documentTable WHERE url = '" << inURL << "'"; Result res = query.store(RESET_QUERY); Row row = res.fetch_row(); return make_pair(bool(1),TID(row["documentID"])); } catch (BadQuery er) { cerr << "Error: " << er.error << endl; return make_pair(bool(0),0); } } else { cerr << "Impossible to convert URL " << inURL << " to documentID "; cerr << "(documentTable empty or not correctly accessible) !\n"; return make_pair(bool(0),0); } } /** Get list of documents containing feature inFID */ CDocumentFrequencyList* CAcIFMySQL::FeatureToList(TFeatureID inFID)const { CDocumentFrequencyList* resultList(0); vector queryReturn; if (recordCount("documentFeatureConnection") > 0) { try { Query query = cnx->query(); query << "SELECT * from documentFeatureConnection where featureID = " << inFID; query.storein(queryReturn); // pass through queryReturn and store documentID and docFreq in resultList resultList=new CDocumentFrequencyList(queryReturn.end()-queryReturn.begin()); #ifndef _CDocumentFrequencyListIsList CDocumentFrequencyElement* resultListBack=resultList->begin(); #endif for (vector ::iterator It = queryReturn.begin(); It != queryReturn.end(); It++) { // resultElement.mID = It->documentID; // resultElement.mFrequency = It->docFreq; #ifdef _CDocumentFrequencyListIsList resultList->push_back(CDocumentFrequencyElement(It->documentID, It->docFreq)); #else *resultListBack=CDocumentFrequencyElement(It->documentID, It->docFreq); resultListBack++; #endif } #ifdef _CDocumentFrequencyListIsArray resultList->setEnd(resultListBack); #endif }catch (BadQuery er) { cerr << "Error: " << er.error << endl; } } else { cerr << "Impossible to convert featureID " << inFID << " to docList "; cerr << "(documentFeatureConnection empty or not correctly accessible) !\n"; } return resultList; } /** Get list of features contained by a document with URL inURL */ CDocumentFrequencyList* CAcIFMySQL::URLToFeatureList(string inURL)const{ TID tid; pair lID=URLToID(inURL); if (lID.first) return DIDToFeatureList(tid); return 0; } /** Get list of features contained by a document with ID inDID */ CDocumentFrequencyList* CAcIFMySQL::DIDToFeatureList(TID inDID)const { CDocumentFrequencyList* resultList; vector queryReturn; if (recordCount("documentFeatureConnection") > 0) { try { Query query = cnx->query(); query << "SELECT * from documentFeatureConnection where documentID = " << inDID; query.storein(queryReturn); // pass through queryReturn and store featureID and docFreq in resultList resultList=new CDocumentFrequencyList(queryReturn.end()-queryReturn.begin()); #ifndef _CDocumentFrequencyListIsList CDocumentFrequencyElement* resultListBack=resultList->begin(); #endif for (vector ::iterator It = queryReturn.begin(); It != queryReturn.end(); It++) { #ifdef _CDocumentFrequencyListIsList resultList->push_back(CDocumentFrequencyElement(It->documentID, It->docFreq)); #else *resultListBack=CDocumentFrequencyElement(It->documentID, It->docFreq); resultListBack++; #endif } #ifdef _CDocumentFrequencyListIsArray resultList->setEnd(resultListBack); #endif } catch (BadQuery er) { cerr << "Error: " << er.error << endl; } } else { cerr << "Impossible to convert documentID " << inDID << " to featureList "; cerr << "(documentFeatureConnection empty or not correctly accessible) !\n"; } return resultList; } /** Get list of documents with features contained in a CDocumentFrequencyList inFeatureList*/ CDocumentFrequencyList* CAcIFMySQL::featureList2docList (CDocumentFrequencyList inFeatureList) { CDocumentFrequencyList* resultList; // CDocumentFrequencyList that will be returned vector queryReturn; // CDocumentFrequencyList we get back from query int totalFeatures; // total number of features we get back for a doc // unsortedDocCollection will contain pairs map unsortedDocCollection; map ::iterator uIt; // sortedDocCollection will contain pairs multimap > sortedDocCollection; multimap >::iterator sIt; totalFeatures = 0; // initialisation if (recordCount("documentFeatureConnection") > 0) { try { CDocumentFrequencyList::iterator fIt; // go through list of features for (fIt=inFeatureList.begin(); fIt!=inFeatureList.end(); fIt++) { totalFeatures++; // for every feature, get list of corresponding documentIDs Query query = cnx->query(); query << "SELECT * from documentFeatureConnection where featureID = " << fIt->getID(); query.storein(queryReturn); // go through list of documentsID for (It=queryReturn.begin(); It!=queryReturn.end(); It++) { // make histogram of documents found uIt = unsortedDocCollection.find(It->documentID); if (uIt != unsortedDocCollection.end()) // docID already existing -> increase frequency unsortedDocCollection[It->documentID]++; else // new docID unsortedDocCollection[It->documentID] = 1; } queryReturn.clear(); } // sort unsortedDocCollection -> copy into multimap container with // nbrOfOccurances as the sort criterium int nbrOfOccurrances,docID; for (uIt = unsortedDocCollection.begin(); uIt != unsortedDocCollection.end(); uIt++) { docID = (*uIt).first; nbrOfOccurrances = (*uIt).second; sortedDocCollection.insert(pair(nbrOfOccurrances,docID)); } #ifndef _CDocumentFrequencyListIsList CDocumentFrequencyElement* resultListBack=resultList->begin(); #endif resultList=new CDocumentFrequencyList(sortedDocCollection.size()); // copy sorted document collection into document frequency list and // divide nbrOfOccurrances by total number of Features for (sIt=sortedDocCollection.begin(); sIt!=sortedDocCollection.end(); sIt++) { #ifdef _CDocumentFrequencyListIsList resultList->push_back(CDocumentFrequencyElement(sIt->second, sIt->first)); #else *resultListBack=CDocumentFrequencyElement(sIt->second, sIt->first); resultListBack++; #endif } #ifdef _CDocumentFrequencyListIsArray resultList->setEnd(resultListBack); #endif } catch (BadQuery er) { cerr << "Error: " << er.error << endl << endl; } } else { cerr << "Impossible to convert featuresList to docList "; cerr << "(documentFeatureConnection empty or not correctly accessible) !\n"; } return resultList; } /* show contents of a DocumentFrequencyList */ void CAcIFMySQL::showDocFreqList(CDocumentFrequencyList docFreqList) { CDocumentFrequencyList::iterator It; if (docFreqList.begin() == docFreqList.end()) // empty list cout << "(list is empty)\n"; else { for (It = docFreqList.begin(); It != docFreqList.end(); It++) { cout << It->getID() << "\t" << It->getDocumentFrequency() << "\n"; } cout << endl; } } /* convert a blob file to a DocumentFrequencyList */ CDocumentFrequencyList* CAcIFMySQL::blob2docFreqList(string inBlobFile)const{ CDocumentFrequencyList* resultList=new CDocumentFrequencyList(); ifstream inFileBuf (inBlobFile.c_str(),ios::in | ios::binary); // blob file struct stat fileStatus; // will contain status of blob file if ((inFileBuf.rdbuf())->is_open()) // If non-zero, the stream is open { if (stat (inBlobFile.c_str(),&fileStatus) == -1) return resultList; // error unsigned int blobLength = fileStatus.st_size; if (!blobLength) return resultList; // error char *read_buffer = new char[blobLength]; inFileBuf.read(read_buffer,blobLength); // construct a string with contents of blob string blobContent(read_buffer,blobLength); // insert contents of blob into resultsList cout << blobContent << endl; // evtl .str() delete[] read_buffer; } else cerr << "Blob file " << inBlobFile << "could not be opened" << endl; return resultList; } /** List of the IDs of all documents present in the inverted file */ void CAcIFMySQL::getAllIDs(list& outIDList)const{ mURL2FTS->getAllIDs(outIDList); }; /** List of triplets (ID,imageURL,thumbnailURL) of all the documents present in the inverted file */ void CAcIFMySQL::getAllAccessorElements(list& outAccessorElementList)const{ mURL2FTS->getAllAccessorElements(outAccessorElementList); }; /** get a given number of random AccessorElement's @param inoutResultList the list which will contain the result @param inSize the desired size of the inoutResultList */ void CAcIFMySQL::getRandomIDs(list& outRandomIDList, list::size_type inSize)const{ return mURL2FTS->getRandomIDs(outRandomIDList, inSize); }; /** For drawing random sets. Why is this part of an CAccessorImplementation? The way the accessor is organised might influence the way random sets can be drawn. At present everything happens in RAM, but we do not want to be fixed on that. @param inoutResultList the list which will contain the result @param inSize the desired size of the inoutResultList */ void CAcIFMySQL::getRandomAccessorElements(list& outResult, list::size_type inSize)const{ mURL2FTS->getRandomAccessorElements(outResult, inSize); }; /** The number of images in this accessor */ int CAcIFMySQL::size()const{ return mURL2FTS->size(); }; /** The number of images in this accessor */ CAcIFMySQL::operator bool()const{ return bool(mURL2FTS); }; /** The number of images in this accessor */ bool CAcIFMySQL::operator ()()const{ return bool(mURL2FTS); }; pair CAcIFMySQL::IDToAccessorElement(TID inID)const{ return mURL2FTS->IDToAccessorElement(inID); }; list* CAcIFMySQL::getAllFeatureIDs()const{ assert(0); }; double CAcIFMySQL::FeatureToCollectionFrequency(TFeatureID inFeatureID)const{ return 1; } double CAcIFMySQL::DIDToMaxDocumentFrequency(TID inID)const{ return 1; } double CAcIFMySQL::DIDToDFSquareSum(TID inID)const{ return 1; } double CAcIFMySQL::DIDToSquareDFLogICFSum(TID inID)const{ return 1; } unsigned int CAcIFMySQL::getFeatureDescription(TID inID)const{ } #endif gift-0.1.14/libGIFTAcInvertedFile/cc/Makefile.am0000644000175200001440000000371010153634150016052 00000000000000# -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # #Makefile for the inverted File library # CCCONFIG=sed "s:__EXECBINDIR__:@DEBEXECBINDIR@:g;s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@DEBPERLLIBDIR@:g;s:__DATADIR__:@DEBDATADIR@:g;s:__LIBDIR__:@DEBSHAREDIR@:g;s:__HOME__:${HOME}:g;s:__WEB_PUBLISHING_DIRECTORY__:@WEB_PUBLISHING_DIRECTORY@:g;s=__WEB_PUBLISHING_LOCATION__=@WEB_PUBLISHING_LOCATION@=g;" < $< > $@ lib_LTLIBRARIES = libGIFTAcInvertedFile.la libGIFTAcInvertedFile_la_LDFLAGS= -module "@PRE_INSTALL_LIBDIRS@" -lMRML -lGIFTAcURL2FTS INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcInvertedFile/include -I$(top_srcdir)/libGIFTAcURL2FTS/include #CAcIFFileSystem.cc: CAcIFFileSystem.pre-cc # $(CCCONFIG) # libGIFTInvertedFile_a_SOURCES= libGIFTAcInvertedFile_la_SOURCES= \ CAcIFFileSystem.cc\ CAcIFMySQL.cc\ \ CAFIFMySQL.cc\ CAFInvertedFile.cc\ \ CIFBuilderTriplet.cc\ CDocumentFrequencyElement.cc \ CDocumentFrequencyList.cc \ \ CIFListStart.cc \ CInvertedFileChunk.cc \ \ CAdditionalDocumentInformation.cc\ plug_in_fo.cc # CLEANFILES=CAcIFFileSystem.cc gift-0.1.14/libGIFTAcInvertedFile/cc/Makefile.in0000644000175200001440000004526310220474075016077 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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@ # -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # #Makefile for the inverted File library # SOURCES = $(libGIFTAcInvertedFile_la_SOURCES) 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 = : host_triplet = @host@ subdir = libGIFTAcInvertedFile/cc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libGIFTAcInvertedFile_la_LIBADD = am_libGIFTAcInvertedFile_la_OBJECTS = CAcIFFileSystem.lo CAcIFMySQL.lo \ CAFIFMySQL.lo CAFInvertedFile.lo CIFBuilderTriplet.lo \ CDocumentFrequencyElement.lo CDocumentFrequencyList.lo \ CIFListStart.lo CInvertedFileChunk.lo \ CAdditionalDocumentInformation.lo plug_in_fo.lo libGIFTAcInvertedFile_la_OBJECTS = \ $(am_libGIFTAcInvertedFile_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/CAFIFMySQL.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CAFInvertedFile.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CAcIFFileSystem.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CAcIFMySQL.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CAdditionalDocumentInformation.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CDocumentFrequencyElement.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CDocumentFrequencyList.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CIFBuilderTriplet.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CIFListStart.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CInvertedFileChunk.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/plug_in_fo.Plo CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libGIFTAcInvertedFile_la_SOURCES) DIST_SOURCES = $(libGIFTAcInvertedFile_la_SOURCES) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ CCCONFIG = sed "s:__EXECBINDIR__:@DEBEXECBINDIR@:g;s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@DEBPERLLIBDIR@:g;s:__DATADIR__:@DEBDATADIR@:g;s:__LIBDIR__:@DEBSHAREDIR@:g;s:__HOME__:${HOME}:g;s:__WEB_PUBLISHING_DIRECTORY__:@WEB_PUBLISHING_DIRECTORY@:g;s=__WEB_PUBLISHING_LOCATION__=@WEB_PUBLISHING_LOCATION@=g;" < $< > $@ lib_LTLIBRARIES = libGIFTAcInvertedFile.la libGIFTAcInvertedFile_la_LDFLAGS = -module "@PRE_INSTALL_LIBDIRS@" -lMRML -lGIFTAcURL2FTS INCLUDES = -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcInvertedFile/include -I$(top_srcdir)/libGIFTAcURL2FTS/include #CAcIFFileSystem.cc: CAcIFFileSystem.pre-cc # $(CCCONFIG) # libGIFTInvertedFile_a_SOURCES= libGIFTAcInvertedFile_la_SOURCES = \ CAcIFFileSystem.cc\ CAcIFMySQL.cc\ \ CAFIFMySQL.cc\ CAFInvertedFile.cc\ \ CIFBuilderTriplet.cc\ CDocumentFrequencyElement.cc \ CDocumentFrequencyList.cc \ \ CIFListStart.cc \ CInvertedFileChunk.cc \ \ CAdditionalDocumentInformation.cc\ plug_in_fo.cc all: all-am .SUFFIXES: .SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: $(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 libGIFTAcInvertedFile/cc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTAcInvertedFile/cc/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libGIFTAcInvertedFile.la: $(libGIFTAcInvertedFile_la_OBJECTS) $(libGIFTAcInvertedFile_la_DEPENDENCIES) $(CXXLINK) -rpath $(libdir) $(libGIFTAcInvertedFile_la_LDFLAGS) $(libGIFTAcInvertedFile_la_OBJECTS) $(libGIFTAcInvertedFile_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAFIFMySQL.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAFInvertedFile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAcIFFileSystem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAcIFMySQL.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAdditionalDocumentInformation.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDocumentFrequencyElement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDocumentFrequencyList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CIFBuilderTriplet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CIFListStart.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CInvertedFileChunk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plug_in_fo.Plo@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: 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) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES 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-info-am \ uninstall-libLTLIBRARIES # CLEANFILES=CAcIFFileSystem.cc # 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: gift-0.1.14/libGIFTAcInvertedFile/cc/plug_in_fo.cc0000644000175200001440000000071710220502727016451 00000000000000#include "libGIFTAcInvertedFile/include/CAcIFFileSystem.h" #include "libMRML/include/CAccessorAdminCollection.h" #include extern "C" extern "C" char* libGIFTAcInvertedFile_getClassName(){ return "inverted_file"; } extern "C" extern "C" CAcIFFileSystem* libGIFTAcInvertedFile_makeAccessor(const CXMLElement& inElement){ cout << endl << "CALLED: libGIFTAcInvertedFile_makeAccessor" << endl ; return new CAcIFFileSystem(inElement); } gift-0.1.14/libGIFTAcInvertedFile/cc/CAdditionalDocumentInformation.cc0000644000175200001440000001343110220502727022405 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CAdditionalDocumentInformation - Stores different * informations about document frequencies * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #include "libMRML/include/TID.h" #include #include #include "libGIFTAcInvertedFile/include/CAdditionalDocumentInformation.h" #include #include /*************************************** * * Constructor - * **************************************** * * modification history * * * ****************************************/ /// CAdditionalDocumentInformation::CAdditionalDocumentInformation(const string& inName){ setFileNameBase(inName); resetDF(); resetSquareDFLogICF(); }; /*************************************** * * setFileNameBase * **************************************** * * modification history * * * ****************************************/ /// void CAdditionalDocumentInformation::setFileNameBase(const string& inName){ mFileNameBase=inName; resetDF(); }; /*************************************** * * resetDF * **************************************** * * modification history * * * ****************************************/ /// void CAdditionalDocumentInformation::resetDF(){ mMaximumDF=0; mDFSquareSum=0; }; /*************************************** * * adjustDF * **************************************** * * modification history * * * ****************************************/ /// void CAdditionalDocumentInformation::adjustDF(double inDF){ mDFSquareSum+=inDF*inDF; mMaximumDF=max(inDF,mMaximumDF); }; /*************************************** * * getMaximumDF * **************************************** * * modification history * * * ****************************************/ /// double CAdditionalDocumentInformation::getMaximumDF()const{ assert(mMaximumDF); return mMaximumDF; }; /*************************************** * * getDFSquareSum * **************************************** * * modification history * * * ****************************************/ /// double CAdditionalDocumentInformation::getDFSquareSum()const{ assert(mDFSquareSum); return mDFSquareSum; }; /*************************************** * * resetSquareDFLogICF * **************************************** * * modification history * * * ****************************************/ /// void CAdditionalDocumentInformation::resetSquareDFLogICF(){ mSquareDFLogICFSum=0; }; /*************************************** * * adjustSquareDFLogICF * **************************************** * * modification history * * * ****************************************/ /// void CAdditionalDocumentInformation::adjustSquareDFLogICF(double inValue){ mSquareDFLogICFSum+=inValue; }; /*************************************** * * getSquareDFLogICFSum * **************************************** * * modification history * * * ****************************************/ /// double CAdditionalDocumentInformation::getSquareDFLogICFSum()const{ return mSquareDFLogICFSum; }; /*************************************** * * output * **************************************** * * modification history * * * ****************************************/ /// bool CAdditionalDocumentInformation::output()const{ ofstream lStream(string(mFileNameBase+".ADI").c_str()); return output(lStream); }; /*************************************** * * * **************************************** * * modification history * * * ****************************************/ /// bool CAdditionalDocumentInformation::output(ostream& outStream)const{ #ifdef PRINT cout << "[>mSquareDFLogICFSum" << mMaximumDF << ",square" << mDFSquareSum << "," << mSquareDFLogICFSum << "]" << flush << endl; #endif outStream << mMaximumDF << " " << mDFSquareSum << " " << mSquareDFLogICFSum; return outStream; }; /*************************************** * * input * **************************************** * * modification history * * * ****************************************/ /// bool CAdditionalDocumentInformation::input(istream& inStream){ inStream >> mMaximumDF >> mDFSquareSum >> mSquareDFLogICFSum; #ifdef PRINT cout << "[Max" << mMaximumDF << ",square" << mDFSquareSum << ",IDFlog.." << mSquareDFLogICFSum << "]" << flush << endl; #endif return inStream; }; /*************************************** * * input * **************************************** * * modification history * * * ****************************************/ /// bool CAdditionalDocumentInformation::input(){ ifstream lStream(string(mFileNameBase+".ADI").c_str()); return input(lStream); }; gift-0.1.14/libGIFTAcInvertedFile/cc/CIFBuilderTriplet.cc0000644000175200001440000000171710220502727017605 00000000000000#include "libGIFTAcInvertedFile/include/CIFBuilderTriplet.h" /** default constructor */ CIFBuilderTriplet::CIFBuilderTriplet(): mFeatureID(0), mDocumentID(0), mDocumentFrequency(0){ }; /** convenience constructor */ CIFBuilderTriplet::CIFBuilderTriplet(TID inFeatureID, TID inDocumentID, float inDocumentFrequency): mFeatureID(inFeatureID), mDocumentID(inDocumentID), mDocumentFrequency(inDocumentFrequency){ }; /** testing if all fields are equal */ bool CIFBuilderTriplet::isIdentical(const CIFBuilderTriplet& inTriplet)const{ inTriplet.mFeatureID==mFeatureID; inTriplet.mDocumentID==mDocumentID; inTriplet.mDocumentFrequency==mDocumentFrequency; }; bool operator<(const CIFBuilderTriplet& l,// less const CIFBuilderTriplet& t // than ){ return (l.mFeatureID lInvertedFileType=inConfiguration.stringReadAttribute("cui-inverted-file-type"); if(lInvertedFileType.first){ cout << "yes/noMAKING MYSQL" << lInvertedFileType.second << endl; }else{ cout << "not there MAKING MYSQL" << lInvertedFileType.first << endl; } if((lInvertedFileType.first) && (lInvertedFileType.second=="mysql")){ cout << endl << "éééMAKING MYSQL" << endl; return new CAcIFMySQL(inConfiguration); }else{ cout << endl << "éééNOT MAKING MYSQL" << endl; return new CAcIFFileSystem(inConfiguration); } #else return new CAcIFFileSystem(inConfiguration); #endif }; /** */ CAFInvertedFile::CAFInvertedFile(){ mName="inverted_file"; }; gift-0.1.14/libGIFTAcInvertedFile/cc/CInvertedFileChunk.cc0000644000175200001440000001051010220502727017774 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CInvertedFileChunk * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * _CDocumentFrequencyListIsVector is the document frequency list a vector? * * ****************************************/ #include #include "FeatureExtraction/gift_features.h" #include "libGIFTAcInvertedFile/include/CInvertedFileChunk.h" #include /*************************************** * * addElement * **************************************** * * modification history * * * ****************************************/ void CInvertedFileChunk::addElement(TID inDocumentID, double inDocumentFrequency){ //cout << "a" << flush; insert(make_pair(inDocumentID,inDocumentFrequency)); }; /*************************************** * * getCollectionFrequency - returns the percentage of documents which contain this one feature * **************************************** * * modification history * * * ****************************************/ double CInvertedFileChunk::getCollectionFrequency(size_t inSize)const{ return double(size())/inSize; } /*************************************** * * writeBinary - writes the binary block for one feature into the file * **************************************** * * modification history * * * ****************************************/ bool CInvertedFileChunk::writeBinary(ostream& outStream, TID inFeatureID, size_t inSize)const{ bool lRetVal=true; { TID lFeatureID(inFeatureID); lRetVal = lRetVal && outStream.write((char*)&lFeatureID, sizeof(lFeatureID)); } { float lCollectionFrequency=(float(size()) /inSize); if((lCollectionFrequency >1) || (lCollectionFrequency < 0)){ cout << "The collection frequency is: " << lCollectionFrequency << endl; assert(!"collection frequency out of range"); } lRetVal = lRetVal && outStream.write((char*)&lCollectionFrequency, sizeof(lCollectionFrequency)); } int lSize(size()); { // writing this twice means: there is // no space left in this list lRetVal = lRetVal && outStream.write((char*)&lSize, sizeof(lSize)); // writing this twice means: there is // no space left in this list lRetVal = lRetVal && outStream.write((char*)&lSize, sizeof(lSize)); cout << "writing chunk of size " << lSize <writeBinary(outStream); } return lRetVal; } gift-0.1.14/libGIFTAcInvertedFile/Makefile.am0000644000175200001440000000002410153634150015460 00000000000000SUBDIRS= include cc gift-0.1.14/libGIFTAcInvertedFile/Makefile.in0000644000175200001440000003456610220474074015515 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = libGIFTAcInvertedFile DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = 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 ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = include cc all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(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 libGIFTAcInvertedFile/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTAcInvertedFile/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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: # 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): @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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: @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; 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='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="../$(top_distdir)" \ distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive 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-info \ install-info-am install-man 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-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: gift-0.1.14/libGIFTAcInvertedFile/include/0000777000175200001440000000000010220511625015133 500000000000000gift-0.1.14/libGIFTAcInvertedFile/include/gift_features.h0000644000175200001440000000140010220502727020045 00000000000000#ifndef _GIFT_FEATURES #define _GIFT_FEATURES /* feature classes */ #define COL_POS 0 /* a colour in a specific position (and at a specific scale) */ #define COL_HST 1 /* the proportion of a given colour */ #define GABOR_POS 2 /* the value of a Gabor filter in a particular position */ #define GABOR_HST 3 /* the proportion of a particular value of a Gabor filter in the image */ #define FREQ_MAX 0x7fffffff /* since we will use FLOATS to store frequencies we want high resolution (WM) */ typedef unsigned int freq_type; typedef struct _FEATURE_DATA { int id; freq_type frequency; /* i.e. f = frequency/FREQ_MAX */ } FEATURE_DATA; /* use primitive hacks by Wolfgang for adapting to Wolfgang's code */ #define WOLFGANG_HACK #endif gift-0.1.14/libGIFTAcInvertedFile/include/CADIHash.h0000644000175200001440000000336710220502727016540 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _CADIHash #define _CADIHash #include "libGIFTAcInvertedFile/include/uses-declarations.h" #include #include "libMRML/include/TID.h" #include "libGIFTAcInvertedFile/include/CAdditionalDocumentInformation.h" #include /** * * CADIHash * * * * modification history: * *@Author: Wolfgang Müller * * Changes: * HM 090399 created the documentation * * compiler defines used: * * A hash for additional document information (hashed by document ID) * * */ class CADIHash:public map >{ public: /** * * Writing ADI for each document to its own * */ inline bool output()const{ bool lRetVal=true; for(const_iterator i=begin(); i!=end(); i++){ lRetVal= lRetVal && (*i).second.output(); } return lRetVal; } }; #endif gift-0.1.14/libGIFTAcInvertedFile/include/CAcSQLInvertedFile.h0000644000175200001440000001620510220502727020536 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- class CXMLElement; /** * * * This class manages the access to the inverted file as well * as its generation * * * * modification history: * * WM 150600 created the file * * * * compiler defines used: * * */ #ifndef _CINVERTEDFILEACCESSOR #define _CINVERTEDFILEACCESSOR #include "libGIFTAcInvertedFile/include/uses-declarations.h" #include #include "libMRML/include/TID.h" #include "libMRML/include/CSelfDestroyPointer.h" #include "libMRML/include/CArraySelfDestroyPointer.h" #include "libGIFTAcInvertedFile/include/CDocumentFrequencyList.h" #include "CCollectionFrequencyList.h" #include "libGIFTAcInvertedFile/include/CADIHash.h" #include "libGIFTAcURL2FTS/include/CAcURL2FTS.h" #include #include #include #include #ifdef HAS_HASH_MAP #include #else #define hash_map map #endif #include #include #include "libMRML/include/CMagic.h" typedef TID TFeatureID ; /** An accessor to an inverted file. This access is done "by hand" at present this not really efficient, however we plan to move to memory mapped files. */ class CAcInvertedFile:public CAcURL2FTS{ protected: /** the maximum feature ID arising in this file */ TID mMaximumFeatureID; /** A buffer, if the inverted file is to be held in ram */ CArraySelfDestroyPointer mInvertedFileBuffer; /** The inverted file */ mutable CSelfDestroyPointer mInvertedFile; /** Feature -> Offset in inverted file */ mutable ifstream mOffsetFile; /** File of feature descriptions */ ifstream mFeatureDescriptionFile; /** Name of the inverted file */ string mInvertedFileName; /** Name of the Offset file */ string mOffsetFileName; /** Name for the file with the feature description */ string mFeatureDescriptionFileName; /** map from feature id to the offset for this feature */ typedef hash_map CIDToOffset;//new hash /** map from feature id to the offset for this feature */ CIDToOffset mIDToOffset; /** map from feature to the collection frequency */ mutable hash_map mFeatureToCollectionFrequency;//new hash /**@name for fast access...*/ //@{ /** map from the feature ID to the feature description */ hash_map mFeatureDescription;//new hash_ /** additional information about the document like, e.g. the euclidean length of the feature list. */ CADIHash mDocumentInformation; //@} /** add a pair of FeatureID,Offset to the open offset file (helper function for inverted file construction) */ void writeOffsetFileElement(TID inFeatureID, int inPosition, ostream& inOpenOffsetFile); /** loads a *.fts file. and returns the feature list*/ CDocumentFrequencyList* getFeatureFile(string inFileName)const; public: /** for testing if the inverted file is correctly constructed*/ bool operator()()const; /** This opens an exsisting inverted file, and then inits this structure. After that it is fully usable As a paramter it takes an XMLElement which contains a "collection" element and its content. If the attribute vi-generate-inverted-file is true, then a new inverted file will be generated using the parameters given in inCollectionElement. you will NOT be able to use *this afterwards. The REAL constructor. */ CAcInvertedFile(const CXMLElement& inCollectionElement); /** called by constructors */ bool init(bool); /** Destructor */ ~CAcInvertedFile(); /** Translate a DocumentID to a URL (for output) */ string IDToURL(TID inID)const; /** Translate an URL to its document ID */ TID URLToID(const string& inURL)const; /**@name The proper inverted file access*/ //@{ /** List of documents containing the feature */ CDocumentFrequencyList* FeatureToList(TFeatureID)const; /** List of features contained by a document */ CDocumentFrequencyList* URLToFeatureList(string inURL)const; /** List of features contained by a document with ID inDID */ CDocumentFrequencyList* DIDToFeatureList(TID inDID)const; //@} /**@name Accessing information about features*/ //@{ /** Collection frequency for a given feature */ double FeatureToCollectionFrequency(TFeatureID)const; /** What kind of feature is the feature with ID inFeatureID? */ unsigned int getFeatureDescription(TID inFeatureID)const; //@} /**@name Accessing additional document information*/ //@{ /** returns the maximum document frequency for one document ID */ double DIDToMaxDocumentFrequency(TID)const; /** Returns the document-frequency square sum for a given document ID */ double DIDToDFSquareSum(TID)const; /** Returns this function for a given document ID */ double DIDToSquareDFLogICFSum(TID)const; //@} /*@name Inverted File Generation and Consistency Checking*/ //@{ /** Generating an inverted File, if there is none. Fast but stupid in-memory method. This method is very fast, if all the inverted file (and a bit more) can be kept in memory at runtime. If this is not the case, extensive swapping is the result, virtually halting the inverted file creation. */ bool generateInvertedFile(); /** Generating an inverted File, if there is none. Employing the two-way-merge method described in "managing gigabytes", chapter 5.2. Sort-based inversion. (Page 181) */ bool newGenerateInvertedFile(); /**Check the consistency of the inverted file system accessed by this accessor.*/ bool checkConsistency(); /**Is the Document with inDocumentID contained in the document frequency list of the feature inFeatureID and is the associated document frequency the same?*/ bool findWithinStream(TID inFeatureID, TID inDocumentID, double inDocumentFrequency)const; //@} /** This is interesting for browsing*/ TID getMaximumFeatureID()const; /** Getting a list of all features contained in this. This function is necessary, because in the present system only about 50 percent of the features are really used. A feature is considered used if it arises in mIDToOffset. */ list* getAllFeatureIDs()const; }; #endif gift-0.1.14/libGIFTAcInvertedFile/include/CDocumentFrequencyHash.h0000644000175200001440000000352210220502727021574 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CDOCUMENTFREQUENCYHASH * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CDOCUMENTFREQUENCYHASH #define _CDOCUMENTFREQUENCYHASH #include "libGIFTAcInvertedFile/include/uses-declarations.h" #include "libMRML/include/TID.h" #include "libGIFTAcInvertedFile/include/CDocumentFrequencyElement.h" #include "libGIFTAcInvertedFile/include/CDocumentFrequencyList.h" #include #include #define MAPTYPE map #define MAPINITIALIZER //:MAPTYPE (2000) class CDocumentFrequencyHash:public MAPTYPE{ public: inline CDocumentFrequencyHash() MAPINITIALIZER {}; }; #undef MAPTYPE #undef MAPINITIALIZER #endif gift-0.1.14/libGIFTAcInvertedFile/include/CDocumentFrequencyList.h0000644000175200001440000000613610220502727021630 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /** * * * * * * modification history: * WM 19990913 * HM 090399 created the documentation * WM created * * * * compiler defines used: * * */ #ifndef _CDOCUMENTFREQUENCYLIST #define _CDOCUMENTFREQUENCYLIST #include "libGIFTAcInvertedFile/include/uses-declarations.h" #include "libGIFTAcInvertedFile/include/CDocumentFrequencyElement.h" //#define _CDocumentFrequencyListIsVector //#define _CDocumentFrequencyListIsList #define _CDocumentFrequencyListIsArray #ifdef _CDocumentFrequencyListIsVector #include #else #include #endif /** A list of Document Frequency Elements (the main part of an inverted file) */ class CDocumentFrequencyList #ifdef _CDocumentFrequencyListIsVector :public vector #endif #ifdef _CDocumentFrequencyListIsList :public list #endif { /** The (maximum) size of this */ int mSize; /** The end of this */ CDocumentFrequencyElement* mEnd; #ifdef _CDocumentFrequencyListIsArray CDocumentFrequencyElement* mContent; #endif public: /** * * Constructor * */ CDocumentFrequencyList(size_t inSize); /** * * Constructor * */ CDocumentFrequencyList(); /** * * Destructor * */ ~CDocumentFrequencyList(); /** * * A nice function for writing the whole list as binary * (as opposed to human readable ascii) into a file * */ bool writeBinary(ostream& outStream)const; /** * * A nice function for reading the whole list as binary * (as opposed to human readable ascii) from a file * */ bool readBinary(istream& inStream); #ifdef _CDocumentFrequencyListIsArray /** mimicking STL iterator is simple pointer*/ typedef CDocumentFrequencyElement* iterator; /** mimicking STL const_iterator is simple const pointer*/ typedef CDocumentFrequencyElement const* const_iterator; /** mimicking STL */ iterator begin(); /** mimicking STL */ iterator end(); /** mimicking STL */ const_iterator begin()const; /** mimicking STL */ const_iterator end()const; /** mimicking STL */ size_t size()const; /** to set the end of this */ void setEnd(CDocumentFrequencyElement*); #endif }; #endif gift-0.1.14/libGIFTAcInvertedFile/include/CIFListStart.h0000644000175200001440000000523110220502727017477 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CIFLISTSTART #define _CIFLISTSTART #include "libGIFTAcInvertedFile/include/uses-declarations.h" #include "libMRML/include/TID.h" #include /**The chunk which starts a list in the inverted file, consisting of FeatureID, CollectionFrequency of the Feature and Number of Elements in the List */ class CIFListStart{ /// TID mFeatureID; /// float mCollectionFrequency; /** The number of elements */ unsigned int mNumberOfElements; /** The total number of elements be in this list before rearranging the file */ unsigned int mNumberOfReservedElements; public: /*************************************** * * * ***************************************/ CIFListStart(istream& inStream); /*************************************** * * the ID of the feature * ***************************************/ TID getFeatureID()const; /*************************************** * * The collection frequency of this * ***************************************/ double getCollectionFrequency()const; /*************************************** * * The number of elements in this list * ***************************************/ unsigned int getNumberOfElements()const; /*************************************** * * The total number of elements allowed in this list * ***************************************/ unsigned int getNumberOfReservedElements()const; }; #endif gift-0.1.14/libGIFTAcInvertedFile/include/CAdditionalDocumentInformation.h0000644000175200001440000001012210220502727023277 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CADDITIONALDOCUMENTINFORMATION * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CADDITIONALDOCUMENTINFORMATION #define _CADDITIONALDOCUMENTINFORMATION #include "libGIFTAcInvertedFile/include/uses-declarations.h" #include "libMRML/include/TID.h" #include #include #include #include /** Additional document information (ADI) is information is needed for weighting schemes which take into account properties of whole documents. Things like e.g. the euclidean length of a vector have to be calculated beforehand. */ class CAdditionalDocumentInformation{ protected: ///Filename of the document (from which the ADI file will be built) string mFileNameBase; ///Maximum Document frequency of a feature for the whole document double mMaximumDF; ///Sum of squared document frequencies off all features of the document. double mDFSquareSum; ///Sum of (DF*DF*log(ICF)) for all features of the document double mSquareDFLogICFSum; public: /*************************************** * * * ***************************************/ ///Constructor sets filename CAdditionalDocumentInformation(const string& inName="N.N."); /*************************************** * * * ***************************************/ ///...If neccesary set filename later void setFileNameBase(const string& inName); /*************************************** * * * ***************************************/ ///Reset mMaximumDF and mDFSquareSum void resetDF(); /*************************************** * * * ***************************************/ ///Add the right things to mMaximumDF and mDFSquareSum void adjustDF(double inDF); /*************************************** * * * ***************************************/ ///reset mSquareDFLogICFSum void resetSquareDFLogICF(); /*************************************** * * * ***************************************/ ///add the right things to mSquareDFLogICFSum void adjustSquareDFLogICF(double); /*************************************** * * * ***************************************/ ///@name Accessors //@{ double getMaximumDF()const; /*************************************** * * * ***************************************/ /// double getDFSquareSum()const; /*************************************** * * * ***************************************/ /// double getSquareDFLogICFSum()const; /*************************************** * * * ***************************************/ //@} //@name input/output to streams //@{ /// bool output(ostream& outStream)const; /*************************************** * * * ***************************************/ /// bool output()const; /*************************************** * * * ***************************************/ /// bool input(istream& inStream); /*************************************** * * * ***************************************/ /// bool input(); //@} }; #endif gift-0.1.14/libGIFTAcInvertedFile/include/CBitSetCollection.h0000644000175200001440000000666110220502727020545 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _CBITSETCOLLECTION #define _CBITSETCOLLECTION #include "libGIFTAcInvertedFile/include/uses-declarations.h" * * CBitSetSelection * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #include #include "libMRML/include/TID.h" #include "CBitVector.h" /** A class which is supposed to contain the results of a comparison in the PicHunter sense of the word. In the present implementation each comparison result is represented by a bit vector. Each of these bitvectors contains the IDs of the documents which are consistent with a comparison, i.e. which are after this comparison still considered to be a possible target. This class is now considered to */ class CBitSetCollection:public list{ /// CBitVector mPresentlyConsistentSet; /** The set of all elements used up to now this is necessary for inverting the bitset, because otherwise we do not have any information about which bits could have been set */ CBitVector mSetOfUsedElements; public: /*************************************** * * * ***************************************/ ///Adding a comparison results: push_back and consistify() int addResult(const CBitVector& inResult); /** The central function: Consider the case where comparison results are inconsistent: It would mean that you have to drop some of your comparison results and/or to modify the metric. Metric modifying comes later in the game, here we concentrate on dropping the right comparison results. If you have to drop comparisons you would like to drop the older ones, because the newer are fresher, if the user has decided to move his/her target, the newer comparis will account for that. To cut a long story short: consistify will drop the comparison results which are considered as reasons for the inconsistence. The result is the number of comparisons which have been dropped. */ /*************************************** * * * ***************************************/ int consistify(); ///giving back the set of all images presently consistent with the comparisons CBitVector const& getPresentlyConsistentSet()const; ///giving back the set of all images presently consistent with the comparisons void setPresentlyConsistentSet(const list& inIDList); }; #endif gift-0.1.14/libGIFTAcInvertedFile/include/CAFSpecialised.h0000644000175200001440000000322110220502727017760 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CAFSPECIALISED #define _CAFSPECIALISED #include "libGIFTAcInvertedFile/include/uses-declarations.h" #include "react_to_perl.h" #include "libMRML/include/CAccessorFactory.h" /** * * This template is designed to make easy use * of the CAccessorFactory: Tem * *@author: Wolfgang Müller */ template class CAFSpecialised:public CAccessorFactory{ public: /** Construct this. The template parameter TName is used for registering in the right way. */ CAFSpecialised():mName(TName){}; /** Make a new */ CAccessor* makeAccessor(const CAttributeList& inAttributes){ return new TAccessorSubType(inAttributes); }; }; #endif gift-0.1.14/libGIFTAcInvertedFile/include/CIFBuilderTriplet.h0000644000175200001440000000402610220502727020501 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CIFBUILDERTRIPLET #define _CIFBUILDERTRIPLET #include "libGIFTAcInvertedFile/include/uses-declarations.h" #include "libMRML/include/TID.h" /** When building an inverted file by successive merging we need first to create a file containing triplets of FeatureID, DocumentID and DocumentFrequency These elements need to be sorted by FeatureID and inverse Document Frequency. */ class CIFBuilderTriplet{ public: /** the default constructor */ CIFBuilderTriplet(); /** convenience constructor */ CIFBuilderTriplet(TID inFeatureID, TID inDocumentID, float inDocumentFrequency); /** testing if all fields are equal */ bool isIdentical(const CIFBuilderTriplet& inTriplet)const; /** the feature id of this feature */ int mFeatureID; /** the document id of the document containing this feature */ int mDocumentID; /** the frequency of the feature within the document */ float mDocumentFrequency; }; bool operator<( const CIFBuilderTriplet& l,// less const CIFBuilderTriplet& t // than ); #endif gift-0.1.14/libGIFTAcInvertedFile/include/CAFIFMySQL.h0000644000175200001440000000306510220502727016725 00000000000000/* -*- mode: c++ -*- */ #ifdef __GIFT_WITH_MYSQL__ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CAFIFMYSQL #define _CAFIFMYSQL #include "libGIFTAcInvertedFile/include/uses-declarations.h" #include "libMRML/include/CAccessorFactory.h" #include "libGIFTAcInvertedFile/include/CAcInvertedFile.h" #include "libGIFTAcInvertedFile/include/CAcIFFileSystem.h" /** * A factory to make inverted Files *@author Wolfgang Müller * */ class CAFIFMySQL:public CAccessorFactory{ public: /** Constructs this: i.e. sets mName */ CAFIFMySQL(); /** makes an inverte file accessor */ CAccessor* makeAccessor(const CXMLElement& inConfiguration)const; }; #endif #endif gift-0.1.14/libGIFTAcInvertedFile/include/Makefile.am0000644000175200001440000000117010153634150017106 00000000000000 InvertedFiledir=$(includedir)/libGIFTAcInvertedFile/include InvertedFile_HEADERS=CADIHash.h CDocumentFrequencyElement.h \ CAFIFMySQL.h CDocumentFrequencyHash.h \ CAFInvertedFile.h CDocumentFrequencyList.h \ CAFSpecialised.h CIFBuilderTriplet.h \ CAcIFFileSystem.h CIFListStart.h \ CAcIFMySQL.h CInitializedDouble.h \ CAcInvertedFile.h CInvertedFileChunk.h \ CAcInvertedFileAbstraction.h WeightingFunctionsAndNormalizers.h \ CAcSQLInvertedFile.h gift_features.h \ CAdditionalDocumentInformation.h map_to_list.h \ CBitSetCollection.h merge_sort_streams.h \ CComparisonResults.h uses-declarations.h gift-0.1.14/libGIFTAcInvertedFile/include/Makefile.in0000644000175200001440000003110510220474075017123 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = libGIFTAcInvertedFile/include DIST_COMMON = $(InvertedFile_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__installdirs = "$(DESTDIR)$(InvertedFiledir)" InvertedFileHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(InvertedFile_HEADERS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ InvertedFiledir = $(includedir)/libGIFTAcInvertedFile/include InvertedFile_HEADERS = CADIHash.h CDocumentFrequencyElement.h \ CAFIFMySQL.h CDocumentFrequencyHash.h \ CAFInvertedFile.h CDocumentFrequencyList.h \ CAFSpecialised.h CIFBuilderTriplet.h \ CAcIFFileSystem.h CIFListStart.h \ CAcIFMySQL.h CInitializedDouble.h \ CAcInvertedFile.h CInvertedFileChunk.h \ CAcInvertedFileAbstraction.h WeightingFunctionsAndNormalizers.h \ CAcSQLInvertedFile.h gift_features.h \ CAdditionalDocumentInformation.h map_to_list.h \ CBitSetCollection.h merge_sort_streams.h \ CComparisonResults.h uses-declarations.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(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 libGIFTAcInvertedFile/include/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTAcInvertedFile/include/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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-InvertedFileHEADERS: $(InvertedFile_HEADERS) @$(NORMAL_INSTALL) test -z "$(InvertedFiledir)" || $(mkdir_p) "$(DESTDIR)$(InvertedFiledir)" @list='$(InvertedFile_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(InvertedFileHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(InvertedFiledir)/$$f'"; \ $(InvertedFileHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(InvertedFiledir)/$$f"; \ done uninstall-InvertedFileHEADERS: @$(NORMAL_UNINSTALL) @list='$(InvertedFile_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f '$(DESTDIR)$(InvertedFiledir)/$$f'"; \ rm -f "$(DESTDIR)$(InvertedFiledir)/$$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 $(HEADERS) installdirs: for dir in "$(DESTDIR)$(InvertedFiledir)"; 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: -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 \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-InvertedFileHEADERS 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-InvertedFileHEADERS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-InvertedFileHEADERS \ 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 \ tags uninstall uninstall-InvertedFileHEADERS 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: gift-0.1.14/libGIFTAcInvertedFile/include/CInitializedDouble.h0000644000175200001440000000436110220502727020732 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CInitializedDouble * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CINITIALIZEDDOUBLE #define _CINITIALIZEDDOUBLE #include "libGIFTAcInvertedFile/include/uses-declarations.h" /** A class of doubles which are initialized with a zero (unnecessary, it seems) */ class CInitializedDouble{ protected: ///The double double mDouble; public: /*************************************** * * * ***************************************/ ///Conversion (for double=CInitializedDouble) inline operator double()const{ return mDouble; }; /*************************************** * * * ***************************************/ /// inline CInitializedDouble(const double inDouble=0):mDouble(inDouble){}; /*************************************** * * * ***************************************/ /// inline CInitializedDouble(const CInitializedDouble& in): mDouble(in.mDouble){}; /*************************************** * * * ***************************************/ /// inline CInitializedDouble operator=(const CInitializedDouble& in) {mDouble=(in.mDouble);}; }; #endif gift-0.1.14/libGIFTAcInvertedFile/include/CInvertedFileChunk.h0000644000175200001440000000415310220502727020702 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- /** * * CInvertedFileChunk * * * * modification history: * * HM 090399 created the documentation * * * * compiler defines used: * * */ #ifndef _CINVERTEDFILECHUNK #define _CINVERTEDFILECHUNK #include "libGIFTAcInvertedFile/include/uses-declarations.h" #include #include #include "libMRML/include/TID.h" #include #include "libGIFTAcInvertedFile/include/CDocumentFrequencyList.h" /** */ class CMapInvertedFileChunk:public map{}; /** A class which does all the necessary administrative work for generating inverted files. It contains the list of documents which contain a given feature */ class CInvertedFileChunk:public CMapInvertedFileChunk{ public: /** * * returns the percentage of documents which contain this one feature * */ double getCollectionFrequency(size_t inSize)const; /** * * add one document of to the list for one feature * */ void CInvertedFileChunk::addElement(TID inDocumentID, double inDocumentFrequency); /** * * writes the binary part of the list for one feature * */ bool writeBinary(ostream&, TID inFeatureID, size_t inSize)const; }; #endif gift-0.1.14/libGIFTAcInvertedFile/include/CAFInvertedFile.h0000644000175200001440000000304710220502727020121 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CAFINVERTEDFILE #define _CAFINVERTEDFILE #include "libGIFTAcInvertedFile/include/uses-declarations.h" #include "libMRML/include/CAccessorFactory.h" #include "libGIFTAcInvertedFile/include/CAcInvertedFile.h" #include "libGIFTAcInvertedFile/include/CAcIFFileSystem.h" /** * A factory to make inverted Files *@author Wolfgang Müller * */ class CAFInvertedFile:public CAccessorFactory{ public: /** Constructs this: i.e. sets mName */ CAFInvertedFile(); /** makes an inverte file accessor */ CAccessor* makeAccessor(const CXMLElement& inConfiguration)const; }; #endif gift-0.1.14/libGIFTAcInvertedFile/include/merge_sort_streams.h0000644000175200001440000002302210220502727021126 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva, University of Bayreuth Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _MERGE_SORT #define _MERGE_SORT //#warning FIXME: this needs to be added to the GIFT distro. It speeds up the generation //#warning of inverted files considerably //(done) #include // auto_ptr #include // using swap #include // file access #include using namespace std; //#define STREAMPOS_T fstream::pos_type /** a wrapper for streampos, so we can do increments on it */ template class CStreamPos{ /** the content */ T mContent; public: CStreamPos(T inContent):mContent(inContent){ } CStreamPos(long int inContent):mContent(inContent){ } operator T()const{ return mContent; } operator long int()const{ return mContent; } CStreamPos& operator++ (){ mContent=mContent+static_cast(1); return *this; } CStreamPos operator++ (int){ CStreamPos lReturnValue=*this; mContent=mContent+static_cast(1); return lReturnValue; } CStreamPos operator% (int inMod)const{ return mContent % inMod; } CStreamPos operator/ (int inMod)const{ return mContent / inMod; } bool operator< (CStreamPos& inThan)const{ return this->mContent < inThan.mContent; } bool operator! ()const{ return !(this->mContent); } CStreamPos operator+ (CStreamPos& inSummand){ return CStreamPos(mContent + inSummand.mContent); } }; #if __GNUC__==2 #define STREAMPOS_T long long int #else #define STREAMPOS_T CStreamPos #endif // ex long long int /** A template for merging streams in the sense of mergesort @params in1,in2 are the streams to be merged @params out is the stream which contains afterwards the two merged streams The stream is considered to contain only elements of type T This is the principal helper function of merge_sort_streams */ template void merge_streams(istream& in1, const STREAMPOS_T inCount1, istream& in2, const STREAMPOS_T inCount2, ostream& out, int inNumberOfPageElements=1){ { // cout << "Merging: " // << inCount1 // << "," // << inCount2 // << endl; const STREAMPOS_T lPageSize(sizeof(T)*inNumberOfPageElements); if(!(inCount1)){// if there is nothing to merge for(STREAMPOS_T i=0;//...copy i void first_level_quicksort(int inNumberOfPageElements, const char* inFileToBeSortedName, const char* inTemporaryName){ cout << "Starting quicksort: " << inNumberOfPageElements << " elements per page." << endl << "Sorting files " << inFileToBeSortedName << endl << "to " << inTemporaryName << endl; cout << "NOW ALLOCATING A PAGE" << inNumberOfPageElements << endl; auto_ptr lPage(new T[inNumberOfPageElements]); cout << "H" << flush; const STREAMPOS_T lPageSize(sizeof(T)*inNumberOfPageElements); cout << "I" << flush; STREAMPOS_T lFileSize(0); ifstream lToBeSorted1(inFileToBeSortedName); assert(lToBeSorted1); lToBeSorted1.seekg(0, ios::end); lFileSize=lToBeSorted1.tellg(); lToBeSorted1.clear(); lToBeSorted1.seekg(0, ios::beg); cout << "E" << flush; ofstream lTemporary(inTemporaryName); assert(lTemporary); cout << "R" << flush; STREAMPOS_T lSum(0); T* lBegin(lPage.get()); T* lEnd(lPage.get()); cout << "FIRSTLEVELQUICK" << lFileSize << ";" << lSum<< endl; while((lSum char* merge_sort_streams(const char* inFileToBeSortedName, const char* inTemporaryName, int inNumberOfPageElements=(1 << 20) ){ const char* lFileToBeSortedName(inFileToBeSortedName); const char* lTemporaryName(inTemporaryName); STREAMPOS_T lFileSize(0); ifstream lToBeSorted1(inFileToBeSortedName); lToBeSorted1.seekg(0, ios::end); lFileSize=lToBeSorted1.tellg(); lToBeSorted1.close(); ofstream lTemporary; ifstream lToBeSorted2; #ifdef first_level_quick first_level_quicksort(inNumberOfPageElements, inFileToBeSortedName, inTemporaryName); swap(lFileToBeSortedName, lTemporaryName); #else cout << "STARTING mit MERGESIZE1" << endl; inNumberOfPageElements=1; #endif STREAMPOS_T lCount(0); for(STREAMPOS_T iMergeSize(sizeof(T)*inNumberOfPageElements); (iMergeSize < lFileSize) || !(lCount%2) // ||(lCount%2) makes sure that we will get // the result in inFileToBeSorted // the ! is, because we have have already // the quicksort sorting pass behind us ; (iMergeSize = iMergeSize << 1), (lCount=lCount+static_cast(1))){ cout << "MERGESORT MergeSize " << iMergeSize << endl; lToBeSorted1.open(lFileToBeSortedName); lToBeSorted1.clear(); lToBeSorted2.open(lFileToBeSortedName); lToBeSorted2.clear(); lTemporary.open(lTemporaryName); lTemporary.clear(); for(STREAMPOS_T i(0); i(i) << ")" << endl; } assert(lToBeSorted1); if(i+iMergeSizeiMergeSize){ lMergeSize1=iMergeSize; } if(lMergeSize2>iMergeSize){ lMergeSize2=iMergeSize; } #if __GNUC__==2 merge_streams(lToBeSorted1, lMergeSize1/sizeof(T), lToBeSorted2, lMergeSize2/sizeof(T), lTemporary, inNumberOfPageElements ); #else merge_streams(lToBeSorted1, lMergeSize1.operator/(sizeof(T)), lToBeSorted2, lMergeSize2.operator/(sizeof(T)), lTemporary, inNumberOfPageElements ); #endif } lTemporary.close(); lToBeSorted1.close(); lToBeSorted2.close(); swap(lFileToBeSortedName, lTemporaryName); cout << "endmerge" << endl; } return strdup(lFileToBeSortedName); } #endif gift-0.1.14/libGIFTAcInvertedFile/include/map_to_list.h0000644000175200001440000000112310220502727017532 00000000000000/** * * MAPTOLIST * * * * modification history: * * HM 090399 created the documentation * * * * compiler defines used: * * */ #ifndef _MAPTOLIST #define _MAPTOLIST #include #include /** * * generating a list out of the elements of a map * */ template list* map_to_list(const typename map::const_iterator inBegin, const typename map::const_iterator inEnd){ list lNewList=new list; while(inBegin!=inEnd){ lNewList->push_back((inBegin++).second); } return lNewList; } #endif gift-0.1.14/libGIFTAcInvertedFile/include/CComparisonResults.h0000644000175200001440000000722110220502727021024 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CCOMPARISONRESULTS * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CCOMPARISONRESULTS #define _CCOMPARISONRESULTS #include "libGIFTAcInvertedFile/include/uses-declarations.h" #include #include #include "libMRML/include/CRelevanceLevel.h" #include "libGIFTQuInvertedFile/include/CWeightingFunctionPointerHash.h" #include "libGIFTAcInvertedFile/include/CDocumentFrequencyElement.h" //#include "CBitVector.h" class CIFQPicHunter; class CRelevanceLevel; class CDocumentFrequencyList; /** The general scheme of implementing a PicHunter like algorithm in GIFT uses the following scheme: If you want a suggestion of n<\em> elements get 2n<\em> elements. Call them the s_i. For the same dbSize/10 (or something) elements (which we will call the e_i) calculate the distance (s_i,d_j) for all i and j possible. (Leading to something like 500 comparisons in our case). For each s_i the delta_{ij} will be stored in a structure of the type CComparisonResults */ class CComparisonResults{ /// typedef CIFQPicHunter lCContainerType; /// CWeightingFunctionPointerHash mWeighters; /// lCContainerType& mContainer; /// typedef set lCScoreSet; /// mutable lCScoreSet mScores; /// CRelevanceLevel mQueryImage; /// TID mID; /**For giving non-temporary references back: I think this is a workaround, but maybe also due to bad understanding*/ mutable CBitVector mReturnSet; public: /*************************************** * * * ***************************************/ /// CComparisonResults(lCContainerType& inContainer, const CWeightingFunction& inPrototype, TID inID, const CRelevanceLevel& inQuery); /*************************************** * * * ***************************************/ /// double calculateImageScore(TID inDID, const CDocumentFrequencyList& inList)const; /*************************************** * * * ***************************************/ /// double addImageScore(TID inDID, const CDocumentFrequencyList& inList)const; /*************************************** * * * ***************************************/ /// CBitVector compare(const CComparisonResults& inResults)const; /// double getAsymmetry(const CComparisonResults& inResults)const; /// CWeightingFunctionPointerHash& getWeighters(); /// void setRelevanceLevel(double); /// TID getID()const; /// CRelevanceLevel const& getQuery()const; }; #endif gift-0.1.14/libGIFTAcInvertedFile/include/uses-declarations.h0000644000175200001440000000245310220502727020654 00000000000000/* -*- mode: c++ -*- Path: ./libGIFTAcInvertedFile/include/uses-declarations.h */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /* Author: Wolfgang Müller (via perl script) use namespace definitions for libGIFTAcInvertedFile. to be included into all include files of this library */ #ifndef _LIBGIFTACINVERTEDFILE_USES_DECLARATIONS_ #define _LIBGIFTACINVERTEDFILE_USES_DECLARATIONS_ using namespace std; #endif gift-0.1.14/libGIFTAcInvertedFile/include/CAcInvertedFile.h0000644000175200001440000001121310220502727020150 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- class CXMLElement; /** * * * This class manages the access to the inverted file as well * as its generation * * * * modification history: * * WM 1099 changed documentation format * completed documentation * HM 090399 created the documentation * WM 1098 created the file * * * * compiler defines used: * * */ #ifndef _CINVERTEDFILEACCESSOR #define _CINVERTEDFILEACCESSOR #include "libGIFTAcInvertedFile/include/uses-declarations.h" #include #include "libMRML/include/TID.h" #include "libMRML/include/CAccessor.h" #include "libGIFTAcInvertedFile/include/CDocumentFrequencyList.h" #include #include #include #include #ifdef HAS_HASH_MAP #include #else #define hash_map map #endif #include #include #include "libMRML/include/CMagic.h" typedef TID TFeatureID ; /** An accessor to an inverted file. This access is done "by hand" at present this not really efficient, however we plan to move to memory mapped files. */ class CAcInvertedFile:public CAccessor{ public: /** for testing if the inverted file is correctly constructed*/ virtual bool operator()()const =0; /** */ /** Translate a DocumentID to a URL (for output) */ virtual string IDToURL(TID inID)const =0; /** Translate an URL to its document ID */ virtual pair URLToID(const string& inURL)const =0; /**@name The proper inverted file access*/ //@{ /** Give the List of documents containing the feature inFID CORNELIA: CDocumentFrequencyList ist nichts anderes als eine liste von int,float paaren: struct{ int mID, float mFrequency; } */ virtual CDocumentFrequencyList* FeatureToList(TFeatureID inFID)const =0; /** List of features contained by a document with URL inURL*/ virtual CDocumentFrequencyList* URLToFeatureList(string inURL)const =0; /** List of features contained by a document with ID inDID */ virtual CDocumentFrequencyList* DIDToFeatureList(TID inDID)const =0; /** */ /** For drawing random sets mainly a translation of getRandomURLs CORNELIA: IM MOMENT KOENNEN WIR DIESE FUNKTION VERGESSEN virtual void getRandomRLLs(list&, list::size_type)const; */ //@} /**@name Accessing information about features*/ //@{ /** Collection frequency for a given feature */ virtual double FeatureToCollectionFrequency(TFeatureID)const =0; /** What kind of feature is the feature with ID inFeatureID? */ virtual unsigned int getFeatureDescription(TID inFeatureID)const =0; //@} /**@name Accessing additional document information*/ //@{ /** returns the maximum document frequency for one document ID */ virtual double DIDToMaxDocumentFrequency(TID)const =0; /** Returns the document-frequency square sum for a given document ID */ virtual double DIDToDFSquareSum(TID)const =0; /** Returns this function for a given document ID */ virtual double DIDToSquareDFLogICFSum(TID)const =0; //@} /*@name Inverted File Generation and Consistency Checking*/ //@{ /** Generating an inverted File, if there is none. */ virtual bool generateInvertedFile() =0; /**Check the consistency of the inverted file system accessed by this accessor.*/ virtual bool checkConsistency() =0; //@} /** Getting a list of all features contained in this. This function is necessary, because in the present system only about 50 percent of the features are really used. A feature is considered used if it arises in at least one image */ virtual list* getAllFeatureIDs()const =0; }; #endif gift-0.1.14/libGIFTAcInvertedFile/include/CAcIFFileSystem.h0000644000175200001440000002352010220502727020077 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- class CXMLElement; /* * * * This class manages the access to the inverted file as well * as its generation * * * * modification history: * * WM 1099 changed documentation format * completed documentation * HM 090399 created the documentation * WM 1098 created the file * * * * compiler defines used: * * */ #ifndef _CACIFFILESYSTEM #define _CACIFFILESYSTEM #include "libGIFTAcInvertedFile/include/uses-declarations.h" #include #include "libMRML/include/TID.h" #include "libMRML/include/CSelfDestroyPointer.h" #include "libMRML/include/CArraySelfDestroyPointer.h" #include "libGIFTAcInvertedFile/include/CDocumentFrequencyList.h" #include "libMRML/include/CMutex.h" // multi threading //#include "CCollectionFrequencyList.h" #include "libGIFTAcInvertedFile/include/CADIHash.h" #include "libGIFTAcURL2FTS/include/CAcURL2FTS.h" #include "libGIFTAcInvertedFile/include/CAcInvertedFile.h" #include #include #include #include #ifdef HAS_HASH_MAP #include #define HASH_MAP hash_map #else #define HASH_MAP map #endif #include #include #include "libMRML/include/CMagic.h" typedef TID TFeatureID ; /** An accessor to an inverted file. This access is done "by hand". For a long time we wanted to move to memory mapped files (like SWISH++) but currently I think this is not the best idea. */ class CAcIFFileSystem:public CAcInvertedFile{ protected: /** the mutex for multi threading */ CMutex mMutex; /** In order to have just one parent, I have to limit on single inheritance. I cannot use virtual base classes, because then I cannot downcast */ CSelfDestroyPointer mURL2FTS; /** the maximum feature ID arising in this file */ TID mMaximumFeatureID; /** A buffer, if the inverted file is to be held in ram */ #ifndef V295 string mInvertedFileBuffer; #else CArraySelfDestroyPointer mInvertedFileBuffer; #endif /** Some place for putting temporary indexing data*/ string mTemporaryIndexingFileBase; /** The inverted file */ mutable CSelfDestroyPointer mInvertedFile; /** Feature -> Offset in inverted file */ mutable ifstream mOffsetFile; /** File of feature descriptions */ ifstream mFeatureDescriptionFile; /** Name of the inverted file */ string mInvertedFileName; /** Name of the Offset file */ string mOffsetFileName; /** Name for the file with the feature description */ string mFeatureDescriptionFileName; /** map from feature id to the offset for this feature */ typedef HASH_MAP CIDToOffset;//new hash /** map from feature id to the offset for this feature */ CIDToOffset mIDToOffset; /** map from feature to the collection frequency */ mutable HASH_MAP mFeatureToCollectionFrequency;//new hash /**@name for fast access...*/ //@{ /** map from the feature ID to the feature description */ HASH_MAP mFeatureDescription;//new hash_ /** additional information about the document like, e.g. the euclidean length of the feature list. */ CADIHash mDocumentInformation; //@} /** add a pair of FeatureID,Offset to the open offset file (helper function for inverted file construction) */ void writeOffsetFileElement(TID inFeatureID, streampos inPosition, ostream& inOpenOffsetFile); /** loads a *.fts file. and returns the feature list*/ CDocumentFrequencyList* getFeatureFile(string inFileName)const; public: /** for testing if the inverted file is correctly constructed*/ bool operator()()const; /** This opens an exsisting inverted file, and then inits this structure. After that it is fully usable As a paramter it takes an XMLElement which contains a "collection" element and its content. If the attribute cui-generate-inverted-file is true, then a new inverted file will be generated using the parameters given in inCollectionElement. you will NOT be able to use *this afterwards. Like every accessor, this accessor takes a MRML element as input (@see CXMLElement for how to access the attributes of this element). Currently this accessor understands the following attributes cui-base-dir: the directory containing the following files cui-inverted-file-location: the location of the inverted file cui-offset-file-location: a file containing offsets into the inverted file cui-feature-file-location: the location of the "url2fts" file which translates urls to feature file names. */ CAcIFFileSystem(const CXMLElement& inCollectionElement); /** called by constructors */ bool init(bool); /** Destructor */ ~CAcIFFileSystem(); /** Translate a DocumentID to a URL (for output) */ string IDToURL(TID inID)const; /**@name The proper inverted file access*/ //@{ /** List of documents containing the feature */ CDocumentFrequencyList* FeatureToList(TFeatureID)const; /** List of features contained by a document */ CDocumentFrequencyList* URLToFeatureList(string inURL)const; /** List of features contained by a document with ID inDID */ CDocumentFrequencyList* DIDToFeatureList(TID inDID)const; //@} /**@name Accessing information about features*/ //@{ /** Collection frequency for a given feature */ double FeatureToCollectionFrequency(TFeatureID)const; /** What kind of feature is the feature with ID inFeatureID? */ unsigned int getFeatureDescription(TID inFeatureID)const; //@} /**@name Accessing additional document information*/ //@{ /** returns the maximum document frequency for one document ID */ double DIDToMaxDocumentFrequency(TID)const; /** Returns the document-frequency square sum for a given document ID */ double DIDToDFSquareSum(TID)const; /** Returns this function for a given document ID */ double DIDToSquareDFLogICFSum(TID)const; //@} /*@name Inverted File Generation and Consistency Checking*/ //@{ /** Generating an inverted File, if there is none. Fast but stupid in-memory method. This method is very fast, if all the inverted file (and a bit more) can be kept in memory at runtime. If this is not the case, extensive swapping is the result, virtually halting the inverted file creation. */ bool generateInvertedFile(); /** Generating an inverted File, if there is none. Employing the two-way-merge method described in "managing gigabytes", chapter 5.2. Sort-based inversion. (Page 181) */ bool newGenerateInvertedFile(); /**Check the consistency of the inverted file system accessed by this accessor.*/ bool checkConsistency(); /**Is the Document with inDocumentID contained in the document frequency list of the feature inFeatureID and is the associated document frequency the same? @param inFeature URLToID(const string& inURL)const; /** List of the IDs of all documents present in the inverted file */ void getAllIDs(list&)const; /** List of triplets (ID,imageURL,thumbnailURL) of all the documents present in the inverted file */ void getAllAccessorElements(list&)const; /** get a given number of random C-AccessorElement-s @param inoutResultList the list which will contain the result @param inSize the desired size of the inoutResultList */ void getRandomIDs(list&, list::size_type)const; /** For drawing random sets. Why is this part of an CAccessorImplementation? The way the accessor is organised might influence the way random sets can be drawn. At present everything happens in RAM, but we do not want to be fixed on that. @param inoutResultList the list which will contain the result @param inSize the desired size of the inoutResultList */ void getRandomAccessorElements(list& outResult, list::size_type inSize)const; /** The number of images in this accessor */ int size()const; //@} /** This is interesting for browsing*/ TID getMaximumFeatureID()const; /** Getting a list of all features contained in this. This function is necessary, because in the present system only about 50 percent of the features are really used. A feature is considered used if it arises in mIDToOffset. */ list* getAllFeatureIDs()const; /** * * Translate a DocumentID to an accessor Element * */ virtual pair IDToAccessorElement(TID inID)const; /** is this well constructed? */ operator bool()const; }; #endif gift-0.1.14/libGIFTAcInvertedFile/include/CDocumentFrequencyElement.h0000644000175200001440000000661210220502727022305 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /** * * CDOCUMENTFREQUENCYELEMENT * * * * modification history: * * HM 090399 created the documentation * * * * compiler defines used: * * */ #ifndef _CDOCUMENTFREQUENCYELEMENT #define _CDOCUMENTFREQUENCYELEMENT #include "libGIFTAcInvertedFile/include/uses-declarations.h" #include #include #include "libMRML/include/TID.h" /** A pair of Document Frequency ID: Can be used for FeatureIDs and DocumentIDs */ class CDocumentFrequencyElement{ struct{ /** The ID of the document or featue */ TID mID; /** The document frequency of the feature */ float mDocumentFrequency; } mContent; public: /** * * @name Constructors * */ //@{ /** */ CDocumentFrequencyElement(); /** * * constructor * fills mContent with inID,inDocumentFrequency * */ CDocumentFrequencyElement(TID inID, float inDocumentFrequency); /** * * * */ CDocumentFrequencyElement(istream& inStream); /** * * * */ CDocumentFrequencyElement(const CDocumentFrequencyElement& inElement); /** * * * */ //@} /**@name input/output*/ //@{ /** */ bool input(istream& inStream); /** * * * */ bool output(ostream& outStream)const; /** * * * */ bool writeBinary(ostream& outStream)const; //@} /**@name Accessors*/ //@{ /** * * * */ TID getID()const; /** * * * */ unsigned int getIntegerDocumentFrequency()const; /** * * * */ float getDocumentFrequency()const; /** * * * */ void setDocumentFrequency(float); /** * * * */ void divideDocumentFrequency(float); //@} }; /** * * * CDocumentFrequencyElement:Sorting function class for sorting by ID * */ class CSortByID_DFE: public binary_function { public: /** Inlined for speed */ inline bool operator()(const CDocumentFrequencyElement& l, const CDocumentFrequencyElement& t){ return l.getID(){ public: /** */ inline bool operator()(const CDocumentFrequencyElement& l, const CDocumentFrequencyElement& t){ return t.getDocumentFrequency() #include "libMRML/include/TID.h" #include "libMRML/include/CSelfDestroyPointer.h" #include "libMRML/include/CArraySelfDestroyPointer.h" #include "libGIFTAcInvertedFile/include/CDocumentFrequencyList.h" #include "libGIFTAcInvertedFile/include/CADIHash.h" #include #include #include #include #ifdef HAS_HASH_MAP #include #else #define hash_map map #endif #include #include #include #include #include "libMRML/include/CMagic.h" typedef TID TFeatureID ; /** An accessor to an inverted file. This access is done "by hand" at present this not really efficient, however we plan to move to memory mapped files. */ class documentFeatureConnection; class CAcIFMySQL:public CAccessor{ /** In order to have just one parent, I have to limit on single inheritance. I cannot use virtual base classes, because then I cannot downcast */ CSelfDestroyPointer mURL2FTS; /** our connection to the document-feature database */ documentFeatureConnection* mConnection; string GdbName; string GdbUser; string GdbHost; string GdbPassword; bool connection2dbOK; Connection *cnx; /** */ //vector queryReturn; /** */ vector ::iterator It; /** this function was not asked for */ CDocumentFrequencyList* featureList2docList(CDocumentFrequencyList inFeatureList); /** dto. */ void showDocFreqList(CDocumentFrequencyList docFreqList); /* neither this */ CDocumentFrequencyList* blob2docFreqList(string inBlobFile)const; protected: int CAcIFMySQL::recordCount(string ltableName)const; bool CAcIFMySQL::selectDB( string); bool CAcIFMySQL::createDB( string); bool CAcIFMySQL::dropDB( string); void CAcIFMySQL::initialiseGIFTTables(bool, bool,string); public: /** for testing if the inverted file is correctly constructed*/ virtual bool operator()()const; /** This opens an exsisting inverted file, and then inits this structure. After that it is fully usable As a paramter it takes an XMLElement which contains a "collection" element and its content. If the attribute vi-generate-inverted-file is true, then a new inverted file will be generated using the parameters given in inCollectionElement. you will NOT be able to use *this afterwards. The REAL constructor. */ CAcIFMySQL(const CXMLElement& inCollectionElement); /** Destructor */ ~CAcIFMySQL(); /** */ /** Translate a DocumentID to a URL (for output) */ virtual string IDToURL(TID inID)const; /** Translate an URL to its document ID */ virtual pair URLToID(const string& inURL)const; /**@name The proper inverted file access*/ //@{ /** Give the List of documents containing the feature inFID CORNELIA: CDocumentFrequencyList ist nichts anderes als eine liste von int,float paaren: struct{ int mID, float mFrequency; } */ virtual CDocumentFrequencyList* FeatureToList(TFeatureID inFID)const; /** List of features contained by a document with URL inURL*/ virtual CDocumentFrequencyList* URLToFeatureList(string inURL)const; /** List of features contained by a document with ID inDID */ virtual CDocumentFrequencyList* DIDToFeatureList(TID inDID)const; /** */ /** For drawing random sets mainly a translation of getRandomURLs CORNELIA: IM MOMENT KOENNEN WIR DIESE FUNKTION VERGESSEN virtual void getRandomRLLs(list&, list::size_type)const; */ //@} /**@name Accessing information about features*/ //@{ /** Collection frequency for a given feature */ virtual double FeatureToCollectionFrequency(TFeatureID)const; /** What kind of feature is the feature with ID inFeatureID? */ virtual unsigned int getFeatureDescription(TID inFeatureID)const; //@} /**@name Accessing additional document information*/ //@{ /** returns the maximum document frequency for one document ID */ virtual double DIDToMaxDocumentFrequency(TID)const; /** Returns the document-frequency square sum for a given document ID */ virtual double DIDToDFSquareSum(TID)const; /** Returns this function for a given document ID */ virtual double DIDToSquareDFLogICFSum(TID)const; //@} /*@name Inverted File Generation and Consistency Checking*/ //@{ /** Generating an inverted File, if there is none. virtual bool generateInvertedFile(); */ //@} /** Getting a list of all features contained in this. This function is necessary, because in the present system only about 50 percent of the features are really used. A feature is considered used if it arises in at least one image */ void CAcIFMySQL::getAllIDs( list &) const; void CAcIFMySQL::getAllAccessorElements( list &) const; void CAcIFMySQL::getRandomIDs(list &, size_t) const; void CAcIFMySQL::getRandomAccessorElements(list &, size_t) const; virtual list* getAllFeatureIDs()const; /** * * Translate a DocumentID to an accessor Element * */ virtual pair IDToAccessorElement(TID inID)const; int CAcIFMySQL::size() const; CAcIFMySQL::operator bool()const; }; #endif #endif gift-0.1.14/libGIFTAcInvertedFile/include/CAcInvertedFileAbstraction.h0000644000175200001440000001264610220502727022355 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- class CXMLElement; /** * * * This class manages the access to the inverted file as well * as its generation * * * * modification history: * * WM 1099 changed documentation format * completed documentation * HM 090399 created the documentation * WM 1098 created the file * * * * compiler defines used: * * */ #ifndef _CINVERTEDFILEACCESSOR #define _CINVERTEDFILEACCESSOR #include "libGIFTAcInvertedFile/include/uses-declarations.h" #include #include "libMRML/include/TID.h" #include "libMRML/include/CSelfDestroyPointer.h" #include "libMRML/include/CArraySelfDestroyPointer.h" #include "libGIFTAcInvertedFile/include/CDocumentFrequencyList.h" #include "CCollectionFrequencyList.h" #include "libGIFTAcInvertedFile/include/CADIHash.h" #include "libGIFTAcURL2FTS/include/CAcURL2FTS.h" #include #include #include #include #ifdef HAS_HASH_MAP #include #else #define hash_map map #endif #include #include #include "libMRML/include/CMagic.h" typedef TID TFeatureID ; /** An accessor to an inverted file. This access is done "by hand" at present this not really efficient, however we plan to move to memory mapped files. */ class CAcInvertedFileAbstraction{ public: /** for testing if the inverted file is correctly constructed*/ virtual bool operator()()const =0; /** This opens an exsisting inverted file, and then inits this structure. After that it is fully usable As a paramter it takes an XMLElement which contains a "collection" element and its content. If the attribute vi-generate-inverted-file is true, then a new inverted file will be generated using the parameters given in inCollectionElement. you will NOT be able to use *this afterwards. The REAL constructor. */ CAcInvertedFileAbstraction(const CXMLElement& inCollectionElement); /** Destructor */ ~CAcInvertedFileAbstraction(); /** */ /** Translate a DocumentID to a URL (for output) */ virtual string IDToURL(TID inID)const =0; /** Translate an URL to its document ID */ virtual TID URLToID(const string& inURL)const =0; /**@name The proper inverted file access*/ //@{ /** Give the List of documents containing the feature inFID CORNELIA: CDocumentFrequencyList ist nichts anderes als eine liste von int,float paaren: struct{ int mID, float mFrequency; } */ virtual CDocumentFrequencyList* FeatureToList(TFeatureID inFID)const =0; /** List of features contained by a document with URL inURL*/ virtual CDocumentFrequencyList* URLToFeatureList(string inURL)const =0; /** List of features contained by a document with ID inDID */ virtual CDocumentFrequencyList* DIDToFeatureList(TID inDID)const =0; /** */ /** For drawing random sets mainly a translation of getRandomURLs CORNELIA: IM MOMENT KOENNEN WIR DIESE FUNKTION VERGESSEN virtual void getRandomRLLs(list&, list::size_type)const; */ //@} /**@name Accessing information about features*/ //@{ /** Collection frequency for a given feature */ virtual double FeatureToCollectionFrequency(TFeatureID)const =0; /** What kind of feature is the feature with ID inFeatureID? */ virtual unsigned int getFeatureDescription(TID inFeatureID)const =0; //@} /**@name Accessing additional document information*/ //@{ /** returns the maximum document frequency for one document ID */ virtual double DIDToMaxDocumentFrequency(TID)const =0; /** Returns the document-frequency square sum for a given document ID */ virtual double DIDToDFSquareSum(TID)const =0; /** Returns this function for a given document ID */ virtual double DIDToSquareDFLogICFSum(TID)const =0; //@} /*@name Inverted File Generation and Consistency Checking*/ //@{ /** Generating an inverted File, if there is none. */ virtual bool generateInvertedFile() =0; /**Check the consistency of the inverted file system accessed by this accessor.*/ virtual bool checkConsistency() =0; //@} /** Getting a list of all features contained in this. This function is necessary, because in the present system only about 50 percent of the features are really used. A feature is considered used if it arises in at least one image */ virtual list* getAllFeatureIDs()const =0; }; #endif gift-0.1.14/libGIFTAcInvertedFile/include/WeightingFunctionsAndNormalizers.h0000644000175200001440000000376710220502727023727 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * ... a whole collection of includes for convenience * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #include "libGIFTQuInvertedFile/include/CQNBestFullyWeighted.h" #include "libGIFTQuInvertedFile/include/CWFBestFullyWeighted.h" #include "libGIFTQuInvertedFile/include/CQNNoNormalization.h" #include "libGIFTQuInvertedFile/include/CQNEuclideanLengthSquare.h" #include "libGIFTQuInvertedFile/include/CQNSquareDFLogICFSum.h" #include "libGIFTQuInvertedFile/include/CQNMaxDocumentFrequency.h" #include "libGIFTQuInvertedFile/include/CWFBestProbabilistic.h" #include "libGIFTQuInvertedFile/include/CWFClassicalIDF.h" #include "libGIFTQuInvertedFile/include/CWFBinaryTerm.h" #include "libGIFTQuInvertedFile/include/CWFProbability.h" #include "libGIFTQuInvertedFile/include/CWFStandardTF.h" #include "libGIFTQuInvertedFile/include/CWFCoordinationLevel.h" gift-0.1.14/gift-check-perl-config.pl0000644000175200001440000000314010153634150014205 00000000000000#!/usr/bin/perl -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # # This file finds out which perl modules needed are missing from your system # the perl modules are specified as arguments # my $lModule; my $lReturnValue; while($lModule=shift){ print "Checking for module $lModule in your perl setup\n"; eval "use $lModule;"; my $lErrorString=join("\n ",split("\n",$@)); if($@){ $lReturnValue=1; print STDERR << "ENDSTRING" $lModule is missing. Perl gives us the following error message: $lErrorString; ENDSTRING }else{ print "$lModule: OK\n" }; } die q(There were one or more missing Perl modules. Please install them or adjust your Perl library path befor trying again. This error message was generated ) if $lReturnValue gift-0.1.14/README0000644000175200001440000000355110153634150010327 00000000000000 GIFT 0.1.11 README Wolfgang Mueller 2004-06-11 IF YOU'RE ALLREADY RUNNING AN INSTALLATION OF A PREVIOUS VERSION OF THE GIFT, PLEASE DO READ THE "NEWS" FILE. The GIFT is a content based image retrieval system. That is, it enables the user to retrieve images from a collection without attaching text-based annotation to each image. For a no-problem-few-questions interactive installation (the method tested best) that does not use CPAN get gift-prerequisites-0.11.tar.gz and install that. Then type: % ./configure --enable-multithreading % make % make install For a few-questions interactive installation that uses CPAN type (a bit more risky than the previous approach not due to CPAN, but more difficult to test). % ./configure --enable-interactive --enable-multithreading % make % make install If you ask yourself questions, read : README this file. The executive summary for the impatient. NEWS differences to the last few releases, mostly concerning prerequisites INSTALL How to install this program (or ANY GNU PROGRAM, that is). AUTHORS Contains author and contact info Doc/gift-guide.txt for more information about how to install the GIFT and the prerequisites, and how to get going. Doc/configuring-and-hacking-the-gift.txt for information about how to add your own plugins to the GIFT, and how to configure the GIFT by hand. More documentation can be obtained by installing doxygen before configure-ing and make-ing the GIFT. You will find this doc in Doc/autoDoc/HTML. MAILINGLISTS: bug-gift@gnu.org subscribe using http://mail.gnu.org help-gift@gnu.org subscribe using http://mail.gnu.org MOST FREQUENT ERROR: PLEASE do a make clean before each run of ./configure . gift-0.1.14/libGIFTAcDistanceMatrix/0000777000175200001440000000000010220511631014044 500000000000000gift-0.1.14/libGIFTAcDistanceMatrix/cc/0000777000175200001440000000000010220511630014430 500000000000000gift-0.1.14/libGIFTAcDistanceMatrix/cc/CProbabilityCombiner.cc0000644000175200001440000000463710220502727020736 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include "libGIFTAcDistanceMatrix/include/CProbabilityCombiner.h" CProbabilityCombiner::CProbabilityCombiner(){ setBelief(); mNumberOfElements=1; }; void CProbabilityCombiner::setBelief(double inBelief){ mBelief=inBelief; }; CProbabilityCombiner* CProbabilityCombiner::clone()const{ if(this) return subClone(); else return 0; }; void CProbabilityCombiner::setNumberOfElements(int inNumberOfElements){ mNumberOfElements=inNumberOfElements; }; double CProbabilityCombiner::operator()(double inFirst,double inSecond)const{ return (perform(inFirst, inSecond)*mBelief)+(1-mBelief)/mNumberOfElements; }; CProbabilityCombiner* CPCMaximum::subClone()const{ return new CPCMaximum(*this); }; double CPCMaximum::perform(double inFirst,double inSecond)const{ return max(inFirst,inSecond); }; double CPCMinimum::perform(double inFirst,double inSecond)const{ return min(inFirst,inSecond); }; CProbabilityCombiner* CPCMinimum::subClone()const{ return new CPCMinimum(*this); }; double CPCProduct::perform(double inFirst,double inSecond)const{ return inFirst*inSecond; }; CProbabilityCombiner* CPCProduct::subClone()const{ return new CPCProduct(*this); }; double CPCDiscrete::perform(double inFirst,double inSecond)const{ if((inFirst*inSecond)>lThreshold){ return inFirst*inSecond; }else{ return 0; } }; CProbabilityCombiner* CPCDiscrete::subClone()const{ return new CPCDiscrete(*this); }; gift-0.1.14/libGIFTAcDistanceMatrix/cc/CInformationCalculator.cc0000644000175200001440000000755310220502727021276 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libGIFTAcDistanceMatrix/include/CInformationCalculator.h" #include #include #include #include CInformationCalculator* CInformationCalculator::clone()const{ if(this) return subClone(); else return 0; }; bool CInformationCalculator::isOnePass()const{ return true; } void CInformationCalculator::adjustInnerState(double){ assert(!"This function should never be called: " "It is non virtual for reasons to long to explain"); } void CInformationCalculator::startFirstPass(){ assert(!"This function should never be called: " "It is non virtual for reasons to long to explain"); } double CICEntropy::operator()(double inProbability)const{ return (inProbability>0) ? -log(inProbability)*inProbability : 0; } CInformationCalculator* CICEntropy::subClone()const{ return new CICEntropy(*this); } // /// CICEntropyWithThreshold::CICEntropyWithThreshold(double inThreshold){ setThreshold(inThreshold); } /// CICEntropyWithThreshold::CICEntropyWithThreshold(const CICEntropyWithThreshold& in){ mThreshold = in.mThreshold; mMaximum = in.mMaximum; } /// void CICEntropyWithThreshold::setThreshold(double inThreshold){ mThreshold=inThreshold; }; /// bool CICEntropyWithThreshold::isOnePass()const{ return false; }; /// void CICEntropyWithThreshold::startFirstPass(){ mMaximum=-1e30; }; /// void CICEntropyWithThreshold::adjustInnerState(double inValue){ mMaximum=max(mMaximum, inValue); }; double CICEntropyWithThreshold::operator()(double inProbability)const{ #ifdef _debug if(inProbability > mMaximum*mThreshold){ cout << '+' ; }else{ cout << '-'; } #endif return (inProbability > mMaximum*mThreshold) ? -log(inProbability)*inProbability : 0; } CInformationCalculator* CICEntropyWithThreshold::subClone()const{ return new CICEntropyWithThreshold(*this); } /// CICERelative::CICERelative(double inThreshold){ setThreshold(inThreshold); } /// CICERelative::CICERelative(const CICERelative& in){ mThreshold = in.mThreshold; mSum = in.mSum; } /// void CICERelative::setThreshold(double inThreshold){ mThreshold=inThreshold; }; /// bool CICERelative::isOnePass()const{ return false; }; /// void CICERelative::startFirstPass(){ mSum=0; }; /// void CICERelative::adjustInnerState(double inValue){ mSum+=inValue; }; double CICERelative::operator()(double inProbability)const{ /* if((inProbability > mThreshold) && (mSum>0)) cout << "+"; else cout << "-";*/ return ((inProbability > mThreshold) && (mSum>0)) ? -log(inProbability/mSum)*(inProbability/mSum) : 0; } CInformationCalculator* CICERelative::subClone()const{ return new CICERelative(*this); } /// double CICSum::operator()(double inProbability)const{ return inProbability; } /// CInformationCalculator* CICSum::subClone()const{ return new CICSum(*this); } gift-0.1.14/libGIFTAcDistanceMatrix/cc/CDistanceCalculator.cc0000644000175200001440000000520310220502727020531 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libGIFTAcDistanceMatrix/include/CDistanceCalculator.h" #define HERE __FILE__ << ":" << __LINE__ << ":" #define _CD_DEBUG_VECTOR //template CDistanceCalculator// ::CDistanceCalculator(const char* inFileName){ cout << HERE << "BEGINconstructing CDistanceCalculator" << endl << "opening " << inFileName << endl << flush; mContent.open(inFileName); assert(mContent); cout << "ENDconstructing CDistanceCalculator" << flush; } //template CDistanceCalculator// ::operator bool()const{ return bool(mContent); }; //template bool CDistanceCalculator// ::calculateDistances(const CID& inPivot, CIDtoDistanceList& outDistances, bool inDeletePivot)const{ assert(mContent); if(mContent){ bool lReturnValue=mContent.getLineVector(inPivot, outDistances); /// if inDeletePivot has been given as true: ///delete the pivot from the set: Distance to self is considered ///uninteresting. if(outDistances.find(inPivot)!=outDistances.end() && inDeletePivot){ outDistances.erase(outDistances.find(inPivot)); } #ifdef _CD_DEBUG_VECTOR cout << "Calculate Distances: " << outDistances.size() << " size of vector" << endl; #endif return lReturnValue && mContent; }; cout << HERE << "real shit looking for" << inPivot << endl; return false; } void CDistanceCalculator::setDeletePivot(bool inDeletePivot){ mDeletePivot=inDeletePivot; }; gift-0.1.14/libGIFTAcDistanceMatrix/cc/CAcDistanceMatrix.cc0000644000175200001440000000371110220502727020152 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/mrml_const.h" // for parsing #include "libMRML/include/CXMLElement.h" // constructor #include "libGIFTAcDistanceMatrix/include/CAcDistanceMatrix.h" /*************************************** * * is this structure working? * ***************************************/ bool CAcDistanceMatrix::operator()()const{ return bool((const CAcURL2FTS&)(*this)) && bool((const CDistanceCalculator&)(*this)); }; /*************************************** * * Initialization * ***************************************/ CAcDistanceMatrix::CAcDistanceMatrix(const CXMLElement& inCollectionElement): CAcURL2FTS(inCollectionElement), CDistanceCalculator((inCollectionElement.stringReadAttribute(mrml_const::cui_base_dir).second +inCollectionElement.stringReadAttribute(mrml_const::cui_distance_matrix_location).second).c_str()){ }; /*************************************** * * Destructor * ***************************************/ CAcDistanceMatrix::~CAcDistanceMatrix(){ }; gift-0.1.14/libGIFTAcDistanceMatrix/cc/CSquasher.cc0000644000175200001440000000402310220502727016557 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libGIFTAcDistanceMatrix/include/CSquasher.h" #include #include double CStandardSquasher::operator()(double inCloser, double inFarther)const{ double lReturnValue(1.0/(1+exp((inCloser-inFarther) /mSigma ))); //cout << "µ" << lReturnValue << ":" << mSigma << ": " << inFarther << ">" << inCloser<< endl; return lReturnValue; }; double CDiscreteSquasher::operator()(double inCloser, double inFarther)const{ #ifdef VISTEX return (inCloser < inFarther+mSigma) ? 1:0.3; #else return (inCloser < inFarther+mSigma) ? 1:0.1; #endif } double gauss(double x,double inSigma){ inSigma+=1e-11; return exp(-x*x / (inSigma*inSigma)); } double CGaussianSquasher::operator()(double inCloser, double inFarther)const{ return 0.5+(-0.5*gauss(inFarther,mSigma) +0.5*gauss(inCloser,mSigma));//sic! } double CFlexibleSquasher::operator()(double inCloser, double inFarther)const{ return 0.5+(-0.5*gauss(inFarther,inFarther-inCloser) +0.5*gauss(inCloser,inFarther-inCloser)); } gift-0.1.14/libGIFTAcDistanceMatrix/cc/Makefile.am0000644000175200001440000000307010153634154016414 00000000000000# -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # #Makefile for the inverted File library # lib_LTLIBRARIES = libGIFTAcDistanceMatrix.la libGIFTAcDistanceMatrix_la_LDFLAGS="@PRE_INSTALL_LIBDIRS@" -lMRML -lGIFTAcInvertedFile -lGIFTAcURL2FTS INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcInvertedFile/include -I$(top_srcdir)/libGIFTAcDistanceMatrix/include -I$(top_srcdir)/libGIFTAcURL2FTS/include -I$(top_srcdir)/libGIFTQuBayesian/include -I$(HOME)/browsing/libGIFTQuBayesian/include libGIFTAcDistanceMatrix_la_SOURCES= \ CAcDistanceMatrix.cc \ CAFDistanceMatrix.cc \ CSquasher.cc \ CInformationCalculator.cc\ CProbabilityCombiner.cc\ CDrawer.cc\ CDistanceCalculator.cc\ plug_in_fo.cc gift-0.1.14/libGIFTAcDistanceMatrix/cc/Makefile.in0000644000175200001440000004352210220474074016431 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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@ # -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # #Makefile for the inverted File library # SOURCES = $(libGIFTAcDistanceMatrix_la_SOURCES) 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 = : host_triplet = @host@ subdir = libGIFTAcDistanceMatrix/cc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libGIFTAcDistanceMatrix_la_LIBADD = am_libGIFTAcDistanceMatrix_la_OBJECTS = CAcDistanceMatrix.lo \ CAFDistanceMatrix.lo CSquasher.lo CInformationCalculator.lo \ CProbabilityCombiner.lo CDrawer.lo CDistanceCalculator.lo \ plug_in_fo.lo libGIFTAcDistanceMatrix_la_OBJECTS = \ $(am_libGIFTAcDistanceMatrix_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/CAFDistanceMatrix.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CAcDistanceMatrix.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CDistanceCalculator.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CDrawer.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CInformationCalculator.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CProbabilityCombiner.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CSquasher.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/plug_in_fo.Plo CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libGIFTAcDistanceMatrix_la_SOURCES) DIST_SOURCES = $(libGIFTAcDistanceMatrix_la_SOURCES) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libGIFTAcDistanceMatrix.la libGIFTAcDistanceMatrix_la_LDFLAGS = "@PRE_INSTALL_LIBDIRS@" -lMRML -lGIFTAcInvertedFile -lGIFTAcURL2FTS INCLUDES = -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcInvertedFile/include -I$(top_srcdir)/libGIFTAcDistanceMatrix/include -I$(top_srcdir)/libGIFTAcURL2FTS/include -I$(top_srcdir)/libGIFTQuBayesian/include -I$(HOME)/browsing/libGIFTQuBayesian/include libGIFTAcDistanceMatrix_la_SOURCES = \ CAcDistanceMatrix.cc \ CAFDistanceMatrix.cc \ CSquasher.cc \ CInformationCalculator.cc\ CProbabilityCombiner.cc\ CDrawer.cc\ CDistanceCalculator.cc\ plug_in_fo.cc all: all-am .SUFFIXES: .SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: $(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 libGIFTAcDistanceMatrix/cc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTAcDistanceMatrix/cc/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libGIFTAcDistanceMatrix.la: $(libGIFTAcDistanceMatrix_la_OBJECTS) $(libGIFTAcDistanceMatrix_la_DEPENDENCIES) $(CXXLINK) -rpath $(libdir) $(libGIFTAcDistanceMatrix_la_LDFLAGS) $(libGIFTAcDistanceMatrix_la_OBJECTS) $(libGIFTAcDistanceMatrix_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAFDistanceMatrix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAcDistanceMatrix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDistanceCalculator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDrawer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CInformationCalculator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CProbabilityCombiner.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CSquasher.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plug_in_fo.Plo@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: 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) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES 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-info-am \ uninstall-libLTLIBRARIES # 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: gift-0.1.14/libGIFTAcDistanceMatrix/cc/CDrawer.cc0000644000175200001440000000324410220502727016214 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libGIFTAcDistanceMatrix/include/CDrawer.h" CDrawer* CDrawer::clone()const{ if(this) return subClone(); else return 0; } /// void CDrawer::setNumberOfImages(const int& inNumberOfImages){ mNumberOfImages= inNumberOfImages; }; /// int CDrawer::getNumberOfImages()const{ return mNumberOfImages; }; inline double CDUniform::operator()(double inProbability)const{ return (inProbability); } CDrawer* CDUniform::subClone()const{ return new CDUniform(*this); } inline double CDPreferMiddle::operator()(double inProbability)const{ return inProbability + 1/mNumberOfImages;//ex sqrt(sqrt (5.7.) //ex NUMBER_OF_IMAGES (7.12.) } CDrawer* CDPreferMiddle::subClone()const{ return new CDPreferMiddle(*this); } gift-0.1.14/libGIFTAcDistanceMatrix/cc/CAFDistanceMatrix.cc0000644000175200001440000000052110220502727020111 00000000000000#include "libGIFTAcDistanceMatrix/include/CAFDistanceMatrix.h" #include "libGIFTAcDistanceMatrix/include/CAcDistanceMatrix.h" CAccessor* CAFDistanceMatrix::makeAccessor(const CXMLElement& inConfiguration)const{ return new CAcDistanceMatrix(inConfiguration); }; CAFDistanceMatrix::CAFDistanceMatrix(){ mName="distance_matrix"; }; gift-0.1.14/libGIFTAcDistanceMatrix/cc/plug_in_fo.cc0000644000175200001440000000101210220502727016775 00000000000000#include "libGIFTAcDistanceMatrix/include/CAcDistanceMatrix.h" #include "libMRML/include/CAccessorAdminCollection.h" #include extern "C" char* libGIFTAcDistanceMatrix_getClassName(){ return "distance_matrix"; } extern "C" CAcDistanceMatrix* libGIFTAcDistanceMatrix_makeAccessor(const CXMLElement& inElement){ CAcDistanceMatrix* lReturnValue(new CAcDistanceMatrix(inElement)); lReturnValue->checkNPrint(); cout << __FILE__ << ":" << __LINE__ << "made " << lReturnValue << endl; return lReturnValue; } gift-0.1.14/libGIFTAcDistanceMatrix/Makefile.am0000644000175200001440000000002510153634154016024 00000000000000SUBDIRS= cc include gift-0.1.14/libGIFTAcDistanceMatrix/Makefile.in0000644000175200001440000003457510220474074016054 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = libGIFTAcDistanceMatrix DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = 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 ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = cc include all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(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 libGIFTAcDistanceMatrix/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTAcDistanceMatrix/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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: # 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): @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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: @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; 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='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="../$(top_distdir)" \ distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive 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-info \ install-info-am install-man 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-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: gift-0.1.14/libGIFTAcDistanceMatrix/include/0000777000175200001440000000000010220511631015467 500000000000000gift-0.1.14/libGIFTAcDistanceMatrix/include/CSquasher.h0000644000175200001440000000406510220502727017465 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _CSQUASHER #define _CSQUASHER #include "libGIFTAcDistanceMatrix/include/uses-declarations.h" #include // // in general for squashing: for the case that // FARTHER much farther away than CLOSER // the probability is supposed to be one // //the base class CSquasher:public unary_function{ protected: double mSigma; public: ///the real squashing function virtual double operator()(double inCloser, double inFarther)const=0; ///setting a parameter how much to believe the user inline void setSigma(double inSigma){ mSigma=inSigma; } }; class CStandardSquasher:public CSquasher{ public: /// virtual double operator()(double inCloser, double inFarther)const; }; class CDiscreteSquasher:public CSquasher{ public: virtual double operator()(double inCloser, double inFarther)const; }; class CGaussianSquasher:public CSquasher{ public: virtual double operator()(double inCloser, double inFarther)const; }; class CFlexibleSquasher:public CSquasher{ public: virtual double operator()(double inCloser, double inFarther)const; }; #endif gift-0.1.14/libGIFTAcDistanceMatrix/include/CDistanceCalculator.h0000644000175200001440000000601210220502727021430 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _CDISTANCECALCULATOR #define _CDISTANCECALCULATOR #include "libGIFTAcDistanceMatrix/include/uses-declarations.h" #include #include "libGIFTAcDistanceMatrix/include/CPersistentTranslatedIndexMatrix.h" #include #include "libMRML/include/CMagic.h" template void do_for_equal_first(const TTIterator& inBegin1, const TTIterator& inEnd1, const TTIterator& inBegin2, const TTIterator& inEnd2, TTInserter& inInserter, const TTFunction& f){ TTIterator i=inBegin1; TTIterator j=inBegin2; //this algorithm assumes, that both the lists are sorted for their ID //otherwhise NOTHING is assumed while(i!=inEnd1 && j!=inEnd2 ){ if(i->firstfirst){ i++; }else{ // i->first >= j->first if(j->firstfirst){ j++; }else{ // i.e. i->first == j->first holds // output is squashing the difference of the distances, // of elements with identical ID inInserter=(make_pair(i->first, f(i->second, j->second))); i++; j++; } } } } // for testing: nice and radical //#define TTSquash CDiscreteSquasher //more adapted to the real user... //#define TTSquash CStandardSquasher //template class CDistanceCalculator:public CMagic{ public: // public type definitions /** The content of this is a matrix from int to float */ typedef CPersistentTranslatedIndexMatrix CContent; /** */ typedef CContent::CIDContentPairList CIDtoDistanceList; /** */ typedef CContent::CIndexList CIDList; /** */ CContent mContent; protected: /** the ID type within this class */ typedef int CID; /** Delete the pivot from a probabilistic set when digesting feedback? See my thesis for an explanation */ bool mDeletePivot; public: /// void setDeletePivot(bool inDeletePivot); /// CDistanceCalculator(const char* inFileName); /// bool calculateDistances(const CID& inID, CIDtoDistanceList& outDistances, bool inDeletePivot)const; /// operator bool()const; }; #endif gift-0.1.14/libGIFTAcDistanceMatrix/include/CAFDistanceMatrix.h.kdoc0000644000175200001440000017754710153634154021764 00000000000000autoDoc/HTML CAcDistanceMatrix=CAcDistanceMatrix.html CAcDistanceMatrix=CAcDistanceMatrix.html CAcDistanceMatrix::operator()=CAcDistanceMatrix.html#operator() CAcDistanceMatrix::CAcDistanceMatrix=CAcDistanceMatrix.html#CAcDistanceMatrix CAcDistanceMatrix::~CAcDistanceMatrix=CAcDistanceMatrix.html#~CAcDistanceMatrix CAFHierarchy=CAFHierarchy.html CAFHierarchy=CAFHierarchy.html CAFHierarchy::CAFHierarchy=CAFHierarchy.html#CAFHierarchy CAFHierarchy::makeAccessor=CAFHierarchy.html#makeAccessor CAcHierarchy=CAcHierarchy.html CAcHierarchy=CAcHierarchy.html CAcHierarchy::isOK=CAcHierarchy.html#isOK CAcHierarchy::mNodeStack=CAcHierarchy.html#mNodeStack CAcHierarchy::mEdges=CAcHierarchy.html#mEdges CAcHierarchy::init=CAcHierarchy.html#init CAcHierarchy::addEdge=CAcHierarchy.html#addEdge CAcHierarchy::CAcHierarchy=CAcHierarchy.html#CAcHierarchy CAcHierarchy::getChildren=CAcHierarchy.html#getChildren CAcHierarchy::addElement=CAcHierarchy.html#addElement CAcHierarchy::push=CAcHierarchy.html#push CAcHierarchy::popNodeAndRegisterEdge=CAcHierarchy.html#popNodeAndRegisterEdge CAcHierarchy::bool=CAcHierarchy.html#bool CADIHash=CADIHash.html CADIHash=CADIHash.html CADIHash::output=CADIHash.html#output CADIHash::lRetVal=CADIHash.html#lRetVal CAFIFMySQL=CAFIFMySQL.html CAFIFMySQL=CAFIFMySQL.html CAFIFMySQL::CAFIFMySQL=CAFIFMySQL.html#CAFIFMySQL CAFIFMySQL::makeAccessor=CAFIFMySQL.html#makeAccessor CAFInvertedFile=CAFInvertedFile.html CAFInvertedFile=CAFInvertedFile.html CAFInvertedFile::CAFInvertedFile=CAFInvertedFile.html#CAFInvertedFile CAFInvertedFile::makeAccessor=CAFInvertedFile.html#makeAccessor CAFSpecialised=CAFSpecialised.html CAFSpecialised=CAFSpecialised.html CAFSpecialised::CAFSpecialised():mName=CAFSpecialised.html#CAFSpecialised():mName CAFSpecialised::makeAccessor=CAFSpecialised.html#makeAccessor CAcIFFileSystem=CAcIFFileSystem.html CAcIFFileSystem=CAcIFFileSystem.html CAcIFFileSystem::mMaximumFeatureID=CAcIFFileSystem.html#mMaximumFeatureID CAcIFFileSystem::mOffsetFile=CAcIFFileSystem.html#mOffsetFile CAcIFFileSystem::mFeatureDescriptionFile=CAcIFFileSystem.html#mFeatureDescriptionFile CAcIFFileSystem::mInvertedFileName=CAcIFFileSystem.html#mInvertedFileName CAcIFFileSystem::mOffsetFileName=CAcIFFileSystem.html#mOffsetFileName CAcIFFileSystem::mFeatureDescriptionFileName=CAcIFFileSystem.html#mFeatureDescriptionFileName CAcIFFileSystem::mIDToOffset=CAcIFFileSystem.html#mIDToOffset CAcIFFileSystem::mDocumentInformation=CAcIFFileSystem.html#mDocumentInformation CAcIFFileSystem::writeOffsetFileElement=CAcIFFileSystem.html#writeOffsetFileElement CAcIFFileSystem::getFeatureFile=CAcIFFileSystem.html#getFeatureFile CAcIFFileSystem::operator()=CAcIFFileSystem.html#operator() CAcIFFileSystem::CAcIFFileSystem=CAcIFFileSystem.html#CAcIFFileSystem CAcIFFileSystem::init=CAcIFFileSystem.html#init CAcIFFileSystem::~CAcIFFileSystem=CAcIFFileSystem.html#~CAcIFFileSystem CAcIFFileSystem::IDToURL=CAcIFFileSystem.html#IDToURL CAcIFFileSystem::FeatureToList=CAcIFFileSystem.html#FeatureToList CAcIFFileSystem::URLToFeatureList=CAcIFFileSystem.html#URLToFeatureList CAcIFFileSystem::DIDToFeatureList=CAcIFFileSystem.html#DIDToFeatureList CAcIFFileSystem::FeatureToCollectionFrequency=CAcIFFileSystem.html#FeatureToCollectionFrequency CAcIFFileSystem::getFeatureDescription=CAcIFFileSystem.html#getFeatureDescription CAcIFFileSystem::DIDToMaxDocumentFrequency=CAcIFFileSystem.html#DIDToMaxDocumentFrequency CAcIFFileSystem::DIDToDFSquareSum=CAcIFFileSystem.html#DIDToDFSquareSum CAcIFFileSystem::DIDToSquareDFLogICFSum=CAcIFFileSystem.html#DIDToSquareDFLogICFSum CAcIFFileSystem::generateInvertedFile=CAcIFFileSystem.html#generateInvertedFile CAcIFFileSystem::newGenerateInvertedFile=CAcIFFileSystem.html#newGenerateInvertedFile CAcIFFileSystem::checkConsistency=CAcIFFileSystem.html#checkConsistency CAcIFFileSystem::findWithinStream=CAcIFFileSystem.html#findWithinStream CAcIFFileSystem::URLToID=CAcIFFileSystem.html#URLToID CAcIFFileSystem::getAllIDs=CAcIFFileSystem.html#getAllIDs CAcIFFileSystem::triplets=CAcIFFileSystem.html#triplets CAcIFFileSystem::getRandomIDs=CAcIFFileSystem.html#getRandomIDs CAcIFFileSystem::getRandomAccessorElements=CAcIFFileSystem.html#getRandomAccessorElements CAcIFFileSystem::size=CAcIFFileSystem.html#size CAcIFFileSystem::getMaximumFeatureID=CAcIFFileSystem.html#getMaximumFeatureID CAcIFFileSystem::getAllFeatureIDs=CAcIFFileSystem.html#getAllFeatureIDs CAcIFFileSystem::IDToAccessorElement=CAcIFFileSystem.html#IDToAccessorElement CAcIFFileSystem::bool=CAcIFFileSystem.html#bool CAcIFMySQL=CAcIFMySQL.html CAcIFMySQL=CAcIFMySQL.html CAcIFMySQL::mConnection=CAcIFMySQL.html#mConnection CAcIFMySQL::GdbName=CAcIFMySQL.html#GdbName CAcIFMySQL::GdbUser=CAcIFMySQL.html#GdbUser CAcIFMySQL::GdbHost=CAcIFMySQL.html#GdbHost CAcIFMySQL::GdbPassword=CAcIFMySQL.html#GdbPassword CAcIFMySQL::connection2dbOK=CAcIFMySQL.html#connection2dbOK CAcIFMySQL::cnx=CAcIFMySQL.html#cnx CAcIFMySQL::featureList2docList=CAcIFMySQL.html#featureList2docList CAcIFMySQL::showDocFreqList=CAcIFMySQL.html#showDocFreqList CAcIFMySQL::blob2docFreqList=CAcIFMySQL.html#blob2docFreqList CAcIFMySQL::CAcIFMySQL::recordCount=CAcIFMySQL.html#CAcIFMySQL::recordCount CAcIFMySQL::CAcIFMySQL::selectDB=CAcIFMySQL.html#CAcIFMySQL::selectDB CAcIFMySQL::CAcIFMySQL::createDB=CAcIFMySQL.html#CAcIFMySQL::createDB CAcIFMySQL::CAcIFMySQL::dropDB=CAcIFMySQL.html#CAcIFMySQL::dropDB CAcIFMySQL::CAcIFMySQL::initialiseGIFTTables=CAcIFMySQL.html#CAcIFMySQL::initialiseGIFTTables CAcIFMySQL::operator()=CAcIFMySQL.html#operator() CAcIFMySQL::CAcIFMySQL=CAcIFMySQL.html#CAcIFMySQL CAcIFMySQL::~CAcIFMySQL=CAcIFMySQL.html#~CAcIFMySQL CAcIFMySQL::IDToURL=CAcIFMySQL.html#IDToURL CAcIFMySQL::URLToID=CAcIFMySQL.html#URLToID CAcIFMySQL::FeatureToList=CAcIFMySQL.html#FeatureToList CAcIFMySQL::URLToFeatureList=CAcIFMySQL.html#URLToFeatureList CAcIFMySQL::DIDToFeatureList=CAcIFMySQL.html#DIDToFeatureList CAcIFMySQL::FeatureToCollectionFrequency=CAcIFMySQL.html#FeatureToCollectionFrequency CAcIFMySQL::getFeatureDescription=CAcIFMySQL.html#getFeatureDescription CAcIFMySQL::DIDToMaxDocumentFrequency=CAcIFMySQL.html#DIDToMaxDocumentFrequency CAcIFMySQL::DIDToDFSquareSum=CAcIFMySQL.html#DIDToDFSquareSum CAcIFMySQL::DIDToSquareDFLogICFSum=CAcIFMySQL.html#DIDToSquareDFLogICFSum CAcIFMySQL::CAcIFMySQL::getAllIDs=CAcIFMySQL.html#CAcIFMySQL::getAllIDs CAcIFMySQL::CAcIFMySQL::getAllAccessorElements=CAcIFMySQL.html#CAcIFMySQL::getAllAccessorElements CAcIFMySQL::CAcIFMySQL::getRandomIDs=CAcIFMySQL.html#CAcIFMySQL::getRandomIDs CAcIFMySQL::CAcIFMySQL::getRandomAccessorElements=CAcIFMySQL.html#CAcIFMySQL::getRandomAccessorElements CAcIFMySQL::getAllFeatureIDs=CAcIFMySQL.html#getAllFeatureIDs CAcIFMySQL::IDToAccessorElement=CAcIFMySQL.html#IDToAccessorElement CAcIFMySQL::CAcIFMySQL::size=CAcIFMySQL.html#CAcIFMySQL::size CAcIFMySQL::bool=CAcIFMySQL.html#bool CAcInvertedFile=CAcInvertedFile.html CAcInvertedFile=CAcInvertedFile.html CAcInvertedFile::operator()=CAcInvertedFile.html#operator() CAcInvertedFile::IDToURL=CAcInvertedFile.html#IDToURL CAcInvertedFile::URLToID=CAcInvertedFile.html#URLToID CAcInvertedFile::FeatureToList=CAcInvertedFile.html#FeatureToList CAcInvertedFile::URLToFeatureList=CAcInvertedFile.html#URLToFeatureList CAcInvertedFile::DIDToFeatureList=CAcInvertedFile.html#DIDToFeatureList CAcInvertedFile::FeatureToCollectionFrequency=CAcInvertedFile.html#FeatureToCollectionFrequency CAcInvertedFile::getFeatureDescription=CAcInvertedFile.html#getFeatureDescription CAcInvertedFile::DIDToMaxDocumentFrequency=CAcInvertedFile.html#DIDToMaxDocumentFrequency CAcInvertedFile::DIDToDFSquareSum=CAcInvertedFile.html#DIDToDFSquareSum CAcInvertedFile::DIDToSquareDFLogICFSum=CAcInvertedFile.html#DIDToSquareDFLogICFSum CAcInvertedFile::generateInvertedFile=CAcInvertedFile.html#generateInvertedFile CAcInvertedFile::checkConsistency=CAcInvertedFile.html#checkConsistency CAcInvertedFile::getAllFeatureIDs=CAcInvertedFile.html#getAllFeatureIDs CAcInvertedFileAbstraction=CAcInvertedFileAbstraction.html CAcInvertedFileAbstraction=CAcInvertedFileAbstraction.html CAcInvertedFileAbstraction::operator()=CAcInvertedFileAbstraction.html#operator() CAcInvertedFileAbstraction::CAcInvertedFileAbstraction=CAcInvertedFileAbstraction.html#CAcInvertedFileAbstraction CAcInvertedFileAbstraction::~CAcInvertedFileAbstraction=CAcInvertedFileAbstraction.html#~CAcInvertedFileAbstraction CAcInvertedFileAbstraction::IDToURL=CAcInvertedFileAbstraction.html#IDToURL CAcInvertedFileAbstraction::URLToID=CAcInvertedFileAbstraction.html#URLToID CAcInvertedFileAbstraction::FeatureToList=CAcInvertedFileAbstraction.html#FeatureToList CAcInvertedFileAbstraction::URLToFeatureList=CAcInvertedFileAbstraction.html#URLToFeatureList CAcInvertedFileAbstraction::DIDToFeatureList=CAcInvertedFileAbstraction.html#DIDToFeatureList CAcInvertedFileAbstraction::FeatureToCollectionFrequency=CAcInvertedFileAbstraction.html#FeatureToCollectionFrequency CAcInvertedFileAbstraction::getFeatureDescription=CAcInvertedFileAbstraction.html#getFeatureDescription CAcInvertedFileAbstraction::DIDToMaxDocumentFrequency=CAcInvertedFileAbstraction.html#DIDToMaxDocumentFrequency CAcInvertedFileAbstraction::DIDToDFSquareSum=CAcInvertedFileAbstraction.html#DIDToDFSquareSum CAcInvertedFileAbstraction::DIDToSquareDFLogICFSum=CAcInvertedFileAbstraction.html#DIDToSquareDFLogICFSum CAcInvertedFileAbstraction::generateInvertedFile=CAcInvertedFileAbstraction.html#generateInvertedFile CAcInvertedFileAbstraction::checkConsistency=CAcInvertedFileAbstraction.html#checkConsistency CAcInvertedFileAbstraction::getAllFeatureIDs=CAcInvertedFileAbstraction.html#getAllFeatureIDs CAcInvertedFile=CAcInvertedFile.html CAcInvertedFile=CAcInvertedFile.html CAcInvertedFile::mMaximumFeatureID=CAcInvertedFile.html#mMaximumFeatureID CAcInvertedFile::mOffsetFile=CAcInvertedFile.html#mOffsetFile CAcInvertedFile::mFeatureDescriptionFile=CAcInvertedFile.html#mFeatureDescriptionFile CAcInvertedFile::mInvertedFileName=CAcInvertedFile.html#mInvertedFileName CAcInvertedFile::mOffsetFileName=CAcInvertedFile.html#mOffsetFileName CAcInvertedFile::mFeatureDescriptionFileName=CAcInvertedFile.html#mFeatureDescriptionFileName CAcInvertedFile::mIDToOffset=CAcInvertedFile.html#mIDToOffset CAcInvertedFile::mDocumentInformation=CAcInvertedFile.html#mDocumentInformation CAcInvertedFile::writeOffsetFileElement=CAcInvertedFile.html#writeOffsetFileElement CAcInvertedFile::getFeatureFile=CAcInvertedFile.html#getFeatureFile CAcInvertedFile::operator()=CAcInvertedFile.html#operator() CAcInvertedFile::CAcInvertedFile=CAcInvertedFile.html#CAcInvertedFile CAcInvertedFile::init=CAcInvertedFile.html#init CAcInvertedFile::~CAcInvertedFile=CAcInvertedFile.html#~CAcInvertedFile CAcInvertedFile::IDToURL=CAcInvertedFile.html#IDToURL CAcInvertedFile::URLToID=CAcInvertedFile.html#URLToID CAcInvertedFile::FeatureToList=CAcInvertedFile.html#FeatureToList CAcInvertedFile::URLToFeatureList=CAcInvertedFile.html#URLToFeatureList CAcInvertedFile::DIDToFeatureList=CAcInvertedFile.html#DIDToFeatureList CAcInvertedFile::FeatureToCollectionFrequency=CAcInvertedFile.html#FeatureToCollectionFrequency CAcInvertedFile::getFeatureDescription=CAcInvertedFile.html#getFeatureDescription CAcInvertedFile::DIDToMaxDocumentFrequency=CAcInvertedFile.html#DIDToMaxDocumentFrequency CAcInvertedFile::DIDToDFSquareSum=CAcInvertedFile.html#DIDToDFSquareSum CAcInvertedFile::DIDToSquareDFLogICFSum=CAcInvertedFile.html#DIDToSquareDFLogICFSum CAcInvertedFile::generateInvertedFile=CAcInvertedFile.html#generateInvertedFile CAcInvertedFile::newGenerateInvertedFile=CAcInvertedFile.html#newGenerateInvertedFile CAcInvertedFile::checkConsistency=CAcInvertedFile.html#checkConsistency CAcInvertedFile::findWithinStream=CAcInvertedFile.html#findWithinStream CAcInvertedFile::getMaximumFeatureID=CAcInvertedFile.html#getMaximumFeatureID CAcInvertedFile::getAllFeatureIDs=CAcInvertedFile.html#getAllFeatureIDs CAdditionalDocumentInformation=CAdditionalDocumentInformation.html CAdditionalDocumentInformation=CAdditionalDocumentInformation.html CAdditionalDocumentInformation::mFileNameBase=CAdditionalDocumentInformation.html#mFileNameBase CAdditionalDocumentInformation::mMaximumDF=CAdditionalDocumentInformation.html#mMaximumDF CAdditionalDocumentInformation::mDFSquareSum=CAdditionalDocumentInformation.html#mDFSquareSum CAdditionalDocumentInformation::mSquareDFLogICFSum=CAdditionalDocumentInformation.html#mSquareDFLogICFSum CAdditionalDocumentInformation::CAdditionalDocumentInformation=CAdditionalDocumentInformation.html#CAdditionalDocumentInformation CAdditionalDocumentInformation::setFileNameBase=CAdditionalDocumentInformation.html#setFileNameBase CAdditionalDocumentInformation::resetDF=CAdditionalDocumentInformation.html#resetDF CAdditionalDocumentInformation::adjustDF=CAdditionalDocumentInformation.html#adjustDF CAdditionalDocumentInformation::resetSquareDFLogICF=CAdditionalDocumentInformation.html#resetSquareDFLogICF CAdditionalDocumentInformation::adjustSquareDFLogICF=CAdditionalDocumentInformation.html#adjustSquareDFLogICF CAdditionalDocumentInformation::getMaximumDF=CAdditionalDocumentInformation.html#getMaximumDF CAdditionalDocumentInformation::getDFSquareSum=CAdditionalDocumentInformation.html#getDFSquareSum CAdditionalDocumentInformation::getSquareDFLogICFSum=CAdditionalDocumentInformation.html#getSquareDFLogICFSum CAdditionalDocumentInformation::output=CAdditionalDocumentInformation.html#output CAdditionalDocumentInformation::output=CAdditionalDocumentInformation.html#output CAdditionalDocumentInformation::input=CAdditionalDocumentInformation.html#input CAdditionalDocumentInformation::input=CAdditionalDocumentInformation.html#input CBitSetCollection=CBitSetCollection.html CBitSetCollection=CBitSetCollection.html CBitSetCollection::mPresentlyConsistentSet=CBitSetCollection.html#mPresentlyConsistentSet CBitSetCollection::mSetOfUsedElements=CBitSetCollection.html#mSetOfUsedElements CBitSetCollection::addResult=CBitSetCollection.html#addResult CBitSetCollection::consistify=CBitSetCollection.html#consistify CBitSetCollection::getPresentlyConsistentSet=CBitSetCollection.html#getPresentlyConsistentSet CBitSetCollection::setPresentlyConsistentSet=CBitSetCollection.html#setPresentlyConsistentSet CComparisonResults=CComparisonResults.html CComparisonResults=CComparisonResults.html CComparisonResults::lCContainerType=CComparisonResults.html#lCContainerType CComparisonResults::mWeighters=CComparisonResults.html#mWeighters CComparisonResults::mContainer=CComparisonResults.html#mContainer CComparisonResults::mScores=CComparisonResults.html#mScores CComparisonResults::mQueryImage=CComparisonResults.html#mQueryImage CComparisonResults::mID=CComparisonResults.html#mID CComparisonResults::mReturnSet=CComparisonResults.html#mReturnSet CComparisonResults::CComparisonResults=CComparisonResults.html#CComparisonResults CComparisonResults::calculateImageScore=CComparisonResults.html#calculateImageScore CComparisonResults::addImageScore=CComparisonResults.html#addImageScore CComparisonResults::compare=CComparisonResults.html#compare CComparisonResults::getAsymmetry=CComparisonResults.html#getAsymmetry CComparisonResults::getWeighters=CComparisonResults.html#getWeighters CComparisonResults::setRelevanceLevel=CComparisonResults.html#setRelevanceLevel CComparisonResults::getID=CComparisonResults.html#getID CComparisonResults::getQuery=CComparisonResults.html#getQuery CDocumentFrequencyElement=CDocumentFrequencyElement.html CDocumentFrequencyElement=CDocumentFrequencyElement.html CDocumentFrequencyElement::mID=CDocumentFrequencyElement.html#mID CDocumentFrequencyElement::mDocumentFrequency=CDocumentFrequencyElement.html#mDocumentFrequency CDocumentFrequencyElement::CDocumentFrequencyElement=CDocumentFrequencyElement.html#CDocumentFrequencyElement CDocumentFrequencyElement::CDocumentFrequencyElement=CDocumentFrequencyElement.html#CDocumentFrequencyElement CDocumentFrequencyElement::CDocumentFrequencyElement=CDocumentFrequencyElement.html#CDocumentFrequencyElement CDocumentFrequencyElement::CDocumentFrequencyElement=CDocumentFrequencyElement.html#CDocumentFrequencyElement CDocumentFrequencyElement::input=CDocumentFrequencyElement.html#input CDocumentFrequencyElement::output=CDocumentFrequencyElement.html#output CDocumentFrequencyElement::writeBinary=CDocumentFrequencyElement.html#writeBinary CDocumentFrequencyElement::getID=CDocumentFrequencyElement.html#getID CDocumentFrequencyElement::getIntegerDocumentFrequency=CDocumentFrequencyElement.html#getIntegerDocumentFrequency CDocumentFrequencyElement::getDocumentFrequency=CDocumentFrequencyElement.html#getDocumentFrequency CDocumentFrequencyElement::setDocumentFrequency=CDocumentFrequencyElement.html#setDocumentFrequency CDocumentFrequencyElement::divideDocumentFrequency=CDocumentFrequencyElement.html#divideDocumentFrequency CSortByID_DFE=CSortByID_DFE.html CSortByID_DFE=CSortByID_DFE.html CSortByID_DFE::operator()=CSortByID_DFE.html#operator() CSortByDocumentFrequency_DFE=CSortByDocumentFrequency_DFE.html CSortByDocumentFrequency_DFE=CSortByDocumentFrequency_DFE.html CSortByDocumentFrequency_DFE::operator()=CSortByDocumentFrequency_DFE.html#operator() CDocumentFrequencyHash=CDocumentFrequencyHash.html CDocumentFrequencyHash=CDocumentFrequencyHash.html CDocumentFrequencyHash::CDocumentFrequencyHash=CDocumentFrequencyHash.html#CDocumentFrequencyHash CDocumentFrequencyList=CDocumentFrequencyList.html CDocumentFrequencyList=CDocumentFrequencyList.html CDocumentFrequencyList::mSize=CDocumentFrequencyList.html#mSize CDocumentFrequencyList::mEnd=CDocumentFrequencyList.html#mEnd CDocumentFrequencyList::mContent=CDocumentFrequencyList.html#mContent CDocumentFrequencyList::CDocumentFrequencyList=CDocumentFrequencyList.html#CDocumentFrequencyList CDocumentFrequencyList::CDocumentFrequencyList=CDocumentFrequencyList.html#CDocumentFrequencyList CDocumentFrequencyList::~CDocumentFrequencyList=CDocumentFrequencyList.html#~CDocumentFrequencyList CDocumentFrequencyList::writeBinary=CDocumentFrequencyList.html#writeBinary CDocumentFrequencyList::readBinary=CDocumentFrequencyList.html#readBinary CDocumentFrequencyList::iterator=CDocumentFrequencyList.html#iterator CDocumentFrequencyList::const_iterator=CDocumentFrequencyList.html#const_iterator CDocumentFrequencyList::begin=CDocumentFrequencyList.html#begin CDocumentFrequencyList::end=CDocumentFrequencyList.html#end CDocumentFrequencyList::begin=CDocumentFrequencyList.html#begin CDocumentFrequencyList::end=CDocumentFrequencyList.html#end CDocumentFrequencyList::size=CDocumentFrequencyList.html#size CDocumentFrequencyList::setEnd=CDocumentFrequencyList.html#setEnd CIFBuilderTriplet=CIFBuilderTriplet.html CIFBuilderTriplet=CIFBuilderTriplet.html CIFBuilderTriplet::CIFBuilderTriplet=CIFBuilderTriplet.html#CIFBuilderTriplet CIFBuilderTriplet::CIFBuilderTriplet=CIFBuilderTriplet.html#CIFBuilderTriplet CIFBuilderTriplet::isIdentical=CIFBuilderTriplet.html#isIdentical CIFBuilderTriplet::mFeatureID=CIFBuilderTriplet.html#mFeatureID CIFBuilderTriplet::mDocumentID=CIFBuilderTriplet.html#mDocumentID CIFBuilderTriplet::mDocumentFrequency=CIFBuilderTriplet.html#mDocumentFrequency CIFListStart=CIFListStart.html CIFListStart=CIFListStart.html CIFListStart::mFeatureID=CIFListStart.html#mFeatureID CIFListStart::mCollectionFrequency=CIFListStart.html#mCollectionFrequency CIFListStart::mNumberOfElements=CIFListStart.html#mNumberOfElements CIFListStart::mNumberOfReservedElements=CIFListStart.html#mNumberOfReservedElements CIFListStart::CIFListStart=CIFListStart.html#CIFListStart CIFListStart::getFeatureID=CIFListStart.html#getFeatureID CIFListStart::getCollectionFrequency=CIFListStart.html#getCollectionFrequency CIFListStart::getNumberOfElements=CIFListStart.html#getNumberOfElements CIFListStart::getNumberOfReservedElements=CIFListStart.html#getNumberOfReservedElements CInitializedDouble=CInitializedDouble.html CInitializedDouble=CInitializedDouble.html CInitializedDouble::mDouble=CInitializedDouble.html#mDouble CInitializedDouble::double=CInitializedDouble.html#double CInitializedDouble::CInitializedDouble=CInitializedDouble.html#CInitializedDouble CInitializedDouble::CInitializedDouble=CInitializedDouble.html#CInitializedDouble CInitializedDouble::operator==CInitializedDouble.html#operator= CInvertedFileChunk=CInvertedFileChunk.html CInvertedFileChunk=CInvertedFileChunk.html CInvertedFileChunk::getCollectionFrequency=CInvertedFileChunk.html#getCollectionFrequency CInvertedFileChunk::CInvertedFileChunk::addElement=CInvertedFileChunk.html#CInvertedFileChunk::addElement CInvertedFileChunk::writeBinary=CInvertedFileChunk.html#writeBinary CAFPerl=CAFPerl.html CAFPerl=CAFPerl.html CAFPerl::CAFPerl=CAFPerl.html#CAFPerl CAFPerl::makeAccessor=CAFPerl.html#makeAccessor CAcPerl=CAcPerl.html CAcPerl=CAcPerl.html CAcPerl::CAcPerl=CAcPerl.html#CAcPerl CAcPerl::~CAcPerl=CAcPerl.html#~CAcPerl CAcPerl::bool=CAcPerl.html#bool CAcPerl::cloneCollectionElement=CAcPerl.html#cloneCollectionElement CAcPerl::IDToURL=CAcPerl.html#IDToURL CAcPerl::IDToAccessorElement=CAcPerl.html#IDToAccessorElement CAcPerl::URLToID=CAcPerl.html#URLToID CAcPerl::getAllIDs=CAcPerl.html#getAllIDs CAcPerl::getAllAccessorElements=CAcPerl.html#getAllAccessorElements CAcPerl::getRandomIDs=CAcPerl.html#getRandomIDs CAcPerl::getRandomAccessorElements=CAcPerl.html#getRandomAccessorElements CAcPerl::size=CAcPerl.html#size CAFURL2FTS=CAFURL2FTS.html CAFURL2FTS=CAFURL2FTS.html CAFURL2FTS::CAFURL2FTS=CAFURL2FTS.html#CAFURL2FTS CAFURL2FTS::makeAccessor=CAFURL2FTS.html#makeAccessor CAcURL2FTS=CAcURL2FTS.html CAcURL2FTS=CAcURL2FTS.html CAcURL2FTS::mWellConstructed=CAcURL2FTS.html#mWellConstructed CAcURL2FTS::mURLToFFN=CAcURL2FTS.html#mURLToFFN CAcURL2FTS::mIDToFFN=CAcURL2FTS.html#mIDToFFN CAcURL2FTS::mURLToFeatureFile=CAcURL2FTS.html#mURLToFeatureFile CAcURL2FTS::mURLToFeatureFileName=CAcURL2FTS.html#mURLToFeatureFileName CAcURL2FTS::CAcIFFileSystem=CAcURL2FTS.html#CAcIFFileSystem CAcURL2FTS::getURLToFeatureFileName=CAcURL2FTS.html#getURLToFeatureFileName CAcURL2FTS::CAcURL2FTS=CAcURL2FTS.html#CAcURL2FTS CAcURL2FTS::bool=CAcURL2FTS.html#bool CAcURL2FTS::size=CAcURL2FTS.html#size CAcURL2FTS::URLToFFN=CAcURL2FTS.html#URLToFFN CAcURL2FTS::IDToFFN=CAcURL2FTS.html#IDToFFN CCutoffFunction=CCutoffFunction.html CCutoffFunction=CCutoffFunction.html CCutoffFunction::mUpperCutoff=CCutoffFunction.html#mUpperCutoff CCutoffFunction::mLowerCutoff=CCutoffFunction.html#mLowerCutoff CCutoffFunction::isOnePass=CCutoffFunction.html#isOnePass CCutoffFunction::startFirstPass=CCutoffFunction.html#startFirstPass CCutoffFunction::adjustInnerState=CCutoffFunction.html#adjustInnerState CCutoffFunction::operator()=CCutoffFunction.html#operator() CCutoffFunction::setUpperCutoff=CCutoffFunction.html#setUpperCutoff CCutoffFunction::setLowerCutoff=CCutoffFunction.html#setLowerCutoff CCutoffFunction::clone=CCutoffFunction.html#clone CCFAbsolute=CCFAbsolute.html CCFAbsolute=CCFAbsolute.html CCFAbsolute::CCFAbsolute=CCFAbsolute.html#CCFAbsolute CCFAbsolute::isOnePass=CCFAbsolute.html#isOnePass CCFAbsolute::startFirstPass=CCFAbsolute.html#startFirstPass CCFAbsolute::adjustInnerState=CCFAbsolute.html#adjustInnerState CCFAbsolute::operator()=CCFAbsolute.html#operator() CCFAbsolute::clone=CCFAbsolute.html#clone TTInserter=TTInserter.html TTInserter=TTInserter.html TTInserter::do_for_equal_first=TTInserter.html#do_for_equal_first TTInserter::if=TTInserter.html#if TTInserter::inInserter=(make_pair=TTInserter.html#inInserter=(make_pair TTInserter::mSquasher=TTInserter.html#mSquasher TTInserter::CIDtoDistanceList=TTInserter.html#CIDtoDistanceList TTInserter::CIDList=TTInserter.html#CIDList TTInserter::CID=TTInserter.html#CID TTInserter::mContent=TTInserter.html#mContent TTInserter::setSquasher=TTInserter.html#setSquasher TTInserter::getSquasher=TTInserter.html#getSquasher TTInserter::CDistanceCalculator=TTInserter.html#CDistanceCalculator TTInserter::calculateDistances=TTInserter.html#calculateDistances TTInserter::calculateRelativeAndSquash=TTInserter.html#calculateRelativeAndSquash TTInserter::calculateRelativeAndSquash=TTInserter.html#calculateRelativeAndSquash TTInserter::calculateRelativeAndSquash=TTInserter.html#calculateRelativeAndSquash TTInserter::calculateRelativeAndSquash=TTInserter.html#calculateRelativeAndSquash TTInserter::digestFeedback=TTInserter.html#digestFeedback TTInserter::bool=TTInserter.html#bool CDrawer=CDrawer.html CDrawer=CDrawer.html CDrawer::mNumberOfImages=CDrawer.html#mNumberOfImages CDrawer::operator()=CDrawer.html#operator() CDrawer::subClone=CDrawer.html#subClone CDrawer::setNumberOfImages=CDrawer.html#setNumberOfImages CDrawer::getNumberOfImages=CDrawer.html#getNumberOfImages CDrawer::clone=CDrawer.html#clone CDUniform=CDUniform.html CDUniform=CDUniform.html CDUniform::operator()=CDUniform.html#operator() CDUniform::subClone=CDUniform.html#subClone CDPreferMiddle=CDPreferMiddle.html CDPreferMiddle=CDPreferMiddle.html CDPreferMiddle::operator()=CDPreferMiddle.html#operator() CDPreferMiddle::subClone=CDPreferMiddle.html#subClone CEnhancedPicHunter=CEnhancedPicHunter.html CEnhancedPicHunter=CEnhancedPicHunter.html CEnhancedPicHunter::mDistanceCalculator=CEnhancedPicHunter.html#mDistanceCalculator CEnhancedPicHunter::mLearningStructure=CEnhancedPicHunter.html#mLearningStructure CEnhancedPicHunter::setDistanceCalculator=CEnhancedPicHunter.html#setDistanceCalculator CEnhancedPicHunter::CEnhancedPicHunter=CEnhancedPicHunter.html#CEnhancedPicHunter CEnhancedPicHunter::submitAssumption=CEnhancedPicHunter.html#submitAssumption CEnhancedPicHunter::chooseBestSelection=CEnhancedPicHunter.html#chooseBestSelection CEnhancedPicHunter::setNumberOfImages=CEnhancedPicHunter.html#setNumberOfImages CEnhancedPicHunter::getNumberOfImages=CEnhancedPicHunter.html#getNumberOfImages CIDToMatrixIndex=CIDToMatrixIndex.html CIDToMatrixIndex=CIDToMatrixIndex.html CIDToMatrixIndex::CIDToMatrixIndex=CIDToMatrixIndex.html#CIDToMatrixIndex CIDToMatrixIndex::addID=CIDToMatrixIndex.html#addID CIDToMatrixIndex::size=CIDToMatrixIndex.html#size CIDToMatrixIndex::operator[]=CIDToMatrixIndex.html#operator[] CIFQPicHunter=CIFQPicHunter.html CIFQPicHunter=CIFQPicHunter.html CIFQPicHunter::mResultCollection=CIFQPicHunter.html#mResultCollection CIFQPicHunter::CIFQPicHunter=CIFQPicHunter.html#CIFQPicHunter CIFQPicHunter::query=CIFQPicHunter.html#query CIFQuickAndDirtyHunter=CIFQuickAndDirtyHunter.html CIFQuickAndDirtyHunter=CIFQuickAndDirtyHunter.html CIFQuickAndDirtyHunter::mNumberOfImages=CIFQuickAndDirtyHunter.html#mNumberOfImages CIFQuickAndDirtyHunter::mNumberOfTries=CIFQuickAndDirtyHunter.html#mNumberOfTries CIFQuickAndDirtyHunter::mPositiveThreshold=CIFQuickAndDirtyHunter.html#mPositiveThreshold CIFQuickAndDirtyHunter::mNegativeThreshold=CIFQuickAndDirtyHunter.html#mNegativeThreshold CIFQuickAndDirtyHunter::CIFQuickAndDirtyHunter=CIFQuickAndDirtyHunter.html#CIFQuickAndDirtyHunter CIFQuickAndDirtyHunter::init=CIFQuickAndDirtyHunter.html#init CIFQuickAndDirtyHunter::setCollection=CIFQuickAndDirtyHunter.html#setCollection CIFQuickAndDirtyHunter::setAlgorithm=CIFQuickAndDirtyHunter.html#setAlgorithm CIFQuickAndDirtyHunter::fastQuery=CIFQuickAndDirtyHunter.html#fastQuery CIFQuickAndDirtyHunter::setSquasher=CIFQuickAndDirtyHunter.html#setSquasher CIFQuickAndDirtyHunter::setNumberOfTries=CIFQuickAndDirtyHunter.html#setNumberOfTries CIFQuickAndDirtyHunter::setPositiveThreshold=CIFQuickAndDirtyHunter.html#setPositiveThreshold CIFQuickAndDirtyHunter::setNegativeThreshold=CIFQuickAndDirtyHunter.html#setNegativeThreshold CIFQuickAndDirtyHunter::setDepthOfMemory=CIFQuickAndDirtyHunter.html#setDepthOfMemory CIFQuickAndDirtyHunter::setForgetAfterNthInconsistency=CIFQuickAndDirtyHunter.html#setForgetAfterNthInconsistency CIFQuickAndDirtyHunter::makeEmptySet=CIFQuickAndDirtyHunter.html#makeEmptySet CIFQuickAndDirtyHunter::getFeedbackList=CIFQuickAndDirtyHunter.html#getFeedbackList CInformationCalculator=CInformationCalculator.html CInformationCalculator=CInformationCalculator.html CInformationCalculator::operator()=CInformationCalculator.html#operator() CInformationCalculator::startFirstPass=CInformationCalculator.html#startFirstPass CInformationCalculator::isOnePass=CInformationCalculator.html#isOnePass CInformationCalculator::adjustInnerState=CInformationCalculator.html#adjustInnerState CInformationCalculator::clone=CInformationCalculator.html#clone CInformationCalculator::subClone=CInformationCalculator.html#subClone CICEntropy=CICEntropy.html CICEntropy=CICEntropy.html CICEntropy::operator()=CICEntropy.html#operator() CICEntropy::subClone=CICEntropy.html#subClone CICEntropyWithThreshold=CICEntropyWithThreshold.html CICEntropyWithThreshold=CICEntropyWithThreshold.html CICEntropyWithThreshold::mMaximum=CICEntropyWithThreshold.html#mMaximum CICEntropyWithThreshold::mThreshold=CICEntropyWithThreshold.html#mThreshold CICEntropyWithThreshold::CICEntropyWithThreshold=CICEntropyWithThreshold.html#CICEntropyWithThreshold CICEntropyWithThreshold::CICEntropyWithThreshold=CICEntropyWithThreshold.html#CICEntropyWithThreshold CICEntropyWithThreshold::setThreshold=CICEntropyWithThreshold.html#setThreshold CICEntropyWithThreshold::isOnePass=CICEntropyWithThreshold.html#isOnePass CICEntropyWithThreshold::startFirstPass=CICEntropyWithThreshold.html#startFirstPass CICEntropyWithThreshold::adjustInnerState=CICEntropyWithThreshold.html#adjustInnerState CICEntropyWithThreshold::operator()=CICEntropyWithThreshold.html#operator() CICEntropyWithThreshold::subClone=CICEntropyWithThreshold.html#subClone CICERelative=CICERelative.html CICERelative=CICERelative.html CICERelative::mSum=CICERelative.html#mSum CICERelative::mThreshold=CICERelative.html#mThreshold CICERelative::CICERelative=CICERelative.html#CICERelative CICERelative::CICERelative=CICERelative.html#CICERelative CICERelative::setThreshold=CICERelative.html#setThreshold CICERelative::isOnePass=CICERelative.html#isOnePass CICERelative::startFirstPass=CICERelative.html#startFirstPass CICERelative::adjustInnerState=CICERelative.html#adjustInnerState CICERelative::operator()=CICERelative.html#operator() CICERelative::subClone=CICERelative.html#subClone CICSum=CICSum.html CICSum=CICSum.html CICSum::operator()=CICSum.html#operator() CICSum::subClone=CICSum.html#subClone CPSetOfPSets=CPSetOfPSets.html CPSetOfPSets=CPSetOfPSets.html CPSetOfPSets::CIDSequence=CPSetOfPSets.html#CIDSequence CPSetOfPSets::CAssumptionElement=CPSetOfPSets.html#CAssumptionElement CPSetOfPSets::mContent=CPSetOfPSets.html#mContent CPSetOfPSets::mAssumption=CPSetOfPSets.html#mAssumption CPSetOfPSets::mMaximumSize=CPSetOfPSets.html#mMaximumSize CPSetOfPSets::mForgetAfterNthInconsistency=CPSetOfPSets.html#mForgetAfterNthInconsistency CPSetOfPSets::mNumberOfImages=CPSetOfPSets.html#mNumberOfImages CPSetOfPSets::CPSetOfPSets=CPSetOfPSets.html#CPSetOfPSets CPSetOfPSets::~CPSetOfPSets=CPSetOfPSets.html#~CPSetOfPSets CPSetOfPSets::CPSetOfPSets=CPSetOfPSets.html#CPSetOfPSets CPSetOfPSets::addElement=CPSetOfPSets.html#addElement CPSetOfPSets::evaluateAssumption=CPSetOfPSets.html#evaluateAssumption CPSetOfPSets::updateWeights=CPSetOfPSets.html#updateWeights CPSetOfPSets::evaluateContent=CPSetOfPSets.html#evaluateContent CPSetOfPSets::getCurrentBest=CPSetOfPSets.html#getCurrentBest CPSetOfPSets::getCurrentBestSize=CPSetOfPSets.html#getCurrentBestSize CPSetOfPSets::drawSequenceFromCurrentBest=CPSetOfPSets.html#drawSequenceFromCurrentBest CPSetOfPSets::drawSetFromCurrentBest=CPSetOfPSets.html#drawSetFromCurrentBest CPSetOfPSets::setPrototype=CPSetOfPSets.html#setPrototype CPSetOfPSets::getPrototypeClone=CPSetOfPSets.html#getPrototypeClone CPSetOfPSets::combine=CPSetOfPSets.html#combine CPSetOfPSets::reduceToTheMax=CPSetOfPSets.html#reduceToTheMax CPSetOfPSets::setMaximumSize=CPSetOfPSets.html#setMaximumSize CPSetOfPSets::setForgetAfterNthInconsistency=CPSetOfPSets.html#setForgetAfterNthInconsistency CPSetOfPSets::size=CPSetOfPSets.html#size CPSetOfPSets::clear=CPSetOfPSets.html#clear CPSetOfPSets::setNumberOfImages=CPSetOfPSets.html#setNumberOfImages CPSetOfPSets::getNumberOfImages=CPSetOfPSets.html#getNumberOfImages CPersistentMatrix=CPersistentMatrix.html CPersistentMatrix=CPersistentMatrix.html CPersistentMatrix::mXSize=CPersistentMatrix.html#mXSize CPersistentMatrix::mYSize=CPersistentMatrix.html#mYSize CPersistentMatrix::mContent=CPersistentMatrix.html#mContent CPersistentMatrix::CPersistentMatrix=CPersistentMatrix.html#CPersistentMatrix CPersistentMatrix::open=CPersistentMatrix.html#open CPersistentMatrix::create=CPersistentMatrix.html#create CPersistentMatrix::getLineVector=CPersistentMatrix.html#getLineVector CPersistentMatrix::getLineVector=CPersistentMatrix.html#getLineVector CPersistentMatrix::putLineVector=CPersistentMatrix.html#putLineVector CPersistentMatrix::putLineVector=CPersistentMatrix.html#putLineVector CPersistentMatrix::setValue=CPersistentMatrix.html#setValue CPersistentMatrix::bool=CPersistentMatrix.html#bool CPersistentTranslatedIndexMatrix=CPersistentTranslatedIndexMatrix.html CPersistentTranslatedIndexMatrix=CPersistentTranslatedIndexMatrix.html CPersistentTranslatedIndexMatrix::mTranslator=CPersistentTranslatedIndexMatrix.html#mTranslator CPersistentTranslatedIndexMatrix::mContent=CPersistentTranslatedIndexMatrix.html#mContent CPersistentTranslatedIndexMatrix::CPersistentTranslatedIndexMatrix=CPersistentTranslatedIndexMatrix.html#CPersistentTranslatedIndexMatrix CPersistentTranslatedIndexMatrix::create=CPersistentTranslatedIndexMatrix.html#create CPersistentTranslatedIndexMatrix::open=CPersistentTranslatedIndexMatrix.html#open CPersistentTranslatedIndexMatrix::putLineVector=CPersistentTranslatedIndexMatrix.html#putLineVector CPersistentTranslatedIndexMatrix::getLineVector=CPersistentTranslatedIndexMatrix.html#getLineVector CPersistentTranslatedIndexMatrix::putLineVector=CPersistentTranslatedIndexMatrix.html#putLineVector CPersistentTranslatedIndexMatrix::getLineVector=CPersistentTranslatedIndexMatrix.html#getLineVector CPersistentTranslatedIndexMatrix::setValue=CPersistentTranslatedIndexMatrix.html#setValue CPersistentTranslatedIndexMatrix::bool=CPersistentTranslatedIndexMatrix.html#bool CPersistentTranslatedIndexMatrix::size=CPersistentTranslatedIndexMatrix.html#size CPersistentVector=CPersistentVector.html CPersistentVector=CPersistentVector.html CPersistentVector::mLength=CPersistentVector.html#mLength CPersistentVector::CPersistentVector=CPersistentVector.html#CPersistentVector CPersistentVector::read=CPersistentVector.html#read CPersistentVector::read=CPersistentVector.html#read CPersistentVector::write=CPersistentVector.html#write CPersistentVector::init=CPersistentVector.html#init CPicHunter=CPicHunter.html CPicHunter=CPicHunter.html CPicHunter::CFeedback=CPicHunter.html#CFeedback CPicHunter::CSuggestion=CPicHunter.html#CSuggestion CPicHunter::mDistanceBuffer=CPicHunter.html#mDistanceBuffer CPicHunter::mSuggestion=CPicHunter.html#mSuggestion CPicHunter::mLearningStructure=CPicHunter.html#mLearningStructure CPicHunter::CPicHunter=CPicHunter.html#CPicHunter CPicHunter::getSuggestion=CPicHunter.html#getSuggestion CProbabilisticSet=CProbabilisticSet.html CProbabilisticSet=CProbabilisticSet.html CProbabilisticSet::CContent=CProbabilisticSet.html#CContent CProbabilisticSet::mIsNormalized=CProbabilisticSet.html#mIsNormalized CProbabilisticSet::mIsDrawPrepared=CProbabilisticSet.html#mIsDrawPrepared CProbabilisticSet::mSquashValue=CProbabilisticSet.html#mSquashValue CProbabilisticSet::mContent=CProbabilisticSet.html#mContent CProbabilisticSet::mIsSorted=CProbabilisticSet.html#mIsSorted CProbabilisticSet::mIsDoublesRemoved=CProbabilisticSet.html#mIsDoublesRemoved CProbabilisticSet::prepareDraw=CProbabilisticSet.html#prepareDraw CProbabilisticSet::CProbabilisticSet=CProbabilisticSet.html#CProbabilisticSet CProbabilisticSet::CProbabilisticSet=CProbabilisticSet.html#CProbabilisticSet CProbabilisticSet::cloneWithoutContent=CProbabilisticSet.html#cloneWithoutContent CProbabilisticSet::clone=CProbabilisticSet.html#clone CProbabilisticSet::~CProbabilisticSet=CProbabilisticSet.html#~CProbabilisticSet CProbabilisticSet::unite=CProbabilisticSet.html#unite CProbabilisticSet::intersect=CProbabilisticSet.html#intersect CProbabilisticSet::probabilityThatMember=CProbabilisticSet.html#probabilityThatMember CProbabilisticSet::addElement=CProbabilisticSet.html#addElement CProbabilisticSet::addElement=CProbabilisticSet.html#addElement CProbabilisticSet::sortIfUnsorted=CProbabilisticSet.html#sortIfUnsorted CProbabilisticSet::removeDoubles=CProbabilisticSet.html#removeDoubles CProbabilisticSet::setUniteStrategy=CProbabilisticSet.html#setUniteStrategy CProbabilisticSet::setIntersectStrategy=CProbabilisticSet.html#setIntersectStrategy CProbabilisticSet::setInformationCalculator=CProbabilisticSet.html#setInformationCalculator CProbabilisticSet::setDrawStrategy=CProbabilisticSet.html#setDrawStrategy CProbabilisticSet::setValidInterval=CProbabilisticSet.html#setValidInterval CProbabilisticSet::calculateInformation=CProbabilisticSet.html#calculateInformation CProbabilisticSet::draw=CProbabilisticSet.html#draw CProbabilisticSet::drawSet=CProbabilisticSet.html#drawSet CProbabilisticSet::getTopNSet=CProbabilisticSet.html#getTopNSet CProbabilisticSet::drawSequence=CProbabilisticSet.html#drawSequence CProbabilisticSet::getTopNSequence=CProbabilisticSet.html#getTopNSequence CProbabilisticSet::getProbabilityMax=CProbabilisticSet.html#getProbabilityMax CProbabilisticSet::countAboveThreshold=CProbabilisticSet.html#countAboveThreshold CProbabilisticSet::getProbabilitySum=CProbabilisticSet.html#getProbabilitySum CProbabilisticSet::multiplyProbabilities=CProbabilisticSet.html#multiplyProbabilities CProbabilisticSet::normalize=CProbabilisticSet.html#normalize CProbabilisticSet::size=CProbabilisticSet.html#size CProbabilisticSet::output=CProbabilisticSet.html#output CProbabilisticSet::getContent=CProbabilisticSet.html#getContent CProbabilisticSet::operator==CProbabilisticSet.html#operator= CProbabilisticSet::operator==CProbabilisticSet.html#operator= CProbabilisticSet::operator++=CProbabilisticSet.html#operator++ CProbabilisticSet::clear=CProbabilisticSet.html#clear CProbabilisticSetElement=CProbabilisticSetElement.html CProbabilisticSetElement=CProbabilisticSetElement.html CProbabilisticSetElement::mContent=CProbabilisticSetElement.html#mContent CProbabilisticSetElement::mWeight=CProbabilisticSetElement.html#mWeight CProbabilisticSetElement::mProbability=CProbabilisticSetElement.html#mProbability CProbabilisticSetElement::mDrawValue=CProbabilisticSetElement.html#mDrawValue CProbabilisticSetElement::CProbabilisticSetElement=CProbabilisticSetElement.html#CProbabilisticSetElement CProbabilisticSetElement::CProbabilisticSetElement=CProbabilisticSetElement.html#CProbabilisticSetElement CProbabilisticSetElement::setWeight=CProbabilisticSetElement.html#setWeight CProbabilisticSetElement::setDrawValue=CProbabilisticSetElement.html#setDrawValue CProbabilisticSetElement::setProbability=CProbabilisticSetElement.html#setProbability CProbabilisticSetElement::setContent=CProbabilisticSetElement.html#setContent CProbabilisticSetElement::getWeight=CProbabilisticSetElement.html#getWeight CProbabilisticSetElement::getProbability=CProbabilisticSetElement.html#getProbability CProbabilisticSetElement::getDrawValue=CProbabilisticSetElement.html#getDrawValue CProbabilisticSetElement::getContent=CProbabilisticSetElement.html#getContent CProbabilisticSetElement::output=CProbabilisticSetElement.html#output CSortByProbability_PSE=CSortByProbability_PSE.html CSortByProbability_PSE=CSortByProbability_PSE.html CSortByProbability_PSE::operator()=CSortByProbability_PSE.html#operator() CSortByProbability_PSE::operator()=CSortByProbability_PSE.html#operator() CSortByProbability_PSE::operator()=CSortByProbability_PSE.html#operator() CSortByDrawValue_PSE=CSortByDrawValue_PSE.html CSortByDrawValue_PSE=CSortByDrawValue_PSE.html CSortByDrawValue_PSE::operator()=CSortByDrawValue_PSE.html#operator() CSortByDrawValue_PSE::operator()=CSortByDrawValue_PSE.html#operator() CSortByDrawValue_PSE::operator()=CSortByDrawValue_PSE.html#operator() CSortByContent_PSE=CSortByContent_PSE.html CSortByContent_PSE=CSortByContent_PSE.html CSortByContent_PSE::operator()=CSortByContent_PSE.html#operator() CSortByContent_PSE::operator()=CSortByContent_PSE.html#operator() CSortByContent_PSE::operator()=CSortByContent_PSE.html#operator() CProbabilityCombiner=CProbabilityCombiner.html CProbabilityCombiner=CProbabilityCombiner.html CProbabilityCombiner::mBelief=CProbabilityCombiner.html#mBelief CProbabilityCombiner::mNumberOfElements=CProbabilityCombiner.html#mNumberOfElements CProbabilityCombiner::CProbabilityCombiner=CProbabilityCombiner.html#CProbabilityCombiner CProbabilityCombiner::setBelief=CProbabilityCombiner.html#setBelief CProbabilityCombiner::setNumberOfElements=CProbabilityCombiner.html#setNumberOfElements CProbabilityCombiner::perform=CProbabilityCombiner.html#perform CProbabilityCombiner::operator()=CProbabilityCombiner.html#operator() CProbabilityCombiner::clone=CProbabilityCombiner.html#clone CProbabilityCombiner::subClone=CProbabilityCombiner.html#subClone CPCMaximum=CPCMaximum.html CPCMaximum=CPCMaximum.html CPCMaximum::perform=CPCMaximum.html#perform CPCMaximum::subClone=CPCMaximum.html#subClone CPCMinimum=CPCMinimum.html CPCMinimum=CPCMinimum.html CPCMinimum::perform=CPCMinimum.html#perform CPCMinimum::subClone=CPCMinimum.html#subClone CPCProduct=CPCProduct.html CPCProduct=CPCProduct.html CPCProduct::perform=CPCProduct.html#perform CPCProduct::subClone=CPCProduct.html#subClone CPCDiscrete=CPCDiscrete.html CPCDiscrete=CPCDiscrete.html CPCDiscrete::lThreshold=CPCDiscrete.html#lThreshold CPCDiscrete::perform=CPCDiscrete.html#perform CPCDiscrete::subClone=CPCDiscrete.html#subClone CSquasher=CSquasher.html CSquasher=CSquasher.html CSquasher::mSigma=CSquasher.html#mSigma CSquasher::operator()=CSquasher.html#operator() CSquasher::setSigma=CSquasher.html#setSigma CStandardSquasher=CStandardSquasher.html CStandardSquasher=CStandardSquasher.html CStandardSquasher::operator()=CStandardSquasher.html#operator() CDiscreteSquasher=CDiscreteSquasher.html CDiscreteSquasher=CDiscreteSquasher.html CDiscreteSquasher::operator()=CDiscreteSquasher.html#operator() CGaussianSquasher=CGaussianSquasher.html CGaussianSquasher=CGaussianSquasher.html CGaussianSquasher::operator()=CGaussianSquasher.html#operator() CFlexibleSquasher=CFlexibleSquasher.html CFlexibleSquasher=CFlexibleSquasher.html CFlexibleSquasher::operator()=CFlexibleSquasher.html#operator() CQHierarchy=CQHierarchy.html CQHierarchy=CQHierarchy.html CQHierarchy::init=CQHierarchy.html#init CQHierarchy::CQHierarchy=CQHierarchy.html#CQHierarchy CQHierarchy::~CQHierarchy=CQHierarchy.html#~CQHierarchy CQHierarchy::CQHierarchy=CQHierarchy.html#CQHierarchy CQHierarchy::fastQuery=CQHierarchy.html#fastQuery CQHierarchy::setAlgorithm=CQHierarchy.html#setAlgorithm CWeighterFactory=CWeighterFactory.html CWeighterFactory=CWeighterFactory.html CWeighterFactory::newWeighter=CWeighterFactory.html#newWeighter CWeighterFactory::CWeighterFactory=CWeighterFactory.html#CWeighterFactory CWeighterFactory::~CWeighterFactory=CWeighterFactory.html#~CWeighterFactory CQInvertedFile=CQInvertedFile.html CQInvertedFile=CQInvertedFile.html CQInvertedFile::mModulo=CQInvertedFile.html#mModulo CQInvertedFile::mModuloClass=CQInvertedFile.html#mModuloClass CQInvertedFile::mWeighterFactory=CQInvertedFile.html#mWeighterFactory CQInvertedFile::mQueryFeatureWeighters=CQInvertedFile.html#mQueryFeatureWeighters CQInvertedFile::keepScore=CQInvertedFile.html#keepScore CQInvertedFile::keepScorePruning=CQInvertedFile.html#keepScorePruning CQInvertedFile::buildQueryHash=CQInvertedFile.html#buildQueryHash CQInvertedFile::buildNormalizedQueryList=CQInvertedFile.html#buildNormalizedQueryList CQInvertedFile::buildNormalizedQueryHash=CQInvertedFile.html#buildNormalizedQueryHash CQInvertedFile::init=CQInvertedFile.html#init CQInvertedFile::finishInit=CQInvertedFile.html#finishInit CQInvertedFile::CQInvertedFile=CQInvertedFile.html#CQInvertedFile CQInvertedFile::~CQInvertedFile=CQInvertedFile.html#~CQInvertedFile CQInvertedFile::setAlgorithm=CQInvertedFile.html#setAlgorithm CQInvertedFile::fastQuery=CQInvertedFile.html#fastQuery CQInvertedFile::fastQueryByFeature=CQInvertedFile.html#fastQueryByFeature CQInvertedFile::DIDToScore=CQInvertedFile.html#DIDToScore CQInvertedFile::URLToScore=CQInvertedFile.html#URLToScore CQInvertedFile::FeatureListToScore=CQInvertedFile.html#FeatureListToScore CQInvertedFile::buildNormalizedQueryHash=CQInvertedFile.html#buildNormalizedQueryHash CQInvertedFile::mBlockingOn=CQInvertedFile.html#mBlockingOn CQInvertedFile::activateBlockingFeatures=CQInvertedFile.html#activateBlockingFeatures CQInvertedFile::releaseBlockingFeatures=CQInvertedFile.html#releaseBlockingFeatures CQInvertedFile::featuresBlocked=CQInvertedFile.html#featuresBlocked CQInvertedFile::blockFeatureGroup=CQInvertedFile.html#blockFeatureGroup CQInvertedFile::unblockFeatureGroup=CQInvertedFile.html#unblockFeatureGroup CQInvertedFile::isBlocked=CQInvertedFile.html#isBlocked CQInvertedFile::mPruningUsed=CQInvertedFile.html#mPruningUsed CQInvertedFile::mScoreBoardPruningUsed=CQInvertedFile.html#mScoreBoardPruningUsed CQInvertedFile::stopAfterFeature=CQInvertedFile.html#stopAfterFeature CQInvertedFile::reduceTo=CQInvertedFile.html#reduceTo CQInvertedFile::mNumberofUsedScoreBoardPrunings=CQInvertedFile.html#mNumberofUsedScoreBoardPrunings CQInvertedFile::mFeaturePruningUsed=CQInvertedFile.html#mFeaturePruningUsed CQInvertedFile::mPercentageofFeatures=CQInvertedFile.html#mPercentageofFeatures CQInvertedFile::mTimePruningUsed=CQInvertedFile.html#mTimePruningUsed CQInvertedFile::mStoppingTime=CQInvertedFile.html#mStoppingTime CQInvertedFile::mEvaluateAfterPruning=CQInvertedFile.html#mEvaluateAfterPruning CQInvertedFile::releaseAllPrunings=CQInvertedFile.html#releaseAllPrunings CQInvertedFile::useFeaturePruning=CQInvertedFile.html#useFeaturePruning CQInvertedFile::releaseFeaturePruning=CQInvertedFile.html#releaseFeaturePruning CQInvertedFile::useTimePruning=CQInvertedFile.html#useTimePruning CQInvertedFile::releaseTimePruning=CQInvertedFile.html#releaseTimePruning CQInvertedFile::useScoreBoardPruning=CQInvertedFile.html#useScoreBoardPruning CQInvertedFile::releaseScoreBoardPruning=CQInvertedFile.html#releaseScoreBoardPruning CQInvertedFile::useEvaluateAfterPruning=CQInvertedFile.html#useEvaluateAfterPruning CQInvertedFile::releaseEvaluateAfterPruning=CQInvertedFile.html#releaseEvaluateAfterPruning CQInvertedFile::getWeighter=CQInvertedFile.html#getWeighter CQNBestFullyWeighted=CQNBestFullyWeighted.html CQNBestFullyWeighted=CQNBestFullyWeighted.html CQNBestFullyWeighted::CQNBestFullyWeighted=CQNBestFullyWeighted.html#CQNBestFullyWeighted CQNBestFullyWeighted::considerQueryFeature=CQNBestFullyWeighted.html#considerQueryFeature CQNBestFullyWeighted::clone=CQNBestFullyWeighted.html#clone CQNEuclideanLengthSquare=CQNEuclideanLengthSquare.html CQNEuclideanLengthSquare=CQNEuclideanLengthSquare.html CQNEuclideanLengthSquare::CQNEuclideanLengthSquare=CQNEuclideanLengthSquare.html#CQNEuclideanLengthSquare CQNEuclideanLengthSquare::considerQueryFeature=CQNEuclideanLengthSquare.html#considerQueryFeature CQNEuclideanLengthSquare::clone=CQNEuclideanLengthSquare.html#clone CQNMaxDocumentFrequency=CQNMaxDocumentFrequency.html CQNMaxDocumentFrequency=CQNMaxDocumentFrequency.html CQNMaxDocumentFrequency::CQNMaxDocumentFrequency=CQNMaxDocumentFrequency.html#CQNMaxDocumentFrequency CQNMaxDocumentFrequency::considerQueryFeature=CQNMaxDocumentFrequency.html#considerQueryFeature CQNMaxDocumentFrequency::clone=CQNMaxDocumentFrequency.html#clone CQNNoNormalization=CQNNoNormalization.html CQNNoNormalization=CQNNoNormalization.html CQNNoNormalization::CQNNoNormalization=CQNNoNormalization.html#CQNNoNormalization CQNNoNormalization::getValue=CQNNoNormalization.html#getValue CQNNoNormalization::considerQueryFeature=CQNNoNormalization.html#considerQueryFeature CQNNoNormalization::clone=CQNNoNormalization.html#clone CQNSquareDFLogICFSum=CQNSquareDFLogICFSum.html CQNSquareDFLogICFSum=CQNSquareDFLogICFSum.html CQNSquareDFLogICFSum::CQNSquareDFLogICFSum=CQNSquareDFLogICFSum.html#CQNSquareDFLogICFSum CQNSquareDFLogICFSum::considerQueryFeature=CQNSquareDFLogICFSum.html#considerQueryFeature CQNSquareDFLogICFSum::clone=CQNSquareDFLogICFSum.html#clone CQueryNormalizer=CQueryNormalizer.html CQueryNormalizer=CQueryNormalizer.html CQueryNormalizer::mValue=CQueryNormalizer.html#mValue CQueryNormalizer::mAccessor=CQueryNormalizer.html#mAccessor CQueryNormalizer::CQueryNormalizer=CQueryNormalizer.html#CQueryNormalizer CQueryNormalizer::setAccessor=CQueryNormalizer.html#setAccessor CQueryNormalizer::reset=CQueryNormalizer.html#reset CQueryNormalizer::getValue=CQueryNormalizer.html#getValue CQueryNormalizer::considerQueryFeature=CQueryNormalizer.html#considerQueryFeature CQueryNormalizer::clone=CQueryNormalizer.html#clone CScoreBoard=CScoreBoard.html CScoreBoard=CScoreBoard.html CScoreBoard::mIgnoreNewValues=CScoreBoard.html#mIgnoreNewValues CScoreBoard::CScoreBoard=CScoreBoard.html#CScoreBoard CScoreBoard::operator()=CScoreBoard.html#operator() CScoreBoard::output=CScoreBoard.html#output CScoreBoard::setIgnore=CScoreBoard.html#setIgnore CScoreBoard::releaseIgnore=CScoreBoard.html#releaseIgnore CScoreBoard::limitNumberTo=CScoreBoard.html#limitNumberTo CWFBestFullyWeighted=CWFBestFullyWeighted.html CWFBestFullyWeighted=CWFBestFullyWeighted.html CWFBestFullyWeighted::CWFBestFullyWeighted=CWFBestFullyWeighted.html#CWFBestFullyWeighted CWFBestFullyWeighted::subApply=CWFBestFullyWeighted.html#subApply CWFBestFullyWeighted::apply=CWFBestFullyWeighted.html#apply CWFBestFullyWeighted::clone=CWFBestFullyWeighted.html#clone CWFBestProbabilistic=CWFBestProbabilistic.html CWFBestProbabilistic=CWFBestProbabilistic.html CWFBestProbabilistic::subApply=CWFBestProbabilistic.html#subApply CWFBestProbabilistic::apply=CWFBestProbabilistic.html#apply CWFBestProbabilistic::clone=CWFBestProbabilistic.html#clone CWFBinaryTerm=CWFBinaryTerm.html CWFBinaryTerm=CWFBinaryTerm.html CWFBinaryTerm::CWFBinaryTerm=CWFBinaryTerm.html#CWFBinaryTerm CWFBinaryTerm::subApply=CWFBinaryTerm.html#subApply CWFBinaryTerm::clone=CWFBinaryTerm.html#clone CWFClassicalIDF=CWFClassicalIDF.html CWFClassicalIDF=CWFClassicalIDF.html CWFClassicalIDF::preCalculate=CWFClassicalIDF.html#preCalculate CWFClassicalIDF::subApply=CWFClassicalIDF.html#subApply CWFClassicalIDF::clone=CWFClassicalIDF.html#clone CWFCoordinationLevel=CWFCoordinationLevel.html CWFCoordinationLevel=CWFCoordinationLevel.html CWFCoordinationLevel::subApply=CWFCoordinationLevel.html#subApply CWFCoordinationLevel::clone=CWFCoordinationLevel.html#clone CWFProbability=CWFProbability.html CWFProbability=CWFProbability.html CWFProbability::CWFProbability=CWFProbability.html#CWFProbability CWFProbability::subApply=CWFProbability.html#subApply CWFProbability::clone=CWFProbability.html#clone CWFStandardTF=CWFStandardTF.html CWFStandardTF=CWFStandardTF.html CWFStandardTF::subApply=CWFStandardTF.html#subApply CWFStandardTF::apply=CWFStandardTF.html#apply CWFStandardTF::clone=CWFStandardTF.html#clone CWeighter=CWeighter.html CWeighter=CWeighter.html CWeighter::mWeightingFunction=CWeighter.html#mWeightingFunction CWeighter::mDocumentNormalizer=CWeighter.html#mDocumentNormalizer CWeighter::mQueryNormalizer=CWeighter.html#mQueryNormalizer CWeighter::CWeighter=CWeighter.html#CWeighter CWeighter::init=CWeighter.html#init CWeighter::setAccessor=CWeighter.html#setAccessor CWeighter::clone=CWeighter.html#clone CWeighter::~CWeighter=CWeighter.html#~CWeighter CWeighter::getWeightingFunction=CWeighter.html#getWeightingFunction CWeighter::getDocumentNormalizer=CWeighter.html#getDocumentNormalizer CWeighter::getQueryNormalizer=CWeighter.html#getQueryNormalizer CWeightingFunction=CWeightingFunction.html CWeightingFunction=CWeightingFunction.html CWeightingFunction::mPositiveRelevanceSum=CWeightingFunction.html#mPositiveRelevanceSum CWeightingFunction::mNegativeRelevanceSum=CWeightingFunction.html#mNegativeRelevanceSum CWeightingFunction::mPositiveTermFrequency=CWeightingFunction.html#mPositiveTermFrequency CWeightingFunction::mNegativeTermFrequency=CWeightingFunction.html#mNegativeTermFrequency CWeightingFunction::mFeatureDescription=CWeightingFunction.html#mFeatureDescription CWeightingFunction::mID=CWeightingFunction.html#mID CWeightingFunction::mAccessor=CWeightingFunction.html#mAccessor CWeightingFunction::mQueryNormalizer=CWeightingFunction.html#mQueryNormalizer CWeightingFunction::mThisNormalizer=CWeightingFunction.html#mThisNormalizer CWeightingFunction::mQueryFactor=CWeightingFunction.html#mQueryFactor CWeightingFunction::mDocumentFactor=CWeightingFunction.html#mDocumentFactor CWeightingFunction::getQueryFactor=CWeightingFunction.html#getQueryFactor CWeightingFunction::preCalculate=CWeightingFunction.html#preCalculate CWeightingFunction::CWeightingFunction=CWeightingFunction.html#CWeightingFunction CWeightingFunction::setAccessor=CWeightingFunction.html#setAccessor CWeightingFunction::setNormalizers=CWeightingFunction.html#setNormalizers CWeightingFunction::setID=CWeightingFunction.html#setID CWeightingFunction::getID=CWeightingFunction.html#getID CWeightingFunction::setRelevanceSum=CWeightingFunction.html#setRelevanceSum CWeightingFunction::addQueryFeature=CWeightingFunction.html#addQueryFeature CWeightingFunction::getTermFrequency=CWeightingFunction.html#getTermFrequency CWeightingFunction::subApply=CWeightingFunction.html#subApply CWeightingFunction::apply=CWeightingFunction.html#apply CWeightingFunction::applyOnThis=CWeightingFunction.html#applyOnThis CWeightingFunction::constructNew=CWeightingFunction.html#constructNew CWeightingFunction::clone=CWeightingFunction.html#clone CWeightingFunction::the=CWeightingFunction.html#the CWeightingFunction::CSortByDFTimesLogICF_WF=CWeightingFunction.html#CSortByDFTimesLogICF_WF CSortByFeatureID_WF=CSortByFeatureID_WF.html CSortByFeatureID_WF=CSortByFeatureID_WF.html CSortByFeatureID_WF::operator()=CSortByFeatureID_WF.html#operator() CSortByDFTimesLogICF_WF=CSortByDFTimesLogICF_WF.html CSortByDFTimesLogICF_WF=CSortByDFTimesLogICF_WF.html CSortByDFTimesLogICF_WF::operator()=CSortByDFTimesLogICF_WF.html#operator() CSortByQueryFactor_WF=CSortByQueryFactor_WF.html CSortByQueryFactor_WF=CSortByQueryFactor_WF.html CSortByQueryFactor_WF::operator()=CSortByQueryFactor_WF.html#operator() CSortByAbsQueryFactor_WF=CSortByAbsQueryFactor_WF.html CSortByAbsQueryFactor_WF=CSortByAbsQueryFactor_WF.html CSortByAbsQueryFactor_WF::operator()=CSortByAbsQueryFactor_WF.html#operator() CSortPointers_WF=CSortPointers_WF.html CSortPointers_WF=CSortPointers_WF.html CSortPointers_WF::mSorter=CSortPointers_WF.html#mSorter CSortPointers_WF::CSortPointers_WF=CSortPointers_WF.html#CSortPointers_WF CSortPointers_WF::operator()=CSortPointers_WF.html#operator() CWeightingFunctionPointerHash=CWeightingFunctionPointerHash.html CWeightingFunctionPointerHash=CWeightingFunctionPointerHash.html CWeightingFunctionPointerHash::mWeightingFunction=CWeightingFunctionPointerHash.html#mWeightingFunction CWeightingFunctionPointerHash::CWeightingFunctionPointerHash=CWeightingFunctionPointerHash.html#CWeightingFunctionPointerHash CWeightingFunctionPointerHash::size=CWeightingFunctionPointerHash.html#size CWeightingFunctionPointerHash::~CWeightingFunctionPointerHash=CWeightingFunctionPointerHash.html#~CWeightingFunctionPointerHash CWeightingFunctionPointerHash::clearFeatures=CWeightingFunctionPointerHash.html#clearFeatures CWeightingFunctionPointerHash::addFeature=CWeightingFunctionPointerHash.html#addFeature CQPerl=CQPerl.html CQPerl=CQPerl.html CQPerl::mPackage=CQPerl.html#mPackage CQPerl::mPerlQueryProcessor=CQPerl.html#mPerlQueryProcessor CQPerl::qualifyFunctionName=CQPerl.html#qualifyFunctionName CQPerl::mPerl=CQPerl.html#mPerl CQPerl::callPerl=CQPerl.html#callPerl CQPerl::callConstruct=CQPerl.html#callConstruct CQPerl::CQPerl=CQPerl.html#CQPerl CQPerl::CQPerl=CQPerl.html#CQPerl CQPerl::~CQPerl=CQPerl.html#~CQPerl CQPerl::query=CQPerl.html#query CQPerl::fastQuery=CQPerl.html#fastQuery CQPerl::getRandomImages=CQPerl.html#getRandomImages CQPerl::getRandomIDs=CQPerl.html#getRandomIDs CQPerl::getAllIDs=CQPerl.html#getAllIDs CQPerl::getAllAccessorElements=CQPerl.html#getAllAccessorElements CQPerl::setAlgorithm=CQPerl.html#setAlgorithm CQPerl::init=CQPerl.html#init CXMLTriplet=CXMLTriplet.html CXMLTriplet=CXMLTriplet.html CXMLTriplet::mInstruction=CXMLTriplet.html#mInstruction CXMLTriplet::mName=CXMLTriplet.html#mName CXMLTriplet::mValue=CXMLTriplet.html#mValue CXMLTriplet::element=CXMLTriplet.html#element CXMLTriplet::up=CXMLTriplet.html#up CXMLTriplet::attribute=CXMLTriplet.html#attribute CXMLTriplet::text=CXMLTriplet.html#text CArraySelfDestroyPointer=CArraySelfDestroyPointer.html CArraySelfDestroyPointer=CArraySelfDestroyPointer.html CArraySelfDestroyPointer::mIsSelfDestroyer=CArraySelfDestroyPointer.html#mIsSelfDestroyer CArraySelfDestroyPointer::mPointer=CArraySelfDestroyPointer.html#mPointer CArraySelfDestroyPointer::resetWithoutDeleting=CArraySelfDestroyPointer.html#resetWithoutDeleting CArraySelfDestroyPointer::isSelfDestroyer=CArraySelfDestroyPointer.html#isSelfDestroyer CArraySelfDestroyPointer::setIsSelfDestroyer=CArraySelfDestroyPointer.html#setIsSelfDestroyer CArraySelfDestroyPointer::unsetIsSelfDestroyer=CArraySelfDestroyPointer.html#unsetIsSelfDestroyer CArraySelfDestroyPointer::operator==CArraySelfDestroyPointer.html#operator= CArraySelfDestroyPointer::operator*=CArraySelfDestroyPointer.html#operator* CArraySelfDestroyPointer::operator*=CArraySelfDestroyPointer.html#operator* CArraySelfDestroyPointer::->=CArraySelfDestroyPointer.html#-> CArraySelfDestroyPointer::->=CArraySelfDestroyPointer.html#-> CArraySelfDestroyPointer::~CArraySelfDestroyPointer=CArraySelfDestroyPointer.html#~CArraySelfDestroyPointer CArraySelfDestroyPointer::CArraySelfDestroyPointer=CArraySelfDestroyPointer.html#CArraySelfDestroyPointer CArraySelfDestroyPointer::CArraySelfDestroyPointer=CArraySelfDestroyPointer.html#CArraySelfDestroyPointer CArraySelfDestroyPointer::CArraySelfDestroyPointer=CArraySelfDestroyPointer.html#CArraySelfDestroyPointer CArraySelfDestroyPointer::bool=CArraySelfDestroyPointer.html#bool CArraySelfDestroyPointer::T*=CArraySelfDestroyPointer.html#T* CCommunicationHandler=CCommunicationHandler.html CCommunicationHandler=CCommunicationHandler.html CCommunicationHandler::mParser=CCommunicationHandler.html#mParser CCommunicationHandler::mSessionFile=CCommunicationHandler.html#mSessionFile CCommunicationHandler::mConfigFile=CCommunicationHandler.html#mConfigFile CCommunicationHandler::mSessionManager=CCommunicationHandler.html#mSessionManager CCommunicationHandler::mAlgorithmTree=CCommunicationHandler.html#mAlgorithmTree CCommunicationHandler::mQueryAtRandomCount=CCommunicationHandler.html#mQueryAtRandomCount CCommunicationHandler::mSocket=CCommunicationHandler.html#mSocket CCommunicationHandler::mLog=CCommunicationHandler.html#mLog CCommunicationHandler::setSocket=CCommunicationHandler.html#setSocket CCommunicationHandler::preamble=CCommunicationHandler.html#preamble CCommunicationHandler::frame=CCommunicationHandler.html#frame CCommunicationHandler::toAttribute=CCommunicationHandler.html#toAttribute CCommunicationHandler::toAttribute=CCommunicationHandler.html#toAttribute CCommunicationHandler::toAttribute=CCommunicationHandler.html#toAttribute CCommunicationHandler::sendError=CCommunicationHandler.html#sendError CCommunicationHandler::openSession=CCommunicationHandler.html#openSession CCommunicationHandler::renameSession=CCommunicationHandler.html#renameSession CCommunicationHandler::deleteSession=CCommunicationHandler.html#deleteSession CCommunicationHandler::getPropertySheet=CCommunicationHandler.html#getPropertySheet CCommunicationHandler::sendHandshake=CCommunicationHandler.html#sendHandshake CCommunicationHandler::getSessions=CCommunicationHandler.html#getSessions CCommunicationHandler::getCollections=CCommunicationHandler.html#getCollections CCommunicationHandler::getAlgorithms=CCommunicationHandler.html#getAlgorithms CCommunicationHandler::sendResult=CCommunicationHandler.html#sendResult CCommunicationHandler::sendRandomImages=CCommunicationHandler.html#sendRandomImages CCommunicationHandler::gQueryImages=CCommunicationHandler.html#gQueryImages CCommunicationHandler::mSessionID=CCommunicationHandler.html#mSessionID CCommunicationHandler::mResultSize=CCommunicationHandler.html#mResultSize CCommunicationHandler::mCutoff=CCommunicationHandler.html#mCutoff CCommunicationHandler::mCollection=CCommunicationHandler.html#mCollection CCommunicationHandler::mAlgorithm=CCommunicationHandler.html#mAlgorithm CCommunicationHandler::setResultSize=CCommunicationHandler.html#setResultSize CCommunicationHandler::setResultCutoff=CCommunicationHandler.html#setResultCutoff CCommunicationHandler::setResultCutoff=CCommunicationHandler.html#setResultCutoff CCommunicationHandler::setCollectionID=CCommunicationHandler.html#setCollectionID CCommunicationHandler::setAlgorithmID=CCommunicationHandler.html#setAlgorithmID CCommunicationHandler::startTreeBuilding=CCommunicationHandler.html#startTreeBuilding CCommunicationHandler::addToCurrentTree=CCommunicationHandler.html#addToCurrentTree CCommunicationHandler::moveUpCurrentTree=CCommunicationHandler.html#moveUpCurrentTree CCommunicationHandler::isBuildingTree=CCommunicationHandler.html#isBuildingTree CCommunicationHandler::parseString=CCommunicationHandler.html#parseString CCommunicationHandler::clearAlgorithmElement=CCommunicationHandler.html#clearAlgorithmElement CCommunicationHandler::startAlgorithmElement=CCommunicationHandler.html#startAlgorithmElement CCommunicationHandler::endAlgorithmElement=CCommunicationHandler.html#endAlgorithmElement CCommunicationHandler::initAlgorithmElement=CCommunicationHandler.html#initAlgorithmElement CCommunicationHandler::readAlgorithmElement=CCommunicationHandler.html#readAlgorithmElement CCommunicationHandler::endConfiguration=CCommunicationHandler.html#endConfiguration CCommunicationHandler::mParsingFinished=CCommunicationHandler.html#mParsingFinished CCommunicationHandler::clearParsingFinished=CCommunicationHandler.html#clearParsingFinished CCommunicationHandler::setParsingFinished=CCommunicationHandler.html#setParsingFinished CCommunicationHandler::isParsingFinished=CCommunicationHandler.html#isParsingFinished CCommunicationHandler::readAndParse=CCommunicationHandler.html#readAndParse CCommunicationHandler::makeParser=CCommunicationHandler.html#makeParser CCommunicationHandler::startMultiRequest=CCommunicationHandler.html#startMultiRequest CCommunicationHandler::endMultiRequest=CCommunicationHandler.html#endMultiRequest CCommunicationHandler::addToMultiResponse=CCommunicationHandler.html#addToMultiResponse CCommunicationHandler::getSessionManager=CCommunicationHandler.html#getSessionManager CCommunicationHandler::incrementQueryAtRandomCount=CCommunicationHandler.html#incrementQueryAtRandomCount CCommunicationHandler::getQueryAtRandomCount=CCommunicationHandler.html#getQueryAtRandomCount CCommunicationHandler::CCommunicationHandler=CCommunicationHandler.html#CCommunicationHandler CCommunicationHandler::~CCommunicationHandler=CCommunicationHandler.html#~CCommunicationHandler CSelfDestroyPointer=CSelfDestroyPointer.html CSelfDestroyPointer=CSelfDestroyPointer.html CSelfDestroyPointer::mIsSelfDestroyer=CSelfDestroyPointer.html#mIsSelfDestroyer CSelfDestroyPointer::mPointer=CSelfDestroyPointer.html#mPointer CSelfDestroyPointer::resetWithoutDeleting=CSelfDestroyPointer.html#resetWithoutDeleting CSelfDestroyPointer::isSelfDestroyer=CSelfDestroyPointer.html#isSelfDestroyer CSelfDestroyPointer::setIsSelfDestroyer=CSelfDestroyPointer.html#setIsSelfDestroyer CSelfDestroyPointer::unsetIsSelfDestroyer=CSelfDestroyPointer.html#unsetIsSelfDestroyer CSelfDestroyPointer::operator==CSelfDestroyPointer.html#operator= CSelfDestroyPointer::operator*=CSelfDestroyPointer.html#operator* CSelfDestroyPointer::operator*=CSelfDestroyPointer.html#operator* CSelfDestroyPointer::->=CSelfDestroyPointer.html#-> CSelfDestroyPointer::->=CSelfDestroyPointer.html#-> CSelfDestroyPointer::~CSelfDestroyPointer=CSelfDestroyPointer.html#~CSelfDestroyPointer CSelfDestroyPointer::CSelfDestroyPointer=CSelfDestroyPointer.html#CSelfDestroyPointer CSelfDestroyPointer::CSelfDestroyPointer=CSelfDestroyPointer.html#CSelfDestroyPointer CSelfDestroyPointer::CSelfDestroyPointer=CSelfDestroyPointer.html#CSelfDestroyPointer CSelfDestroyPointer::bool=CSelfDestroyPointer.html#bool CSelfDestroyPointer::T*=CSelfDestroyPointer.html#T* CSelfClonePointer=CSelfClonePointer.html CSelfClonePointer=CSelfClonePointer.html CSelfClonePointer::mIsSelfCloner=CSelfClonePointer.html#mIsSelfCloner CSelfClonePointer::CSelfClonePointer=CSelfClonePointer.html#CSelfClonePointer CSelfClonePointer::operator==CSelfClonePointer.html#operator= CSelfClonePointer::operator==CSelfClonePointer.html#operator= CSelfClonePointer::CSelfClonePointer=CSelfClonePointer.html#CSelfClonePointer CSelfClonePointer::CSelfClonePointer=CSelfClonePointer.html#CSelfClonePointer CSelfClonePointer::bool=CSelfClonePointer.html#bool CSelfClonePointer::T*=CSelfClonePointer.html#T* gift-0.1.14/libGIFTAcDistanceMatrix/include/CPersistentTranslatedIndexMatrix.h0000644000175200001440000001614510220502727024233 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _CPERSISTENTTRANSLATEDINDEXMATRIX #define _CPERSISTENTTRANSLATEDINDEXMATRIX #include "libGIFTAcDistanceMatrix/include/uses-declarations.h" #include "assert.h" #include #include #include #include "libMRML/include/GIFTExceptions.h" #include "libGIFTAcDistanceMatrix/include/CPersistentMatrix.h" ///#include "CIDToMatrixIndex.h" //defining this activates printouts in this file #undef CPTIM_DEBUG #define HERE __FILE__ << ":" << __LINE__ << ":" template class CPersistentTranslatedIndexMatrix{ public: /// typedef map CIDContentPairList; /// typedef vector CIndexList; protected: /// typedef vector CLineVector; ///FIXME: taking a map here is a performance flaw typedef map CTranslator; /// typedef CPersistentMatrix CMatrix; /// CTranslator mTranslator; /// CMatrix* mContent; public: /// CPersistentTranslatedIndexMatrix(); /// bool create(const char* inFileName, const CIndexList& inIndexList); /// bool open(const char* inFileName); /// bool putLineVector(const TTID& inID, const CLineVector& inVector)const; /// bool getLineVector(const TTID& inID, CLineVector& outVector)const; /// bool putLineVector(const TTID& inID, const CIDContentPairList& inList)const; /// bool getLineVector(const TTID& inI, CIDContentPairList& outList)const; /// bool setValue(const TTID& inX, const TTID& inX, const TTContent& inValue)const; /// operator bool()const; /// long size()const; }; /// template CPersistentTranslatedIndexMatrix ::CPersistentTranslatedIndexMatrix(): mContent(0) { }; /// template bool CPersistentTranslatedIndexMatrix ::create(const char* inFileName, const CIndexList& inIndexList){ CIndexList lIndexList(inIndexList); sort(lIndexList.begin(),lIndexList.end()); long lCount=0; for(typename CIndexList::const_iterator i=lIndexList.begin(); i!=lIndexList.end(); i++,lCount++){ mTranslator.insert(make_pair(*i,lCount)); } mContent=new CMatrix(lCount,lCount); if(mContent){ string lStreamName=string(inFileName)+string(".trans"); ofstream lStream(lStreamName.c_str()); if(lStream){ for(typename CTranslator::const_iterator i=mTranslator.begin(); i!=mTranslator.end(); i++){ lStream << i->first << " " << i->second << endl; } } return lStream && mContent->create(inFileName) ; } return false; }; /// template bool CPersistentTranslatedIndexMatrix ::open(const char* inFileName){ long lCount=0; delete mContent; mTranslator.clear(); string lStreamName=string(inFileName)+string(".trans"); ifstream lStream(lStreamName.c_str()); if(lStream){ cout << HERE << "Opened translator stream" << endl; }else{ cout << HERE << "FAILED" << endl; assert(0); } //reading pairs: left side is ID-element in ascii //right side is index in vector if(lStream){ while(lStream){ TTID lFirst; long lSecond; lStream >> lFirst >> lSecond; mTranslator.insert(make_pair(lFirst,lSecond)); } } cout << HERE << "After reading translator: " << this->size() << " elements in translator" << endl; mContent=new CMatrix(size(), size()); mContent->open(inFileName); assert(mContent->operator bool()); cout << HERE << "OPEN3" << endl; return lStream && mContent->operator bool(); } /// template bool CPersistentTranslatedIndexMatrix ::getLineVector(const TTID& inID, CLineVector& outVector)const{ assert(mContent); #ifdef CPTIM_DEBUG cout << "(" << inID << ")" << endl; #endif if(mTranslator.find(inID)!=mTranslator.end()){ long lLocalLine=mTranslator.find(inID)->second; #ifdef CPTIM_DEBUG cout << "getting Line: " << lLocalLine << endl; #endif return mContent->getLineVector(lLocalLine,outVector); }else{ cout <<"<first << "," << i->second << endl; } cout << "dumping>>"< bool CPersistentTranslatedIndexMatrix ::getLineVector(const TTID& inI, CIDContentPairList& outList)const{ assert(mContent); CLineVector lVector(size()); bool lReturnValue=getLineVector(inI, lVector); outList.clear(); try{ for(typename CTranslator::const_iterator i=mTranslator.begin(); i!=mTranslator.end(); i++){ outList.insert(make_pair(i->first, lVector[i->second])); } }catch(...){ return false; } return lReturnValue; }; /// template bool CPersistentTranslatedIndexMatrix ::putLineVector(const TTID& inID, const CLineVector& inVector)const{ if(mTranslator.find(inID)!=mTranslator.end()){ long lLine=mTranslator.find(inID)->second; return mContent->putLineVector(lLine,inVector); }else{ assert(!"There is no ID of this kind"); } return 0; }; /// template bool CPersistentTranslatedIndexMatrix ::putLineVector(const TTID& inID, const CIDContentPairList& inList)const{ CLineVector lVector(size()); bool lReturnValue=getLineVector(inID, lVector); cout << "inID" << inID << endl; assert(lReturnValue); for(typename CIDContentPairList::const_iterator i=inList.begin(); i!=inList.end(); i++){ typename CTranslator::const_iterator lXPosition=mTranslator.find(i->first); if(lXPosition!=mTranslator.end()){ lVector[lXPosition->second]=i->second; } } return lReturnValue && putLineVector(inID, lVector); }; /// template long CPersistentTranslatedIndexMatrix ::size()const{ return mTranslator.size(); } /// template CPersistentTranslatedIndexMatrix::operator bool()const{ return mContent && bool(*mContent); } #endif gift-0.1.14/libGIFTAcDistanceMatrix/include/CDrawer.h0000644000175200001440000000373710220502727017123 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _CDRAWER #define _CDRAWER #include "libGIFTAcDistanceMatrix/include/uses-declarations.h" #include #include #include /*************************************** * * CDrawer * a function for drawing from a CPSet * **************************************** * * modification history: * * WM 19990820 created file * **************************************** * * compiler defines used: * * ****************************************/ class CDrawer:public unary_function{ protected: int mNumberOfImages; public: /// virtual double operator()(double)const=0; /// virtual CDrawer* subClone()const=0; /// void setNumberOfImages(const int& inNumberOfImages); /// int getNumberOfImages()const; /// CDrawer* clone()const; }; class CDUniform:public CDrawer { public: virtual double operator()(double)const; virtual CDrawer* subClone()const; }; class CDPreferMiddle:public CDrawer { public: virtual double operator()(double)const; virtual CDrawer* subClone()const; }; #endif gift-0.1.14/libGIFTAcDistanceMatrix/include/Makefile.am0000644000175200001440000000060010153634154017446 00000000000000DistanceMatrixdir=$(includedir)/libGIFTAcDistanceMatrix/include DistanceMatrix_HEADERS= CAFDistanceMatrix.h CPersistentMatrix.h \ CAFDistanceMatrix.h.kdoc CPersistentTranslatedIndexMatrix.h \ CAcDistanceMatrix.h CPersistentVector.h \ CDistanceCalculator.h CProbabilityCombiner.h \ CDrawer.h CSquasher.h \ CIDToMatrixIndex.h \ CInformationCalculator.h uses-declarations.h gift-0.1.14/libGIFTAcDistanceMatrix/include/Makefile.in0000644000175200001440000003060010220474074017460 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = libGIFTAcDistanceMatrix/include DIST_COMMON = $(DistanceMatrix_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__installdirs = "$(DESTDIR)$(DistanceMatrixdir)" DistanceMatrixHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(DistanceMatrix_HEADERS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ DistanceMatrixdir = $(includedir)/libGIFTAcDistanceMatrix/include DistanceMatrix_HEADERS = CAFDistanceMatrix.h CPersistentMatrix.h \ CAFDistanceMatrix.h.kdoc CPersistentTranslatedIndexMatrix.h \ CAcDistanceMatrix.h CPersistentVector.h \ CDistanceCalculator.h CProbabilityCombiner.h \ CDrawer.h CSquasher.h \ CIDToMatrixIndex.h \ CInformationCalculator.h uses-declarations.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(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 libGIFTAcDistanceMatrix/include/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTAcDistanceMatrix/include/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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-DistanceMatrixHEADERS: $(DistanceMatrix_HEADERS) @$(NORMAL_INSTALL) test -z "$(DistanceMatrixdir)" || $(mkdir_p) "$(DESTDIR)$(DistanceMatrixdir)" @list='$(DistanceMatrix_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(DistanceMatrixHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(DistanceMatrixdir)/$$f'"; \ $(DistanceMatrixHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(DistanceMatrixdir)/$$f"; \ done uninstall-DistanceMatrixHEADERS: @$(NORMAL_UNINSTALL) @list='$(DistanceMatrix_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f '$(DESTDIR)$(DistanceMatrixdir)/$$f'"; \ rm -f "$(DESTDIR)$(DistanceMatrixdir)/$$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 $(HEADERS) installdirs: for dir in "$(DESTDIR)$(DistanceMatrixdir)"; 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: -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 \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-DistanceMatrixHEADERS 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-DistanceMatrixHEADERS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-DistanceMatrixHEADERS \ 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 \ tags uninstall uninstall-DistanceMatrixHEADERS 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: gift-0.1.14/libGIFTAcDistanceMatrix/include/CInformationCalculator.h0000644000175200001440000000550410220502727022170 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _CINFORMATIONCALCULATOR #define _CINFORMATIONCALCULATOR #include "libGIFTAcDistanceMatrix/include/uses-declarations.h" #include #include class CInformationCalculator:public unary_function{ public: ///really applying this function virtual double operator()(double)const=0; /// virtual void startFirstPass(); /// virtual bool isOnePass()const; /// virtual void adjustInnerState(double); ///Cloning CInformationCalculator* clone()const; /// virtual CInformationCalculator* subClone()const=0; }; // class CICEntropy:public CInformationCalculator{ public: /// virtual double operator()(double)const; /// virtual CInformationCalculator* subClone()const; }; // class CICEntropyWithThreshold:public CInformationCalculator{ /// double mMaximum; /// double mThreshold; public: /// CICEntropyWithThreshold(double inThreshold=1.0); /// CICEntropyWithThreshold(const CICEntropyWithThreshold& in); /// void setThreshold(double inThreshold); /// virtual bool isOnePass()const; /// virtual void startFirstPass(); /// virtual void adjustInnerState(double); /// virtual double operator()(double)const; /// virtual CInformationCalculator* subClone()const; }; // class CICERelative:public CInformationCalculator{ /// double mSum; /// double mThreshold; public: /// CICERelative(double inThreshold=1.0); /// CICERelative(const CICERelative& in); /// void setThreshold(double inThreshold); /// virtual bool isOnePass()const; /// virtual void startFirstPass(); /// virtual void adjustInnerState(double); /// virtual double operator()(double)const; /// virtual CInformationCalculator* subClone()const; }; class CICSum:public CInformationCalculator{ public: virtual double operator()(double)const; virtual CInformationCalculator* subClone()const; }; #endif gift-0.1.14/libGIFTAcDistanceMatrix/include/CIDToMatrixIndex.h0000644000175200001440000000323010220502727020637 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _CIDTOMATRIXINDEX #define _CIDTOMATRIXINDEX #include "libGIFTAcDistanceMatrix/include/uses-declarations.h" class CIDToMatrixIndex{ /// map mContent; public: /// CIDToMatrixIndex(); /// void addID(const T& inID); /// long size()const; /// long operator[](const T& inID)const; }; template CIDToMatrixIndex::CIDToMatrixIndex(){ } template long CIDToMatrixIndex::size()const{ return mContent.size(); } template void CIDToMatrixIndex::addElement(T const& inID){ long lCurrentSize =size(); mContent[inID] =lCurrentSize; } template long CIDToMatrixIndex::operator[](const T& inID)const{ return *mContent.find(inID); }; #endif gift-0.1.14/libGIFTAcDistanceMatrix/include/CAcDistanceMatrix.h0000644000175200001440000000431010220502727021046 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /** * * * * * * modification history: * * WM 211099 filled documentation templates * answered some comments that were questions * WM 0599 file created * * @author Wolfgang Mueller * * compiler defines used: * * */ #ifndef _CDISTANCEMATRIXACCESSOR #define _CDISTANCEMATRIXACCESSOR #include "libGIFTAcDistanceMatrix/include/uses-declarations.h" #include #include "libMRML/include/TID.h" #include "libGIFTAcURL2FTS/include/CAcURL2FTS.h" #include #include #include //#include class CXMLElement; #include "libGIFTAcDistanceMatrix/include/CDistanceCalculator.h" /** In addition to basic CAccessor functionality, this accessor permits the lookup of distances between elements in the database. The table for this lookup the Distance Matrix has to have been calculated in advance, using a series of QBE queries */ class CAcDistanceMatrix:public CAcURL2FTS, public CDistanceCalculator{ protected: /** */ CContent mContent; public: /** * * Is this accessor up and running? * */ bool operator()()const; /** * * The construction * */ CAcDistanceMatrix(const CXMLElement& inCollectionElement); /** * * Destructor * */ ~CAcDistanceMatrix(); }; #endif gift-0.1.14/libGIFTAcDistanceMatrix/include/uses-declarations.h0000644000175200001440000000246310220502727021214 00000000000000/* -*- mode: c++ -*- Path: ./libGIFTAcDistanceMatrix/include/uses-declarations.h */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /* Author: Wolfgang Müller (via perl script) use namespace definitions for libGIFTAcDistanceMatrix. to be included into all include files of this library */ #ifndef _LIBGIFTACDISTANCEMATRIX_USES_DECLARATIONS_ #define _LIBGIFTACDISTANCEMATRIX_USES_DECLARATIONS_ using namespace std; #endif gift-0.1.14/libGIFTAcDistanceMatrix/include/CAFDistanceMatrix.h0000644000175200001440000000271110220502727021014 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CAFDISTANCEMATRIX #define _CAFDISTANCEMATRIX #include "libGIFTAcDistanceMatrix/include/uses-declarations.h" #include "libMRML/include/CAccessorFactory.h" /** * A factory to make DistanceMatrix accessors *@Author Wolfgang Müller * */ class CAFDistanceMatrix:public CAccessorFactory{ public: /** Constructs this, i.e., sets mName */ CAFDistanceMatrix(); /** makes an inverte file accessor */ CAccessor* makeAccessor(const CXMLElement& inConfiguration)const; }; #endif gift-0.1.14/libGIFTAcDistanceMatrix/include/CPersistentVector.h0000644000175200001440000000571610220502727021221 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _CPERSISTENTVECTOR #define _CPERSISTENTVECTOR #include "libGIFTAcDistanceMatrix/include/uses-declarations.h" #include #include #include #include #include template void binary_writer(ostream& outStream, const T& inToBeWritten){ outStream.write(&inToBeWritten, sizeof(inToBeWritten)); } template void binary_reader(istream& inStream, T& inToBeRead){ inStream.read((char*)&inToBeRead, sizeof(inToBeRead)); } /// template class CPersistentVector:public vector{ /// long mLength; public: /// CPersistentVector(long inLength); /// bool read(istream& inStream); /// bool read(istream& inStream, long inNumRecords); /// bool write(ostream& outStream)const; /// void init(T const& inDefaultValue); }; template CPersistentVector::CPersistentVector(long inLength): mLength(inLength), vector(inLength) { } template void CPersistentVector::init(T const& inDefaultValue){ #ifdef V295 constant_void_fun f(inDefaultValue); this->clear(); this->reserve(mLength); for(long i=0; iclear(); this->resize(mLength); fill(this->begin(),this->end(),inDefaultValue); #endif } template bool CPersistentVector::read(istream& inStream){ return read(inStream, mLength); } template bool CPersistentVector::read(istream& inStream, long inLength){ this->reserve(inLength); this->clear(); for(long i=0; i=0 && lToBeRead<=1); push_back(lToBeRead); } mLength=inLength; return inStream; } template bool CPersistentVector::write(ostream& outStream)const{ for(typename CPersistentVector::const_iterator i=this->begin(); i!=this->end(); i++){ binary_writer(outStream, *i); } outStream << flush; return outStream; } #endif gift-0.1.14/libGIFTAcDistanceMatrix/include/CProbabilityCombiner.h0000644000175200001440000000434610220502727021633 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _CPROBABILITYCOMBINER #define _CPROBABILITYCOMBINER #include "libGIFTAcDistanceMatrix/include/uses-declarations.h" #include #include class CProbabilityCombiner:public binary_function{ double mBelief; int mNumberOfElements; public: CProbabilityCombiner(); virtual void setBelief(double inBelief=1); virtual void setNumberOfElements(int inNumberOfElements=1); virtual double perform(double, double)const=0; virtual double operator()(double, double)const; virtual CProbabilityCombiner* clone()const;// virtual is new as of 20010306 virtual CProbabilityCombiner* subClone()const=0; }; class CPCMaximum:public CProbabilityCombiner{ public: virtual double perform(double,double)const; virtual CProbabilityCombiner* subClone()const; }; class CPCMinimum:public CProbabilityCombiner{ public: virtual double perform(double,double)const; virtual CProbabilityCombiner* subClone()const; }; class CPCProduct:public CProbabilityCombiner{ public: virtual double perform(double,double)const; virtual CProbabilityCombiner* subClone()const; }; class CPCDiscrete:public CProbabilityCombiner{ double lThreshold; public: virtual double perform(double,double)const; virtual CProbabilityCombiner* subClone()const; }; #endif gift-0.1.14/libGIFTAcDistanceMatrix/include/CPersistentMatrix.h0000644000175200001440000001206510220502727021216 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _CPERSISTENTMATRIX #define _CPERSISTENTMATRIX #include "libGIFTAcDistanceMatrix/include/uses-declarations.h" #include "libGIFTAcDistanceMatrix/include/CPersistentVector.h" #define CPM_debug template class CPersistentMatrix{ ///This is for the users of CPersistentMatrix typedef vector CLineVector; typedef CPersistentVector CPersistentLineVector; long mXSize; long mYSize; mutable fstream* mContent; public: CPersistentMatrix(long inXSize, long inYSize); bool open(char const* inFileName); bool create(char const* inFileName)const; bool getLineVector(long inY, CPersistentLineVector& outVector)const; bool getLineVector(long inY, CLineVector& outVector)const; bool putLineVector(long inY, CPersistentLineVector const& outVector); bool putLineVector(long inY, CLineVector const& outVector); bool setValue(long inX, long inY, T const& inValue); operator bool()const; }; template CPersistentMatrix::CPersistentMatrix(long inXSize, long inYSize): mXSize(inXSize), mYSize(inYSize){ } template bool CPersistentMatrix::create(char const* inFileName)const{ fstream* lFile=new fstream(inFileName,fstream::out+fstream::in); CPersistentVector lLine(mXSize); if(lFile){ for(long i=0; (i bool CPersistentMatrix::open(char const* inFileName){ mContent=new fstream(inFileName, fstream::in | fstream::out); if(mContent && *mContent){ cout << "PersistentMatrix: Opened File " << inFileName << endl << flush; }else{ cout << "PersistentMatrix: FAILED TO OPEN FILE " << inFileName << endl << flush; throw VENotFound(string(string("CPersistentMatrix open") +inFileName) .c_str()); } return(mContent && *mContent); } template bool CPersistentMatrix::getLineVector(long inY, CPersistentLineVector& outVector)const{ #ifdef CPM_debug cout << "getLineVector"<seekg(inY * mXSize * sizeof(T)); bool lReturnValue = outVector.read(*mContent); lReturnValue = lReturnValue && (*mContent); assert(*mContent); assert(lReturnValue); #ifdef CPM_debug cout << "returning" << flush; #endif return lReturnValue; } template bool CPersistentMatrix::getLineVector(long inY, CLineVector& outVector)const{ assert(mContent); #ifdef CPM_debug cout << "getLineVector"< bool CPersistentMatrix::putLineVector(long inY, CPersistentLineVector const& inVector){ if(!mContent) return false; // cout << "Posish: " << inY * mXSize << "," << sizeof(T) << endl; mContent->seekp(inY * mXSize * sizeof(T)); bool lReturnValue = inVector.write(*mContent); lReturnValue = lReturnValue && (*mContent); return lReturnValue; } ///FIXME: performance flaw. use vector swap for speed template bool CPersistentMatrix::putLineVector(long inY, CLineVector const& inVector){ CPersistentLineVector lVector(mXSize); typename CPersistentLineVector::iterator i=lVector.begin(); typename CLineVector::const_iterator j=inVector.begin(); while(i!=lVector.end() && j!=inVector.end()){ *i++=*j++; } return putLineVector(inY, lVector); } template bool CPersistentMatrix::setValue(long inX, long inY, T const& inValue){ if(!mContent) return false; mContent->seekp((inY * mXSize + inX) * sizeof(T) ); mContent->write(&inValue,sizeof(inValue)); mContent->flush(); return (*mContent); } /// template CPersistentMatrix::operator bool()const{ return mContent && bool(*mContent); } #endif gift-0.1.14/libGIFTQuInvertedFile/0000777000175200001440000000000010220511627013554 500000000000000gift-0.1.14/libGIFTQuInvertedFile/cc/0000777000175200001440000000000010220511627014141 500000000000000gift-0.1.14/libGIFTQuInvertedFile/cc/CWeightingFunction.cc0000644000175200001440000001731210220502727020127 00000000000000/************************************************** * Class WeightingFunction * * *************************************************** * * Compiler Defines * *************************************************** * * Modification History * * HM 990108 Put in the documentation * * $Header: * $Log: ***************************************************/ #include #include "libGIFTQuInvertedFile/include/CWeightingFunction.h" #include "iostream.h" #include "FeatureExtraction/gift_features.h" #include #include /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ CWeightingFunction::CWeightingFunction(const CAcInvertedFile* inAccessor, CQueryNormalizer* inQueryNormalizer, CQueryNormalizer* inThisNormalizer): mAccessor(inAccessor), mQueryNormalizer(inQueryNormalizer), mThisNormalizer(inThisNormalizer), mID(0), mPositiveTermFrequency(0), mNegativeTermFrequency(0), mPositiveRelevanceSum(0), mNegativeRelevanceSum(0) { //empty }; /** This virtual destructor is here inorder to call the (inherited) default constructors */ CWeightingFunction::~CWeightingFunction(){ //intentionally empty }; /*************************************** * * getQueryFactor * **************************************** * * modification history * * * ****************************************/ /// double CWeightingFunction::getQueryFactor()const{ return mQueryFactor; }; /*************************************** * * preCalculate * **************************************** * * modification history * * * ****************************************/ /// void CWeightingFunction::preCalculate(){ mQueryFactor=getTermFrequency(); }; /* sets the two normalizing functions directly */ /*************************************** * * setNormalizers * **************************************** * * modification history * * * ****************************************/ void CWeightingFunction::setNormalizers(CQueryNormalizer* inQueryNormalizer, CQueryNormalizer* inThisNormalizer) { mQueryNormalizer=inQueryNormalizer; mThisNormalizer=inThisNormalizer; } /* sets the sccessor directly */ /*************************************** * * setAccessor * **************************************** * * modification history * * * ****************************************/ void CWeightingFunction::setAccessor(const CAcInvertedFile* inAccessor) { mAccessor=inAccessor; } /*************************************** * * setID * **************************************** * * modification history * * * ****************************************/ void CWeightingFunction::setID(TID inID) { //Setting the feature ID amounts to an initialization: //in fact this is the first point, where everything //necessary gets known. (in the general case) mID=inID; if(mAccessor){ mPositiveTermFrequency=0; mNegativeTermFrequency=0; // the following line is needed, because we treat histogram // features differently from block features. mFeatureDescription= mAccessor->getFeatureDescription(mID); } } /// gets the ID of the feature from the weighting function */ /*************************************** * * getID * **************************************** * * modification history * * * ****************************************/ TID CWeightingFunction::getID()const{ return mID; }; /*************************************** * * setRelevanceSum * **************************************** * * modification history * * * ****************************************/ void CWeightingFunction::setRelevanceSum(double inPositiveRelevanceSum, double inNegativeRelevanceSum){ mPositiveRelevanceSum = inPositiveRelevanceSum; mNegativeRelevanceSum = inNegativeRelevanceSum; }; /*************************************** * * addQueryFeature * **************************************** * * modification history * * * ****************************************/ /// void CWeightingFunction::addQueryFeature(double inRelevanceLevel, const CDocumentFrequencyElement& inQueryFeature){ // adjustRelevanceSum(inRelevanceLevel); DELETED WM if(inRelevanceLevel>0){ mPositiveTermFrequency+= (inRelevanceLevel)* inQueryFeature.getDocumentFrequency(); }else{ mNegativeTermFrequency+= inRelevanceLevel* inQueryFeature.getDocumentFrequency(); } }; /*************************************** * * getTermFrequency * **************************************** * * modification history * * * ****************************************/ /* returns the term frequency divided by the relevance sum */ double CWeightingFunction::getTermFrequency()const{ double lReturnValue(0); if(mPositiveRelevanceSum){ lReturnValue += mPositiveTermFrequency/mPositiveRelevanceSum; } if(mNegativeRelevanceSum){ // both of these numbers are negative, which would become a positve number, // and we have to subtract it lReturnValue -= 0.5 * fabs(mNegativeTermFrequency)/fabs(mNegativeRelevanceSum); } return lReturnValue; } /*************************************** * * subApply * **************************************** * * modification history * * * ****************************************/ ///Giving a weight and doing histogram intersection double CWeightingFunction::subApply(const double inDocumentFrequency, const double inNormalizingFactor)const{ /* normalizinmg factor is not used ??? */ //This function is to be called by almost every //Weigting function. //It does additional weighting based on the kind of the feature. double lRetVal=0; #ifdef PRINT cout << "CWF-sA" <getValue()); }; /*************************************** * * constructNew * **************************************** * * modification history * * * ****************************************/ ///Giving a weight CWeightingFunction* CWeightingFunction::constructNew(TID inID)const { CWeightingFunction* lRetVal=clone(); lRetVal->setID(inID); return lRetVal; }; /*************************************** * * clone * **************************************** * * modification history * * * ****************************************/ ///Giving a weight CWeightingFunction* CWeightingFunction::clone()const { CWeightingFunction* lRetVal=new CWeightingFunction(mAccessor, mQueryNormalizer, mThisNormalizer); return lRetVal; }; /*************************************** * * < * **************************************** * * modification history * * * ****************************************/ bool operator<(const CWeightingFunction& l, const CWeightingFunction& t){ return l.getID() < t.getID(); } gift-0.1.14/libGIFTQuInvertedFile/cc/CWFClassicalIDF.cc0000644000175200001440000000641310220502727017152 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CWFClassicalIDF * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #include "libGIFTQuInvertedFile/include/CWFClassicalIDF.h" #include "FeatureExtraction/gift_features.h" #include /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ CWFClassicalIDF:: CWFClassicalIDF(const CAcInvertedFile* inAccessor, CQueryNormalizer* inQueryNormalizer, CQueryNormalizer* inThisNormalizer): CWeightingFunction(inAccessor, inQueryNormalizer, inThisNormalizer) { } /*************************************** * * preCalculate * **************************************** * * modification history * * * ****************************************/ void CWFClassicalIDF::preCalculate(){ CWeightingFunction::preCalculate(); mQueryFactor= mQueryFactor * log(mAccessor->FeatureToCollectionFrequency(mID)) * log(mAccessor->FeatureToCollectionFrequency(mID)); } /*************************************** * * subApply * **************************************** * * modification history * * * ****************************************/ double CWFClassicalIDF::subApply(const double inDocumentFrequency, const double inNormalizingFactor)const{ #ifdef PRINT cout << "WFClassic" << endl; #endif TID lFeatureID=mID; /* to test the behaviour before the code optimization */ /* double lQueryFactor=log(mAccessor->FeatureToCollectionFrequency(mID))* log(mAccessor->FeatureToCollectionFrequency(mID));*/ if((mFeatureDescription==COL_HST) || (mFeatureDescription==GABOR_HST)) return CWeightingFunction::subApply(inDocumentFrequency, inNormalizingFactor); else return mQueryFactor; } /*************************************** * * clone * **************************************** * * modification history * * * ****************************************/ /// CWeightingFunction* CWFClassicalIDF::clone()const{ CWeightingFunction* lRetVal=new CWFClassicalIDF(mAccessor, mQueryNormalizer, mThisNormalizer); return lRetVal; }; gift-0.1.14/libGIFTQuInvertedFile/cc/CScoreBoard.cc0000644000175200001440000001375010220502727016521 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CScoreBoard - administrates the Scoreboard of the images * **************************************** * * modification history: * * WM 000125 changed things such, that this class * is able to live without * knowing the CAccessor * results in heavy changes of all functions * probable errors in sorting for scoreboard pruning * HM 090399 created the documentation * HM 990121 corrected the limit function * HM 990120 added new functions * HM 990119 changed the output of the scoreboard * **************************************** * * compiler defines used: * * ****************************************/ #include "libGIFTQuInvertedFile/include/CScoreBoard.h" #include "libGIFTQuInvertedFile/include/CWeightingFunction.h" #include "libGIFTAcInvertedFile/include/CAcInvertedFile.h" #include "libMRML/include/CRelevanceLevelList.h" #include "libMRML/include/CIDRelevanceLevelPairList.h" #include /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ CScoreBoard::CScoreBoard(){ mIgnoreNewValues=false; } /*************************************** * * () * **************************************** * * modification history * * * ****************************************/ void CScoreBoard::operator()(const CWeightingFunction& inWF, const CDocumentFrequencyElement& inDFE){ double lAdjustValue=inWF.apply(inDFE); //value > 0? //if(lAdjustValue!=0) { // has this document already scored? if(find(inDFE.getID())!=end()){ //yes -> adjust the score (*this)[inDFE.getID()] += lAdjustValue; }else{ //no -> create a new scoreboard entry if not blocked if (mIgnoreNewValues==false) { insert(make_pair (inDFE.getID(), lAdjustValue)); } } } } /*************************************** * * output - prints out the results of the scoreboard sorted by relevance level * **************************************** * * modification history * * * ****************************************/ void CScoreBoard::output(ostream& outStream,const CAccessor& inAccessor)const{ CRelevanceLevelList lRelevanceLevelList; string helpString; for(const_iterator i=begin(); i!=end(); i++) { lRelevanceLevelList.push_back(CRelevanceLevel(inAccessor.IDToURL(i->first),i->second)); } lRelevanceLevelList.sort(); lRelevanceLevelList.reverse(); int lCount=0; for(CRelevanceLevelList::const_iterator i=lRelevanceLevelList.begin(); i!=lRelevanceLevelList.end() && lCount<100; i++, lCount++){ helpString=(*i).getURL().substr(43,4)+";"; outStream << helpString; outStream << (*i).getRelevanceLevel(); outStream << ";"; } } /*************************************** * * setIgnore - makes new entries into the scoreboard impossible * **************************************** * * modification history * * * ****************************************/ /* sets the variable to avoid adding new images to the Scoreboard */ void CScoreBoard::setIgnore() { mIgnoreNewValues=true; } /*************************************** * * releaseIgnore - makes new entries into the scoreboard possible again * **************************************** * * modification history * * * ****************************************/ /* allows the adding of new members to the scoreboard again */ void CScoreBoard::releaseIgnore() { mIgnoreNewValues=false; } /*************************************** * * CSortByRelevanceLevel - needed for the sorting of the scoreboard by relevance level * **************************************** * * modification history * * * ****************************************/ typedef pair CTIDToRelevanceLevelPair; class CSortByRelevanceLevel: public binary_function{ public: inline bool operator()(CTIDToRelevanceLevelPair& l, CTIDToRelevanceLevelPair& t){ return l.second.getRelevanceLevel()first, i->second)); } /* sorting the list */ lRelevanceLevelList.sort();//by relevance level (implied); lRelevanceLevelList.reverse(); clear(); int lCount=0; for(CIDRelevanceLevelPairList::const_iterator i=lRelevanceLevelList.begin(); i!=lRelevanceLevelList.end() && lCountgetID(), i->getRelevanceLevel())); } } gift-0.1.14/libGIFTQuInvertedFile/cc/CQNNoNormalization.cc0000644000175200001440000000503310220502727020053 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CQNNoNormalization * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #include "libGIFTQuInvertedFile/include/CQNNoNormalization.h" #include "libMRML/include/my_diagnose.h" /*************************************** * * CQNNoNormalization * **************************************** * * modification history * * * ****************************************/ /// CQNNoNormalization::CQNNoNormalization(const CAcInvertedFile* inAccessor): CQueryNormalizer(inAccessor) { }; /*************************************** * * getValue * **************************************** * * modification history * * * ****************************************/ double CQNNoNormalization::getValue()const{ return 1; } /*************************************** * * considerQueryFeature * **************************************** * * modification history * * * ****************************************/ void CQNNoNormalization::considerQueryFeature(const CWeightingFunction& inFeature){ // deliberately left empty }; /*************************************** * * clone: This permits us to store * completely preconfiguered normalizers * and use them when needed * **************************************** * * modification history * * * ****************************************/ CQueryNormalizer* CQNNoNormalization::clone()const{ my_diagnose("in clone"); return new CQNNoNormalization(*this); } gift-0.1.14/libGIFTQuInvertedFile/cc/CWFProbability.cc0000644000175200001440000000476410220502727017220 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CWFProbability * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #include "libGIFTQuInvertedFile/include/CWFProbability.h" #include #include "FeatureExtraction/gift_features.h" /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ CWFProbability:: CWFProbability(const CAcInvertedFile* inAccessor, CQueryNormalizer* inQueryNormalizer, CQueryNormalizer* inThisNormalizer): CWeightingFunction(inAccessor, inQueryNormalizer, inThisNormalizer) { } /*************************************** * * subApply * **************************************** * * modification history * * * ****************************************/ double CWFProbability::subApply(const double inDocumentFrequency, const double inNormalizationFactor)const{ #ifdef PRINT cout << "CWFProbability" < #include "FeatureExtraction/gift_features.h" /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ CWFBestProbabilistic:: CWFBestProbabilistic(const CAcInvertedFile* inAccessor, CQueryNormalizer* inQueryNormalizer, CQueryNormalizer* inThisNormalizer): CWeightingFunction(inAccessor, inQueryNormalizer, inThisNormalizer) { } /*************************************** * * subApply * **************************************** * * modification history * * * ****************************************/ double CWFBestProbabilistic::subApply(const double inDocumentFrequency, const double inMaxDocumentFrequency)const{ #ifdef PRINT cout << "WFFBestProbabilistic" << endl; #endif TID lFeatureID=mID; double lCollectionFrequency= mAccessor->FeatureToCollectionFrequency(lFeatureID); double lCollectionFrequencyFactor=log(1/lCollectionFrequency-0.999); // lCollectionFrequencyFactor=1; if((mFeatureDescription==COL_HST) || (mFeatureDescription==GABOR_HST)){ lCollectionFrequencyFactor=1; } assert(inMaxDocumentFrequency>0); return //document term weight (0.5+ 0.5*inDocumentFrequency /inMaxDocumentFrequency ) //query term weight *lCollectionFrequencyFactor *CWeightingFunction::subApply(inDocumentFrequency, 1); } /*************************************** * * apply * **************************************** * * modification history * * * ****************************************/ double CWFBestProbabilistic::apply(const CDocumentFrequencyElement& inResultFeature)const{ TID lDocumentID=inResultFeature.getID(); return subApply(inResultFeature.getDocumentFrequency(), mAccessor->DIDToMaxDocumentFrequency(lDocumentID)); } /*************************************** * * clone * **************************************** * * modification history * * * ****************************************/ /// CWeightingFunction* CWFBestProbabilistic::clone()const{ CWeightingFunction* lRetVal=new CWFBestProbabilistic(mAccessor, mQueryNormalizer, mThisNormalizer); return lRetVal; }; gift-0.1.14/libGIFTQuInvertedFile/cc/CWFBinaryTerm.cc0000644000175200001440000000556210220502727017011 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CWFBinaryTerm * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #include "libGIFTQuInvertedFile/include/CWFBinaryTerm.h" #include #include "FeatureExtraction/gift_features.h" /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ CWFBinaryTerm:: CWFBinaryTerm(const CAcInvertedFile* inAccessor, CQueryNormalizer* inQueryNormalizer, CQueryNormalizer* inThisNormalizer): CWeightingFunction(inAccessor, inQueryNormalizer, inThisNormalizer) { } /*************************************** * * subApply * **************************************** * * modification history * * * ****************************************/ double CWFBinaryTerm::subApply(const double inDocumentFrequency, const double inNormalizationFactor)const{ #ifdef PRINT cout << "CWFBinaryTerm" <FeatureToCollectionFrequency(lFeatureID); if((mFeatureDescription==COL_HST) || (mFeatureDescription==GABOR_HST)){ return CWeightingFunction::subApply(inDocumentFrequency, inNormalizationFactor); }else{ return CWeightingFunction::subApply(inDocumentFrequency, inNormalizationFactor) * log(1/lCollectionFrequency-0.9999); } } /*************************************** * * clone * **************************************** * * modification history * * * ****************************************/ /// CWeightingFunction* CWFBinaryTerm::clone()const{ CWeightingFunction* lRetVal=new CWFBinaryTerm(mAccessor, mQueryNormalizer, mThisNormalizer); return lRetVal; }; gift-0.1.14/libGIFTQuInvertedFile/cc/Makefile.am0000644000175200001440000000340410153634155016121 00000000000000# -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # #Makefile for the inverted File library # lib_LTLIBRARIES = libGIFTQuInvertedFile.la libGIFTQuInvertedFile_la_LDFLAGS="@PRE_INSTALL_LIBDIRS@" -lMRML -lGIFTAcInvertedFile # # The trick here is: do not compile c code with the -D bool=char define. #-rdynamic INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTQuInvertedFile/include -I$(top_srcdir)/libGIFTAcInvertedFile/include libGIFTQuInvertedFile_la_SOURCES= \ CWeightingFunction.cc \ CWFBestFullyWeighted.cc \ CWFBestProbabilistic.cc \ CWFClassicalIDF.cc \ CWFBinaryTerm.cc \ CWFStandardTF.cc \ CWFCoordinationLevel.cc \ CWFProbability.cc \ \ CWeighter.cc\ \ CWeightingFunctionPointerHash.cc \ CScoreBoard.cc \ \ CQueryNormalizer.cc \ CQNNoNormalization.cc \ CQNMaxDocumentFrequency.cc \ CQNEuclideanLengthSquare.cc \ CQNSquareDFLogICFSum.cc \ \ CQInvertedFile.cc \ plug_in_fo.ccgift-0.1.14/libGIFTQuInvertedFile/cc/Makefile.in0000644000175200001440000004705610220474077016145 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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@ # -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # #Makefile for the inverted File library # SOURCES = $(libGIFTQuInvertedFile_la_SOURCES) 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 = : host_triplet = @host@ subdir = libGIFTQuInvertedFile/cc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libGIFTQuInvertedFile_la_LIBADD = am_libGIFTQuInvertedFile_la_OBJECTS = CWeightingFunction.lo \ CWFBestFullyWeighted.lo CWFBestProbabilistic.lo \ CWFClassicalIDF.lo CWFBinaryTerm.lo CWFStandardTF.lo \ CWFCoordinationLevel.lo CWFProbability.lo CWeighter.lo \ CWeightingFunctionPointerHash.lo CScoreBoard.lo \ CQueryNormalizer.lo CQNNoNormalization.lo \ CQNMaxDocumentFrequency.lo CQNEuclideanLengthSquare.lo \ CQNSquareDFLogICFSum.lo CQInvertedFile.lo plug_in_fo.lo libGIFTQuInvertedFile_la_OBJECTS = \ $(am_libGIFTQuInvertedFile_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/CQInvertedFile.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CQNEuclideanLengthSquare.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CQNMaxDocumentFrequency.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CQNNoNormalization.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CQNSquareDFLogICFSum.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CQueryNormalizer.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CScoreBoard.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CWFBestFullyWeighted.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CWFBestProbabilistic.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CWFBinaryTerm.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CWFClassicalIDF.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CWFCoordinationLevel.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CWFProbability.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CWFStandardTF.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CWeighter.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CWeightingFunction.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CWeightingFunctionPointerHash.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/plug_in_fo.Plo CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libGIFTQuInvertedFile_la_SOURCES) DIST_SOURCES = $(libGIFTQuInvertedFile_la_SOURCES) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libGIFTQuInvertedFile.la libGIFTQuInvertedFile_la_LDFLAGS = "@PRE_INSTALL_LIBDIRS@" -lMRML -lGIFTAcInvertedFile # # The trick here is: do not compile c code with the -D bool=char define. #-rdynamic INCLUDES = -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTQuInvertedFile/include -I$(top_srcdir)/libGIFTAcInvertedFile/include libGIFTQuInvertedFile_la_SOURCES = \ CWeightingFunction.cc \ CWFBestFullyWeighted.cc \ CWFBestProbabilistic.cc \ CWFClassicalIDF.cc \ CWFBinaryTerm.cc \ CWFStandardTF.cc \ CWFCoordinationLevel.cc \ CWFProbability.cc \ \ CWeighter.cc\ \ CWeightingFunctionPointerHash.cc \ CScoreBoard.cc \ \ CQueryNormalizer.cc \ CQNNoNormalization.cc \ CQNMaxDocumentFrequency.cc \ CQNEuclideanLengthSquare.cc \ CQNSquareDFLogICFSum.cc \ \ CQInvertedFile.cc \ plug_in_fo.cc all: all-am .SUFFIXES: .SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: $(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 libGIFTQuInvertedFile/cc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTQuInvertedFile/cc/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libGIFTQuInvertedFile.la: $(libGIFTQuInvertedFile_la_OBJECTS) $(libGIFTQuInvertedFile_la_DEPENDENCIES) $(CXXLINK) -rpath $(libdir) $(libGIFTQuInvertedFile_la_LDFLAGS) $(libGIFTQuInvertedFile_la_OBJECTS) $(libGIFTQuInvertedFile_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CQInvertedFile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CQNEuclideanLengthSquare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CQNMaxDocumentFrequency.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CQNNoNormalization.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CQNSquareDFLogICFSum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CQueryNormalizer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CScoreBoard.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CWFBestFullyWeighted.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CWFBestProbabilistic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CWFBinaryTerm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CWFClassicalIDF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CWFCoordinationLevel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CWFProbability.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CWFStandardTF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CWeighter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CWeightingFunction.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CWeightingFunctionPointerHash.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plug_in_fo.Plo@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: 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) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES 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-info-am \ uninstall-libLTLIBRARIES # 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: gift-0.1.14/libGIFTQuInvertedFile/cc/CQNMaxDocumentFrequency.cc0000644000175200001440000000451410220502727021041 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CQNMaxDocumentFrequency * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #include "libGIFTQuInvertedFile/include/CQNMaxDocumentFrequency.h" #include /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ CQNMaxDocumentFrequency::CQNMaxDocumentFrequency(const CAcInvertedFile* inAccessor): CQueryNormalizer(inAccessor) { }; /*************************************** * * considerQueryFeature * **************************************** * * modification history * * * ****************************************/ void CQNMaxDocumentFrequency::considerQueryFeature(const CWeightingFunction& inFeature){ mValue=max(fabs(inFeature.getTermFrequency()), mValue); }; /*************************************** * * clone: This permits us to store * completely preconfiguered normalizers * and use them when needed * **************************************** * * modification history * * * ****************************************/ CQueryNormalizer* CQNMaxDocumentFrequency::clone()const{ return new CQNMaxDocumentFrequency(*this); } gift-0.1.14/libGIFTQuInvertedFile/cc/CQNEuclideanLengthSquare.cc0000644000175200001440000000454310220502727021151 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CQNEuclideanLengthSquare * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #include "libGIFTQuInvertedFile/include/CQNEuclideanLengthSquare.h" #include /*************************************** * * constructor * **************************************** * * modification history * * * ****************************************/ CQNEuclideanLengthSquare::CQNEuclideanLengthSquare(const CAcInvertedFile* inAccessor): CQueryNormalizer(inAccessor) { }; /*************************************** * * considerQueryFeature * **************************************** * * modification history * * * ****************************************/ void CQNEuclideanLengthSquare::considerQueryFeature(const CWeightingFunction& inFeature){ mValue+=inFeature.getTermFrequency()* inFeature.getTermFrequency(); }; /*************************************** * * clone: This permits us to store * completely preconfiguered normalizers * and use them when needed * **************************************** * * modification history * * * ****************************************/ CQueryNormalizer* CQNEuclideanLengthSquare::clone()const{ return new CQNEuclideanLengthSquare(*this); } gift-0.1.14/libGIFTQuInvertedFile/cc/CQNSquareDFLogICFSum.cc0000644000175200001440000000463610220502727020063 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CQNSquareDFLogICFSum * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #include "libGIFTQuInvertedFile/include/CQNSquareDFLogICFSum.h" #include /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ CQNSquareDFLogICFSum::CQNSquareDFLogICFSum(const CAcInvertedFile* inAccessor): CQueryNormalizer(inAccessor) { }; /*************************************** * * considerQueryFeature * **************************************** * * modification history * * * ****************************************/ void CQNSquareDFLogICFSum::considerQueryFeature(const CWeightingFunction& inFeature){ double lICF=-log(mAccessor->FeatureToCollectionFrequency(inFeature.getID())); double lSummand=inFeature.getTermFrequency()*lICF; mValue+=lSummand*lSummand; }; /*************************************** * * clone: This permits us to store * completely preconfiguered normalizers * and use them when needed * **************************************** * * modification history * * * ****************************************/ CQueryNormalizer* CQNSquareDFLogICFSum::clone()const{ return new CQNSquareDFLogICFSum(*this); } gift-0.1.14/libGIFTQuInvertedFile/cc/CWeighter.cc0000644000175200001440000000531110220502727016246 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /** Author: Wolfgang Müller */ #include "libGIFTQuInvertedFile/include/CQueryNormalizer.h" #include "libGIFTQuInvertedFile/include/CWeightingFunction.h" #include "libGIFTQuInvertedFile/include/CWeighter.h" /** constructor */ CWeighter::CWeighter(CWeightingFunction* inWeightingFunction, CQueryNormalizer* inDocumentNormalizer, CQueryNormalizer* inQueryNormalizer): mWeightingFunction(inWeightingFunction), mDocumentNormalizer(inDocumentNormalizer), mQueryNormalizer(inQueryNormalizer){ }; /** destructor: deletes all content. */ CWeighter::~CWeighter(){ delete mWeightingFunction; delete mDocumentNormalizer; delete mQueryNormalizer; }; /** initialise pointers */ void CWeighter::init(){ mWeightingFunction->setNormalizers(mQueryNormalizer, mDocumentNormalizer); } /** initialise pointers */ void CWeighter::setAccessor(CAcInvertedFile& inAccessor){ mWeightingFunction->setAccessor(&inAccessor); mQueryNormalizer->setAccessor(&inAccessor); mDocumentNormalizer->setAccessor(&inAccessor); init(); } /** initialise pointers */ CWeighter* CWeighter::clone()const{ CWeightingFunction* lWeightingFunction =mWeightingFunction->clone(); CQueryNormalizer* lDocumentNormalizer=mDocumentNormalizer->clone(); CQueryNormalizer* lQueryNormalizer =mQueryNormalizer->clone(); CWeighter* lWeighter=new CWeighter(lWeightingFunction, lQueryNormalizer, lDocumentNormalizer); lWeighter->init(); return lWeighter; } /** */ CWeightingFunction* CWeighter::getWeightingFunction()const{ return mWeightingFunction; }; /** */ CQueryNormalizer* CWeighter::getDocumentNormalizer()const{ return mDocumentNormalizer; }; /** */ CQueryNormalizer* CWeighter::getQueryNormalizer()const{ return mQueryNormalizer; }; gift-0.1.14/libGIFTQuInvertedFile/cc/CWFCoordinationLevel.cc0000644000175200001440000000501010220502727020341 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CWFCoordinationLevel * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #include "libGIFTQuInvertedFile/include/CWFCoordinationLevel.h" #include /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ CWFCoordinationLevel:: CWFCoordinationLevel(const CAcInvertedFile* inAccessor, CQueryNormalizer*, CQueryNormalizer* inThisNormalizer): CWeightingFunction(inAccessor, 0, inThisNormalizer) { } /*************************************** * * subApply * **************************************** * * modification history * * * ****************************************/ double CWFCoordinationLevel::subApply(const double inDocumentFrequency, const double inNormalizingFactor)const{ #ifdef PRINT cout << "WFCoLevel" << endl; #endif return 1 * CWeightingFunction::subApply(inDocumentFrequency, inNormalizingFactor); } /*************************************** * * clone * **************************************** * * modification history * * * ****************************************/ /// CWeightingFunction* CWFCoordinationLevel::clone()const{ CWeightingFunction* lRetVal=new CWFCoordinationLevel(mAccessor, mQueryNormalizer, mThisNormalizer); return lRetVal; }; gift-0.1.14/libGIFTQuInvertedFile/cc/plug_in_fo.cc0000644000175200001440000000064710220502727016515 00000000000000#include "libGIFTQuInvertedFile/include/CQInvertedFile.h" #include "libMRML/include/CAccessorAdminCollection.h" extern "C" char* libGIFTQuInvertedFile_getClassName(){ return "inverted_file"; } extern "C" CQuery* libGIFTQuInvertedFile_makeQuery(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm ){ return new CQInvertedFile(inAccessorAdminCollection, inAlgorithm ); } gift-0.1.14/libGIFTQuInvertedFile/cc/CWFStandardTF.cc0000644000175200001440000000657310220502727016732 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CWFStandardTF * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #include "libGIFTQuInvertedFile/include/CWFStandardTF.h" #include #include "FeatureExtraction/gift_features.h" /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ CWFStandardTF:: CWFStandardTF(const CAcInvertedFile* inAccessor, CQueryNormalizer* inQueryNormalizer, CQueryNormalizer* inThisNormalizer): CWeightingFunction(inAccessor, inQueryNormalizer, inThisNormalizer) { } /*************************************** * * subApply * **************************************** * * modification history * * * ****************************************/ double CWFStandardTF::subApply(const double inDocumentFrequency, const double inEuclideanLengthSquare)const{ #ifdef PRINT cout << "WFStandardICF" << endl; #endif double lEuclideanLength=sqrt(inEuclideanLengthSquare); double lTermFrequencyProduct=getTermFrequency()*inDocumentFrequency; //for histograms the term-frequency product is ignored if((mFeatureDescription==COL_HST) || (mFeatureDescription==GABOR_HST)) lTermFrequencyProduct=1; return //document term weight lTermFrequencyProduct /lEuclideanLength //query term weight * CWeightingFunction::subApply(inDocumentFrequency, 1 //the normalizing factor //has already been used once, so this time //it is ignored -> 1 ) ; } /*************************************** * * apply * **************************************** * * modification history * * * ****************************************/ double CWFStandardTF::apply(const CDocumentFrequencyElement& inResultFeature)const{ subApply(inResultFeature.getDocumentFrequency(), mAccessor->DIDToDFSquareSum(inResultFeature.getID())); }; /*************************************** * * clone * **************************************** * * modification history * * * ****************************************/ /// CWeightingFunction* CWFStandardTF::clone()const{ CWeightingFunction* lRetVal=new CWFStandardTF(mAccessor, mQueryNormalizer, mThisNormalizer); return lRetVal; }; gift-0.1.14/libGIFTQuInvertedFile/cc/CWeightingFunctionPointerHash.cc0000644000175200001440000000620010220502727022266 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CWeightingFunctionPointerHash * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #include #include "libGIFTQuInvertedFile/include/CWeightingFunctionPointerHash.h" /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ CWeightingFunctionPointerHash:: CWeightingFunctionPointerHash(const CWeightingFunction& inWF): mWeightingFunction(inWF) { } /*************************************** * * size * **************************************** * * modification history * * * ****************************************/ CWeightingFunctionPointerHash::CFather::size_type CWeightingFunctionPointerHash::size()const{ return CFather::size(); } /*************************************** * * addFeature * **************************************** * * modification history * * * ****************************************/ void CWeightingFunctionPointerHash ::addFeature(const double inRelevanceLevel, const CDocumentFrequencyElement& inElement){ #ifdef PRINT cout << "CWFPHop()" << size() << "," << inElement.getID() << "," << mRelevanceLevel << flush; #endif iterator lHashEntry= find(inElement.getID()); if(lHashEntry==end()){ // insert a new instance of the weighting function, // copied from the prototype in mWeightingFunction insert(make_pair(inElement.getID(), mWeightingFunction .constructNew(inElement.getID()))); lHashEntry=find(inElement.getID()); (*lHashEntry).second->addQueryFeature(inRelevanceLevel, inElement); }else{ (*lHashEntry).second->addQueryFeature(inRelevanceLevel, inElement); } } void CWeightingFunctionPointerHash::clearFeatures(){ for(CWeightingFunctionPointerHash::iterator i=begin(); i!=end(); i++){ delete i->second; } clear(); }; /** */ CWeightingFunctionPointerHash::~CWeightingFunctionPointerHash(){ clearFeatures(); }; gift-0.1.14/libGIFTQuInvertedFile/cc/CQInvertedFile.cc0000644000175200001440000012424010220502727017174 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/mrml_const.h" // constants for parsing #include "libMRML/include/my_throw.h" #include "libMRML/include/my_diagnose.h" /*************************************** * * CInvertedFileQuery - this is the class that handles a query * **************************************** * * modification history: * WM 270999 Unifying code between diverging versions * main difference: Accessors are now pointers * as well as the weighting functions. * so lots of "." become "->" * CInvertedFileQuery is inherited from CInvertedFileQuery * which leads quite often to type casting * The constructors have changed. * WM 08 99 Weighting functions are now pointers * QueryFeatureWeighters, CAccessor structure as well * configuration using CAlgorithm * use RTTI to find algorithms which do not fit the Query * ALL THIS TO MAKE FLEXIBLE RUNTIME CONFIGURATION POSSIBLE * filled in some documentation gaps * HM 140999 put in the compiler define NOSCREENOUTPUT * HM 140999 removed the second output at the Timestamp * HM 130999 put in the seperate normalization of positive and negative input images * HM 300899 searched the error which suppressed uneven relevance feedback * HM 250899 removed some couts * HM 160899 Work on the bug with the URL * HM 100699 ScoreBoard pruning now as well with the percentage of features for the reduction * HM 200599 print out a double timestamp with a better precision * HM 050599 changes to find pruning error with histograms * HM 030599 use the pruning variables * HM 030599 put in a second function keepScore_pruning to implement * the different pruning activities * HM 030599 put in a second function keepScore_pruning to implement the different pruning activities * HM 120499 print out the list with all the term frequencies * HM 090499 tests with the pruning * HM 090399 created the documentation * WM 10 98 created file and most of the content * **************************************** * * compiler defines used: * * _NO_PRINT_QFW if undefined, print the query feature weighters * _NO_FIDPRINT if undefined, feature ids are printed to the screen while evaluating * _RTTI_WORKS If this is defined, it is assumed by the code that RTTI works * in the resulting code * or else * Warning: there is a relevant constant in this file * "<10" in setAlgorithm. * it has something to do with the check, of an algorithm is considered * allowed for Inverted file queries. * is necessary, because of lack of RTTI * NOSCREENOUTPUT - if defined, nothing is printed to the screen * ****************************************/ //#define _RTTI_WORKS #include "FeatureExtraction/gift_features.h" #include #include #include #include #include #include "libGIFTAcInvertedFile/include/map_to_list.h" #include "libGIFTAcInvertedFile/include/CDocumentFrequencyHash.h" #include "libGIFTQuInvertedFile/include/CWeightingFunctionPointerHash.h" #include "libGIFTQuInvertedFile/include/CQueryNormalizer.h" #include "libGIFTQuInvertedFile/include/CWeightingFunction.h" #include "libGIFTAcInvertedFile/include/CDocumentFrequencyList.h" #include #include "libGIFTAcInvertedFile/include/CInitializedDouble.h" #include "libGIFTQuInvertedFile/include/CScoreBoard.h" #include "libGIFTAcInvertedFile/include/CAcInvertedFile.h" #include "libGIFTQuInvertedFile/include/CQInvertedFile.h" #include "libMRML/include/GIFTExceptions.h" #include "libMRML/include/CXMLElement.h" #include #define _NO_FIDPRINT #define _NO_PRINT_QFW #include /* to use the gettimeofday function */ //#define NOSCREENOUTPUT /** A factory for weighting functions with associated normalizers. The weighting functions are intended to be members of CQInvertedFile where they will be used. */ CWeighter* CWeighterFactory::newWeighter(const string& inID)const{ assert(find(inID)!=end()); return(find(inID)->second->clone()); }; /** constructor: initializes everything fills the map etc. The only accessors are the three get.*() Functions */ CWeighterFactory::CWeighterFactory(){ /* something FISHY here FIXME with Salton Buckley paper */ (*this)["BestFullyWeighted"]= new CWeighter(new CWFBestFullyWeighted(0,0,0), new CQNEuclideanLengthSquare(0), new CQNMaxDocumentFrequency(0)); (*this)["ClassicalIDF"]= new CWeighter(new CWFClassicalIDF(0,0,0), new CQNNoNormalization(0), new CQNNoNormalization(0)); (*this)["BestProbabilistic"]= new CWeighter(new CWFBestProbabilistic(0,0,0), new CQNNoNormalization(0), new CQNMaxDocumentFrequency(0)); (*this)["BinaryTerm"]= new CWeighter(new CWFBinaryTerm(0,0,0), new CQNNoNormalization(0), new CQNNoNormalization(0)); (*this)["Probability"]= new CWeighter(new CWFProbability(0,0,0), new CQNNoNormalization(0), new CQNNoNormalization(0)); (*this)["StandardTF"]= new CWeighter(new CWFStandardTF(0,0,0), new CQNNoNormalization(0), new CQNEuclideanLengthSquare(0)); (*this)["Coordination"]= new CWeighter(new CWFCoordinationLevel(0,0,0), new CQNNoNormalization(0), new CQNNoNormalization(0)); }; CWeighterFactory::~CWeighterFactory(){ for(iterator i=begin(); i!=end(); i++){ delete i->second; } } /*************************************** * * stampTime - prints the time out on the screen * **************************************** * * modification history * * WM 12 98 creation * * ****************************************/ /* to print out the time for performance measurements */ static void stampTime(){ cout << "[Timestamp" << 1.0*clock()/CLOCKS_PER_SEC << "]" << endl; /* void *garbage; *//* only used for the call of the function */ /*timeval *result; */ /* result structure for the time function */ /* result=new(timeval); gettimeofday(result, garbage); cout<<"[Timestamp" <tv_sec <<";" <tv_usec <<"]" <= timeLimit) return true; else return false; } /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ CQInvertedFile::CQInvertedFile(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm ): CQuery(inAccessorAdminCollection, inAlgorithm){ assert(&inAccessorAdminCollection); assert(&inAlgorithm); assert(&inAlgorithm==mAlgorithm); mDeb=mAlgorithm; mAlgorithm->activate(); my_diagnose(&inAlgorithm); // mproxy has been filled in a reasonable way // by CQuery::CQuery pair lSubType=inAlgorithm.stringReadAttribute("cui-sub-type"); if(lSubType.first){ if(lSubType.second=="mysql"){ mAccessor=mAccessorAdmin->openAccessor("if_mysql"); }else{ mAccessor=mAccessorAdmin->openAccessor("inverted_file"); } }else{ mAccessor=mAccessorAdmin->openAccessor("inverted_file"); } cout << "1st Checking accessor" << endl; // mAccessor->checkNPrint(); //there is something wrong between the generated //accessor and what we want if(!mAccessor){ cout << "throwing: " << (VEWrongAccessor("InvertedFileQuery")) << endl << flush; try{ my_throw(VEWrongAccessor("InvertedFileQuery")); } catch(...){ cout << "locally caught and rethrown" << flush; my_throw(VEWrongAccessor("InvertedFileQuery")); } } //here do additional things with the algorithm, if wanted and needed //which probably is the case init(); cout << "++Accessor: " << mAccessor << flush << endl; cout << "Checking Accessor II" << endl; //mAccessor->checkNPrint(); cout << "CQInvertedFile THIS:" << this << endl; }; CQInvertedFile::~CQInvertedFile(){ cout << "begin KILLING INVERTED FILE QUERY" << endl; assert(mDeb==mAlgorithm); if(mAlgorithm){ mAlgorithm->check(); pair lSubType=mAlgorithm->stringReadAttribute("cui-sub-type"); if(lSubType.first){ if(lSubType.second=="mysql"){ mAccessorAdmin->closeAccessor("if_mysql"); }else{ mAccessorAdmin->closeAccessor("inverted_file"); } }else{ mAccessorAdmin->closeAccessor("inverted_file"); } } mAlgorithm->deActivate(); cout << "end KILLING INVERTED FILE QUERY" << endl; } /*************************************** * * set the Algorithm. * same scheme as in setCollection * ***************************************/ bool CQInvertedFile::setAlgorithm(CAlgorithm& inAlgorithm){ cout << "SETALGORITHM" << endl; if(mAlgorithm->getCollectionID()==inAlgorithm.getCollectionID()){ return true; }else{ cout << "OPENACCESSOR" << endl; //close the old collection mAccessorAdmin->closeAccessor("inverted_file"); // mAccessorAdmin=&mAccessorAdminCollection->getProxy(inAlgorithm.getCollectionID()); mAccessor=mAccessorAdmin->openAccessor("inverted_file"); // return (mAccessor && CQuery::setAlgorithm(inAlgorithm)); } }; /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ void CQInvertedFile::init(){ int i; if(mAlgorithm){ string lString(""); mAlgorithm->toXML(lString,5); cout << "çççççççççççççççççççççççççççççççççççççççç" << endl << lString << "çççççççççççççççççççççççççççççççççççççççç" << endl << flush; } if(mAlgorithm){ mWeighter=mWeighterFactory .newWeighter(mAlgorithm ->stringReadAttribute(mrml_const::cui_weighting_function).second); } mQueryFeatureWeighters= new CWeightingFunctionPointerHash(*mWeighter->getWeightingFunction()); mWeighter->setAccessor((*(CAcInvertedFile*)mAccessor)); /* parameter for the seperate normalization of positive and negative feedback */ /* mSeperateNormalizationofPositiveandNegativeImages=false;*/ /* turns off the blocking of features */ mBlockingOn=false; /* clears the file with the selective blocking, all features need to be blocked actively, if wanted */ for(i=0;itoXML(lString,5); my_diagnose(lString); releaseBlockingFeatures(); { pair lBlock= mAlgorithm->boolReadAttribute(string(mrml_const::cui_block_color_histogram)); cout << "%%%%%%%%%%%%%%%%%%%%" << mAlgorithm->stringReadAttribute(string(mrml_const::cui_block_color_histogram)).second << endl; if(lBlock.first && lBlock.second){ blockFeatureGroup(COL_HST); } } { pair lBlock= mAlgorithm->boolReadAttribute(string(mrml_const::cui_block_texture_histogram)); if(lBlock.first && lBlock.second){ blockFeatureGroup(GABOR_HST); } } { pair lBlock= mAlgorithm->boolReadAttribute(string(mrml_const::cui_block_color_blocks)); if(lBlock.first && (lBlock.second)){ blockFeatureGroup(COL_POS); } } { pair lBlock= mAlgorithm->boolReadAttribute(string(mrml_const::cui_block_texture_blocks)); if(lBlock.first && (lBlock.second)){ blockFeatureGroup(GABOR_POS); } } { pair lTimeCutoffPoint= mAlgorithm->doubleReadAttribute(string(mrml_const::cui_pr_time_cutoff_point)); if(lTimeCutoffPoint.first){ useTimePruning(lTimeCutoffPoint.second); } } { pair lPercentageOfFeatures= mAlgorithm->doubleReadAttribute(string(mrml_const::cui_pr_percentage_of_features)); if(lPercentageOfFeatures.first){ useFeaturePruning(lPercentageOfFeatures.second); } } { pair lScoreBoardReducedAt= mAlgorithm->doubleReadAttribute(string(mrml_const::cui_pr_score_board_reduced_at)); pair lScoreBoardReducedTo= mAlgorithm->longReadAttribute(string(mrml_const::cui_pr_score_board_reduced_to)); if(lScoreBoardReducedAt.first && lScoreBoardReducedTo.first){ useScoreBoardPruning(lScoreBoardReducedAt.second, lScoreBoardReducedTo.second); } } { pair lModulo= mAlgorithm->longReadAttribute(string(mrml_const::cui_pr_modulo)); pair lModuloClass= mAlgorithm->longReadAttribute(string(mrml_const::cui_pr_modulo_class)); if(lModulo.first){ mModulo=lModulo.second; if(lModuloClass.first){ mModuloClass=lModuloClass.second; }else{ mModuloClass=0; } }else{ mModulo=0; mModuloClass=0; } } } cout << "Init finished " << flush << endl; }; /*************************************** * * buildQueryHash - Creates a list with all the features which are in all the different images * in the query, contains one "artificial" query image * **************************************** * * modification history * initally done by Henning, this has been shortened quite a bit by * Wolfgang (The old code made a list which was then copied. Now * we copy directly the values we need, thus eliminating the need * for alloc/dealloc, and cutting some possibilites for bugs) ****************************************/ void CQInvertedFile::buildQueryHash(CRelevanceLevelList& inQuery, CWeightingFunctionPointerHash& outQueryFeatureWeighters)const{ /* checks all the relevant images which were selected */ for(CRelevanceLevelList::const_iterator i=inQuery.begin(); i!=inQuery.end(); i++){ //Get the feature list for the URL of *i (that means: for each input image) #ifndef NOSCREENOUTPUT cout<< "input image to URL: _" << (*i).getURL() << "_" << endl << flush; #endif CDocumentFrequencyList* lReadFeatures= ((CAcInvertedFile*)mAccessor)->URLToFeatureList((*i).getURL()); /* Build a new feature list without blocked features. There are several cases */ if(featuresBlocked() && !mModulo){// adding features which are not blocked for(CDocumentFrequencyList::iterator j=lReadFeatures->begin(); j!=lReadFeatures->end(); j++ ){ if(isBlocked(((CAcInvertedFile*)mAccessor)->getFeatureDescription(j->getID()))==false){ outQueryFeatureWeighters.addFeature((*i).getRelevanceLevel(), *j); } } }// END: adding features which are not blocked if(featuresBlocked() && mModulo){// adding features which are not blocked, // and for which the feature number has the right modulo // use of this: dispatching multiple query processors for(CDocumentFrequencyList::iterator j=lReadFeatures->begin(); j!=lReadFeatures->end(); j++ ){ if((isBlocked(((CAcInvertedFile*)mAccessor)->getFeatureDescription(j->getID()))==false) && ((j->getID()) % mModulo == mModuloClass)){ outQueryFeatureWeighters.addFeature((*i).getRelevanceLevel(), *j); } /* end of the loop for all the features of one image */ } /* end of removing the blocked features from the list */ } if(!featuresBlocked() && mModulo){ for(CDocumentFrequencyList::iterator j=lReadFeatures->begin(); j!=lReadFeatures->end(); j++ ){ if((j->getID()) % mModulo == mModuloClass){// adding features with the right modulo /* adds one of the features for a special image to the list */ outQueryFeatureWeighters.addFeature((*i).getRelevanceLevel(), *j); } /* end of the loop for all the features of one image */ } /* end of removing the blocked features from the list */ } if(!featuresBlocked() && !mModulo){// adding all features for(CDocumentFrequencyList::iterator j=lReadFeatures->begin(); j!=lReadFeatures->end(); j++ ){ /* adds one of the features for a special image to the list */ outQueryFeatureWeighters.addFeature((*i).getRelevanceLevel(), *j); } } #ifndef NOSCREENOUTPUT cout << "gotten HERE" << flush << endl; #endif #ifdef PRINT cout << endl << (*i).getURL() << " " << lRelevanceLevel << endl; #endif delete(lReadFeatures); }/* end of the loop for every image in the query */ } /*************************************** * * buildNormalizedQueryHash * **************************************** * * modification history * * * ****************************************/ void CQInvertedFile:: buildNormalizedQueryHash(double inPositiveRelevanceSum, double inNegativeRelevanceSum, CWeightingFunctionPointerHash& inoutQFW) const{ //Just to make sure... mWeighter->getQueryNormalizer()->reset(); mWeighter->getDocumentNormalizer()->reset(); /* for every weighting function, meaning for every element in the list of important features */ {//for limiting the scope of the following variable definitions CQueryNormalizer* lDocumentNormalizer=mWeighter->getDocumentNormalizer(); CQueryNormalizer* lQueryNormalizer=mWeighter->getQueryNormalizer(); for(CWeightingFunctionPointerHash::const_iterator j=inoutQFW.begin(); j!=inoutQFW.end(); j++) { /* calculates the relevant values for the normalizing of the function */ lQueryNormalizer->considerQueryFeature(*(*j).second); lDocumentNormalizer->considerQueryFeature(*(*j).second); (*j).second->setRelevanceSum(inPositiveRelevanceSum, inNegativeRelevanceSum); (*j).second->preCalculate(); } } } /*************************************** * * buildNormalizedQueryList * **************************************** * * modification history * * * ****************************************/ void CQInvertedFile:: buildNormalizedQueryList(double inPositiveRelevanceSum, double inNegativeRelevanceSum, CWeightingFunctionPointerHash& inoutQFW, CWeightingFunctionPointerList& outQFW) const { //Just to make sure... mWeighter->getQueryNormalizer()->reset(); mWeighter->getDocumentNormalizer()->reset(); buildNormalizedQueryHash(inPositiveRelevanceSum, inNegativeRelevanceSum, inoutQFW); #ifndef NOSCREENOUTPUT cout<<"normalized List build\n"; stampTime(); #endif for(CWeightingFunctionPointerHash::const_iterator i=inoutQFW.begin(); i!=inoutQFW.end(); i++){ outQFW.push_back((*i).second); } outQFW.sort(CSortPointers_WF ()); outQFW.reverse(); /* test to print out the list with the sorted features */ #ifndef _NO_PRINT_QFW cout << "--------------------" << "The query feature weighters: " << endl; for(CWeightingFunctionPointerList::const_iterator j=outQFW.begin(); j!=outQFW.end(); j++) { cout<<(*j)->getID(); cout<<";"; cout<<((CAcInvertedFile*)mAccessor)->FeatureToCollectionFrequency((*j)->getID()); cout<<";"; cout<<(*j)->getTermFrequency(); cout<<";"; cout<<((CAcInvertedFile*)mAccessor)->getFeatureDescription((*j)->getID()); cout<<"\n"; } #endif } /*************************************** * * query - here the query takes place with a list of input images * **************************************** * * modification history * * * ****************************************/ CIDRelevanceLevelPairList* CQInvertedFile::fastQuery(const CXMLElement& inQuery, int inNumberOfInterestingImages, double inThreshold){ cout << "--Accessor: " << flush << mAccessor << flush << endl; mQueryFeatureWeighters->clearFeatures(); double lPositiveSum(0); double lNegativeSum(0); CRelevanceLevelList lQuery; // In the query tree I got, i simply look for // the element containing a user-relevance-list bool lIsEmpty(true);// is there no image in the query? for(list::const_iterator i=inQuery.child_list_begin(); i!=inQuery.child_list_end(); i++){ // cout << "I:The name of this tree element: " // << endl // << (*i)->getName() // << endl; if((*i)->getName()=="cui-inverted-file-query-by-feature"){ for(list::const_iterator j=(*i)->child_list_begin(); j!=(*i)->child_list_end(); j++){ if((*j)->getName()=="cui-term-frequency-element"){ pair lFeatureID((*j)->longReadAttribute("feature-id")); pair lTermFrequency((*j)->doubleReadAttribute("term-frequency")); if(lFeatureID.first){ if(lTermFrequency.first){ mQueryFeatureWeighters->addFeature(lTermFrequency.second,CDocumentFrequencyElement(lFeatureID.second, 1)); }else{ mQueryFeatureWeighters->addFeature(1,CDocumentFrequencyElement(lFeatureID.second, 1)); } } } } } if((*i)->getName()==mrml_const::user_relevance_element_list){ for(list::const_iterator j=(*i)->child_list_begin(); j!=(*i)->child_list_end(); j++){ // cout << "J:The name of this tree element: " // << endl // << (*j)->getName() // << endl; if((*j)->getName()==mrml_const::user_relevance_element){ if(((*j)->stringReadAttribute(mrml_const::image_location).first) && ((*j)->stringReadAttribute(mrml_const::user_relevance).first)){ if(fabs((*j)->doubleReadAttribute(mrml_const::user_relevance).second)>0.001){ lQuery.push_back(CRelevanceLevel((*j)->stringReadAttribute(mrml_const::image_location).second, (*j)->doubleReadAttribute(mrml_const::user_relevance).second)); if(lQuery.back().getRelevanceLevel()>0){ lIsEmpty=false; lPositiveSum+=lQuery.back().getRelevanceLevel(); }else{ lIsEmpty=false; lNegativeSum+=lQuery.back().getRelevanceLevel(); } } } } } } } if(lIsEmpty){ cout << "THE QUERY IS EMPTY" << endl; //which means, random images are requested return getRandomIDs(inNumberOfInterestingImages); cout << "RETURNING" << endl; } //... but more successfully cout << "Query number of documents: " << lQuery.size() << "The document: "; if(lQuery.size()){ cout << lQuery.front().getRelevanceLevel() << "," << lQuery.front().getURL() << "\n" << endl; }else{ cout << "NO DOCUMENT" << endl; } #ifndef NOSCREENOUTPUT #endif //in case of an empty query if(!lQuery.size()){ return new CIDRelevanceLevelPairList(); } double lRelevanceSum=0; /* */ //resets the normalizer for the query mWeighter->getQueryNormalizer()->reset(); mWeighter->getDocumentNormalizer()->reset(); #ifndef NOSCREENOUTPUT cout << "building query" << endl << flush; stampTime(); #endif /* creates a list of a all the features in all the input images */ buildQueryHash(lQuery, *mQueryFeatureWeighters); #ifndef NOSCREENOUTPUT stampTime(); cout << "..finished:left:" << mQueryFeatureWeighters->size() << endl; #endif /* this is a list with all the weightings for every feature */ CWeightingFunctionPointerList lParameters; /* and the list for every feature and its weighting is created here */ buildNormalizedQueryList(lPositiveSum, lNegativeSum, *mQueryFeatureWeighters, lParameters); return fastQueryByFeature(lParameters, inNumberOfInterestingImages, inThreshold); } /** * * Assuming that a correct CWeightingFunctionPointerHash has been built by fastQuery * (or another function), this function will do the rest * */ CIDRelevanceLevelPairList* CQInvertedFile::fastQueryByFeature(const CWeightingFunctionPointerList& inQuery, int inNumberOfInterestingImages, double inThreshold){ #ifndef NOSCREENOUTPUT cout << "query." << flush << endl; stampTime(); #endif //A score for each document, //each score is initialized with zero CScoreBoard lScoreBoard; double lQueryScore; /* calculates the value for the answer images */ if (mPruningUsed) { cout << "Pruning used!" << endl; lQueryScore=(keepScorePruning(lScoreBoard, inQuery, true, inNumberOfInterestingImages )); } else { cout << "Pruning NOT used!" << endl; lQueryScore=(keepScore(lScoreBoard, inQuery, true)); } #ifndef NOSCREENOUTPUT stampTime(); cout << ".query" << flush << endl; #endif //Normalizing scores by query score and building a list from it CIDRelevanceLevelPairList* lReturnValue=new CIDRelevanceLevelPairList(); // list for the contents of the ScoreBoard for(CScoreBoard::iterator i=lScoreBoard.begin(); i!=lScoreBoard.end(); i++){ (*i).second/=fabs(lQueryScore); lReturnValue->push_back(CIDRelevanceLevelPair(i->first, i->second)); } #ifndef NOSCREENOUTPUT cout << "presort" << flush << endl; stampTime(); #endif lReturnValue->sort(); lReturnValue->reverse(); //Iterate over the wanted elements CIDRelevanceLevelPairList::iterator iWantedElements=lReturnValue->begin(); //skip inNumberOfInterestingImages and delete the rest of the //output list for(int lNumberOfSkippedImages=0; (lNumberOfSkippedImages < inNumberOfInterestingImages) && (iWantedElements!=lReturnValue->end()); iWantedElements++, lNumberOfSkippedImages++ ){ } if(iWantedElements!=lReturnValue->end()){ lReturnValue->erase(iWantedElements,lReturnValue->end()); } //Delete all results below threshold if threshold>0.0 if(inThreshold>0.0001){ for(CIDRelevanceLevelPairList::iterator i=lReturnValue->begin(); i!=lReturnValue->end();){ if((*i).getRelevanceLevel()" << (*i).getRelevanceLevel() << endl; lReturnValue->erase(i++); }else{ i++; } } } #ifndef NOSCREENOUTPUT stampTime(); cout << "postsort" << flush << endl; #endif return lReturnValue; } /*************************************** * * keepScore - this is the main part to calculate the score by iterating the features * **************************************** * * modification history * * HM 030599 removed all pruning activities from here * HM 0199 added pruning activities * WM 1098 created function * ****************************************/ double CQInvertedFile::keepScore(CScoreBoard& inoutScoreBoard, const CWeightingFunctionPointerList& inFeatures, bool inPositive)const{ double lQueryScore=0; int lMaximumNumberofEvaluatedFeatures=int (inFeatures.size()*0.9); //For all query features int lCount=0; for(CWeightingFunctionPointerList::const_iterator i=inFeatures.begin(); (i!=inFeatures.end()); i++) { lCount++; #ifndef _NO_FIDPRINT cout << "[FID" << dec << (*i)->getID() << "]" << flush; #endif /* adjusts the query score for one more feature, this does it for the query image itself to have a number to normalize with */ lQueryScore+= (*i)->applyOnThis(); //load list of documents which contain features CDocumentFrequencyList* lOneFeatureResult= ((CAcInvertedFile*)mAccessor)->FeatureToList((*i)->getID()); //then adjust the score for the documents if(lOneFeatureResult) { for(CDocumentFrequencyList::iterator j=lOneFeatureResult->begin(); j!=lOneFeatureResult->end(); j++) { inoutScoreBoard(*(*i),*j);//one could say inoutScoreBoard.adjust(.,.) }; } else{ cerr << "FAILED:OneFeatureResult" << endl << flush; } delete lOneFeatureResult; } return lQueryScore; }; /*************************************** * * keepScore_pruning - this is the main part to calculate the score by iterating the features * **************************************** * * modification history * * * ****************************************/ double CQInvertedFile::keepScorePruning(CScoreBoard& inoutScoreBoard, const CWeightingFunctionPointerList& inFeatures, bool inPositive, int inElementsToRetrieve )const{ double lQueryScore=0; int lNumberofFeatures=inFeatures.size(); int lMaximumNumberofEvaluatedFeatures=int (lNumberofFeatures*mPercentageofFeatures/100); cout << "Pruning: I will evaluate " << lMaximumNumberofEvaluatedFeatures << " Features." << flush << endl; int lNextScoreBoardNumber=0; //For all query features int lCount=0; for(CWeightingFunctionPointerList::const_iterator i=inFeatures.begin(); (i!=inFeatures.end())//FIXME for loop comparison && (!(mTimePruningUsed && (timeReached(mStoppingTime)) && (lCount>100))) && (!(mFeaturePruningUsed && (lCount==lMaximumNumberofEvaluatedFeatures))); i++) { lCount++; if(mScoreBoardPruningUsed) { if(mNumberofUsedScoreBoardPrunings>lNextScoreBoardNumber) { if(lCount== (int (mScoreBoardPruningArray[lNextScoreBoardNumber] .stopAfterFeature*lNumberofFeatures))) { #ifndef NOSCREENOUTPUT cout << mScoreBoardPruningArray[lNextScoreBoardNumber].reduceTo; cout<<"\n"; #endif inoutScoreBoard .limitNumberTo(int(mScoreBoardPruningArray [lNextScoreBoardNumber] .reduceTo *inElementsToRetrieve)); inoutScoreBoard.setIgnore(); lNextScoreBoardNumber++; } } } #ifndef _NO_FIDPRINT cout << "[FID" << dec << (*i)->getID() << "]" << flush; #endif /* adjusts the query score for one more feature, this does it for the query image itself to have a number to normalize with */ lQueryScore+= (*i)->applyOnThis(); //load list of documents which contain features CDocumentFrequencyList* lOneFeatureResult= ((CAcInvertedFile*)mAccessor)->FeatureToList((*i)->getID()); //then adjust the score for the documents if(lOneFeatureResult) { for(CDocumentFrequencyList::iterator j=lOneFeatureResult->begin(); j!=lOneFeatureResult->end(); j++) { inoutScoreBoard(*(*i), *j);//one could say inoutScoreBoard.adjust(.,.) }; } else cerr << "FAILED:OneFeatureResult" << endl << flush; delete lOneFeatureResult; } /* this is only to reduce the list to a special number at the end */ /* inoutScoreBoard.limitNumberTo(20);*/ return lQueryScore; }; /*************************************** * * URLToScore - returns the score for one valid URL * **************************************** * * modification history * * * ****************************************/ double CQInvertedFile::URLToScore(const string& inURL, const CWeightingFunctionPointerHash& inFeatures )const{ CDocumentFrequencyList* lDocumentFeatures= ((CAcInvertedFile*)mAccessor)->URLToFeatureList(inURL); TID lID=((CAcInvertedFile*)mAccessor)->URLToID(inURL).second; double lResult=FeatureListToScore(lID, *lDocumentFeatures, inFeatures); delete lDocumentFeatures; return lResult; } /*************************************** * * DIDToScore - returns the score for one valid document ID * **************************************** * * modification history * * * ****************************************/ double CQInvertedFile::DIDToScore(TID inDID, const CWeightingFunctionPointerHash& inFeatures )const{ CDocumentFrequencyList* lDocumentFeatures= ((CAcInvertedFile*)mAccessor)->DIDToFeatureList(inDID); double lResult=FeatureListToScore(inDID, *lDocumentFeatures, inFeatures); delete lDocumentFeatures; return lResult; } /*************************************** * * FeatureListToScore * **************************************** * * modification history * * * ****************************************/ double CQInvertedFile::FeatureListToScore(TID inDID, const CDocumentFrequencyList& inDocumentFeatures, const CWeightingFunctionPointerHash& inFeatures)const{ //Embarassing, I calculate here each time the value for the application //of the query on itself... //...after all, this only causes a factor of 2 in the speed :-I // will be fixed when we have a caching method double lQueryScore=0; /* for(CWeightingFunctionPointerHash::const_iterator i=inFeatures.begin(); i!=inFeatures.end(); i++){ lQueryScore+=(*i).second->applyOnThis(); }FIXME*/ double lLocalScore=0; // for(CDocumentFrequencyList::const_iterator i=inDocumentFeatures.begin(); i!=inDocumentFeatures.end(); i++){ //Input was a list of FeatureID/Document-Frequency-Pairs //We have to translate this into DocumentID-DocumentFrequency-Pairs CWeightingFunctionPointerHash::const_iterator lWeightingFunction=inFeatures.find((*i).getID()); if(lWeightingFunction!=inFeatures.end()){ lLocalScore=(*lWeightingFunction).second-> apply(CDocumentFrequencyElement(inDID, (*i).getDocumentFrequency())); } } return lLocalScore/fabs(lQueryScore); }; /*************************************** * * buildNormalizedQueryHash * **************************************** * * modification history * * * ****************************************/ void CQInvertedFile::buildNormalizedQueryHash(const CRelevanceLevel& inQuery, CWeightingFunctionPointerHash& outQueryFeatureWeighters)const{ CRelevanceLevelList lQuery; lQuery.push_back(inQuery); buildQueryHash(lQuery, outQueryFeatureWeighters); buildNormalizedQueryHash(1, 1, outQueryFeatureWeighters); } /*************************************** * * turnOnSeperateNormalization - turns on the seperate normalization * *************************************** * * modification history * * * ****************************************/ void turnOnSeperateNormalization() { /* mSeperateNormalizationofPositiveandNegativeImages=true;*/ } /*************************************** * * activateBlockingFeatures - sets the variable to block groups of features * *************************************** * * modification history * * * ****************************************/ void CQInvertedFile::activateBlockingFeatures() { mBlockingOn=true; } /*************************************** * * releaseBlockingFeatures - this turns off the blocking of features * *************************************** * * modification history * * @Author Henning Mueller * HM 240399 created * ****************************************/ void CQInvertedFile::releaseBlockingFeatures() { mBlockingOn=false; } /*************************************** * * featuresBlocked - returns true if the features are blocked * *************************************** * * modification history * * @Author Henning Mueller * HM 240399 created * ****************************************/ bool CQInvertedFile::featuresBlocked()const { if(mBlockingOn==true) return true; else return false; } /*************************************** * * blockFeatureGroup - this blocks one special group of features * *************************************** * * modification history * * @Author Henning Mueller * HM 240399 created * ****************************************/ void CQInvertedFile::blockFeatureGroup(const int inFeatureNumber) { cout << endl << "§§§§§§§§§§§§§§§§§§§§blocking feature group: " << inFeatureNumber << endl; mBlockingArray[inFeatureNumber]=true; activateBlockingFeatures(); } /*************************************** * * unblockFeatureGroup - this releases the blocking of one feature group * *************************************** * * modification history * * @Author Henning Mueller * HM 240399 created * ****************************************/ void CQInvertedFile::unblockFeatureGroup(const int inFeatureNumber) { mBlockingArray[inFeatureNumber]=false; } /*************************************** * * isBlocked - returns true if the feature is blocked and false if not * *************************************** * * modification history * * @Author Henning Mueller * HM 240399 created * ****************************************/ bool CQInvertedFile::isBlocked(const int inFeatureNumber)const { if(mBlockingArray[inFeatureNumber]==true) return true; else return false; } /*************************************** * * sets back all the variables for the pruning * *************************************** * * modification history * * @Author Henning Mueller * HM 030599 created * ****************************************/ void CQInvertedFile::releaseAllPrunings() { releaseFeaturePruning(); releaseTimePruning(); releaseScoreBoardPruning(); } /*************************************** * * activates the feature pruning with evaluating a certain percentage of the features * *************************************** * * modification history * * @Author Henning Mueller * HM 030599 created * ****************************************/ void CQInvertedFile::useFeaturePruning(double percentage) { cout << endl << "§§§§§§§§§§§§§§§§§§§§USE FEATURE PRUNING: " << percentage << endl; mPruningUsed=true; mFeaturePruningUsed=true; mPercentageofFeatures=percentage; } /*************************************** * * set the variables back to its normal status * *************************************** * * modification history * * @Author Henning Mueller * HM 030599 created * ****************************************/ void CQInvertedFile::releaseFeaturePruning() { mFeaturePruningUsed=false; mPercentageofFeatures=0; if((!mScoreBoardPruningUsed) && (!mTimePruningUsed)) mPruningUsed=false; } /*************************************** * * activates the time pruning with the give cuOffPoint * *************************************** * * modification history * * @Author Henning Mueller * HM 030599 created * ****************************************/ void CQInvertedFile::useTimePruning(double inTimeCutoffPoint){ mPruningUsed=true; mTimePruningUsed=true; mStoppingTime=inTimeCutoffPoint; } /*************************************** * * releases the timePruning * *************************************** * * modification history * * @Author Henning Mueller * HM 030599 created * ****************************************/ void CQInvertedFile::releaseTimePruning(){ mTimePruningUsed=false; mStoppingTime=0; if ((!mScoreBoardPruningUsed) && (!mFeaturePruningUsed)) mPruningUsed=false; } /*************************************** * * creates one entry in the scoreboardPruning * *************************************** * * modification history * * @Author Henning Mueller * HM 030599 created * ****************************************/ void CQInvertedFile::useScoreBoardPruning(double inCutoffPoint, double reduceTo){ mScoreBoardPruningUsed=true; mPruningUsed=true; /* if there is still room in the list */ if(mNumberofUsedScoreBoardPrunings(mAccessor); if(!lAccessor){ my_throw(VEWrongAlgorithm("finishInit")); } mWeighter->setAccessor(*lAccessor); } CWeighter& CQInvertedFile::getWeighter(){ return *mWeighter; }; gift-0.1.14/libGIFTQuInvertedFile/cc/CQueryNormalizer.cc0000644000175200001440000000601710220502727017644 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CQueryNormalizer * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #include "libGIFTQuInvertedFile/include/CQueryNormalizer.h" /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ CQueryNormalizer::CQueryNormalizer(const CAcInvertedFile* inAccessor): mAccessor(inAccessor){ reset(); }; /*************************************** * * setAccessor * **************************************** * * modification history * * * ****************************************/ void CQueryNormalizer::setAccessor(const CAcInvertedFile* inAccessor){ mAccessor= inAccessor; }; /*************************************** * * reset * **************************************** * * modification history * * * ****************************************/ void CQueryNormalizer::reset(){ mValue=0; } /*************************************** * * getValue * **************************************** * * modification history * * * ****************************************/ double CQueryNormalizer::getValue()const{ return mValue; } /*************************************** * * considerQueryFeature * **************************************** * * modification history * * * ****************************************/ void CQueryNormalizer::considerQueryFeature(const CWeightingFunction& inFeature){ #define THIS_SHOULD_NEVER_BE_CALLED 0 assert(THIS_SHOULD_NEVER_BE_CALLED); }; /*************************************** * * clone: This permits us to store * completely preconfiguered normalizers * and use them when needed * **************************************** * * modification history * * * ****************************************/ CQueryNormalizer* CQueryNormalizer::clone()const{ cout << "here in clone" << flush; return new CQueryNormalizer(*this); } gift-0.1.14/libGIFTQuInvertedFile/cc/CWFBestFullyWeighted.cc0000644000175200001440000000662410220502727020327 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CWFBestFullyWeighted * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #include "libGIFTQuInvertedFile/include/CWFBestFullyWeighted.h" #include #include "FeatureExtraction/gift_features.h" /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ CWFBestFullyWeighted:: CWFBestFullyWeighted(const CAcInvertedFile* inAccessor, CQueryNormalizer* inQueryNormalizer, CQueryNormalizer* inThisNormalizer): CWeightingFunction(inAccessor, inQueryNormalizer, inThisNormalizer) { } /*************************************** * * subApply * **************************************** * * modification history * * * ****************************************/ double CWFBestFullyWeighted::subApply(double inDocumentFrequency, double inSquareDFLogICFSum)const{ TID lFeatureID=mID; double lCollectionFrequency= mAccessor->FeatureToCollectionFrequency(lFeatureID); double lLogCF=-log(lCollectionFrequency); if((mFeatureDescription==COL_HST) || (mFeatureDescription==GABOR_HST)) lLogCF= 1 / inDocumentFrequency; return //document term weight (inDocumentFrequency*lLogCF) / sqrt(inSquareDFLogICFSum) //query term weight *(0.5+ (0.5*getTermFrequency() /mQueryNormalizer->getValue()) ) * lLogCF * CWeightingFunction::subApply(inDocumentFrequency, 1); } /*************************************** * * apply * **************************************** * * modification history * * * ****************************************/ double CWFBestFullyWeighted::apply(const CDocumentFrequencyElement& inResultFeature)const{ return subApply(inResultFeature.getDocumentFrequency(), mAccessor -> DIDToSquareDFLogICFSum(inResultFeature.getID())); } /*************************************** * * clone * **************************************** * * modification history * * * ****************************************/ /// CWeightingFunction* CWFBestFullyWeighted::clone()const{ CWeightingFunction* lRetVal=new CWFBestFullyWeighted(mAccessor, mQueryNormalizer, mThisNormalizer); return lRetVal; }; gift-0.1.14/libGIFTQuInvertedFile/Makefile.am0000644000175200001440000000002510153634155015530 00000000000000SUBDIRS= cc include gift-0.1.14/libGIFTQuInvertedFile/Makefile.in0000644000175200001440000003456710220474076015562 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = libGIFTQuInvertedFile DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = 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 ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = cc include all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(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 libGIFTQuInvertedFile/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTQuInvertedFile/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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: # 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): @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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: @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; 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='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="../$(top_distdir)" \ distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive 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-info \ install-info-am install-man 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-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: gift-0.1.14/libGIFTQuInvertedFile/include/0000777000175200001440000000000010220511627015177 500000000000000gift-0.1.14/libGIFTQuInvertedFile/include/CWeightingFunctionPointerList.h0000644000175200001440000000321110220502727023215 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CWEIGHTINGFUNCTIONPOINTERLIST * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CWEIGHTINGFUNCTIONPOINTERLIST #define _CWEIGHTINGFUNCTIONPOINTERLIST #include "libGIFTQuInvertedFile/include/uses-declarations.h" #include "libMRML/include/TID.h" #include "libGIFTQuInvertedFile/include/CWeightingFunction.h" #include #include typedef CWeightingFunction* CWeightingFunctionPointer; typedef list CWeightingFunctionPointerList; #endif gift-0.1.14/libGIFTQuInvertedFile/include/CQInvertedFile.h0000644000175200001440000002636510220502727020105 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- /** * * CQInvertedFile.h - each separate Query is * one instance of this class, sets everything for one query * * @Author: Wolfgang Müller, Pruning and some of the bugfixes Henning Müller * * * modification history: * * WM 08 99 added things for session management * added compiler defines documentation * HM 030999 created the documentation * HM 030599 put in the parameters for the pruning * WM 10 98 creation * * * * compiler defines used: * _CINVERTEDFILEQUERY avoids double inclusion * */ #ifndef _CINVERTEDFILEQUERY #define _CINVERTEDFILEQUERY #include "libGIFTQuInvertedFile/include/uses-declarations.h" #include #include #include "libMRML/include/CSelfDestroyPointer.h" #include "libMRML/include/CRelevanceLevelList.h" #include "libMRML/include/CIDRelevanceLevelPairList.h" #include "libGIFTQuInvertedFile/include/CWeightingFunctionPointerList.h" #include "libGIFTQuInvertedFile/include/CWeightingFunctionPointerHash.h" #include "libMRML/include/CAlgorithm.h" #include "libMRML/include/CQuery.h" #include "libGIFTAcInvertedFile/include/CAcInvertedFile.h" #include "libGIFTQuInvertedFile/include/CWeightingFunction.h" #include "libGIFTQuInvertedFile/include/CQueryNormalizer.h" #include "libGIFTAcInvertedFile/include/WeightingFunctionsAndNormalizers.h" class CScoreBoard; class CAcInvertedFile; #include "libGIFTQuInvertedFile/include/CWeighter.h" /** A factory for weighting functions with associated normalizers. The weighting functions are intended to be members of CQInvertedFile where they will be used. */ class CWeighterFactory:protected map< string,CWeighter* >{ public: /** clones a weighter from the factory and sets the pointers in a way, that normalizers etc. are pointing in the right way to each other. However, you still have to set the accessor Why not set it at once? Maybe. */ CWeighter* newWeighter(const string& inID)const; /** constructor: initializes everything fills the map etc. */ CWeighterFactory(); /** Destructor deletes the content it points to */ ~CWeighterFactory(); }; /** The Query manager for Queries on inverted Files */ class CQInvertedFile:public CQuery{ protected: CAlgorithm* mDeb; /** You can choose to use only every lModulo-th feature */ int mModulo; /** Every lModulo-th feature, starting at lModuloClass */ int mModuloClass; /** This is a factory for weighters. With this we can find the weighters */ CWeighterFactory mWeighterFactory; /** The weighter currently used. */ CSelfDestroyPointer mWeighter; /** object of this type to have a list of the features with the weights */ CSelfDestroyPointer mQueryFeatureWeighters; /** * * calculates the score for all the images based on a list of features * * @author Wolfgang Müller */ double keepScore(CScoreBoard& inoutScoreBoard, const CWeightingFunctionPointerList& inFeatures, bool lPositive)const; /** * * calculates the results for the images using some sort of pruning * * @author Henning Müller */ double keepScorePruning(CScoreBoard& inoutScoreBoard, const CWeightingFunctionPointerList& inFeatures, bool inPositive, int inDesiredNumberOfDocuments)const; /** * * * @short creates a list of all the features which * are in one or more of the query images * should be replaced by a version which operates on IDs not URLs * * @author Wolfgang Müller + Pruning: Henning Müller/reprogrammed WM 09-10-00 */ void buildQueryHash(CRelevanceLevelList& inQuery, CWeightingFunctionPointerHash& outQueryFeatureWeighters)const; /** * * Building a list of normalized WF from a hash of Weighting functions * */ void buildNormalizedQueryList(double inPositiveRelevanceSum, double inNegativeRelevanceSum, CWeightingFunctionPointerHash& inQFW, CWeightingFunctionPointerList& outQFW)const; /** * * Building a list of normalized WF from a hash of Weighting functions * */ void buildNormalizedQueryHash(double inPositiveRelevanceSum, double inNegativeRelevanceSum, CWeightingFunctionPointerHash& inQFW)const; protected: /** * * Initializer, used by both construcors * */ void init(); public: /** finish the initialisation phase make the weighting function know who its normalizers are */ void finishInit(); /** * * New constructor, taking as parameter the * algorithm structure, which contains all * the algorithm configuration * */ CQInvertedFile(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm); /** * * destructor * */ ~CQInvertedFile(); /** * * set the Algorithm. * same scheme as in setCollection * */ virtual bool setAlgorithm(CAlgorithm& inAlgorithm); /** * * @short a query which returns ID/RelevanceLevel pairs instead of * instead of URL/RelevanceLevel pairs; * this is faster for merging tasks (to explain the name) * queries for URLs are answered by query (in herited) * */ virtual CIDRelevanceLevelPairList* fastQuery(const CXMLElement& inQuery, int inNumberOfInterestingImages, double inDifferenceToBest); /** * * Assuming that a correct CWeightingFunctionPointerHash has been built by fastQuery * (or another function), this function will do the rest * */ virtual CIDRelevanceLevelPairList* fastQueryByFeature(const CWeightingFunctionPointerList& inQuery, int inNumberOfInterestingImages, double inDifferenceToBest); /** * * Returns the score for one image in the query * */ double DIDToScore(TID inDID, const CWeightingFunctionPointerHash& inQuery)const; /** * * Returns the score for one image in the query * **/ double URLToScore(const string& inURL, const CWeightingFunctionPointerHash& inQuery)const; /** * * Turns the featurelist of a document into a score. * */ double FeatureListToScore(TID inDID, const CDocumentFrequencyList& inFeatureList, const CWeightingFunctionPointerHash& inQuery)const; /** * * */ void buildNormalizedQueryHash(const CRelevanceLevel& inQuery, CWeightingFunctionPointerHash& outQueryFeatureWeighters)const; /* variables needed for the blocking of special feature groups */ /* the upper limit for the number of feature groups needed for the array for the blocking */ static const int MAXIMUMNUMBEROFEATUREGROUPS=50; /* you need to switch this on to activate the blocking of features */ bool mBlockingOn; /* array with all the feature groups and an information if blocked or not */ bool mBlockingArray[MAXIMUMNUMBEROFEATUREGROUPS]; /** * * activateBlockingFeatures - sets the variable to block groups of features * */ void activateBlockingFeatures(); /** * * releaseBlockingFeatures - this turns off the blocking of features * */ void releaseBlockingFeatures(); /** * * featuresBlocked - returns true if the features are blocked * */ bool featuresBlocked()const; /** * * blockFeatureGroup - this blocks one special group of features * */ void blockFeatureGroup(const int featureNumber); /** * * unblockFeatureGroup - this releases the blocking of one feature group * */ void unblockFeatureGroup(const int featureNumber); /** * * isBlocked - returns true if the feature is blocked and false if not * */ bool isBlocked(const int featureNumber)const; /** These are the variables and functions used for the pruning process the maximum number of sets which can be used to prune the ScoreBoard */ static const int MAX_SCOREBOARD_PRUNINGS=10; /** Shows if any pruning is used */ bool mPruningUsed; /** true if the scoreboardis Pruned */ bool mScoreBoardPruningUsed; /** Parameters for scoreboard pruning @author Henning Müller */ typedef struct{ /** @short this marks a fraction of the number of features used */ double stopAfterFeature; /** reduce the scoreboard to a factor of the number of images you want to retrieve */ double reduceTo; } parameterPruningType; /** @Author Henning Müller */ parameterPruningType mScoreBoardPruningArray[MAX_SCOREBOARD_PRUNINGS]; /** @Author Henning Müller */ int mNumberofUsedScoreBoardPrunings; /* true if feature pruning is used */ bool mFeaturePruningUsed; /** @Author Henning Müller */ double mPercentageofFeatures; /* true if time pruning is used */ bool mTimePruningUsed; /** @Author Henning Müller */ double mStoppingTime; /* if this variable is used with scoreboardpruning, the resulting scoreboard will be evaluated with an uninverted file @Author Henning Müller */ bool mEvaluateAfterPruning; /** * * sets back all the variables for the pruning * * @Author Henning Müller */ void releaseAllPrunings(); /** * * activates the feature pruning with evaluating * a certain percentage of the features * * @Author Henning Müller */ void useFeaturePruning(double percentage); /** * * set the variables back to its normal status * * @Author Henning Müller */ void releaseFeaturePruning(); /** * * activates the time pruning with the give cuOffPoint * * @Author Henning Müller */ void useTimePruning(double inTimeCutoffPoint); /** * * releases the timePruning * * @Author Henning Müller */ void releaseTimePruning(); /** * * creates one entry in the scoreboardPruning * * @Author Henning Müller */ void useScoreBoardPruning(double inCutAfterFraction, double inReduceToFactor); /** * * releases all the settings for the ScorboardPruning * * @Author Henning Müller */ void releaseScoreBoardPruning(); /** * * activates the evaluation after the scoreboardPruning * * @Author Henning Müller */ void useEvaluateAfterPruning(); /** * * releases the evaluation after the scoreboard pruning * * @Author Henning Müller */ void releaseEvaluateAfterPruning(); /** * For FerDeLance queries */ CWeighter& getWeighter(); }; /* end of class */ #endif gift-0.1.14/libGIFTQuInvertedFile/include/CWeightingFunction.h0000644000175200001440000002240410220502727021025 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /** -*- mode: c++ -*- */ /** * * CWEIGHTINGFUNCTION * * * * modification history: * * HM 090399 created some documentation * * @author Wolfgang Müller * * compiler defines used: * * */ #ifndef _CWEIGHTINGFUNCTION #define _CWEIGHTINGFUNCTION #include "libGIFTQuInvertedFile/include/uses-declarations.h" #include #include "libMRML/include/TID.h" #include "libGIFTAcInvertedFile/include/CDocumentFrequencyElement.h" #include "libGIFTAcInvertedFile/include/CAcInvertedFile.h" class CQueryNormalizer; /** a universally usable class for weighting. The rationale is, that we want to implement very flexible feature weighting, so flexible that it does not necessarily have anything to do with the initial concept of feature weighting. The scenario: We have query/feedback from the user. That is: We have a list of images with either positive or negative relevance for the user. Each of these images contains a list of features. Now we want to combine the different features. What we usually need to know is: how many images where in the positive feedback, and how many images where in the negative feedback. */ class CWeightingFunction{ protected: /** This value depends on all the elements of the query, which have a positive user-assigned relevance. i.e. not necessarily only on the elements which contain this feature, so it has to be explicitly set using the function setRelevanceSum from the outside. If relevance=+-1 then this is the number of positive images in the query */ double mPositiveRelevanceSum; /** This value depends on all the elements of the query, which have a negative user-assigned relevance. i.e. not necessarily only on the elements which contain this feature, so it has to be explicitly set using the function setRelevanceSum from the outside. If relevance=+-1 then this is the number of negative images in the query */ double mNegativeRelevanceSum; /* A pseudo term frequency calculated from the input at present by calculating the mean. mPositiveTermFrequency/mPositiveRelevanceSum is one term in a a pseudo term frequency used for calculating query weights */ double mPositiveTermFrequency; /* A pseudo term frequency calculated from the input at present by calculating the mean. mNegativeTermFrequency/mNegativeRelevanceSum is the other term in a a pseudo term frequency used for calculating query weights */ double mNegativeTermFrequency; /** At present the feature description is a simple integer which expresses if the feature is a histogram feature or not and if it is a texture feature or not. We probably will use more elaborate descriptions in the future. */ int mFeatureDescription; /** */ TID mID; /** The accessor for the file on which the query is performed */ const CAcInvertedFile* mAccessor; /** FIXME THERE IS A GOOD DESCRIPTION MISSING FOR THE NEXT TWO VARIABLES */ mutable CQueryNormalizer* mQueryNormalizer; /** A normalizer for apply on self */ mutable CQueryNormalizer* mThisNormalizer; /** The query usually will separate into a part which is equal for all the query and a part which is to be calculated for each document. The part which stays constant */ double mQueryFactor; /** */ double mDocumentFactor; public: /** * * The query factor contains all informatio which * depends only on the query. (for efficiency) * */ double getQueryFactor()const; /** * * Calculate the QueryFactor. * */ virtual void preCalculate(); /** * * Constructor: * @param inAccessor: the accessor containing this \ * (for getting information about single documents) * @param inQueryNormalizer: FIXME * @param inThisNormalizer: FIXME */ CWeightingFunction(const CAcInvertedFile* inAccessor=0, CQueryNormalizer* inQueryNormalizer=0, CQueryNormalizer* inThisNormalizer=0); /** * * Set the accessor (should not be needed) * */ void setAccessor(const CAcInvertedFile*); /** * * Set the query normalizer (should not be needed); * */ void setNormalizers(CQueryNormalizer* inQueryNormalizer, CQueryNormalizer* inThisNormalizer); /** * * Set the ID of this feature * */ void setID(TID); /** * * get the ID of this feature * */ TID getID()const; /** * * Setting the relevance sum, * that is the sum of the absolute values of all * relevance levels of all documents of the query * * for rocchio we need this sum to be once calculated * for positive, once for negative feedback images * */ void setRelevanceSum(double inPositiveRelevanceSum, double inNegativeRelevanceSum); /** * * Add a feature. A feature will be a document frequency element * out of the feature file. * */ virtual void addQueryFeature(double inRelevanceLevel, const CDocumentFrequencyElement& inQueryFeature); /** * * Giving a pseudo term frequency for normalization * */ virtual double getTermFrequency()const; /** * * Apply this on a document frequency * */ virtual double subApply(const double inDocumentFrequency, const double inNormalizingFactor)const; /** * * Preparing the right parameters for subApply: Apply this on another feature * */ virtual double apply(const CDocumentFrequencyElement& inResultFeature)const; /** * * Preparing the right parameters for subApply: Apply this on itself * */ double applyOnThis()const; /**For the "prototype pattern": Kinda virtual copy constructor: Gamma/Helm/Johnson/Vlissides p. 107*/ virtual CWeightingFunction* constructNew(TID inID)const; /**For the "prototype pattern": Kinda virtual copy constructor: Gamma/Helm/Johnson/Vlissides p. 107 This is a new version of constructNew which manages to live without the setID function */ virtual CWeightingFunction* clone()const; /** This virtual destructor is here inorder to call the (inherited) default constructors */ virtual ~CWeightingFunction(); friend class CSortByDFTimesLogICF_WF; }; /** * * * */ bool operator<(const CWeightingFunction&, const CWeightingFunction&); /** CWeightingFunction: Sort by FeatureID */ class CSortByFeatureID_WF: public binary_function { /** */ inline bool operator()(const CWeightingFunction& l, const CWeightingFunction& t){ return l.getID(){ /** */ inline bool operator()(const CWeightingFunction& l, const CWeightingFunction& t){ return l.getTermFrequency() * fabs(log(l.mAccessor->FeatureToCollectionFrequency(l.getID()))) < t.getTermFrequency() * fabs(log(t.mAccessor->FeatureToCollectionFrequency(t.getID()))); }; }; /** * * CWeightingFunction: Sort by DocumentFrequency/CollectionFrequency * */ class CSortByQueryFactor_WF: public binary_function { public: /** */ inline bool operator()(const CWeightingFunction& l, const CWeightingFunction& t){ return l.getQueryFactor() < t.getQueryFactor(); }; }; /** CWeightingFunction: Sort by the absolute value of the query factor. This is useful for pruning when the feedback is negative. */ class CSortByAbsQueryFactor_WF: public binary_function { public: /** */ inline bool operator()(const CWeightingFunction& l, const CWeightingFunction& t){ return fabs(l.getQueryFactor()) < fabs(t.getQueryFactor()); }; }; /** * * * */ template class CSortPointers_WF: binary_function{ protected: /** */ CSortOp mSorter; public: /** */ inline CSortPointers_WF(){}; /** */ inline bool operator()(const CWeightingFunction* l, const CWeightingFunction* t){ return mSorter(*l,*t); }; }; #include "libGIFTQuInvertedFile/include/CQueryNormalizer.h" #endif gift-0.1.14/libGIFTQuInvertedFile/include/CQueryNormalizer.h0000644000175200001440000000635210220502727020546 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CQUERYNORMALIZER * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CQUERYNORMALIZER #define _CQUERYNORMALIZER #include "libGIFTQuInvertedFile/include/uses-declarations.h" #include "libGIFTAcInvertedFile/include/CDocumentFrequencyElement.h" #include "libGIFTQuInvertedFile/include/CWeightingFunction.h" #include "libGIFTAcInvertedFile/include/CAcInvertedFile.h" /** For normalizing weights like in Salton/Buckley we need to now all the features in the query or all the features in a document. This base class is supposed to handle both. For getting additional information it needs to know the accessor. */ class CQueryNormalizer{ protected: /*************************************** * * * ***************************************/ /// double mValue; /*************************************** * * * ***************************************/ /// const CAcInvertedFile* mAccessor; public: /*************************************** * * * ***************************************/ /// CQueryNormalizer(const CAcInvertedFile* inAccessor=0); /*************************************** * * * ***************************************/ /// void setAccessor(const CAcInvertedFile* inAccessor); /*************************************** * * * ***************************************/ /// virtual void reset(); /*************************************** * * * ***************************************/ ///Translating the information into a normalizing value in the end virtual double getValue()const; /*************************************** * * * ***************************************/ ///Considers a feature virtual void considerQueryFeature(const CWeightingFunction& inFeature); /*************************************** * * returning a copy of this * ***************************************/ virtual CQueryNormalizer* clone()const; }; #endif gift-0.1.14/libGIFTQuInvertedFile/include/CWFStandardTF.h0000644000175200001440000000450210220502727017620 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CWFSTANDARDTF #define _CWFSTANDARDTF #include "libGIFTQuInvertedFile/include/uses-declarations.h" #include "libGIFTQuInvertedFile/include/CWeightingFunction.h" ///Standard TermFrequency weight class CWFStandardTF:public CWeightingFunction{ protected: public: /*************************************** * * * ***************************************/ /// CWFStandardTF(const CAcInvertedFile* inAccessor=0, CQueryNormalizer* inQueryNormalizer=0, CQueryNormalizer* inThisNormalizer=0); /*************************************** * * * ***************************************/ ///Apply this on a document frequency virtual double subApply(const double inDocumentFrequency, const double inNormalizingFactor)const; /*************************************** * * * ***************************************/ ///Preparing the right parameters for subApply: Apply this on another feature virtual double apply(const CDocumentFrequencyElement& inResultFeature)const; /*************************************** * * * ***************************************/ ///VCC CWeightingFunction* clone()const; }; #endif gift-0.1.14/libGIFTQuInvertedFile/include/CWFBestFullyWeighted.h0000644000175200001440000000474410220502727021230 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CWFBESTFULLYWEIGHTED * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CWFBESTFULLYWEIGHTED #define _CWFBESTFULLYWEIGHTED #include "libGIFTQuInvertedFile/include/uses-declarations.h" #include "libGIFTQuInvertedFile/include/CWeightingFunction.h" ///Weighting function for method 1 class CWFBestFullyWeighted:public CWeightingFunction{ protected: public: /*************************************** * * * ***************************************/ /// CWFBestFullyWeighted(const CAcInvertedFile* inAccessor, CQueryNormalizer* inQueryNormalizer, CQueryNormalizer* inThisNormalizer); /*************************************** * * * ***************************************/ ///Apply this on a document frequency virtual double subApply(const double inDocumentFrequency, const double inNormalizingFactor)const; /*************************************** * * * ***************************************/ ///Preparing the right parameters for subApply: Apply this on another feature virtual double apply(const CDocumentFrequencyElement& inResultFeature)const; /*************************************** * * * ***************************************/ /**For the "prototype pattern": Kinda virtual copy constructor: Gamma/Helm/Johnson/Vlissides p. 107*/ CWeightingFunction* clone()const; }; #endif gift-0.1.14/libGIFTQuInvertedFile/include/CWFBinaryTerm.h0000644000175200001440000000412310220502727017701 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CWFBINARYTERM * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CWFBINARYTERM #define _CWFBINARYTERM #include "libGIFTQuInvertedFile/include/uses-declarations.h" #include "libGIFTQuInvertedFile/include/CWeightingFunction.h" ///Method class CWFBinaryTerm:public CWeightingFunction{ protected: public: /*************************************** * * * ***************************************/ /// CWFBinaryTerm(const CAcInvertedFile* inAccessor=0, CQueryNormalizer* inQueryNormalizer=0, CQueryNormalizer* inThisNormalizer=0); /*************************************** * * * ***************************************/ ///Apply this on a document frequency virtual double subApply(const double inDocumentFrequency, const double inNormalizingFactor)const; /*************************************** * * * ***************************************/ ///Virtual copy constructor CWeightingFunction* clone()const; }; #endif gift-0.1.14/libGIFTQuInvertedFile/include/CQNEuclideanLengthSquare.h0000644000175200001440000000417510220502727022052 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CQNEuclideanLengthSquare * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CQNEUCLIDEANLENGTHSQUARE #define _CQNEUCLIDEANLENGTHSQUARE #include "libGIFTQuInvertedFile/include/uses-declarations.h" #include "libGIFTQuInvertedFile/include/CQueryNormalizer.h" /**The query normalizer for the Best Fully Weighted Method does not work yet (1.12.1998) */ class CQNEuclideanLengthSquare:public CQueryNormalizer{ public: /*************************************** * * * ***************************************/ /// CQNEuclideanLengthSquare(const CAcInvertedFile* inAccessor); /*************************************** * * * ***************************************/ ///Considers a feature virtual void considerQueryFeature(const CWeightingFunction& inFeature); /*************************************** * * returning a copy of this * ***************************************/ virtual CQueryNormalizer* clone()const; }; #endif gift-0.1.14/libGIFTQuInvertedFile/include/CQNBestFullyWeighted.h0000644000175200001440000000350610220502727021225 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /** * * CQNBestFullyWeighted * * * * modification history: * * HM 090399 created the documentation * * @Author: Wolfgang Müller * * compiler defines used: * * */ #ifndef _CQNBESTFULLYWEIGHTED #define _CQNBESTFULLYWEIGHTED #include "libGIFTQuInvertedFile/include/uses-declarations.h" #include "libGIFTQuInvertedFile/include/CQueryNormalizer.h" /**The query normalizer for the Best Fully Weighted Method does not work yet (1.12.1998) */ class CQNBestFullyWeighted:public CQueryNormalizer{ public: /** * * * * */ CQNBestFullyWeighted(const CAcInvertedFile* inAccessor); /** * * * Considers a feature * */ virtual void considerQueryFeature(const CWeightingFunction& inFeature); /** * * returning a copy of this * */ virtual CQueryNormalizer* clone()const; }; #endif gift-0.1.14/libGIFTQuInvertedFile/include/CQNSquareDFLogICFSum.h0000644000175200001440000000340310220502727020752 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /** * * CQNSQUAREDFLOGICFSUM * * * * modification history: * * HM 090399 created the documentation * * @Author: Wolfgang Müller * * compiler defines used: * * */ #ifndef _CQNSQUAREDFLOGICFSUM #define _CQNSQUAREDFLOGICFSUM #include "libGIFTQuInvertedFile/include/uses-declarations.h" #include "libGIFTQuInvertedFile/include/CQueryNormalizer.h" /**The query normalizer for the Best Fully Weighted Method does not work yet (1.12.1998) */ class CQNSquareDFLogICFSum:public CQueryNormalizer{ public: /** * * * */ CQNSquareDFLogICFSum(const CAcInvertedFile* inAccessor); /** * * Considers a feature * */ virtual void considerQueryFeature(const CWeightingFunction& inFeature); /** * * returning a copy of this * */ virtual CQueryNormalizer* clone()const; }; #endif gift-0.1.14/libGIFTQuInvertedFile/include/CWFCoordinationLevel.h0000644000175200001440000000411210220502727021243 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CWFCOORDINATIONLEVEL #define _CWFCOORDINATIONLEVEL #include "libGIFTQuInvertedFile/include/uses-declarations.h" #include "libGIFTQuInvertedFile/include/CWeightingFunction.h" ///Coordination Level, i.e. no weighting class CWFCoordinationLevel:public CWeightingFunction{ protected: public: /*************************************** * * * ***************************************/ /// CWFCoordinationLevel(const CAcInvertedFile* inAccessor=0, CQueryNormalizer* =0, CQueryNormalizer* =0); /*************************************** * * * ***************************************/ ///Apply this on a document frequency virtual double subApply(const double inDocumentFrequency, const double inNormalizingFactor)const; /*************************************** * * * ***************************************/ /// CWeightingFunction* clone()const; }; #endif gift-0.1.14/libGIFTQuInvertedFile/include/Makefile.am0000644000175200001440000000110510153634155017153 00000000000000libGIFTQuInvertedFiledir=$(includedir)/libGIFTQuInvertedFile/include libGIFTQuInvertedFile_HEADERS=CQInvertedFile.h CWFBinaryTerm.h \ CQNBestFullyWeighted.h CWFClassicalIDF.h \ CQNEuclideanLengthSquare.h CWFCoordinationLevel.h \ CQNMaxDocumentFrequency.h CWFProbability.h \ CQNNoNormalization.h CWFStandardTF.h \ CQNSquareDFLogICFSum.h CWeighter.h \ CQueryNormalizer.h CWeightingFunction.h\ CScoreBoard.h CWeightingFunctionPointerHash.h \ CWeightingFunctionPointerList.h \ CWFBestFullyWeighted.h \ CWFBestProbabilistic.h uses-declarations.h gift-0.1.14/libGIFTQuInvertedFile/include/Makefile.in0000644000175200001440000003133210220474077017171 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = libGIFTQuInvertedFile/include DIST_COMMON = $(libGIFTQuInvertedFile_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__installdirs = "$(DESTDIR)$(libGIFTQuInvertedFiledir)" libGIFTQuInvertedFileHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(libGIFTQuInvertedFile_HEADERS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ libGIFTQuInvertedFiledir = $(includedir)/libGIFTQuInvertedFile/include libGIFTQuInvertedFile_HEADERS = CQInvertedFile.h CWFBinaryTerm.h \ CQNBestFullyWeighted.h CWFClassicalIDF.h \ CQNEuclideanLengthSquare.h CWFCoordinationLevel.h \ CQNMaxDocumentFrequency.h CWFProbability.h \ CQNNoNormalization.h CWFStandardTF.h \ CQNSquareDFLogICFSum.h CWeighter.h \ CQueryNormalizer.h CWeightingFunction.h\ CScoreBoard.h CWeightingFunctionPointerHash.h \ CWeightingFunctionPointerList.h \ CWFBestFullyWeighted.h \ CWFBestProbabilistic.h uses-declarations.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(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 libGIFTQuInvertedFile/include/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTQuInvertedFile/include/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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-libGIFTQuInvertedFileHEADERS: $(libGIFTQuInvertedFile_HEADERS) @$(NORMAL_INSTALL) test -z "$(libGIFTQuInvertedFiledir)" || $(mkdir_p) "$(DESTDIR)$(libGIFTQuInvertedFiledir)" @list='$(libGIFTQuInvertedFile_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(libGIFTQuInvertedFileHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libGIFTQuInvertedFiledir)/$$f'"; \ $(libGIFTQuInvertedFileHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libGIFTQuInvertedFiledir)/$$f"; \ done uninstall-libGIFTQuInvertedFileHEADERS: @$(NORMAL_UNINSTALL) @list='$(libGIFTQuInvertedFile_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f '$(DESTDIR)$(libGIFTQuInvertedFiledir)/$$f'"; \ rm -f "$(DESTDIR)$(libGIFTQuInvertedFiledir)/$$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 $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libGIFTQuInvertedFiledir)"; 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: -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 \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-libGIFTQuInvertedFileHEADERS 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 uninstall-libGIFTQuInvertedFileHEADERS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-libGIFTQuInvertedFileHEADERS \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags uninstall uninstall-am uninstall-info-am \ uninstall-libGIFTQuInvertedFileHEADERS # 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: gift-0.1.14/libGIFTQuInvertedFile/include/CWeighter.h0000644000175200001440000000430510220502727017150 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CWEIGHTER #define _CWEIGHTER #include "libGIFTQuInvertedFile/include/uses-declarations.h" class CWeightingFunction; class CQueryNormalizer; class CAcInvertedFile; /** A weighter is a set of WeightingFunction and normalizers which are going to be used together. Also: The content of the weighting function factory @author Wolfgang Müller */ class CWeighter{ /** */ CWeightingFunction* mWeightingFunction; /** */ CQueryNormalizer* mDocumentNormalizer; /** */ CQueryNormalizer* mQueryNormalizer; public: /** constructor */ CWeighter(CWeightingFunction* inWeightingFunction=0, CQueryNormalizer* inDocumentNormalizer=0, CQueryNormalizer* inQueryNormalizer=0); /** make the weighting function know who its normalizers are */ void init(); /** Set for all content the accessor properly and then call init. */ void setAccessor(CAcInvertedFile& inAccessor); /** clone: clone an init-ed copy of this */ CWeighter* clone()const; /** destructor: deletes all content. */ ~CWeighter(); /** */ CWeightingFunction* getWeightingFunction()const; /** */ CQueryNormalizer* getDocumentNormalizer()const; /** */ CQueryNormalizer* getQueryNormalizer()const; }; #endif gift-0.1.14/libGIFTQuInvertedFile/include/CWFClassicalIDF.h0000644000175200001440000000432110220502727020046 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CWFCLASSICALIDF #define _CWFCLASSICALIDF #include "libGIFTQuInvertedFile/include/uses-declarations.h" #include "libGIFTQuInvertedFile/include/CWeightingFunction.h" ///Classical IDF weight class CWFClassicalIDF:public CWeightingFunction{ protected: public: /*************************************** * * * ***************************************/ /// CWFClassicalIDF(const CAcInvertedFile* inAccessor=0, CQueryNormalizer* inQueryNormalizer=0, CQueryNormalizer* inThisNormalizer=0); /*************************************** * * * ***************************************/ /// void preCalculate(); /*************************************** * * * ***************************************/ ///Apply this on a document frequency virtual double subApply(const double inDocumentFrequency, const double inNormalizingFactor)const; /*************************************** * * * ***************************************/ ///Virtual Copy Constructor CWeightingFunction* clone()const; }; #endif gift-0.1.14/libGIFTQuInvertedFile/include/CScoreBoard.h0000644000175200001440000000506010220502727017414 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _SCOREBOARD #define _SCOREBOARD #include #include #ifdef HAS_HASH_MAP #include #else #define hash_map map #endif #include #include "libMRML/include/CRelevanceLevel.h" #include "libMRML/include/CRelevanceLevelList.h" #include "libGIFTQuInvertedFile/include/CWeightingFunction.h" #include "libGIFTAcInvertedFile/include/CDocumentFrequencyElement.h" class CAcInvertedFile; /** * * @name SCOREBOARD * * For counting the scores when processing the query * @author Wolfgang Mueller, changes for pruning Henning Mueller * * * modification history: * WM 1099 filled the lacking documentation * HM 090399 created the documentation * WM 1199 created the file * * * compiler defines used: * * */ class CScoreBoard:public hash_map,public binary_function{ /* this variable blocks the adding of new documents to the scoreboard */ bool mIgnoreNewValues; public: /** * * needs an accessor for initialization * */ CScoreBoard(); /** * * * */ void operator()(const CWeightingFunction&, const CDocumentFrequencyElement&); /** * * prints out the Scoreboard on the screen * */ void output(ostream&,const CAccessor&)const; /** * * sets the variable to avoid adding new images to the Scoreboard * */ void setIgnore(); /** * * allows the adding of new members to the scoreboard again * */ void releaseIgnore(); /** * * limits the scoreboard to the best n results * */ void limitNumberTo(int maximumNumber); }; #endif gift-0.1.14/libGIFTQuInvertedFile/include/CQNNoNormalization.h0000644000175200001440000000464710220502727020765 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CQNNONORMALIZATION * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CQNNONORMALIZATION #define _CQNNONORMALIZATION #include "libGIFTQuInvertedFile/include/uses-declarations.h" #include "libGIFTAcInvertedFile/include/CDocumentFrequencyElement.h" #include "libGIFTQuInvertedFile/include/CWeightingFunction.h" #include "libGIFTAcInvertedFile/include/CAcInvertedFile.h" #include "libGIFTQuInvertedFile/include/CQueryNormalizer.h" /** Empty normalizer for the trivial case. */ class CQNNoNormalization:public CQueryNormalizer{ public: /*************************************** * * * ***************************************/ /// CQNNoNormalization(const CAcInvertedFile* inAccessor=0); /*************************************** * * * ***************************************/ ///Translating in the end the information into a normalizing value virtual double getValue()const; /*************************************** * * * ***************************************/ ///Considers a feature virtual void considerQueryFeature(const CWeightingFunction& inFeature); /*************************************** * * returning a copy of this * ***************************************/ virtual CQueryNormalizer* clone()const; }; #endif gift-0.1.14/libGIFTQuInvertedFile/include/CWFBestProbabilistic.h0000644000175200001440000000461210220502727021234 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CWFBESTPROBABILISTIC * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CWFBESTPROBABILISTIC #define _CWFBESTPROBABILISTIC #include "libGIFTQuInvertedFile/include/uses-declarations.h" #include "libGIFTQuInvertedFile/include/CWeightingFunction.h" ///Weighting Function method 2 class CWFBestProbabilistic:public CWeightingFunction{ protected: public: /*************************************** * * * ***************************************/ /// CWFBestProbabilistic(const CAcInvertedFile* inAccessor=0, CQueryNormalizer* inQueryNormalizer=0, CQueryNormalizer* inThisNormalizer=0); /*************************************** * * * ***************************************/ ///Apply this on a document frequency virtual double subApply(const double inDocumentFrequency, const double inNormalizingFactor)const; /*************************************** * * * ***************************************/ ///Preparing the right parameters for subApply: Apply this on another feature virtual double apply(const CDocumentFrequencyElement& inResultFeature)const; /*************************************** * * * ***************************************/ ///Virtual copy constructor CWeightingFunction* clone()const; }; #endif gift-0.1.14/libGIFTQuInvertedFile/include/uses-declarations.h0000644000175200001440000000245310220502727020716 00000000000000/* -*- mode: c++ -*- Path: ./libGIFTQuInvertedFile/include/uses-declarations.h */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /* Author: Wolfgang Müller (via perl script) use namespace definitions for libGIFTQuInvertedFile. to be included into all include files of this library */ #ifndef _LIBGIFTQUINVERTEDFILE_USES_DECLARATIONS_ #define _LIBGIFTQUINVERTEDFILE_USES_DECLARATIONS_ using namespace std; #endif gift-0.1.14/libGIFTQuInvertedFile/include/CQNMaxDocumentFrequency.h0000644000175200001440000000404310220502727021736 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CQNMaxDocumentFrequency * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CQNMAXDOCUMENTFREQUENCY #define _CQNMAXDOCUMENTFREQUENCY #include "libGIFTQuInvertedFile/include/uses-declarations.h" #include "libGIFTQuInvertedFile/include/CQueryNormalizer.h" class CQNMaxDocumentFrequency:public CQueryNormalizer{ public: /*************************************** * * * ***************************************/ /// CQNMaxDocumentFrequency(const CAcInvertedFile* inAccessor); /*************************************** * * * ***************************************/ ///Considers a feature virtual void considerQueryFeature(const CWeightingFunction& inFeature); /*************************************** * * returning a copy of this * ***************************************/ virtual CQueryNormalizer* clone()const; }; #endif gift-0.1.14/libGIFTQuInvertedFile/include/CWFProbability.h0000644000175200001440000000413310220502727020106 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CWFBINARYTERM * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CWFPROBABILITY #define _CWFPROBABILITY #include "libGIFTQuInvertedFile/include/uses-declarations.h" #include "libGIFTQuInvertedFile/include/CWeightingFunction.h" ///Method class CWFProbability:public CWeightingFunction{ protected: public: /*************************************** * * * ***************************************/ /// CWFProbability(const CAcInvertedFile* inAccessor=0, CQueryNormalizer* inQueryNormalizer=0, CQueryNormalizer* inThisNormalizer=0); /*************************************** * * * ***************************************/ ///Apply this on a document frequency virtual double subApply(const double inDocumentFrequency, const double inNormalizingFactor)const; /*************************************** * * * ***************************************/ ///Virtual copy constructor CWeightingFunction* clone()const; }; #endif gift-0.1.14/libGIFTQuInvertedFile/include/CWeightingFunctionPointerHash.h0000644000175200001440000000437010220502727023174 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /** * * * * * * modification history: * * HM 090399 created the documentation * * * * compiler defines used: * * */ #ifndef _CWEIGHTINGFUNCTIONPOINTERHASH #define _CWEIGHTINGFUNCTIONPOINTERHASH #include "libGIFTQuInvertedFile/include/uses-declarations.h" #include #include #ifdef HAS_HASH_MAP #include #else #define hash_map map #endif #include "libMRML/include/TID.h" #include "libGIFTQuInvertedFile/include/CWeightingFunction.h" #include "libGIFTQuInvertedFile/include/CWeightingFunctionPointerList.h" /** A hash of weighting function pointers */ class CWeightingFunctionPointerHash:public hash_map{ protected: /** For making the change between different map types easier */ typedef hash_map CFather; /** */ const CWeightingFunction& mWeightingFunction; public: /** * * * */ CWeightingFunctionPointerHash(const CWeightingFunction& inWF); /** * * * */ CWeightingFunctionPointerHash::CFather::size_type size()const; /** clears features before destroying this */ ~CWeightingFunctionPointerHash(); /** * */ void clearFeatures(); /** * * * */ void addFeature(const double inRelevanceLevel, const CDocumentFrequencyElement& inElement); }; #endif gift-0.1.14/ltmain.sh0000644000175200001440000055451710202343026011276 00000000000000# 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 # 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., 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. 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" # define SED for historic ltconfig's generated by Libtool 1.3 test -z "$SED" && SED=sed # 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.10 TIMESTAMP=" (1.1220.2.131 2004/09/19 12:46:56)" # 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 # 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= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" if test -z "$max_cmd_len"; then i=0 testring="ABCD" new_result= # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while (test "X"`$SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \ = "XX$testring") >/dev/null 2>&1 && new_result=`expr "X$testring" : ".*" 2>&1` && max_cmd_len="$new_result" && test "$i" != 17 # 1/2 MB should be enough do i=`expr $i + 1` testring="$testring$testring" done testring= # 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. max_cmd_len=`expr $max_cmd_len \/ 2` fi ##################################### # Shell function definitions: # This seems to be the best place for them # 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 /{x;/import/!{s/^/import/;h;p;};x;};}'` if test "X$win32_nmres" = "Ximport" ; then win32_libid_type="x86 archive import" else win32_libid_type="x86 archive static" fi 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 # user sometimes does CC=-gcc so we need to match that to 'gcc' trimedcc=`echo ${CC} | $SED -e "s/${host}-//g"` # and sometimes libtool has CC=-gcc but user does CC=gcc extendcc=${host}-${CC} case "$@ " in "gcc "* | " gcc "* | "${host}-gcc "* | " ${host}-gcc "*) tagname=CC break ;; "$trimedcc "* | " $trimedcc "* | "`$echo $trimedcc` "* | " `$echo $trimedcc` "*|\ "$extendcc "* | " $extendcc "* | "`$echo $extendcc` "* | " `$echo $extendcc` "*|\ " $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_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_xdir="$my_gentop/$my_xlib" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" status=$? if test "$status" -ne 0 && test ! -d "$my_xdir"; then 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=`basename $darwin_archive` 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}" # Remove the table of contents from the thin files. $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF 2>/dev/null || true $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF\ SORTED 2>/dev/null || true cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" $AR -xo "${darwin_base_archive}" rm "${darwin_base_archive}" cd "$darwin_curdir" done # $darwin_arches ## Okay now we have a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f | 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 -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir (cd $my_xdir && $AR x $my_xabs) || exit $? fi # $darwin_arches fi # $run ;; *) # We will extract separately just the conflicting names and we will # no longer touch any unique names. It is faster to leave these # extract automatically by $AR in one run. $show "(cd $my_xdir && $AR x $my_xabs)" $run eval "(cd \$my_xdir && $AR x \$my_xabs)" || exit $? if ($AR t "$my_xabs" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 $AR t "$my_xabs" | sort | uniq -cd | while read -r count name do i=1 while test "$i" -le "$count" do # Put our $i before any first dot (extension) # Never overwrite any file name_to="$name" while test "X$name_to" = "X$name" || test -f "$my_xdir/$name_to" do name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $my_xdir && $AR xN $i $my_xabs '$name' && $mv '$name' '$name_to')" $run eval "(cd \$my_xdir && $AR xN $i \$my_xabs '$name' && $mv '$name' '$name_to')" || exit $? i=`expr $i + 1` done done fi ;; 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\" # 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" $echo $echo "Copyright (C) 2003 Free Software Foundation, Inc." $echo "This is free software; see the source for copying conditions. There is NO" $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $EXIT_SUCCESS ;; --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 $EXIT_SUCCESS ;; --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 $EXIT_SUCCESS ;; --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 ;; --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 # 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, so we specify it 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 ;; *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; 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 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 "$srcfile" "$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 $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 else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi fi build_libtool_libs=no build_old_libs=yes prefer_static_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 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 ;; *) 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 ;; -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 exit $EXIT_FAILURE 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*) case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-mingw* | *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd*) # 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 esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # gcc -m* arguments should be passed to the linker via $compiler_flags # in order to pass architecture information to the linker # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo # but this is not reliable with gcc because gcc may use -mfoo to # select a different linker, different libraries, etc, while # -Wl,-mfoo simply passes -mfoo to the linker. -m*) # 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" if test "$with_gcc" = "yes" ; then compiler_flags="$compiler_flags $arg" fi continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows # 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) # 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 ;; -Kthread | -mthreads | -mt | -pthread | -pthreads | -threads | -qthreaded | -kthread ) compiler_flags="$compiler_flags $arg" 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 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 status=$? if test "$status" -ne 0 && test ! -d "$output_objdir"; then 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 notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` if eval $echo \"$deplib\" 2>/dev/null \ | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib'" 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 # 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 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 -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var"; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $dir" ;; 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 if test -n "$library_names" && { test "$prefer_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* ) 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 convenience="$convenience $dir/$old_library" old_convenience="$old_convenience $dir/$old_library" deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$deplibs $path" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows) 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 - 1` age="$number_minor" revision="$number_minor" ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in [0-9]*) ;; *) $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in [0-9]*) ;; *) $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in [0-9]*) ;; *) $echo "$modename: AGE \`$age' is not 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` verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) major=`expr $current - $age + 1` 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*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *) # 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 # It is ok to link against an archive when # building a shared library. if $AR -t $potlib > /dev/null 2>&1; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi 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 # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names 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" 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=: 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" : ".*"` && 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 # 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/$save_output-${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" : ".*"` && 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/$save_output-${k}.$objext k=`expr $k + 1` output=$output_objdir/$save_output-${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 reloadale object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$save_output-${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" || 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 $? exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" 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 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*) case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; 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/$output.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' 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. */ const struct { 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 -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC -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. compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; *) $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" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" 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 $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" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $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" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if 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* ) cwrappersource=`$echo ${objdir}/lt-${output}.c` cwrapper=`$echo ${output}.exe` $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #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 '/' #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 #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 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); char * basename (const char *name); char * fnqualify(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 ((char *) basename (argv[0])); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = fnqualify(argv[0]); /* 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; EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } char * basename (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha (name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return (char *) base; } char * fnqualify(const char *path) { size_t size; char *p; char tmp[LT_PATHMAX + 1]; assert(path != NULL); /* Is it qualified already? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha (path[0]) && path[1] == ':') return xstrdup (path); #endif if (IS_DIR_SEPARATOR (path[0])) return xstrdup (path); /* prepend the current directory */ /* doesn't handle '~' */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ p = XMALLOC(char, size); sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); return p; } 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 -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' # 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 \${1+\"\$@\"}\" 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 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 # GNU ar 2.10+ was changed to match POSIX; thus no paths are # encoded into archives. This makes 'ar r' malfunction in # this piecewise linking case whenever conflicting object # names appear in distinct ar calls; check, warn and compensate. if (for obj in $save_oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 AR_FLAGS=cq fi # 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" : ".*"` && 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" | $Xsed -e "$sed_quote_subst"` 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 # We do not want portage's install root ($D) present. Check only for # this if the .la is being installed. if test "$installed" = yes && test "$D"; then eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D::g" -e 's://:/:g'` else mynewdependency_lib="$libdir/$name" fi # Do not add duplicates if test "$mynewdependency_lib"; then my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"` if test -z "$my_little_ninja_foo_1"; then newdependency_libs="$newdependency_libs $mynewdependency_lib" fi fi ;; *) if test "$installed" = yes; then # Rather use S=WORKDIR if our version of portage supports it. # This is because some ebuild (gcc) do not use $S as buildroot. if test "$PWORKDIR"; then S="$PWORKDIR" fi # We do not want portage's build root ($S) present. my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"` if test -n "$my_little_ninja_foo_2" && test "$S"; then mynewdependency_lib="" # We do not want portage's install root ($D) present. my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"` elif test -n "$my_little_ninja_foo_3" && test "$D"; then eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D::g" -e 's://:/:g'` else mynewdependency_lib="$deplib" fi else mynewdependency_lib="$deplib" fi # Do not add duplicates if test "$mynewdependency_lib"; then my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"` if test -z "$my_little_ninja_foo_4"; then newdependency_libs="$newdependency_libs $mynewdependency_lib" fi fi ;; 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 # Do not add duplicates if test "$installed" = yes && test "$D"; then install_libdir=`echo "$install_libdir" |sed -e "s:$D::g" -e 's://:/:g'` fi $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" | $Xsed | 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) prev="-f" ;; -g) prev="-g" ;; -m) prev="-m" ;; -o) prev="-o" ;; -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" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` 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. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" $run eval "(cd $destdir && $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" || 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= # To insure that "foo" is sourced, and not "foo.exe", # finese the cygwin/MSYS system by explicitly sourcing "foo." # which disallows the automatic-append-.exe behavior. case $build in *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; *) wrapperdot=${wrapper} ;; esac # If there is no directory component, then add one. case $file in */* | *\\*) . ${wrapperdot} ;; *) . ./${wrapperdot} ;; 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= # To insure that "foo" is sourced, and not "foo.exe", # finese the cygwin/MSYS system by explicitly sourcing "foo." # which disallows the automatic-append-.exe behavior. case $build in *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; *) wrapperdot=${wrapper} ;; esac # If there is no directory component, then add one. case $file in */* | *\\*) . ${wrapperdot} ;; *) . ./${wrapperdot} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir="/tmp" test -n "$TMPDIR" && tmpdir="$TMPDIR" tmpdir="$tmpdir/libtool-$$" save_umask=`umask` umask 0077 if $mkdir "$tmpdir"; then umask $save_umask else umask $save_umask $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $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 anyways 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 "----------------------------------------------------------------------" $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 "----------------------------------------------------------------------" 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 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE 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 if test "${save_LC_ALL+set}" = set; then LC_ALL="$save_LC_ALL"; export LC_ALL fi if test "${save_LANG+set}" = set; then LANG="$save_LANG"; export LANG fi # 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" test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" if test "$mode" = uninstall; then 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. fi 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 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 $EXIT_SUCCESS # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: gift-0.1.14/THANKS0000644000175200001440000000032610153634155010364 00000000000000Thanks a lot, to Arjen P. De Vries for testing the installation and the program. Thanks to Jon Snader for his book and talking sockets with me. Thanks for reading this. FIXME: we need something better here... :-)gift-0.1.14/configure0000755000175200001440000301432710220474102011356 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59. # # Copyright (C) 2003 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 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+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. 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 ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # 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'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # 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 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="libMRML/cc/CAccessorFactory.cc" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE RANLIB ac_ct_RANLIB build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBTOOL_DEPS MAGICK PERL GIFT_MYSQL_DIR GIFT_LIB_VERSION_INFO UNPUBLISHED UNPUBLISHED_DIR GIFT_INTERNAL_FLAG GIFT_INTERNAL_PERLS WEB_PUBLISHING_DIRECTORY WEB_PUBLISHING_LOCATION PERL_LD_ADD acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS DEBEXECBINDIR DEBPERLLIBDIR DEBSHAREDIR DEBDATADIR BAYESIAN GIFT_BAYESIAN_DIR CA_X_DISTANCEMATRIX GIFT_BAYESIAN_FLAG BAYESIAN_LD_ADD EMACS EMACSLOADPATH lispdir CONVERT DOXYGEN SGML2INFO SGML2TXT SGML2LATEX PRE_INSTALL_LIBDIRS PRE_INSTALL_LINKDIRS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= 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 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -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 | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -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 ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) 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 ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # 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 its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CXX_set=${CXX+set} ac_env_CXX_value=$CXX ac_cv_env_CXX_set=${CXX+set} ac_cv_env_CXX_value=$CXX ac_env_CXXFLAGS_set=${CXXFLAGS+set} ac_env_CXXFLAGS_value=$CXXFLAGS ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ac_cv_env_CXXFLAGS_value=$CXXFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP ac_env_CXXCPP_set=${CXXCPP+set} ac_env_CXXCPP_value=$CXXCPP ac_cv_env_CXXCPP_set=${CXXCPP+set} ac_cv_env_CXXCPP_value=$CXXCPP ac_env_F77_set=${F77+set} ac_env_F77_value=$F77 ac_cv_env_F77_set=${F77+set} ac_cv_env_F77_value=$F77 ac_env_FFLAGS_set=${FFLAGS+set} ac_env_FFLAGS_value=$FFLAGS ac_cv_env_FFLAGS_set=${FFLAGS+set} ac_cv_env_FFLAGS_value=$FFLAGS ac_env_EMACS_set=${EMACS+set} ac_env_EMACS_value=$EMACS ac_cv_env_EMACS_set=${EMACS+set} ac_cv_env_EMACS_value=$EMACS ac_env_EMACSLOADPATH_set=${EMACSLOADPATH+set} ac_env_EMACSLOADPATH_value=$EMACSLOADPATH ac_cv_env_EMACSLOADPATH_set=${EMACSLOADPATH+set} ac_cv_env_EMACSLOADPATH_value=$EMACSLOADPATH # # 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 \`..'] _ACEOF cat <<_ACEOF 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] --datadir=DIR read-only architecture-independent data [PREFIX/share] --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] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-interactive: GET AUTOMATICALLY THE PREREQUISITES FOR THIS PACKAGE. NEEDS ANSWERING QUESTIONS INTERACTIVLY. --disable-foreign-urls allows user to query for images unknown to the system. --enable-gift To be used by the GIFT group for things which are not yet published --enable-set-web-publishing-directory setting the directory of the web publishing directory http://your.domain.here/~$USER by default --enable-set-web-publishing-location setting the location of the web publishing location http://your.domain.here/~$USER by default --enable-multi-threading enable multithreading --enable-debian-config the service tag for debian package builders --enable-bayesian TrackingGIFT Bayesian extensions 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-mysql=directory DEFAULT: ${HOME}/gift-mysql ++ note, this feature is not yet used ++ gift will install a mysql database using the command mysql_install_db. The database will reside in the directory given in the option. The database will be used for purposes like user authentification. NOTE: in contrast to normal mysql databases, this database will be readable only by the user who compiled the gift. --with-lispdir override the default lisp directory Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags EMACS the Emacs editor command EMACSLOADPATH the Emacs library search path Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style 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 elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF Copyright (C) 2003 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 0 fi exec 5>config.log cat >&5 <<_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.59. Invocation command line was $ $0 $@ _ACEOF { 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` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&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_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version="1.8" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done 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. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # Keeping the `.' argument allows $(mkdir_p) to be used without # argument. Indeed, we sometimes output rules like # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more # expensive solution, as it forces Make to start a sub-shell.) 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # 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=gift VERSION=0.1.14 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"} AMTAR=${AMTAR-"${am_missing_run}tar"} 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP 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. ac_config_headers="$ac_config_headers gift-config.h" DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-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 ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 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 -std1. */ int osf4_cc_array ['\x00' == 0 ? 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 # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi echo "$as_me:$LINENO: checking for library containing strerror" >&5 echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6 if test "${ac_cv_search_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_strerror=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char strerror (); int main () { strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_strerror="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_strerror" = no; then for ac_lib in cposix; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char strerror (); int main () { strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_strerror="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 echo "${ECHO_T}$ac_cv_search_strerror" >&6 if test "$ac_cv_search_strerror" != no; then test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" fi echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* 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"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 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; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 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 -std1. */ int osf4_cc_array ['\x00' == 0 ? 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 # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cc 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="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CXX" && break done test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi case $enable_ltdl_convenience in no) { { echo "$as_me:$LINENO: error: this package needs a convenience libltdl" >&5 echo "$as_me: error: this package needs a convenience libltdl" >&2;} { (exit 1); exit 1; }; } ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/''libltdl'/libltdlc.la LTDLINCL='-I${top_srcdir}/''libltdl' # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" # Check whether --enable-shared or --disable-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 or --disable-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 or --disable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval="$enable_fast_install" p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi; # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $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 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 && break cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/${ac_tool_prefix}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" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6 NM="$lt_cv_path_NM" echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump'. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | kfreebsd*-gnu) 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)/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 ;; 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*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 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 ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 5310 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case "`/usr/bin/file conftest.o`" in *32-bit*) case $host in x86_64-*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-*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* ;; *-*-linux*) # Test if the compiler is 64bit echo 'int i;' > conftest.$ac_ext lt_cv_cc_64bit_output=no if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *"ELF 64"*) lt_cv_cc_64bit_output=yes ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f 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 echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; esac need_locks="$enable_libtool_lock" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #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)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6 ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cc 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 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_F77" && break done F77=$ac_ct_F77 fi # Provide some information about the compiler. echo "$as_me:6443:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi G77=`test $ac_compiler_gnu = yes && echo yes` ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* ) # 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 *BSD fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. 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` ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 else echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6 fi # Check for command to grab the raw symbol name followed by C symbol from nm. echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform the above into a raw symbol and a C symbol. symxfrm='\1 \2\3 \3' # 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*) 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* | sysv5*) symcode='[BDRT]' ;; 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 # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6 else echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 fi echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6 if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 echo "${ECHO_T}$lt_cv_objdir" >&6 objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e s/^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 M$VC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi AR=$ac_ct_AR else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP 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 "$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_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else MAGIC_CMD=: fi fi fi ;; esac enable_dlopen=yes enable_win32_dll=no # Check whether --enable-libtool-lock or --disable-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 or --without-pic was given. if test "${with_pic+set}" = set; then withval="$with_pic" pic_mode="$withval" else pic_mode=default fi; test -z "$pic_mode" && pic_mode=default # Check if we have a version mismatch between libtool.m4 and ltmain.sh. # # Note: This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined. # We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually # calls AC_LIBTOOL_CONFIG and creates libtool. # echo "$as_me:$LINENO: checking for correct ltmain.sh version" >&5 echo $ECHO_N "checking for correct ltmain.sh version... $ECHO_C" >&6 if test -z "$ltmain"; then echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo echo "*** Gentoo sanity check failed! ***" echo "*** \$ltmain is not defined, please check the patch for consistency! ***" echo exit 1 fi gentoo_lt_version="1.5.10" gentoo_ltmain_version=`grep '^[:space:]*VERSION=' $ltmain | sed -e 's|^[:space:]*VERSION=||'` if test "$gentoo_lt_version" != "$gentoo_ltmain_version"; then echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo echo "*** Gentoo sanity check failed! ***" echo "*** libtool.m4 and ltmain.sh have a version mismatch! ***" echo "*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) ***" echo echo "Please run:" echo echo " libtoolize --copy --force" echo echo "if appropriate, please contact the maintainer of this" echo "package (or your distribution) for help." echo exit 1 else echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 fi # 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;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # # Check for any special shared library compilation flags. # lt_prog_cc_shlib= if test "$GCC" = no; then case $host_os in sco3.2v5*) lt_prog_cc_shlib='-belf' ;; esac fi if test -n "$lt_prog_cc_shlib"; then { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5 echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;} if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : else { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} lt_cv_prog_cc_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_prog_compiler_static" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The compiler 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 else lt_prog_compiler_static_works=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 if test x"$lt_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$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}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7541: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7545: \$? = $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 if test ! -s conftest.err; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | 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' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; 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* | 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*) case $CC in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic='-Kpic' lt_prog_compiler_static='-dn' ;; solaris*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 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 ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 echo "${ECHO_T}$lt_prog_compiler_pic" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext printf "$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}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7784: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7788: \$? = $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 if test ! -s conftest.err; then lt_prog_compiler_pic_works=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 if test x"$lt_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$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}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7844: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:7848: \$? = $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 if test ! -s out/conftest.err; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= 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 ;; 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}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$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}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) 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 ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_cmds="$tmp_archive_cmds" 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 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 -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else archive_expsym_cmds="$tmp_archive_cmds" fi else ld_shlibs=no fi ;; *) 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" = yes; then 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 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 "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.012|aix4.012.*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes 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' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # 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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f 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 $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${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 $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # 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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f 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' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec=' ' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds it's shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case "$cc_basename" in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's 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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) 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* | kfreebsd*-gnu) 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* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -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*|ia64*) archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=no hardcode_shlibpath_var=no ;; ia64*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=no hardcode_shlibpath_var=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; *) 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 ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) 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 ;; 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 ${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=: ;; sco3.2v5*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then 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 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].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; 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.2uw2*) archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=no hardcode_shlibpath_var=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv5*) no_undefined_flag=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now 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' hardcode_libdir_flag_spec= hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6 test "$ld_shlibs" = no && can_build_shared=no 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 # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 echo "${ECHO_T}$archive_cmds_need_lc" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then 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 ';' >/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. 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 else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' 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 ;; linux*) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 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 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 -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else $archive_expsym_cmds="$archive_cmds" fi else ld_shlibs=no fi ;; *) 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)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi 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 ;; kfreebsd*-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='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 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 ;; *) # from 3.2 on shlibpath_overrides_runpath=no 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' ;; 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*) 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=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi case $host_cpu:$lt_cv_cc_64bit_output in powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/X11R6/lib64" sys_lib_search_path_spec="/lib64 /usr/lib64 /usr/local/lib64 /usr/X11R6/lib64" ;; esac # 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' # Find out which ABI we are using (multilib Linux x86_64 hack). libsuff= case "$host_cpu" in x86_64*) echo '#line 9224 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 ;; esac fi rm -rf conftest* ;; *) ;; esac sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; knetbsd*-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='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=no 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" ;; sco3.2v5*) version_type=osf 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 ;; 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.2uw2* | sysv4.3* | sysv5*) 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 ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6 if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which librarie types wil actually be built echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { echo "$as_me:$LINENO: creating $ofile" >&5 echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # 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., 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. # 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 s/^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 # 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 # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$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=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CC="$lt_save_CC" # Check whether --with-tags or --without-tags was given. if test "${with_tags+set}" = set; then withval="$with_tags" tagnames="$withval" fi; if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cc 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_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= # Source file extension for C++ test sources. ac_ext=cc # 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;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # 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 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 unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` # 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 or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.012|aix4.012.*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_CXX=yes 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' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # 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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f 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 $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${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 $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # 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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f 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' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_CXX=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX=' ' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds it's shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi 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}--image-base=0x10000000 ${wl}--out-implib,$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}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case "$cc_basename" in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' 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 ld's 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 $verstring~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 ;; freebsd12*) # 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* | kfreebsd*-gnu) # 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 case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_CXX='+b $libdir' hardcode_libdir_separator_CXX=: ;; ia64*) hardcode_libdir_flag_spec_CXX='-L$libdir' ;; *) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case "$host_cpu" in hppa*64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; *) 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*|ia64*) archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) 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 ia64*|hppa*64*) archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) 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 ;; 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 ${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}${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*) 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 archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $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' ;; 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' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) 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' ;; 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 ${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}${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 ${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 $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}${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 ;; sco*) archive_cmds_need_lc_CXX=no case $cc_basename in CC) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; 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++ no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -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} -nolib ${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 C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac link_all_deplibs_CXX=yes # 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 -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' # 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' fi ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) archive_cmds_need_lc_CXX=no ;; tandem*) case $cc_basename in NCC) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | 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). 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= ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case "$cc_basename" in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_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="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; 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*) case $cc_basename in KCC) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; 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' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; sco*) case $cc_basename in CC) lt_prog_compiler_pic_CXX='-fPIC' ;; *) ;; esac ;; 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 ;; unixware*) ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext printf "$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}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:12375: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:12379: \$? = $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 if test ! -s conftest.err; then lt_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$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}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:12435: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:12439: \$? = $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 if test ! -s out/conftest.err; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no 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 # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then 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 ';' >/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. 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 else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' 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 ;; linux*) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 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 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 -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else $archive_expsym_cmds="$archive_cmds" fi else ld_shlibs=no fi ;; *) 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)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi 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 ;; kfreebsd*-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='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 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 ;; *) # from 3.2 on shlibpath_overrides_runpath=no 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' ;; 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*) 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=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi case $host_cpu:$lt_cv_cc_64bit_output in powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/X11R6/lib64" sys_lib_search_path_spec="/lib64 /usr/lib64 /usr/local/lib64 /usr/X11R6/lib64" ;; esac # 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' # Find out which ABI we are using (multilib Linux x86_64 hack). libsuff= case "$host_cpu" in x86_64*) echo '#line 12991 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 ;; esac fi rm -rf conftest* ;; *) ;; esac sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; knetbsd*-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='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=no 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" ;; sco3.2v5*) version_type=osf 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 ;; 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.2uw2* | sysv4.3* | sysv5*) 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 ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 echo "${ECHO_T}$hardcode_action_CXX" >&6 if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # 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 NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ 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 # 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 # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_CXX" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # 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=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code=" subroutine t\n return\n end\n" # Code to be used in simple link tests lt_simple_link_test_code=" program t\n end\n" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) test "$enable_shared" = yes && enable_static=no ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 test "$ld_shlibs_F77" = no && can_build_shared=no GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | 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' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; 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* | 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*) case $CC in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic_F77='-Kpic' lt_prog_compiler_static_F77='-dn' ;; solaris*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; 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* | sysv5*) 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 ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext printf "$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}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14786: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:14790: \$? = $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 if test ! -s conftest.err; then lt_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 if test x"$lt_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$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}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14846: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:14850: \$? = $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 if test ! -s out/conftest.err; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= 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 ;; 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}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -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}--image-base=0x10000000 ${wl}--out-implib,$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}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) 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 ;; 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 ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_cmds_F77="$tmp_archive_cmds" 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 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 -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else archive_expsym_cmds_F77="$tmp_archive_cmds" fi else ld_shlibs_F77=no fi ;; *) 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" = yes; then 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 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 "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.012|aix4.012.*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_F77=yes 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' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # 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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f 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 $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${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 $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # 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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f 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' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_F77=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77=' ' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds it's shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${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='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case "$cc_basename" in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's 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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) 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* | kfreebsd*-gnu) 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* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -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*|ia64*) archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; ia64*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; *) 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 ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) 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 ;; 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 ${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=: ;; sco3.2v5*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then 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 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].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; 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.2uw2*) archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag_F77='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv5*) no_undefined_flag_F77=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now 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' hardcode_libdir_flag_spec_F77= hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6 test "$ld_shlibs_F77" = no && can_build_shared=no 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 # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then 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 ';' >/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. 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 else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' 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 ;; linux*) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 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 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 -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else $archive_expsym_cmds="$archive_cmds" fi else ld_shlibs=no fi ;; *) 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)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi 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 ;; kfreebsd*-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='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 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 ;; *) # from 3.2 on shlibpath_overrides_runpath=no 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' ;; 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*) 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=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi case $host_cpu:$lt_cv_cc_64bit_output in powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/X11R6/lib64" sys_lib_search_path_spec="/lib64 /usr/lib64 /usr/local/lib64 /usr/X11R6/lib64" ;; esac # 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' # Find out which ABI we are using (multilib Linux x86_64 hack). libsuff= case "$host_cpu" in x86_64*) echo '#line 16206 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 ;; esac fi rm -rf conftest* ;; *) ;; esac sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; knetbsd*-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='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=no 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" ;; sco3.2v5*) version_type=osf 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 ;; 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.2uw2* | sysv4.3* | sysv5*) 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 ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 echo "${ECHO_T}$hardcode_action_F77" >&6 if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi # 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 NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ 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 # 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 # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_F77" # 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=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$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}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16936: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:16940: \$? = $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 if test ! -s conftest.err; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; 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* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux*) case $CC in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic_GCJ='-Kpic' lt_prog_compiler_static_GCJ='-dn' ;; solaris*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; 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* | sysv5*) 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 ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext printf "$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}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:17179: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:17183: \$? = $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 if test ! -s conftest.err; then lt_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$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}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:17239: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:17243: \$? = $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 if test ! -s out/conftest.err; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= 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 ;; 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}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -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}--image-base=0x10000000 ${wl}--out-implib,$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}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) 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 ;; 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 ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_cmds_GCJ="$tmp_archive_cmds" 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 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 -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else archive_expsym_cmds_GCJ="$tmp_archive_cmds" fi else ld_shlibs_GCJ=no fi ;; *) 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" = yes; then 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 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 "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.012|aix4.012.*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_GCJ=yes 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' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # 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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f 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 $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${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 $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # 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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f 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' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_GCJ=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ=' ' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds it's shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${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='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case "$cc_basename" in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's 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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) 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* | kfreebsd*-gnu) 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* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -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*|ia64*) archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; ia64*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; *) 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 ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) 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 ;; 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 ${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=: ;; sco3.2v5*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then 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 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].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; 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.2uw2*) archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag_GCJ='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv5*) no_undefined_flag_GCJ=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now 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' hardcode_libdir_flag_spec_GCJ= hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6 test "$ld_shlibs_GCJ" = no && can_build_shared=no 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 # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then 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 ';' >/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. 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 else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' 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 ;; linux*) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 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 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 -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else $archive_expsym_cmds="$archive_cmds" fi else ld_shlibs=no fi ;; *) 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)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi 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 ;; kfreebsd*-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='GNU ld.so' ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 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 ;; *) # from 3.2 on shlibpath_overrides_runpath=no 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' ;; 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*) 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=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi case $host_cpu:$lt_cv_cc_64bit_output in powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/X11R6/lib64" sys_lib_search_path_spec="/lib64 /usr/lib64 /usr/local/lib64 /usr/X11R6/lib64" ;; esac # 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' # Find out which ABI we are using (multilib Linux x86_64 hack). libsuff= case "$host_cpu" in x86_64*) echo '#line 18619 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 ;; esac fi rm -rf conftest* ;; *) ;; esac sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; knetbsd*-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='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=no 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" ;; sco3.2v5*) version_type=osf 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 ;; 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.2uw2* | sysv4.3* | sysv5*) 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 ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 echo "${ECHO_T}$hardcode_action_GCJ" >&6 if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # 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 NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ 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 # 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 # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_GCJ" # 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=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' # 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"} # Allow CC to be a program name with arguments. compiler=$CC # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC 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 NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ 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 # 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 # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_RC" # 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=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CC="$lt_save_CC" ;; *) { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion echo "$as_me:$LINENO: checking for XML_ParserCreate in -lexpat" >&5 echo $ECHO_N "checking for XML_ParserCreate in -lexpat... $ECHO_C" >&6 if test "${ac_cv_lib_expat_XML_ParserCreate+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lexpat $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XML_ParserCreate (); int main () { XML_ParserCreate (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_expat_XML_ParserCreate=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_expat_XML_ParserCreate=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_expat_XML_ParserCreate" >&5 echo "${ECHO_T}$ac_cv_lib_expat_XML_ParserCreate" >&6 if test $ac_cv_lib_expat_XML_ParserCreate = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBEXPAT 1 _ACEOF LIBS="-lexpat $LIBS" fi #check if image magick is there by checking if the convert tool is there # Extract the first word of "convert", so it can be a program name with args. set dummy convert; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MAGICK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGICK in [\\/]* | ?:[\\/]*) ac_cv_path_MAGICK="$MAGICK" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MAGICK="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi MAGICK=$ac_cv_path_MAGICK if test -n "$MAGICK"; then echo "$as_me:$LINENO: result: $MAGICK" >&5 echo "${ECHO_T}$MAGICK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi #check if there is perl on this system # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PERL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PERL in [\\/]* | ?:[\\/]*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then echo "$as_me:$LINENO: result: $PERL" >&5 echo "${ECHO_T}$PERL" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if perl gift-check-perl-config.pl "XML::DOM" "XML::XQL" "XML::XQL::DOM" "Text::Iconv" "HTTP::Request" "XML::Parser"; then echo "Your perl setup seems to be OK for running the GIFT" ; else { { echo "$as_me:$LINENO: error: There are some modules missing from your perl configuration. Please see the output above." >&5 echo "$as_me: error: There are some modules missing from your perl configuration. Please see the output above." >&2;} { (exit 1); exit 1; }; } fi # Check whether --with-mysql or --without-mysql was given. if test "${with_mysql+set}" = set; then withval="$with_mysql" GIFT_MYSQL_DIR=${HOME}/gift-mysql else GIFT_MYSQL_DIR=${with_MYSQL:-${HOME}/gift-mysql} fi; # Check whether --enable-interactive or --disable-interactive was given. if test "${enable_interactive+set}" = set; then enableval="$enable_interactive" { echo "$as_me:$LINENO: WARNING: INSTALLING PREREQUISITES DUE TO TECHNICAL REASONS WE WILL HAVE TO IGNORE THE --prefix PARAMETERS HERE IF YOU NEED THEM FOR YOUR APPLICATION/INSTALLATION, CALL echo \"perl gift-install-prerequisites.pl /binary/directory /lib/directory\" BY HAND " >&5 echo "$as_me: WARNING: INSTALLING PREREQUISITES DUE TO TECHNICAL REASONS WE WILL HAVE TO IGNORE THE --prefix PARAMETERS HERE IF YOU NEED THEM FOR YOUR APPLICATION/INSTALLATION, CALL echo \"perl gift-install-prerequisites.pl /binary/directory /lib/directory\" BY HAND " >&2;} ${PERL:-perl} gift-install-prerequisites.pl else echo "------------------------------" echo echo "Do you know, that you could get" echo "the prerequisites to the gift automatically??" echo echo "call" echo "perl gift-install-prerequisites.pl /binary/directory /lib/directory" echo echo "------------------------------" fi; GIFT_LIB_VERSION_INFO="-version-info 0:1:5" CXXFLAGS="$CXXFLAGS -DEF_PROTECT_BELOW=1 -DEF_PROTECT_FREE -DEF_PROTECT_ALIGNMENT=8 -DEF_FILL=42 " # Check whether --enable-foreign-urls or --disable-foreign-urls was given. if test "${enable_foreign_urls+set}" = set; then enableval="$enable_foreign_urls" CXXFLAGS="$CXXFLAGS -D IGNORE_UNKNOWN_URLS" echo "Foreign urls disabled" else echo "Foreign urls enabled" fi; CXXFLAGS="$CXXFLAGS" echo "$as_me:$LINENO: checking for /usr/include/mysql++/sqlplus.hh" >&5 echo $ECHO_N "checking for /usr/include/mysql++/sqlplus.hh... $ECHO_C" >&6 if test "${ac_cv_file__usr_include_mysqlpp_sqlplus_hh+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/include/mysql++/sqlplus.hh"; then ac_cv_file__usr_include_mysqlpp_sqlplus_hh=yes else ac_cv_file__usr_include_mysqlpp_sqlplus_hh=no fi fi echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_mysqlpp_sqlplus_hh" >&5 echo "${ECHO_T}$ac_cv_file__usr_include_mysqlpp_sqlplus_hh" >&6 if test $ac_cv_file__usr_include_mysqlpp_sqlplus_hh = yes; then CXXFLAGS="$CXXFLAGS -I /usr/include/mysql++" fi echo "$as_me:$LINENO: checking for /usr/local/include/mysql++/sqlplus.hh" >&5 echo $ECHO_N "checking for /usr/local/include/mysql++/sqlplus.hh... $ECHO_C" >&6 if test "${ac_cv_file__usr_local_include_mysqlpp_sqlplus_hh+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/local/include/mysql++/sqlplus.hh"; then ac_cv_file__usr_local_include_mysqlpp_sqlplus_hh=yes else ac_cv_file__usr_local_include_mysqlpp_sqlplus_hh=no fi fi echo "$as_me:$LINENO: result: $ac_cv_file__usr_local_include_mysqlpp_sqlplus_hh" >&5 echo "${ECHO_T}$ac_cv_file__usr_local_include_mysqlpp_sqlplus_hh" >&6 if test $ac_cv_file__usr_local_include_mysqlpp_sqlplus_hh = yes; then CXXFLAGS="$CXXFLAGS -I /usr/local/include/mysql++" fi echo "$as_me:$LINENO: checking for /usr/include/mysql/mysql.h" >&5 echo $ECHO_N "checking for /usr/include/mysql/mysql.h... $ECHO_C" >&6 if test "${ac_cv_file__usr_include_mysql_mysql_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/include/mysql/mysql.h"; then ac_cv_file__usr_include_mysql_mysql_h=yes else ac_cv_file__usr_include_mysql_mysql_h=no fi fi echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_mysql_mysql_h" >&5 echo "${ECHO_T}$ac_cv_file__usr_include_mysql_mysql_h" >&6 if test $ac_cv_file__usr_include_mysql_mysql_h = yes; then CXXFLAGS="$CXXFLAGS -I /usr/include/mysql" fi echo "$as_me:$LINENO: checking for /usr/local/include/mysql/mysql.h" >&5 echo $ECHO_N "checking for /usr/local/include/mysql/mysql.h... $ECHO_C" >&6 if test "${ac_cv_file__usr_local_include_mysql_mysql_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/local/include/mysql/mysql.h"; then ac_cv_file__usr_local_include_mysql_mysql_h=yes else ac_cv_file__usr_local_include_mysql_mysql_h=no fi fi echo "$as_me:$LINENO: result: $ac_cv_file__usr_local_include_mysql_mysql_h" >&5 echo "${ECHO_T}$ac_cv_file__usr_local_include_mysql_mysql_h" >&6 if test $ac_cv_file__usr_local_include_mysql_mysql_h = yes; then CXXFLAGS="$CXXFLAGS -I /usr/local/include/mysql" fi echo "$as_me:$LINENO: checking 'new SQLQuery()' in -lsqlplus" >&5 echo $ECHO_N "checking 'new SQLQuery()' in -lsqlplus... $ECHO_C" >&6 RESCUE_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -lsqlplus" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { new SQLQuery(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then CXXFLAGS="$CXXFLAGS -D__GIFT_WITH_MYSQL__ " echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no! \nThe flags used in the unsuccessful compile were $CFLAGS $CXXFLAGS $LDFLAGS" >&5 echo "${ECHO_T}no! \nThe flags used in the unsuccessful compile were $CFLAGS $CXXFLAGS $LDFLAGS" >&6 LDFLAGS=$RESCUE_LDFLAGS fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$LDFLAGS " # Check whether --enable-gift or --disable-gift was given. if test "${enable_gift+set}" = set; then enableval="$enable_gift" echo "hier"; case "${enableval}" in yes) VIF='-D__GIFT_UNPUBLISHED_WORK__'; IP='gift-browser-benchmark.pl gift-extract-text-features.pl gift-annotation-to-html.pl gift-ranking-comparison.pl CFCRankingComparison.pm CGraphCollection.pm'; UNPUBLISHED='-lUnpublished';UNPUBLISHED_DIR='-L$(top_srcdir)/libUnpublished/cc';echo "gift-internals" ;; no) VIF=''; IP = ''; echo "no gift-internals";; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-debug" >&5 echo "$as_me: error: bad value ${enableval} for --enable-debug" >&2;} { (exit 1); exit 1; }; } ;; esac; GIFT_INTERNAL_FLAG=${VIF} GIFT_INTERNAL_PERLS=${IP} else GIFT_INTERNAL=false fi; # Check whether --enable-set-web-publishing-directory or --disable-set-web-publishing-directory was given. if test "${enable_set_web_publishing_directory+set}" = set; then enableval="$enable_set_web_publishing_directory" WEB_PUBLISHING_DIRECTORY=${enableval}/ else WEB_PUBLISHING_DIRECTORY=~/public_html/ fi; # Check whether --enable-set-web-publishing-location or --disable-set-web-publishing-location was given. if test "${enable_set_web_publishing_location+set}" = set; then enableval="$enable_set_web_publishing_location" WEB_PUBLISHING_LOCATION=`echo "${enableval}/" |sed "s:/+^:/:" ` else WEB_PUBLISHING_LOCATION="http://localhost/~${USER}" fi; as_ac_File=`echo "ac_cv_file_$PERL" | $as_tr_sh` echo "$as_me:$LINENO: checking for $PERL" >&5 echo $ECHO_N "checking for $PERL... $ECHO_C" >&6 if eval "test \"\${$as_ac_File+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$PERL"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 if test `eval echo '${'$as_ac_File'}'` = yes; then echo "$as_me:$LINENO: checking if we can embed a Perl interpreter into GIFT" >&5 echo $ECHO_N "checking if we can embed a Perl interpreter into GIFT... $ECHO_C" >&6 #RESCUE_LDFLAGS=$LDFLAGS #LDFLAGS=`echo $LDFLAGS \`perl -MExtUtils::Embed -e ldopts \`|sed 's:-Dbool=char::'` RESCUE_CXXFLAGS=$CXXFLAGS CXXFLAGS=`echo $CXXFLAGS -D__GIFT_WITH_PERL__ \`perl -MExtUtils::Embed -e ccopts \`|sed 's:-Dbool=char::'` if $CXX perl-compile-test-program.cc $CXXFLAGS -o perl-compile-test-program $LDFLAGS `echo \`perl -MExtUtils::Embed -e ldopts \`|sed 's:-Dbool=char::'` ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm perl-compile-test-program PERL_LD_ADD=`perl -MExtUtils::Embed -e ldopts` else CXXFLAGS=$RESCUE_CXXFLAGS LDFLAGS="$RESCUE_LDFLAGS -ldl" echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi # Check whether --enable-multi-threading or --disable-multi-threading was given. if test "${enable_multi_threading+set}" = set; then enableval="$enable_multi_threading" 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 acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char pthread_join (); int main () { pthread_join (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then acx_pthread_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 echo "${ECHO_T}$acx_pthread_ok" >&6 if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case "${host_cpu}-${host_os}" in *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthread or # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" ;; esac if test x"$acx_pthread_ok" = xno; then for flag in $acx_pthread_flags; do case $flag in none) echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6 ;; -*) echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6 PTHREAD_CFLAGS="$flag" ;; pthread-config) # Extract the first word of "pthread-config", so it can be a program name with args. set dummy pthread-config; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$acx_pthread_config"; then ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_acx_pthread_config="yes" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no" fi fi acx_pthread_config=$ac_cv_prog_acx_pthread_config if test -n "$acx_pthread_config"; then echo "$as_me:$LINENO: result: $acx_pthread_config" >&5 echo "${ECHO_T}$acx_pthread_config" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test x"$acx_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6 PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then acx_pthread_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 echo "${ECHO_T}$acx_pthread_ok" >&6 if test "x$acx_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$acx_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6 attr_name=unknown for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int attr=$attr; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then attr_name=$attr; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done echo "$as_me:$LINENO: result: $attr_name" >&5 echo "${ECHO_T}$attr_name" >&6 if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then cat >>confdefs.h <<_ACEOF #define PTHREAD_CREATE_JOINABLE $attr_name _ACEOF fi echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6 flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; esac echo "$as_me:$LINENO: result: ${flag}" >&5 echo "${ECHO_T}${flag}" >&6 if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with cc_r # Extract the first word of "cc_r", so it can be a program name with args. set dummy cc_r; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$PTHREAD_CC"; then ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PTHREAD_CC="cc_r" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}" fi fi PTHREAD_CC=$ac_cv_prog_PTHREAD_CC if test -n "$PTHREAD_CC"; then echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5 echo "${ECHO_T}$PTHREAD_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else PTHREAD_CC="$CC" fi # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then CXXFLAGS="$CXXFLAGS -DHAVE_LIBPTHREAD -D__GIFT_NEW_IS_MALLOC -D__GIFT_USES_THREADS__ $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" CC="$PTHREAD_CC" : else acx_pthread_ok=no fi ac_ext=cc 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 dnlelse else { echo "$as_me:$LINENO: WARNING: Use --enable-multi-threading for enabling multi threading" >&5 echo "$as_me: WARNING: Use --enable-multi-threading for enabling multi threading" >&2;} fi; # Check whether --enable-debian-config or --disable-debian-config was given. if test "${enable_debian_config+set}" = set; then enableval="$enable_debian_config" { echo "$as_me:$LINENO: WARNING: Using debian packagers config. Don't use this unless you want to prepare a Debian package for use in the Debian project" >&5 echo "$as_me: WARNING: Using debian packagers config. Don't use this unless you want to prepare a Debian package for use in the Debian project" >&2;} DEBEXECBINDIR=/usr/bin DEBPERLLIBDIR=/usr/share/perl5/GIFT DEBSHAREDIR=/usr/lib DEBDATADIR=/usr/share/libmrml0 else DEBEXECBINDIR=$bindir DEBPERLLIBDIR=$bindir DEBSHAREDIR=$libdir DEBDATADIR=$datadir fi; # Check whether --enable-tracking or --disable-tracking was given. if test "${enable_tracking+set}" = set; then enableval="$enable_tracking" echo "hier"; case "${enableval}" in yes) TVF='-D__GIFT_BAYESIAN__';BAYESIAN='-lBayesian';GIFT_BAYESIAN_DIR='libGIFTQuBayesian libGIFTAcDistanceMatrix';CA_X_DISTANCEMATRIX='CAcDistanceMatrix.cc CAFDistanceMatrix.cc';; no) GIFT_BAYESIAN_DIR='';; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-debug" >&5 echo "$as_me: error: bad value ${enableval} for --enable-debug" >&2;} { (exit 1); exit 1; }; } ;; esac; GIFT_BAYESIAN_FLAG=${TVF} else GIFT_BAYESIAN=false fi; BAYESIAN_LD_ADD='' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done 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. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # If set to t, that means we are running in a shell under Emacs. # If you have an Emacs named "t", then use the full path. test x"$EMACS" = xt && EMACS= for ac_prog in emacs xemacs do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_EMACS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$EMACS"; then ac_cv_prog_EMACS="$EMACS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_EMACS="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi EMACS=$ac_cv_prog_EMACS if test -n "$EMACS"; then echo "$as_me:$LINENO: result: $EMACS" >&5 echo "${ECHO_T}$EMACS" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$EMACS" && break done test -n "$EMACS" || EMACS="no" # Check whether --with-lispdir or --without-lispdir was given. if test "${with_lispdir+set}" = set; then withval="$with_lispdir" lispdir="$withval" echo "$as_me:$LINENO: checking where .elc files should go" >&5 echo $ECHO_N "checking where .elc files should go... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $lispdir" >&5 echo "${ECHO_T}$lispdir" >&6 else echo "$as_me:$LINENO: checking where .elc files should go" >&5 echo $ECHO_N "checking where .elc files should go... $ECHO_C" >&6 if test "${am_cv_lispdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $EMACS != "no"; then if test x${lispdir+set} != xset; then # If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly # Some emacsen will start up in interactive mode, requiring C-x C-c to exit, # which is non-obvious for non-emacs users. # Redirecting /dev/null should help a bit; pity we can't detect "broken" # emacsen earlier and avoid running this altogether. { (echo "$as_me:$LINENO: \$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) \"\\n\")) (setq load-path (cdr load-path)))' conftest.out") >&5 ($EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' conftest.out) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } am_cv_lispdir=`sed -n \ -e 's,/$,,' \ -e '/.*\/lib\/x*emacs\/site-lisp$/{s,.*/lib/\(x*emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \ -e '/.*\/share\/x*emacs\/site-lisp$/{s,.*/share/\(x*emacs/site-lisp\),${datadir}/\1,;p;q;}' \ conftest.out` rm conftest.out fi fi test -z "$am_cv_lispdir" && am_cv_lispdir='${datadir}/emacs/site-lisp' fi echo "$as_me:$LINENO: result: $am_cv_lispdir" >&5 echo "${ECHO_T}$am_cv_lispdir" >&6 lispdir="$am_cv_lispdir" fi; echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi #check if there is image magick convert on this system # Extract the first word of "convert", so it can be a program name with args. set dummy convert; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_CONVERT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CONVERT in [\\/]* | ?:[\\/]*) ac_cv_path_CONVERT="$CONVERT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CONVERT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi CONVERT=$ac_cv_path_CONVERT if test -n "$CONVERT"; then echo "$as_me:$LINENO: result: $CONVERT" >&5 echo "${ECHO_T}$CONVERT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi #check if there is kdoc on the system # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DOXYGEN+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi DOXYGEN=$ac_cv_path_DOXYGEN if test -n "$DOXYGEN"; then echo "$as_me:$LINENO: result: $DOXYGEN" >&5 echo "${ECHO_T}$DOXYGEN" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi #at present we do not draw any consequences out of these checks. # Extract the first word of "sgml2info", so it can be a program name with args. set dummy sgml2info; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_SGML2INFO+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $SGML2INFO in [\\/]* | ?:[\\/]*) ac_cv_path_SGML2INFO="$SGML2INFO" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SGML2INFO="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi SGML2INFO=$ac_cv_path_SGML2INFO if test -n "$SGML2INFO"; then echo "$as_me:$LINENO: result: $SGML2INFO" >&5 echo "${ECHO_T}$SGML2INFO" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "sgml2txt", so it can be a program name with args. set dummy sgml2txt; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_SGML2TXT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $SGML2TXT in [\\/]* | ?:[\\/]*) ac_cv_path_SGML2TXT="$SGML2TXT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SGML2TXT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi SGML2TXT=$ac_cv_path_SGML2TXT if test -n "$SGML2TXT"; then echo "$as_me:$LINENO: result: $SGML2TXT" >&5 echo "${ECHO_T}$SGML2TXT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "sgml2latex", so it can be a program name with args. set dummy sgml2latex; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_SGML2LATEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $SGML2LATEX in [\\/]* | ?:[\\/]*) ac_cv_path_SGML2LATEX="$SGML2LATEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SGML2LATEX="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi SGML2LATEX=$ac_cv_path_SGML2LATEX if test -n "$SGML2LATEX"; then echo "$as_me:$LINENO: result: $SGML2LATEX" >&5 echo "${ECHO_T}$SGML2LATEX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi PRE_INSTALL_LIBDIRS="-L${PWD}/libMRML/cc/ -L${PWD}/libGIFTAcPerl/cc/ -L${PWD}/libGIFTQuPerl/cc/ -L${PWD}/libGIFTAcInvertedFile/cc/ -L${PWD}/libGIFTAcHierarchy/cc/ -L${PWD}/libGIFTAcDistanceMatrix/cc/ -L${PWD}/libGIFTQuInvertedFile/cc/ -L${PWD}/libGIFTQuBayesian/cc/ -L${PWD}/libGIFTQuHierarchy/cc/ -L${PWD}/libGIFTAcURL2FTS/cc/" PRE_INSTALL_LINKDIRS="--rpath${PWD}/libMRML/cc/ -L${PWD}/libGIFTAcPerl/cc/ -L${PWD}/libGIFTQuPerl/cc/ --rpath${PWD}/libGIFTAcInvertedFile/cc/ --rpath${PWD}/libGIFTAcHierarchy/cc/ --rpath${PWD}/libGIFTAcDistanceMatrix/cc/ --rpath${PWD}/libGIFTQuInvertedFile/cc/ --rpath${PWD}/libGIFTQuBayesian/cc/ --rpath${PWD}/libGIFTQuHierarchy/cc/ --rpath${PWD}/libGIFTAcURL2FTS/cc/" echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #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)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi for ac_header in string algorithm do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in stdlib.h unistd.h sys/types.h time.h sys/time.h sys/socket.h arpa/inet.h netinet/tcp.h sys/times.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for sin in -lm" >&5 echo $ECHO_N "checking for sin in -lm... $ECHO_C" >&6 if test "${ac_cv_lib_m_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char sin (); int main () { sin (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_m_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_sin=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_m_sin" >&5 echo "${ECHO_T}$ac_cv_lib_m_sin" >&6 if test $ac_cv_lib_m_sin = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_socket+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char socket (); int main () { socket (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_socket=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_socket=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 if test $ac_cv_lib_socket_socket = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" fi #dnl check if we have posix threads echo "$as_me:$LINENO: checking for pthread_mutexattr_destroy in -lpthread" >&5 echo $ECHO_N "checking for pthread_mutexattr_destroy in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread_pthread_mutexattr_destroy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char pthread_mutexattr_destroy (); int main () { pthread_mutexattr_destroy (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_pthread_pthread_mutexattr_destroy=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pthread_pthread_mutexattr_destroy=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutexattr_destroy" >&5 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutexattr_destroy" >&6 if test $ac_cv_lib_pthread_pthread_mutexattr_destroy = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" fi # check if we can have uuids echo "$as_me:$LINENO: checking for uuid_generate in -luuid" >&5 echo $ECHO_N "checking for uuid_generate in -luuid... $ECHO_C" >&6 if test "${ac_cv_lib_uuid_uuid_generate+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luuid $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char uuid_generate (); int main () { uuid_generate (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_uuid_uuid_generate=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_uuid_uuid_generate=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_generate" >&5 echo "${ECHO_T}$ac_cv_lib_uuid_uuid_generate" >&6 if test $ac_cv_lib_uuid_uuid_generate = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBUUID 1 _ACEOF LIBS="-luuid $LIBS" fi echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () { _ascii (); _ebcdic (); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long l; char c[sizeof (long)]; } u; u.l = 1; exit (u.c[sizeof (long) - 1] == 1); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 echo "${ECHO_T}$ac_cv_c_bigendian" >&6 case $ac_cv_c_bigendian in yes) cat >>confdefs.h <<\_ACEOF #define WORDS_BIGENDIAN 1 _ACEOF ;; no) ;; *) { { echo "$as_me:$LINENO: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&5 echo "$as_me: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} { (exit 1); exit 1; }; } ;; esac RESCUE_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAG -ldl" #AC_CHECK_LIB(wdbi,dbi_version,[DBI=yes]) CXXFLAGS=$RESCUE_CXXFLAGS #adl_FUNC_GETOPT_LONG LDFLAGS="$LDFLAGS " ac_config_files="$ac_config_files Makefile libMRML/Makefile libMRML/cc/Makefile libMRML/include/Makefile libGIFTQuPerl/Makefile libGIFTQuPerl/cc/Makefile libGIFTQuPerl/include/Makefile libGIFTAcPerl/Makefile libGIFTAcPerl/cc/Makefile libGIFTAcPerl/include/Makefile libGIFTAcURL2FTS/Makefile libGIFTAcURL2FTS/cc/Makefile libGIFTAcURL2FTS/include/Makefile libGIFTAcInvertedFile/Makefile libGIFTAcInvertedFile/cc/Makefile libGIFTAcInvertedFile/include/Makefile libGIFTQuInvertedFile/Makefile libGIFTQuInvertedFile/cc/Makefile libGIFTQuInvertedFile/include/Makefile libGIFTAcHierarchy/Makefile libGIFTAcHierarchy/cc/Makefile libGIFTAcHierarchy/include/Makefile libGIFTQuHierarchy/Makefile libGIFTQuHierarchy/cc/Makefile libGIFTQuHierarchy/include/Makefile libGIFTAcDistanceMatrix/Makefile libGIFTAcDistanceMatrix/cc/Makefile libGIFTAcDistanceMatrix/include/Makefile FeatureExtraction/Makefile libSquirePPM/Makefile scripts/Makefile scripts/emacs-lisp/Makefile scripts/perl/Makefile dtd/Makefile Doc/Makefile Doc/Doxyfile GIFTServer/Makefile GIFTServer/gift-mrml-messages/Makefile GIFTServer/gift-config/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # 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. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *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 \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" 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}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be 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+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. 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 ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # 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'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by $as_me, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "libMRML/Makefile" ) CONFIG_FILES="$CONFIG_FILES libMRML/Makefile" ;; "libMRML/cc/Makefile" ) CONFIG_FILES="$CONFIG_FILES libMRML/cc/Makefile" ;; "libMRML/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES libMRML/include/Makefile" ;; "libGIFTQuPerl/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTQuPerl/Makefile" ;; "libGIFTQuPerl/cc/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTQuPerl/cc/Makefile" ;; "libGIFTQuPerl/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTQuPerl/include/Makefile" ;; "libGIFTAcPerl/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTAcPerl/Makefile" ;; "libGIFTAcPerl/cc/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTAcPerl/cc/Makefile" ;; "libGIFTAcPerl/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTAcPerl/include/Makefile" ;; "libGIFTAcURL2FTS/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTAcURL2FTS/Makefile" ;; "libGIFTAcURL2FTS/cc/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTAcURL2FTS/cc/Makefile" ;; "libGIFTAcURL2FTS/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTAcURL2FTS/include/Makefile" ;; "libGIFTAcInvertedFile/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTAcInvertedFile/Makefile" ;; "libGIFTAcInvertedFile/cc/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTAcInvertedFile/cc/Makefile" ;; "libGIFTAcInvertedFile/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTAcInvertedFile/include/Makefile" ;; "libGIFTQuInvertedFile/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTQuInvertedFile/Makefile" ;; "libGIFTQuInvertedFile/cc/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTQuInvertedFile/cc/Makefile" ;; "libGIFTQuInvertedFile/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTQuInvertedFile/include/Makefile" ;; "libGIFTAcHierarchy/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTAcHierarchy/Makefile" ;; "libGIFTAcHierarchy/cc/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTAcHierarchy/cc/Makefile" ;; "libGIFTAcHierarchy/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTAcHierarchy/include/Makefile" ;; "libGIFTQuHierarchy/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTQuHierarchy/Makefile" ;; "libGIFTQuHierarchy/cc/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTQuHierarchy/cc/Makefile" ;; "libGIFTQuHierarchy/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTQuHierarchy/include/Makefile" ;; "libGIFTAcDistanceMatrix/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTAcDistanceMatrix/Makefile" ;; "libGIFTAcDistanceMatrix/cc/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTAcDistanceMatrix/cc/Makefile" ;; "libGIFTAcDistanceMatrix/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES libGIFTAcDistanceMatrix/include/Makefile" ;; "FeatureExtraction/Makefile" ) CONFIG_FILES="$CONFIG_FILES FeatureExtraction/Makefile" ;; "libSquirePPM/Makefile" ) CONFIG_FILES="$CONFIG_FILES libSquirePPM/Makefile" ;; "scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; "scripts/emacs-lisp/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/emacs-lisp/Makefile" ;; "scripts/perl/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/perl/Makefile" ;; "dtd/Makefile" ) CONFIG_FILES="$CONFIG_FILES dtd/Makefile" ;; "Doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES Doc/Makefile" ;; "Doc/Doxyfile" ) CONFIG_FILES="$CONFIG_FILES Doc/Doxyfile" ;; "GIFTServer/Makefile" ) CONFIG_FILES="$CONFIG_FILES GIFTServer/Makefile" ;; "GIFTServer/gift-mrml-messages/Makefile" ) CONFIG_FILES="$CONFIG_FILES GIFTServer/gift-mrml-messages/Makefile" ;; "GIFTServer/gift-config/Makefile" ) CONFIG_FILES="$CONFIG_FILES GIFTServer/gift-config/Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "gift-config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS gift-config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@AMTAR@,$AMTAR,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@CXXDEPMODE@,$CXXDEPMODE,;t t s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@EGREP@,$EGREP,;t t s,@LN_S@,$LN_S,;t t s,@ECHO@,$ECHO,;t t s,@AR@,$AR,;t t s,@ac_ct_AR@,$ac_ct_AR,;t t s,@CPP@,$CPP,;t t s,@CXXCPP@,$CXXCPP,;t t s,@F77@,$F77,;t t s,@FFLAGS@,$FFLAGS,;t t s,@ac_ct_F77@,$ac_ct_F77,;t t s,@LIBTOOL@,$LIBTOOL,;t t s,@LIBTOOL_DEPS@,$LIBTOOL_DEPS,;t t s,@MAGICK@,$MAGICK,;t t s,@PERL@,$PERL,;t t s,@GIFT_MYSQL_DIR@,$GIFT_MYSQL_DIR,;t t s,@GIFT_LIB_VERSION_INFO@,$GIFT_LIB_VERSION_INFO,;t t s,@UNPUBLISHED@,$UNPUBLISHED,;t t s,@UNPUBLISHED_DIR@,$UNPUBLISHED_DIR,;t t s,@GIFT_INTERNAL_FLAG@,$GIFT_INTERNAL_FLAG,;t t s,@GIFT_INTERNAL_PERLS@,$GIFT_INTERNAL_PERLS,;t t s,@WEB_PUBLISHING_DIRECTORY@,$WEB_PUBLISHING_DIRECTORY,;t t s,@WEB_PUBLISHING_LOCATION@,$WEB_PUBLISHING_LOCATION,;t t s,@PERL_LD_ADD@,$PERL_LD_ADD,;t t s,@acx_pthread_config@,$acx_pthread_config,;t t s,@PTHREAD_CC@,$PTHREAD_CC,;t t s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t s,@DEBEXECBINDIR@,$DEBEXECBINDIR,;t t s,@DEBPERLLIBDIR@,$DEBPERLLIBDIR,;t t s,@DEBSHAREDIR@,$DEBSHAREDIR,;t t s,@DEBDATADIR@,$DEBDATADIR,;t t s,@BAYESIAN@,$BAYESIAN,;t t s,@GIFT_BAYESIAN_DIR@,$GIFT_BAYESIAN_DIR,;t t s,@CA_X_DISTANCEMATRIX@,$CA_X_DISTANCEMATRIX,;t t s,@GIFT_BAYESIAN_FLAG@,$GIFT_BAYESIAN_FLAG,;t t s,@BAYESIAN_LD_ADD@,$BAYESIAN_LD_ADD,;t t s,@EMACS@,$EMACS,;t t s,@EMACSLOADPATH@,$EMACSLOADPATH,;t t s,@lispdir@,$lispdir,;t t s,@CONVERT@,$CONVERT,;t t s,@DOXYGEN@,$DOXYGEN,;t t s,@SGML2INFO@,$SGML2INFO,;t t s,@SGML2TXT@,$SGML2TXT,;t t s,@SGML2LATEX@,$SGML2LATEX,;t t s,@PRE_INSTALL_LIBDIRS@,$PRE_INSTALL_LIBDIRS,;t t s,@PRE_INSTALL_LINKDIRS@,$PRE_INSTALL_LINKDIRS,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # 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. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@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,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #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. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # 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. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h 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" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) 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=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # 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 ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //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=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi cp gift-config.h libMRML/include gift-0.1.14/scripts/0000777000175200001440000000000010220511621011206 500000000000000gift-0.1.14/scripts/perl/0000777000175200001440000000000010220511621012150 500000000000000gift-0.1.14/scripts/perl/CXTVWriter.pre-pm0000644000175200001440000000510610153634155015206 00000000000000#!/usr/bin/perl -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 ###################################################################### require 5.002; use lib '__BINDIR__'; # for including CFeedbackClient use CXMLTreeVisitor; package CXTVWriter; require Exporter; @ISA=qw(Exporter CXMLTreeVisitor); @EXPORT_OK= qw(new startVisit endVisit ); use XML::Writer; sub new(){ my $class = shift; my $self = {}; bless $self, $class; $self->initialize(@_); return $self; } sub initialize{ my$self=shift; my $lOutHandle=shift; if(defined $lOutHandle){ $self->{writer}=new XML::Writer( OUTPUT => $lOutHandle, DATA_MODE => 1, DATA_INDENT => 2); }else{ $self->{writer}=new XML::Writer(); } $self->{writer}->xmlDecl("UTF-8","yes"); # $self->{writer}->doctype("mrml"); } ######################################### # # startVisit # # This is just for testing # # PARAMETERS: The startVisit function takes a tree node (i.e. a hash reference) # as parameter. The parameter is provided by CGIFTLink::traverse # # RETURNS: nothing # sub startVisit( $ ){ my $self=shift; my $lRoot=shift; if(defined($lRoot->{element})){ $self->{writer}->startTag($lRoot->{element},(%{$lRoot->{attributes}})) }else{ #print "TEXT NODE:{",$lRoot->{text},"}\n\n"; $self->{writer}->characters($lRoot->{text}); } } ######################################### # # endVisit # # prints the end tag # # PARAMETERS: The endVisit function takes a tree node (i.e. a hash reference) # as parameter. The parameter is provided by CGIFTLink::traverse # # RETURNS: nothing # sub endVisit( $ ){ my $self=shift; my $lRoot=shift; if(defined($lRoot->{element})){ $self->{writer}->endTag($lRoot->{element}); } } gift-0.1.14/scripts/perl/CXMLTreeBuilder.pre-pm0000644000175200001440000000750110153634155016120 00000000000000#!/usr/bin/perl -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 use lib '__BINDIR__'; # for including CFeedbackClient use XML::Parser; use CQueryParadigmMatcher; package CXMLTreeBuilder; require Exporter; use lib '__BINDIR__'; # for including CFeedbackClient @ISA= qw(Exporter CQueryParadigmMatcher); @EXPORT_OK= qw(new stringToTree); ############################## # # Expat parser handlers # sub handleEnd( $$ ){ my $self=shift; die "BLACK MAGIC!" if ($self->{mMagic}!=42); $self=$self->{mCaller}; print "----------POPPING\n" if $self->{vDEBUG}->{handleEnd}; pop @{$self->{stack}}; } sub addChildToTree( $ ){ my $self=shift; my $inChild=shift; ############################## # # making $lNewTreeElement a new child element # if(defined($self->{stack}->[-1])){ push @{$self->{stack}->[-1]->{children}},$inChild; print "PUSHING: " if $self->{vDEBUG}->{handleEnd}; }else{ print "adding: " if $self->{vDEBUG}->{handleEnd}; $self->{tree}=$inChild; } print("_",defined($inChild->{element})?$inChild->{element}:'undefined',"/",defined($inChild->{text})?$inChild->{text}:'undefined',"_\n") if $self->{vDEBUG}->{handleEnd}; push @{$self->{stack}},$inChild; } sub handleStart( $$ ){ my $self=shift; $self=$self->{mCaller}; my $inElement=shift; my %inAttributes=(@_); ####$########################## # # making $lNewTreeElement a child element # my $lNewTreeElement={ element => $inElement, attributes => \%inAttributes, children => [] }; $self->addChildToTree( $lNewTreeElement ); } sub handleChar( $$ ){ my $self=shift; $self=$self->{mCaller}; my $inText=shift; if(defined($inText)){ unless($inText=~m/^(\s*\n)+$/){ ####$########################## # # making $lNewTreeElement a child element # my $lNewTreeElement={ text => $inText, children => [] }; $self->addChildToTree( $lNewTreeElement ); pop @{$self->{stack}}; print "----------POPPING\n" if $self->{vDEBUG}->{handleEnd}; } } } sub new( ){ my $class = shift; my $self = {}; bless $self, $class; $self->initialize(); # $self->{vDEBUG}->{handleEnd}=1; return $self; } sub initialize(){ my $self=shift; $self->{parser} = new XML::Parser(Handlers => {Start => \&handleStart, End => \&handleEnd, Char => \&handleChar, }); # Make the parser know who is this structure $self->{parser}->{mCaller}=$self; $self->{parser}->{mMagic}=42;#set a magic number ############################### # # which functions do debugging printouts? # # $self->{vDEBUG}={ }; } sub stringToTree( $ ){ my $self=shift; my $inString=shift; $self->{stack}=[]; $self->{parser}->parse($inString); return $self->{tree}; } sub fileToTree( $ ){ my $self=shift; my $fileName=shift; $self->{stack}=[]; $self->{parser}->parsefile($fileName); return $self->{tree}; } package main; gift-0.1.14/scripts/perl/gift-remove-collection.pre-pl0000644000175200001440000000237510153634155017606 00000000000000#!/usr/bin/perl -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 for $i (@ARGV){ if($i eq "--help"){ print "USAGE: gift-remove-collection [options]: remove an image collection from your gift database. For detailed options, see gift-add-collection.pl --help. This script only calls gift-add-collection.pl --remove-collection. "; } } system("__EXECBINDIR__/gift-add-collection.pl","--remove-collection",@ARGV); gift-0.1.14/scripts/perl/gift-dtd-to-keywords.pre-pl0000644000175200001440000001374510153634155017223 00000000000000#!__PERL_LOCATION__ -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # # gift-dtd-to-tex.pl # # This program turns a simple sgml dtd (with does not contain external # entities) into a class, which contains all keywords as string constants # # The use of this is to improve type safety when extendint MRML or changing # things in the program # use Getopt::Long; use XML::Parser; require 5.002; #use strict; use Socket; use FileHandle; use English; use IO::File; use XML::Parser; ######################################## # # slurps in some DTD and translates all te # keywords of the DTD into constant strings of # the language wanted # ######################################## package CDTDToLanguage; require Exporter; @ISA= qw(Exporter); @EXPORT= qw(new slurpDTD translateToLanguage ); sub new { my $class = shift; my $self = {}; bless $self, $class; $self->initialize(); return $self; } sub initialize(){ my$self=shift; $self->{parser} = new XML::Parser(Handlers => {Element => \&handleElement, Attlist => \&handleAttlist, }); # Make the parser know who is this structure $self->{parser}->{mCaller}=$self; $self->{parser}->{mMagic}=42; ############################### #§ # for quick changes what to look at when debugging/testing # # $self->{vDEBUG}={ handleElement => 1, handleAttlist => 1, processDTD => 1, }; print "Printing debugging info for the functions:\n"; { my $i; foreach $i (keys(%{$self->{vDEBUG}})){ if($self->{vDEBUG}->{$i}){ print "$i\n"; } } } ############################### # # Parameters for the query. Here some set/get/functions would be nice # } ############################## # # Expat parser handlers # sub handleElement( $$$ ){ my $self=shift; die "BLACK MAGIC!" if ($self->{mMagic}!=42); $self=$self->{mCaller}; my $lElementName=shift; print "Element: $lElementName\n" if($self->{vDEBUG}->{handleElement}); $self->{used}->{$lElementName}=1; } sub handleAttlist( $$$$$$ ){ my $self=shift; die "BLACK MAGIC!" if ($self->{mMagic}!=42); $self=$self->{mCaller}; my($inElement)=shift; my $lAttributeName=shift; print "Attribute: $lAttributeName\n" if($self->{vDEBUG}->{handleAttlist}); $self->{used}->{$lAttributeName}=1; } sub processDTD( $$ ){ my$self=shift; my $lDTDHandle=shift; my $lEmptyText=shift; print "\nNow I will try to read...\n" if($self->{vDEBUG}->{processDTD}); #we read, and then we parse #for this reason, we can return the #string read { my $lRead=join("",$lDTDHandle->getlines()); if($lRead){ if($self->{vDEBUG}->{processDTD}){ print "Parsing: $lRead"; open OF,">mrml-parsing-log"; print OF $lRead; } $self->{parser}->parse("$lRead $lEmptyText"); } $lRead; } } sub translateToJava( $;$ ){ my$self=shift; my $lClassname=shift; my $inPackage=shift || $lClassname; my $lFH=new IO::File; $lFH->open("> $lClassname.java") or die "could not generate $lClassname.java $!\n"; print $lFH " //Automatically generated from the dtd by gift-dtd-to-keywords package $inPackage; import java.lang.String; public class $lClassname \{ \n"; foreach $i (sort keys(%{$self->{used}})){ $_=$i; tr[-][_]; tr[A-Z][a-z]; print $lFH " public final static String $_ = new String(\"$i\");\n " } print $lFH "\}; \n"; } sub translateToH( $ ){ my$self=shift; my $lClassname=shift; my $lFH=new IO::File; $lFH->open("> $lClassname.h") or die "could not generate $lClassname.h $!\n"; print $lFH " #ifndef _MRML_CONST #define _MRML_CONST //Automatically generated from the dtd by gift-dtd-to-keywords #include using namespace std; class $lClassname \{ public: \n"; foreach $i (sort keys(%{$self->{used}})){ $_=$i; tr[-][_]; tr[A-Z][a-z]; print $lFH " static const string $_;\n " } print $lFH "\}; \n#endif\n"; } sub translateToCC( $ ){ my$self=shift; my $lClassname=shift; my $lIncludePrefix="libMRML/include/"; my $lFH=new IO::File; $lFH->open("> $lClassname.cc") or die "could not generate $lClassname.cc $!\n"; print $lFH " //Automatically generated from the dtd by gift-dtd-to-keywords #include #include \"$lIncludePrefix$lClassname.h\" "; foreach $i (sort keys(%{$self->{used}})){ $_=$i; tr[-][_]; tr[A-Z][a-z]; print $lFH "const string ${lClassname}::$_(\"$i\");\n " } print $lFH "\n"; } package main; %lOptions=(); GetOptions(\%lOptions, "cc", "include", "java" ); my $inDTDFile=shift; my $inTag=shift; my $inClassname=shift; my $inPackagename=shift; if(!$inDTDFile){ print " Usage: gift-dtd-to-keywords.pl infile doctype classname packagename This program turns a simple sgml dtd (with does not contain external entities) into LaTeX. "; } my $lDTDToLanguage=new CDTDToLanguage(); { my $lFH=new IO::File; $lFH->open("< $inDTDFile") or die "there is no $inDTDFile $!\n"; $lDTDToLanguage->processDTD($lFH,"<$inTag>"); $lDTDToLanguage->translateToJava($inClassname, $inPackagename); $lDTDToLanguage->translateToH($inClassname); $lDTDToLanguage->translateToCC($inClassname); } gift-0.1.14/scripts/perl/CGLDAudreyMTam.pre-pl0000644000175200001440000001006010153634155015661 00000000000000#!/usr/bin/perl -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 ################################################################################ # # # This is a viPerl demo especially handcrafted for # Dr. Audrey M. Tam # by # Wolfgang Müller # ################################################################################# ############################################################ # # main # # It would be cleanest to construct all objects from C++ # however, it is fastest for me to do things by using the # main package. # # Take this as some kind of skeleton for your code. # require Exporter; use lib '__BINDIR__'; # for including CFeedbackClient use CGIFTLink qw(processGIFTQueryCall processGIFTRandomQueryCall traverseTree configure); use CXMLTreeBuilder; use XML::Parser;# YOU HAVE TO INSTALL XML::PARSER you get it at www.cpan.org package main; use CVLStructuredAnnotation; ###################################################################### # # # ######################################## # # THE FOLLOWING FUNCTIONS JUST PASS THINGS # THROUGH TO THE CGIFTLink OBJECT CONSTRUCTED # IN construct(). PLEAST DON'T CHANGE # sub processGIFTQueryCall( ; ){ $gQueryProcessor->processGIFTQueryCall(@_); } sub processGIFTRandomQueryCall( ; ){ $gQueryProcessor->processGIFTRandomQueryCall(@_); } sub setAlgorithm( ; ){ $gQueryProcessor->setAlgorithm(@_); } sub setCollection( ; ){ $gQueryProcessor->setCollection(@_); } sub configure(){ $gQueryProcessor->configure(@_); } ############################################################ # # # ###################################################################### ######################################## # # construct # # This function constructs the object which # will process our queries # # CHANGE HERE TO GET YOUR TYPE CONSTRUCTED # sub construct(){ $gQueryProcessor=new CVLStructuredAnnotation(); } ############################################################ # # Testing code to be deleted in final version # print "constructing\n"; construct(); print "configuring\n"; $gQueryProcessor->configure();#puts a nice XML tree in memory my $lVisitor=new CXMLTreeVisitor(); # "ugly-prints" the result of the query. $gQueryProcessor->traverseTree( $gQueryProcessor->query( # # this is an XML tree containing an EMPTY QUERY for 2 images # ADD CHILDREN TO "query-step" PRODUCING YOUR OWN QUERY # #the {} design an anonymous reference to hash, # our XML element node { # the element "element" of the hash has the value "query-step" element => "query-step", # the element "attributes" of the hash is again an anonymous hash # containing the value 2 for the element "result-size" attributes => { "result-size" => 2 }, # this XML element contains two nodes children => [ { text=>"hello, there", children=>[] }, { element => "demo-element-without-a-meaning", attributes=>{}, #no attributes children=>[] #no children } ] }) ,$lVisitor); gift-0.1.14/scripts/perl/gift-old-to-new-url2fts.pre-pl0000644000175200001440000000363010153634155017537 00000000000000#!__PERL_LOCATION__ -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # # This script turns our internal format for annotations # into html # use lib '__BINDIR__'; # for including CFeedbackClient use CXMLTreeWriter; { my $self={}; my $inFile=shift || "url2fts"; my $lInHandle=new IO::File($inFile,"r") or die "no ${inFile}\n"; my $lOutHandle=new IO::File("${inFile}.xml","w") or die "no ${inFile}.xml\n"; print "Translating $inFile to ${inFile}.xml\n"; $self->{writer}=new XML::Writer( OUTPUT => $lOutHandle, DATA_MODE => 1, DATA_INDENT => 2); $self->{writer}->xmlDecl("UTF-8","yes"); $self->{writer}->startTag("image-list"); while(<$lInHandle>){ my($lImageLocation,$lThumbnailLocation,$lFeatureFileName)=split(/\s+/,$_); my $lAttributes={ "url-postfix" => $lImageLocation, "thumbnail-url-postfix" => $lThumbnailLocation, "feature-file-name" => $lFeatureFileName }; $self->{writer}->emptyTag("image",(%{$lAttributes})); } $self->{writer}->endTag("image-list"); } gift-0.1.14/scripts/perl/CQueryParadigmMatcher.pre-pm0000644000175200001440000000443410153634155017411 00000000000000#!/usr/bin/perl -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 require 5.002; #use strict; package CQueryParadigmMatcher; require Exporter; @ISA= qw(Exporter); @EXPORT= qw(isMatchingQueryParadigm isMatchingQueryParadigmList ); @EXPORT_OK= qw(new); sub new { my $class = shift; my $self = {}; bless $self, $class; $self->initialize(@_); return $self; } sub initialize( @ ){ my$self=shift; } =pod Two lists of query paradigms match, if There exists one element in the first list, which matches to at least one element in the second list =cut sub isMatchingQueryParadigmList( $$ ){ my$self=shift; my $inQuery=shift; my $inMatching=shift; my ($i,$j); for $i (@ { $inQuery}){ print "outer loop Comparing: ",join("öö",keys(%$i)),"\n"; for $j (@ { $inMatching}){ print "outer loop With: ",join("àà",keys(%$j)),"\n"; if($self->isMatchingQueryParadigm($i,$j)){ return 1; } } } return 0; } =pod A query paradigm is matching anotherone, if all attributes in the intersection set of attributes are =cut sub isMatchingQueryParadigm( $$ ){ my$self=shift; my $inQuery=shift; my $inMatching=shift; my $i; for $i (keys(%$inQuery)){ print "Inner loop $inQuery->{$i} _$inMatching->{$i}_\n"; if(defined($inMatching->{$i}) && !($inQuery->{$i} eq $inMatching->{$i})){ print "---------- $inQuery->{$i} != $inMatching->{$i} \n"; return 0; } } return 1; } gift-0.1.14/scripts/perl/gift-annotation-to-html.pre-pl0000644000175200001440000000354210153634155017711 00000000000000#!__PERL_LOCATION__ -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # # This script turns our internal format for annotations # into html # $/="";#slurp whole paragraphs print "The annotated collection

TSR 100

"; my $lCount=0; my $lPrefix="http://gift.unige.ch/images/TSR500/"; while(){ if(!(($lCount++)%4)){ print " "; } if(m/:\n/){ s/:\n//; chomp; print "\n\n"; } } print "
"; print "

\n"; $_=; chomp;chomp; print "

$lCount)One word:

$_

\n"; $_=; chomp;chomp; print "

Free:

$_

\n"; $_=; chomp;chomp; print "

Background:

$_

\n"; $_=; chomp;chomp; print "

Foreground:

$_

\n"; print "
"; gift-0.1.14/scripts/perl/CGLDistanceMatrix.pre-pm0000644000175200001440000003503610153634155016477 00000000000000#!__PERL_LOCATION__ -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # Author of this file: Wolfgang Müller # # contact people for MRML and MPEG # check things out: would we be at a pre-meeting? # require 5.002; use lib '__BINDIR__'; # for including CFeedbackClient use CXMLTreeVisitor; use CXTVTripletList; use POSIX qw(floor ceil); =pod =head1 NAME CGLDistanceMatrix - simulating content-based queries by table lookup =head1 SYNOPSIS =head1 DESCRIPTION This is based on CGIFTLink. It provides the simplest possible way of linking a query engine with the GIFT. =head2 The big picture This class reads a pre-calculated distance matrix and a list of images in order to perform next-neighbour queries with primitive relevance feedback. Suppose you want to check how well your low-level/semantic-level feature set does for a given MRML-based benchmark. Suppose you are not Mr. Uberhacker. Suppose you know how to provide a distance matrix for your collection. Then this class is what you need. All you need to do is to provide a matrix which gives the distance between each pair of images from the collection. Give the file location of the distance matrix as the C attribute in a collection of the config file. As all locations given in config files, the location is taken I C. The second parameter you need is a list of image urls. In our case, we would like to use the same url2fts file, as an inverted file based collection would use. These files have the structure IMAGE_URL1 THUMBNAIL_URL1 FEATURE_FILE_URL1 IMAGE_URL2 THUMBNAIL_URL2 FEATURE_FILE_URL2 IMAGE_URL3 THUMBNAIL_URL3 FEATURE_FILE_URL3 IMAGE_URL4 THUMBNAIL_URL4 FEATURE_FILE_URL4 ... ... ... for our purpose, we will take the urls, and we will ignore the feature file of each line. So, if you have a collection which is already indexed using C simply use the url2fts file that exsists already. If not, simply generate a list of urls of all the images and their thumbnails, giving in each line a dummy value, e.g.: http://localhost/1.jpg http://localhost/thumbnail/1.jpg dummy http://localhost/2.jpg http://localhost/thumbnail/2.jpg dummy http://localhost/3.jpg http://localhost/thumbnail/3.jpg dummy http://localhost/4.jpg http://localhost/thumbnail/4.jpg dummy and add the location of this file as attribute to the collection tag corresponding to your collection. =head1 EXAMPLES =head1 ATTRIBUTES cui-base-dir the basis directory containing the following files cui-feature-file-location the location of the url2fts file cui-distance-matrix-location the location of the distance matrix =head1 SEE ALSO CGIFTLink =head1 DIAGNOSTICS =head2 configure When the function CGLDistanceMatrix::configure is called, the text C is printed. configure dies with the following messages if necessary: C this means that the file that contains the information which images are present in the collection, and which *.fts files belong them was not found. If it was found C is printed instead. Afterwards for each image read a line is printed that contains C. C being the ID assigned to the image inside this perl module, C being the url of the image, C being the url of the thumbnail, and C being the location of the feature file (local file name). C is ignored, as it applies only to inverted file indices. =head1 BUGS =head1 RESTRICTIONS There is a couple of big inherent restrictions in this: =head1 AUTHOR Wolfgang Müller for the CUI Geneva =cut ############################################################ # # CGIFTLink # # A class for Perl-side of the link between # GIFT and Perl # # YOU SHOULD NOT NEED TO TOUCH THIS CLASS # THERE IS AN ERROR # # SUBCLASS THIS FOR CREATING YOUR OWN QUERY PROCESSORS # use lib '__BINDIR__'; # adding the install directory to the library directory use CGIFTLink; package CGLDistanceMatrix; require Exporter; @ISA= qw(Exporter CGIFTLink ); @EXPORT_OK= qw(new configure ); sub new(){ my $class = shift; my $self = {}; bless $self, $class; $self->initialize(); return $self; } sub initialize(){ my$self=shift; } ######################################## # # query # # Processes the query given by $self->{tree} # # PARAMETERS: The tree to be processed # # RETURNS: an XML tree containing a "query-result" element # # THIS FUNCTION IS INTENDED TO BE OVERLOADED # sub query( $ ){ my $self=shift; my $inQuery= shift;# this should now contain an XML tree print "CGLDistanceMatrix::query result-size:",$inQuery->{attributes}->{"result-size"}," attributes of \$inQuery",keys(%{$inQuery->{attributes}}),"\n\n"; # # looking at all user-relevance-element-lists # that are direct children of our query-element # my @lUserRelevanceElements; foreach $i (@{$inQuery->{children}}){ print "Looking at child ",$i->{element},"\n"; if($i->{element} eq "user-relevance-element-list"){ print "pushing\n"; print "pushing: The children: ",join(",",@{$i->{children}}),"\n"; push @lUserRelevanceElements,(@{$i->{children}}); } } # # Starting out with a list of all images, # each one is assigned calculated-similarity=0 # my $lResult=[]; { @{$lResult}=@{$self->{url2fts}}; my $i; foreach $i (@{$lResult}){ $i->{attributes}->{'calculated-similarity'}=0; $i->{attributes}->{'_positive'}=0; $i->{attributes}->{'_negative'}=0; $i->{attributes}->{'_positive_count'}=0; $i->{attributes}->{'_negative_count'}=0; } } # # averaging over the results for all query elements # weighted by relevance level # my $lUserRelevanceElement; foreach $lUserRelevanceElement (@lUserRelevanceElements){ print "Looking at user-relevance-element $lUserRelevanceElement->{attributes}->{'image-location'}\n"; my $lLine=$self->{url_to_id}->{$lUserRelevanceElement->{attributes}->{'image-location'}}; if(defined $lLine){ my $lRelevance= defined($lUserRelevanceElement->{attributes}->{'user-relevance'})? $lUserRelevanceElement->{attributes}->{'user-relevance'} : 10000 ; print "Relevance: $lRelevance\n"; my $i; $lCount=0; foreach $i (@{$lResult}){ my $lIncrement=$self->{distance_matrix}->[$lLine]->[$lCount] * $lRelevance; if($lIncrement>0){ $i->{attributes}->{'_positive_count'}++; $i->{attributes}->{'_positive'}+=$lIncrement; } if($lIncrement<0){ $i->{attributes}->{'_negative_count'}++; $i->{attributes}->{'_negative'}+=$lIncrement; } $lCount++; } } } foreach $i (@{$lResult}){ $i->{attributes}->{'calculated-similarity'}=0; if($i->{attributes}->{_positive_count}){ $i->{attributes}->{'calculated-similarity'}+=$i->{attributes}->{'_positive'}/$i->{attributes}->{'_positive_count'}; } if($i->{attributes}->{_negative_count}){ $i->{attributes}->{'calculated-similarity'}+=0.5*$i->{attributes}->{'_negative'}/$i->{attributes}->{'_negative_count'}; } delete $i->{attributes}->{_negative}; delete $i->{attributes}->{_negative_count}; delete $i->{attributes}->{_positive}; delete $i->{attributes}->{_positive_count}; } # # sort in descending order # @{$lResult}=sort {$b->{attributes}->{'calculated-similarity'} <=> $a->{attributes}->{'calculated-similarity'}} @{$lResult}; # # take the first result-size elements. # @{$lResult}=@{$lResult}[0..$inQuery->{attributes}->{"result-size"}]; return { element => "query-result", attributes => {}, children => [ { element => "query-result-element-list", attributes => {}, children => $lResult } ] }; } ######################################## # # query # # Processes the query given by $inQuery # give back $inQuery->{attributes}->{"result-size"} random images # # PARAMETERS: The "query" tree to be processed # # RETURNS: an XML tree containing a "query-result" element # # THIS FUNCTION IS INTENDED TO BE OVERLOADED # sub randomQuery( $ ){ my $self=shift; my $inQuery= shift;# this would now contain an XML tree print "CGIFTLink---------->randomQuery:",$inQuery->{element},",",$inQuery->{attributes}->{"result-size"},":",keys(%{$inQuery->{attributes}}),"\n\n"; my $lResultSize=$inQuery->{attributes}->{"result-size"}; my $i; my %lUsed; my $lResult=[]; if(scalar(@{$self->{url2fts}})<$lResultSize){ $lResult=$self->{url2fts}; }else{ while(scalar(keys %lUsed)<$lResultSize){ my $lNew=POSIX::floor(rand()*scalar(@{$self->{url2fts}})); $lUsed{$lNew}=1; } $lResult=[]; @{$lResult}=@{$self->{url2fts}}[(keys %lUsed)]; } #returning a constant XML tree return { element => "query-result", attributes => {}, children => [ { element => "query-result-element-list", attributes => {}, children => $lResult } ] }; } ######################################## # # configure # # processes the configuration data present in # $self->{collection} and $self->{algorithm}. # possible examples would be the opening of a # connection to an SQL database. # # PARAMETERS: expects $self->{collection} and $self->{algorithm} # to be set # # RETURNS: nothing # # THIS FUNCTION IS INTENDED TO BE OVERLOADED # sub configure( ){ my $self=shift; print "CGLDistanceMatrix.pm::configure called\n"; die unless defined($self); die unless defined($self->{collection}); $self->{selectionSize}=9; $self->{sdev}=5; my $inFileName=$self->{collection}->{attributes}->{'cui-base-dir'} ."/" .$self->{collection}->{attributes}->{'cui-feature-file-location'}; # # the size of the matrix # $self->{size}=$self->{collection}->{attributes}->{'cui-number-of-images'}; open(IF,$inFileName) or die "no url2fts file defined!\n"; print "reading $inFileName\n"; $self->{url2fts}=[]; my $lCount=0; $self->{id_to_url}={}; $self->{url_to_id}={}; while(){ my($lLocation,$lThumb,$lIgnoreFeatures)=split(" ",$_); print "$lCount: $lLocation,$lThumb,$lIgnoreFeatures\n"; $self->{id_to_url}->{$lCount}=$lLocation; $self->{url_to_id}->{$lLocation}=$lCount; $lCount++; push @{$self->{url2fts}},{ element =>'query-result-element', attributes =>{ 'image-location'=>$lLocation, 'thumbnail-location'=>$lThumb, 'calculated-similarity'=>$lCount }, children=> [] } } print "finished reading $inFileName\nURL2FTS WAS LOADED SUCCESSFULLY!\n"; $|=1; print "CONFIGURE: Reading distance matrix\n"; my $lDistanceMatrix=$self->{collection}->{attributes}->{'cui-base-dir'} ."/" .$self->{collection}->{attributes}->{'cui-distance-matrix-location'}; open DISTANCE_MATRIX_FILE,"${lDistanceMatrix}.trans" or die "No distance matrix translator"; close DISTANCE_MATRIX_FILE; open DISTANCE_MATRIX_FILE,"$lDistanceMatrix" or die "No distance matrix file $lDistanceMatrix\n"; my $i,$j; $size=$self->{size}; $self->{distance_matrix}=[]; for($i=0;$i<$size;$i++){ print "."; $self->{distance_matrix}->[$i]=[]; if(1==0){ for($j=0;$j<$size;$j++){ $self->{distance_matrix}->[$i]->[$j]=$self->indicesToDistance($i,$j); } } read DISTANCE_MATRIX_FILE,$inChunk,$self->{size}*4; my $lUnranked=1; if($lUnranked){ @{$self->{distance_matrix}->[$i]}=(unpack ("f" x $self->{size},$inChunk)); }else{ my @lUnrankedList=(unpack ("f" x $self->{size},$inChunk)); my $k; my @lNamedList; my $lCount=0; foreach $k (@lUnrankedList){ push @lNamedList,{ id=>$lCount, distance=>$k }; $lCount++; } my @lSortedNamedList=sort {$a->{distance} <=> $b->{distance};} @lNamedList; my $lCount=0; foreach $k ( #reverse (take this out for lists of scores) @lSortedNamedList){ $self->{distance_matrix}->[$i]->[$k->{id}]=$lCount; $lCount++; } #print join(",",sort {$a<=>$b} @{$self->{distance_matrix}->[$i]}),"\n"; } } {#symmetrify my $lSize=scalar(@{$self->{distance_matrix}}); my $k; foreach $i (0..$lSize){ foreach $k ($i+1..$lSize){ $self->{distance_matrix}->[$i]->[$k]+=$self->{distance_matrix}->[$k]->[$i]; $self->{distance_matrix}->[$i]->[$k]/=2; $self->{distance_matrix}->[$k]->[$i]=$self->{distance_matrix}->[$i]->[$k]; } } } bless $self->{distance_matrix},"NoClass"; print "\nINITIALIZE: Finished reading distance matrix\n"; } ######################################## # # setAlgorithm # # sets $self->{algorithm} to the root of an XML tree # containing an "algorithm" element. This can contain # useful configuration information, depending on your # algorithm # # PARAMETERS: tripletList containing "algorithm" element # # SIDE EFFECTS: sets $self->{algorithm} # # YOU SHOULD NOT NEED TO TOUCH THIS FUNCTION UNLESS # THERE IS AN ERROR # sub setAlgorithm( ; ){ my$self=shift; print "setAlgorithm was called \n"; my $lRoot=$self->CGIFTLink::tripletListToTree(@_); $self->{algorithm}=$lRoot; } ######################################## # # setCollection # # sets $self->{collection} to the root of an XML tree # containing a "collection" element. This can contain # useful configuration information, depending on your # algorithm # # PARAMETERS: tripletList containing "collection" element # # SIDE EFFECTS: sets $self->{collection} # # YOU SHOULD NOT NEED TO TOUCH THIS FUNCTION UNLESS # THERE IS AN ERROR # sub setCollection( ; ){ my$self=shift; print "setCollection was called \n"; my $lRoot=$self->CGIFTLink::tripletListToTree(@_); $self->{collection}=$lRoot; } gift-0.1.14/scripts/perl/gift-browser-benchmark.pre-pl0000644000175200001440000002213110153634155017563 00000000000000#!__PERL_LOCATION__ -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 ############################################################# # # This program uses CFCMovingTarget for making a moving # target test. # # ############################################################# # # if you need printouts for what happens inside CFeedbackClient, # modify CFeedbackClient.pre-pm: # # the hash vDEBUG (line 98) in CFeedbackClient.pre-pm # will be of interest for you # ############################################################# # Author of this file: Wolfgang Müller 2000-03-20 require 5.002; #use strict; use lib '__BINDIR__'; # for including CFeedbackClient use CFCMovingTarget; package main; print "Usage: gift-browser-benchmark.pl host:port? "; # # Read the images from the command line # {#for scoping my $lHost= shift || "localhost:12789"; my $OUTFILE=shift || "gift-mrml-browser-benchmark-outfile.html"; $OUTFILE=">$OUTFILE"; my @lQuery; #we are making a list of #pairs from the flat list of #arguments # a default query my $lFeedbackClient=new CFCMovingTargetTest(); $lFeedbackClient->setAddress($lHost); $lFeedbackClient->doQueryGroup(["http://gift.unige.ch/images/TSR500/b_1007_scaled_small.jpg", "http://gift.unige.ch/images/TSR500/b_1014_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1020_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1023_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1024_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1025_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1026_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1029_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1030_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1038_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1041_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1049_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1050_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1054_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1084_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1090_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1091_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1093_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1098_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1110_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1117_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1119_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1123_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1130_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1141_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1144_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1145_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1151_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1152_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1154_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1157_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1158_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1161_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1162_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1163_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1165_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1170_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1174_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1180_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1192_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1193_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1195_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1197_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1198_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1206_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1207_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1212_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1219_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1220_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1227_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1228_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1229_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1239_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1241_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1247_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1251_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1260_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1284_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1290_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1293_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1299_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1304_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1313_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1323_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1329_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1335_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1341_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1345_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1346_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1355_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1359_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1363_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1366_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1371_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1380_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1385_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1388_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1405_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1408_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1421_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1428_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1436_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1440_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1447_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1450_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1456_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1460_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1462_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1469_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1470_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1471_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1473_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1475_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1479_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1484_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1485_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1488_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1491_scaled_small.jpg", # "http://gift.unige.ch/images/TSR500/b_1498_scaled_small.jpg", "http://gift.unige.ch/images/TSR500/b_1499_scaled_small.jpg" ], {address => "localhost:12790", "collection-id" => "c-52-41-23-27-2-100-1-86-0", "url-prefix" => "http://gift.unige.ch/images/"}, {address => "localhost:12790", "collection-id" => "c-52-41-23-27-2-100-1-86-0", "url-prefix" => "http://gift.unige.ch/images/"}); } print "Usage: gift-browser-benchmark.pl host:port? "; gift-0.1.14/scripts/perl/CTripleTransfer.pre-pl0000644000175200001440000002412310153634155016273 00000000000000#!__PERL_LOCATION__ -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # Author of this file: Wolfgang Müller # # contact people for MRML and MPEG # check things out: would we be at a pre-meeting? # require 5.002; #use strict; # use Socket; # use FileHandle; # use English; # use IO::File; # use IO::Socket; # use XML::Parser; # use CQueryParadigmMatcher; ############################################################# # # CXMLTreeVisitor # # this visitor class is intended as parameter to # CGIFTLink::traverseTree # CGIFTLink::traverseTree will call the visit function of # this class. # # YOU SHOULD NOT NEED TO TOUCH THIS CLASS # THERE IS AN ERROR # # SUBCLASS THIS CLASS TO OBTAIN WHAT YOU WANT # package CXMLTreeVisitor; require Exporter; @ISA= qw(Exporter); @EXPORT_OK= qw(new visit ); sub new(){ my $class = shift; my $self = {}; bless $self, $class; $self->initialize(); return $self; } sub initialize(){ my$self=shift; } ######################################### # # visit # # this visit function is intended as example, and prints the node # it gets as a parameter. # # PARAMETERS: The visit function takes a tree node (i.e. a hash reference) # as parameter. The parameter is provided by CGIFTLink::traverse # # RETURNS: nothing # sub visit( $ ){ my $self=shift; my $lRoot=shift; if(defined($lRoot->{element})){ print "Node: ",$lRoot->{element}, "\n"; my $i; for $i (keys(%{$lRoot->{attributes}})){ print " ",$i,"=\"",$lRoot->{attributes}->{$i},"\"\n"; } }else{ print "TEXT NODE: \n",$lRoot->{text},"\n\n"; } } ############################################################# # # CXTVTripletList # # a subclass of CXMLTreeVisitor # it transforms an XML tree (of the same form as generated # by CGIFTLink::tripletListToTree) to a tripletList which # then can be returned to GIFT. # package CXTVTripletList; require Exporter; @ISA= qw(Exporter CXMLTreeVisitor); @EXPORT_OK= qw(new visit getTripletList ); sub new(){ my $class = shift; my $self = {}; bless $self, $class; $self->initialize(); return $self; } sub initialize(){ my$self=shift; $self->{"triplet-list"}=[]; } ######################################## # # visit # # This function transforms each node visited into triplets # which are appended to @{$self->{"triplet-list"}} # # PARAMETERS: The visit function takes a tree node (i.e. a hash reference) # as parameter. The parameter is provided by CGIFTLink::traverse # # RETURNS: nothing # sub visit(){ my $self=shift; my $lRoot=shift; my $const_element=1; my $const_up=2; my $const_attribute=3; my $const_text=4; if(defined($lRoot->{element})){ push @{$self->{"triplet-list"}},$const_element,$lRoot->{element},""; my $i; for $i (keys(%{$lRoot->{attributes}})){ push @{$self->{"triplet-list"}},$const_attribute,$i,$lRoot->{attributes}->{$i}; } }else{ print "TEXT NODE: \n",$lRoot->{text},"\n\n"; push @{$self->{"triplet-list"}},$const_text,"",$lRoot->{text}; } } ######################################## # # getTripletList # # RETURNS: @{$self->{"triplet-list"}}, the triplet list # generated during traversal # sub getTripletList(){ my$self=shift; return @{$self->{"triplet-list"}}; } ############################################################ # # CGIFTLink # # A class for Perl-side of the link between # GIFT and Perl # # YOU SHOULD NOT NEED TO TOUCH THIS CLASS # THERE IS AN ERROR # # SUBCLASS THIS FOR CREATING YOUR OWN QUERY PROCESSORS # package CGIFTLink; @ISA= qw(Exporter); @EXPORT_OK= qw(new tripletListToTree ); ######################################## # # tripletListToTree # # Transforms a list of triplets given by gift # into a tree of XML elements # # PARAMETERS: @_ contains a flat list of elements # instruction, name, value, instruction, name, value, ... # # RETURNS: the root of the tree generated # # # YOU SHOULD NOT NEED TO TOUCH THIS FUNCTION UNLESS # THERE IS AN ERROR # sub tripletListToTree{ my$self=shift; $const_element=1; $const_up=2; $const_attribute=3; $const_text=4; my $lInstruction; my $lName; my $lValue; my $lReturnTree; do{ $lInstruction=shift; $lName=shift; $lValue=shift; print "---Received: $lInstruction, $lName, $lValue\n"; if(($lInstruction == $const_element) ||($lInstruction == $const_text) ){ # # I make a new subtree # containing just the name # of the element # my $lTree; if($lInstruction == $const_element){ $lTree={ element => $lName, attributes => {}, children => [] }; } if($lInstruction == $const_text){ print "BEFORE TEXTT $lValue\n"; unless($lValue=~m/^(\s|\n)+$/){ print "TEXTT $lValue\n"; $lTree={ text => $lValue }; } } if(defined($lTree)){ unless(defined($lReturnTree)){ $lReturnTree=$lTree; }else{ push @{$self->{children}},$lTree; } unshift @{$self->{"insertion-stack"}},$lTree; } } if($lInstruction == $const_up){ shift @{$self->{"insertion-stack"}}; } if($lInstruction == $const_attribute){ $self->{"insertion-stack"}->[0]->{attributes}->{$lName} = $lValue; } }while(defined($lInstruction, $lName, $lValue)); return $lReturnTree; } ######################################## # # traverseTree # # traverses a tree (as formed by tripletListToTree) # and lets a CXMLVisitor visit each node # # RETURNS: nothing # sub traverseTree( $$ ){ my$self=shift; my $lRoot=shift; my $lVisitor=shift; $lVisitor->visit($lRoot); if(defined($lRoot->{children})){ my $i; foreach $i (@{$lRoot->{children}}){ $self->traverseTree($i,$lVisitor); } } } ######################################## # # processGIFTQueryCall # # PARAMETERS: @_ contains a flat list of elements # instruction, name, value, instruction, name, value, ... # it is suspected to contain a "query" element # # RETURNS: REVERSED, a flat list of elements of the same structure # as the parameters, however containing a "query-result" # element. THE LIST IS REVERSED TO MAKE THINGS EASIER FOR GIFT # WHO WILL POP THINGS OFF A STACK. # # YOU SHOULD NOT NEED TO TOUCH THIS FUNCTION UNLESS # THERE IS AN ERROR # sub processGIFTQueryCall( ; ){ my$self=shift; # transform all parameters to a tree... my $lQueryTree=$self->tripletListToTree(@_); #...then call query,... my $lQueryResultTree=$self->query($lQueryTree); #...and return the reversed triplet list return reverse($self->treeToTripletList($lQueryResultTree)); } ######################################## # # treeToTripletList # # transforms an XML tree into a triplet list # # PARAMETERS: the root of the subtree to be transformed # # RETURNS: a flat list of # instruction, value, name, instruction, value, name, instruction ... # # YOU SHOULD NOT NEED TO TOUCH THIS FUNCTION UNLESS # THERE IS AN ERROR # sub treeToTripletList( $ ){ my$self=shift; my $lRoot=shift; my $lVisitor=new CXTVTripletList(); traverseTree($lRoot, $lVisitor); print "The triplets: ",join(":",$lVisitor->getTripletList()),"\n"; return $lVisitor->getTripletList(); } ######################################## # # setAlgorithm # # sets $self->{algorithm} to the root of an XML tree # containing an "algorithm" element. This can contain # useful configuration information, depending on your # algorithm # # PARAMETERS: tripletList containing "algorithm" element # # SIDE EFFECTS: sets $self->{algorithm} # # YOU SHOULD NOT NEED TO TOUCH THIS FUNCTION UNLESS # THERE IS AN ERROR # sub setAlgorithm( ; ){ my$self=shift; print "setAlgorithm was called \n"; my $lRoot=$self->tripletListToTree(@_); $self->{algorithm}=$lRoot; } ######################################## # # setCollection # # sets $self->{collection} to the root of an XML tree # containing a "collection" element. This can contain # useful configuration information, depending on your # algorithm # # PARAMETERS: tripletList containing "collection" element # # SIDE EFFECTS: sets $self->{collection} # # YOU SHOULD NOT NEED TO TOUCH THIS FUNCTION UNLESS # THERE IS AN ERROR # sub setCollection( ; ){ my$self=shift; print "setCollection was called \n"; my $lRoot=$self->tripletListToTree(@_); $self->{collection}=$lRoot; } ######################################## # # query # # Processes the query given by $self->{tree} # # PARAMETERS: The tree to be processed # # RETURNS: an XML tree containing a "query-result" element # # THIS FUNCTION IS INTENDED TO BE OVERLOADED # sub query( $ ){ my $self=shift; my $inQuery= shift;# this would now contain an XML tree #returning a constant XML tree return { element => "query-result", attributes => {}, children => [ { element => "query-result-element-list", attributes => {}, children => [ { element => "query-result-element", attributes => { "calculated-similarity" => 0.885884, "image-location" => "http://localhost/~muellerw/images/TSR500/b_1027_scaled_small_thumbnail_jpg.jpg", "thumbnail-location" => "http://localhost/~muellerw/images/TSR500/b_1027_scaled_small_thumbnail_jpg.jpg" }, children => [] } ] } ] }; } gift-0.1.14/scripts/perl/CXTVTripletList.pre-pm0000644000175200001440000000456510153634155016221 00000000000000require 5.002; use CXMLTreeVisitor; ############################################################# # # CXTVTripletList # # a subclass of CXMLTreeVisitor # it transforms an XML tree (of the same form as generated # by CGIFTLink::tripletListToTree) to a tripletList which # then can be returned to GIFT. # package CXTVTripletList; require Exporter; @ISA= qw(Exporter CXMLTreeVisitor); @EXPORT_OK= qw(new startVisit endVisit getTripletList ); sub new(){ my $class = shift; my $self = {}; bless $self, $class; $self->initialize(); return $self; } sub initialize(){ my$self=shift; $self->{"triplet-list"}=[]; } ######################################## # # startVisit # # This function transforms each node visited into triplets # which are appended to @{$self->{"triplet-list"}} # # PARAMETERS: The startVisit function takes a tree node (i.e. a hash reference) # as parameter. The parameter is provided by CGIFTLink::traverse # # RETURNS: nothing # sub startVisit( $ ){ my $self=shift; my $lRoot=shift; my $const_element=1; my $const_up=2; my $const_attribute=3; my $const_text=4; if(defined($lRoot->{element})){ push @{$self->{"triplet-list"}},$const_element,$lRoot->{element},""; my $i; for $i (keys(%{$lRoot->{attributes}})){ push @{$self->{"triplet-list"}},$const_attribute,$i,$lRoot->{attributes}->{$i}; } }else{ print "TEXT NODE: \n",$lRoot->{text},"\n\n"; push @{$self->{"triplet-list"}},$const_text,"",$lRoot->{text}; } } ######################################### # # endVisit # # this endVisit moves up the tree after having inserted an element # # PARAMETERS: The endVisit function takes a tree node (i.e. a hash reference) # as parameter. The parameter is provided by CGIFTLink::traverse # # RETURNS: nothing # sub endVisit( $ ){ my$self=shift; my $lRoot=shift; my $const_element=1; my $const_up=2; my $const_attribute=3; my $const_text=4; if(defined($lRoot->{element})){ push @{$self->{"triplet-list"}},$const_up,"",""; }else{ print "TEXT NODE: \n",$lRoot->{text},"\n\n"; push @{$self->{"triplet-list"}},$const_up,"",""; } } ######################################## # # getTripletList # # RETURNS: @{$self->{"triplet-list"}}, the triplet list # generated during traversal # sub getTripletList(){ my$self=shift; return @{$self->{"triplet-list"}}; } gift-0.1.14/scripts/perl/CGIFTLinkDemo.pre-pl0000644000175200001440000000420410153634156015502 00000000000000#!/usr/bin/perl -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 ############################################################ # # main # # It would be cleanest to construct all objects from C++ # however, it is fastest for me to do things by using the # main package. # # Take this as some kind of skeleton for your code. # package CGIFTLink; require Exporter; use lib '__BINDIR__'; # for including CFeedbackClient use CGIFTLink; # add your subclass of CGIFTLink here ######################################## # # THE FOLLOWING FUNCTIONS JUST PASS THINGS # THROUGH TO THE CGIFTLink OBJECT CONSTRUCTED # IN construct(). PLEAST DON'T CHANGE # sub processGIFTQueryCall( ; ){ $gQueryProcessor->processGIFTQueryCall(@_); } sub processGIFTRandomQueryCall( ; ){ $gQueryProcessor->processGIFTRandomQueryCall(@_); } sub setAlgorithm( ; ){ $gQueryProcessor->setAlgorithm(@_); } sub setCollection( ; ){ print "GQ set $gQueryProcessor\n"; $gQueryProcessor->setCollection(@_); } sub configure(){ print "GQ conf $gQueryProcessor\n"; $gQueryProcessor->configure(@_); } ######################################## # # construct # # This function constructs the object which # will process our queries # # CHANGE HERE TO GET YOUR TYPE CONSTRUCTED # sub construct(){ $gQueryProcessor=new CGIFTLink(); } &main::construct(); gift-0.1.14/scripts/perl/gift-add-collection.pre-pl0000644000175200001440000006466210170771311017043 00000000000000#!__PERL_LOCATION__ -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # # This script makes GIFT index all images in a directory # afterwards it creates an entry in the gift config file. # use XML::DOM; use XML::XQL; use XML::XQL::DOM; use Getopt::Long; use IO::File; use XML::Writer; use POSIX; use File::Find; use File::Path; use File::Copy; use Text::Iconv; use POSIX qw(tmpnam); use strict; use vars qw($self $llTemp $llFullName $lFullName $lName $lExtension *FH $lCountPotentialImages $lCountVisitedImages $lImageDirectory $lImageDirectory $lCollectionName $lFeaturePrefix $lIndexPrefix $lThumbnailDirectory $lURLPrefix $lThumbnailURLPrefix $gGiftHome $OLDCONFIG $CONFIG $lOptionList %lOptions $i $lIndexPrefix $url2fts_name $URL2FTS $lURL $lFts $lThumbnailURL $lThumbnailFile $gStringConverter $gDoRemove $gDoFixConfig ); # # first: get the options given on the command line # %lOptions=(); GetOptions(\%lOptions, "fix-config", "help", "remove-collection", "gift-home=s", "local-encoding=s", "image-directory=s", "collection-name:s", "feature-prefix:s", "index-prefix:s", "url-prefix:s", "thumbnail-dir:s", "thumbnail-url-prefix:s", "no-png", "no-gif", "no-jpg", "no-nps", "no-ps"); my($lInEncoding,$lOutEncoding)=((!(defined($lOptions{"local-encoding"}))) ? (&main::findOutEncodings()) : ($lOptions{"local-encoding"},"UTF-8")); print "I am assuming that the system is using $lInEncoding as encoding. Within the xml files generated, we will use $lOutEncoding as encoding method\n"; $gStringConverter = Text::Iconv->new($lInEncoding,$lOutEncoding); # # second: read the options from the .gift-add-collection file # we look for this file in the GIFT_HOME directory # local $gDoFixConfig=""; local $lImageDirectory=""; local $lCollectionName=""; local $lFeaturePrefix=""; local $lIndexPrefix=""; local $lThumbnailDirectory=""; local $lURLPrefix=""; local $lThumbnailURLPrefix=""; local $gGiftHome= $lOptions{'gift-home'} || $gGiftHome || $ENV{GIFT_HOME} || $ENV{HOME}; local $gDoRemove=""; local $lOptionList={ "fix-config" => \$gDoFixConfig, "remove" => \$gDoRemove, "gift-home" => \$gGiftHome, "image-directory" => \$lImageDirectory, "collection-name" => \$lCollectionName, "feature-prefix" => \$lFeaturePrefix, "index-prefix" => \$lIndexPrefix, "thumbnail-dir" => \$lThumbnailDirectory, "url-prefix" => \$lURLPrefix, "thumbnail-url-prefix" => \$lThumbnailURLPrefix }; unless(open DOT_FILE,"$ENV{HOME}/.gift-add-collection"){ print STDERR "File $ENV{HOME}/.gift-add-collection could not be opened ($!), so I won't use it\n"; }else{ { while () { chomp; foreach $i (keys %$lOptionList) { next if m/^\#/; #skip comments eval("if(m/^$i=\\\"(.*)\\\"/){\${\$lOptionList->{\$i}}=\$1;}"); } } foreach $i (keys %$lOptionList) { print "$i => ${$lOptionList->{$i}}\n" if $ {$lOptionList->{$i}}; } ; } } # do we want to remove a collection if($lOptions{'remove-collection'}){ $gDoRemove=1; } # do we want to remove a collection if($lOptions{'fix-config'}){ $gDoFixConfig=1; } # # # #unless($gDoRemove)$gGiftHome= $lOptions{'gift-home'} || $gGiftHome || $ENV{GIFT_HOME} || $ENV{HOME}; # # old position of copy gift-config.mrml and write gift-embed-perl-modules # $lImageDirectory= $lOptions{'image-directory'} || $ARGV[0] || $lImageDirectory || $ENV{PWD} ; $lImageDirectory=$ENV{PWD}.$lImageDirectory unless $lImageDirectory=~m[^/]; $lImageDirectory=$lImageDirectory."/"; $lImageDirectory=~s[ /+ ][/]gx; #removing double backslashes in the end $lImageDirectory=~s[^([^/])][$ENV{PWD}/$1]x; #making path absolute #take the last bit of the directory as database name $lCollectionName= $lOptions{'collection-name'} || $lCollectionName || (split("/",$lImageDirectory))[-1]; #$lCollectionName=~s§$gGiftHome§§; $lFeaturePrefix= $lOptions{'feature-prefix'} || $lFeaturePrefix || "$gGiftHome/gift-indexing-data/$lCollectionName/"; $lURLPrefix= $lOptions{'url-prefix'} || $lURLPrefix || "file:$lImageDirectory"; # is the urlprefix in ~/public_html? create a http-url! $lURLPrefix=~s[^file:__WEB_PUBLISHING_DIRECTORY__][__WEB_PUBLISHING_LOCATION__/]; if ($lOptions{'thumbnail-dir'}) { $lThumbnailDirectory= $lOptions{'thumbnail-dir'} || $lThumbnailDirectory; $lThumbnailDirectory=~s[ /+$ ][/]x; #removing double backslashes in the end $lThumbnailDirectory=~s[^([^/])][$ENV{PWD}/$1]x; #making path absolute } else { unless($lThumbnailDirectory){ $lThumbnailDirectory= $lImageDirectory ; $lThumbnailDirectory=~s[ /*$ ][_thumbnails]x; #strip trailing slashes and add thumbnails } } #$lThumbnailURLPrefix= $lOptions{'thumbnail-url-prefix'} || $lOptions{'url-prefix'} || "file:$lThumbnailDirectory"; $lThumbnailURLPrefix= $lOptions{'thumbnail-url-prefix'} || $lThumbnailURLPrefix || $lOptions{'url-prefix'} || $lURLPrefix || "file:$lThumbnailDirectory"; #cleanup: if there is no "thumbnails" in the end of the url, # but there is thumbnails in the end of the directory # automatically add that if(($lThumbnailDirectory=~m/_thumbnails$ /x) && (!($lThumbnailURLPrefix=~m[^(.*)_thumbnails/*$ ]x))){ $lThumbnailURLPrefix=~s[/*$ ][_thumbnails/]x; } # is the thumbnail-urlprefix in ~/public_html? create a http-url! $lThumbnailURLPrefix=~s[^file:__WEB_PUBLISHING_DIRECTORY__][__WEB_PUBLISHING_LOCATION__/]; $lIndexPrefix= $lOptions{'index-prefix'} || $lIndexPrefix || $lFeaturePrefix; # we asume that the lIndexPrefix ends with # a "/" throughout the program $lIndexPrefix.="/" unless($lIndexPrefix=~m[ /$ ]x); # # replace variables: # foreach $i (values %$lOptionList) { $$i=~s/\@collection-name\@/$lCollectionName/g; } if ($lOptions{help}) { print " gift-add-collection [options] [image-directory]: Add an image collection to your gift database. THE FOLLOWING LIST OF OPTIONS ALSO SHOWS THE CURRENT VALUES AND TAKES OPTIONS BESIDES --help INTO ACCOUNT. IT IS A USEFUL TOOL FOR FINDING OUT HOW gift-add-collection WORKS. Options (options override .gift-add-collection entries): --gift-home Specify the directory which contains the configuration to which you are adding a collection. By default either GIFT_HOME (current value \"$ENV{GIFT_HOME}\") or HOME (current value \"$ENV{HOME}\"). The current value is \"$gGiftHome\" --image-directory All images in this directory will be indexed. Same as giving image-directory after the options Default: \$PWD, Current value: $lImageDirectory --collection-name Name of the new collection to be generated. Default is full path of the image directory. Current value: $lCollectionName --feature-prefix Feature data will be written into this directory. Current value: $lFeaturePrefix --index-prefix Indexing data will be written into this directory Default: $lIndexPrefix (in general:same as given by --feature-prefix) --thumbnail-dir Thumbnails will be put into this directory: Current value: $lThumbnailDirectory (in general:same as given by the name 'image-directory'_thumbnails) Current value: $lThumbnailDirectory --fix-config Fixes the config file by adjusting the collection used by the default query algorithm. If GIFT complains to you about an unknown collection with ID __COLLECTION__, that's the thing to do. Change here, if you want to make a database accessible from the WWW --url-prefix This URL-trunc will be prepended to the file names generated. Default: file:-URL to images Current value: $lURLPrefix --thumbnail-url-prefix This URL-trunc will be prepended to the thumbnail file names generated. file:-URL to thumbnails Current value: $lThumbnailURLPrefix If this script recognizes that you are indexing files in public_html, it will automatically generate http://localhost/~$ENV{HOME} URLs. Options override the contents of $ENV{HOME}/.gift-add-collection "; exit 0; } unless(-e "$gGiftHome/gift-config.mrml"){ copy("__DATADIR__/gift-config.mrml", "$gGiftHome/gift-config.mrml"); } unless(-e "$gGiftHome/gift-embed-perl-modules.pl"){ open PM_OUTFILE,">$gGiftHome/gift-embed-perl-modules.pl" or die "Could not write file $gGiftHome/gift-embed-perl-modules.pl"; print PM_OUTFILE " # # This file was automatically generated # by the GNU Image-Finding Tool (GIFT). # # It should contain 'use' instructions for ALL modules # you want to use from within the GIFT. # # You also have to add 'use lib' instructions where # necessary # use lib '__BINDIR__'; use CGIFTLink; "; } mkpath([$lThumbnailDirectory],1,0755); mkpath([$lIndexPrefix,$lFeaturePrefix],1,0711); print " I will read the images in: $lImageDirectory I will generate feature files which I put into: $lFeaturePrefix The index files will be stored in: $lIndexPrefix The URLs I will generate will have the prefix: $lURLPrefix "; unless($gDoRemove || $gDoFixConfig){ $url2fts_name=">${lIndexPrefix}/url2fts.xml"; $URL2FTS=new IO::File($url2fts_name) or die "Could not open database $url2fts_name for output!"; local $self={}; $self->{writer}=new XML::Writer( OUTPUT => $URL2FTS, DATA_MODE => 1, DATA_INDENT => 2 ); $self->{writer}->xmlDecl("UTF-8","yes"); $self->{writer}->startTag("image-list"); $main::lImageCount=0; $main::gModifyingDateOfThis=(stat($0))[9]; print "This file was last modified $main::gModifyingDateOfThis after the epoch\n"; print "Estimating how many images we are going to index: "; $lCountPotentialImages=0; find(\&countPotentialImages,$lImageDirectory); print "$lCountPotentialImages\n"; $lCountVisitedImages=0; find(\&wanted,$lImageDirectory); $self->{writer}->endTag("image-list"); $URL2FTS=0; #close the file sub countPotentialImages{ my $lFullName=$File::Find::name; my $lName=$lFullName; $lName=~m§\.([^\.]*)$§; my $lExtension=$1; if ($lExtension && $lExtension=~m/^((tif)|(tiff)|(ppm)|(gif)|(jpg)|(jpeg)|(eps)|(png)|(ras))$ /xi) { $main::lCountPotentialImages++; } } sub wanted{ local $lFullName=$File::Find::name; local $lName=$lFullName; $lName=~s[^$lImageDirectory][]; $lName=~m§\.([^\.]*)$§; local $lExtension=$1; if ($lExtension && $lExtension=~m/^((tif)|(tiff)|(ppm)|(gif)|(jpg)|(jpeg)|(eps)|(png)|(ras))$/i) { eval{ my $lNameBase=$lName; $lNameBase=~s§\.$lExtension$§§; $lURL="$lURLPrefix/$lName"; $lFts="$lFeaturePrefix/${lNameBase}_$lExtension.fts"; #the actual location of the thumbnail $lThumbnailFile="$lThumbnailDirectory/${lNameBase}_thumbnail_$lExtension.jpg"; $lThumbnailURL ="$lThumbnailURLPrefix/${lNameBase}_thumbnail_$lExtension.jpg"; print "$lURL $lFts\n"; my $lURL2FTSLine="$lURL $lThumbnailURL $lFts\n"; $lURL2FTSLine=~s§/+§/§g; $lURL2FTSLine=~s§http:/§http://§g; my $i; foreach $i ($lURL, $lThumbnailURL) { #escaping the URL $i=~s[//][/]g; $i=~s[^http:/][http://]; $i=~s[ ][%20]g; $i=safeConvertString($i); } print "lURLPrefix: $lURLPrefix lNameBase: $lNameBase lExtension: $lExtension\n"; # uniqueness of names given by process id # the variable containing the process id of this script # is $$ my $lTemp="/tmp/gift_tmp$$.ppm"; my $lTempFts="/tmp/gift_tmp$$.fts"; print "This script was last modified on $main::gModifyingDateOfThis\n"; my $lThumbnailModificationTime=(stat($lThumbnailFile))[9]; if (!-e($lThumbnailFile) || $lThumbnailModificationTime<$main::gModifyingDateOfThis) { $lThumbnailFile=~m§^(.*/)([^/]*)$§; print($lThumbnailModificationTime," is the modifying date of $lThumbnailFile\n") if $lThumbnailModificationTime; print("We will make a new thumbnail file\n"); print("making the path $1\n"); mkpath([$1],1,0711); print("Converting $lFullName to $lThumbnailFile\n"); print STDERR "Warning: Thumbnail generation failed for $lThumbnailFile $!\n" if system("convert", "-geometry", "128x128", $lFullName, $lThumbnailFile); } else { print "Warning: more recent version of thumbnail file $lThumbnailFile found!\n"; } my $lFtsModificationTime=(stat($lFts))[9]; if (!(-e($lFts)) || ($lFtsModificationTime<$main::gModifyingDateOfThis)) { if ($lFtsModificationTime) { print($lFtsModificationTime," is the modifying date of $lFts file\n") } print("We will make a new feature file\n"); print("Converting $lFullName to $lTemp\n"); unlink $lTemp; local $llTemp=$lTemp; local $llFullName=$lFullName; eval{ if (system("convert" , "-geometry", "256x256!", $llFullName, $llTemp)) { print "Pre feature extraction convert call returned nonzero: $! \n",join(" ",("convert" , "-geometry", "256x256!", $llFullName, $llTemp,"\n")); } }; unless(-e($lTemp)){ die "Pre feature extraction convert call failed ",join(" ",("convert" , "-geometry", "256x256!", $llFullName, $llTemp,"\n")) ; } print("Extracting features from $lTemp\n"); unlink($lTempFts); eval{ system("__EXECBINDIR__/gift-extract-features $lTemp"); }; if(-e $lTempFts){ $lFts=~m§^(.*/)([^/]*)$§; print("making the path $1\n"); mkpath([$1],1,0711); print("...copying from $lTempFts to $lFts\n\n"); copy($lTempFts,$lFts) or print STDOUT "\nCopy $lTempFts -> $lFts failed: $!\n"; if (!$main::lImageCount) { system qq(__EXECBINDIR__/gift-write-feature-descs < $lTemp |perl -e 'print "Writing InvertedFileFeatureDescription...\n";open OF,">$main::lIndexPrefix/InvertedFileFeatureDescription.db" or die "could not open $lIndexPrefix";while(){print OF join(" ",(split(" ",\$_))[0..1]),"\\n";};print "finished.\n";' ); unlink $lTemp; } $main::lImageCount++; # print "Number of images: $main::lImageCount\n\n"; unlink($lTemp); unlink($lTempFts); $main::lCountVisitedImages++; print "\nPROGRESS: ".$main::lCountVisitedImages." of ".$main::lCountPotentialImages." done (".POSIX::floor(90*$main::lCountVisitedImages/$main::lCountPotentialImages)."%)\n"; } else { print "warning: Feature extraction of $lTemp to $lTempFts failed!\n"; } } else { die "Feature extraction failed: $! \n" } # 2004-03-18 add attribute line as last thing my $lAttributes={ "url-postfix" => $lURL, "thumbnail-url-postfix" => $lThumbnailURL, "feature-file-name" => safeConvertString($lFts) }; $self->{writer}->emptyTag("image",(%{$lAttributes})); }; if ($@) { print STDERR "There was an error in extracting features from $File::Find::name\n"; } } } #i am looking for a match of this to place the newly made data my $lTheLine=''; close URL2FTS; system("__EXECBINDIR__/gift-generate-inverted-file $lIndexPrefix/"); print "\nPROGRESS: 99%\n"; my $lUniqueCollectionID="c-".join("-",gmtime()); { #rescue the old config $CONFIG="$gGiftHome/gift-config.mrml"; $OLDCONFIG="${CONFIG}-old"; copy($CONFIG,$OLDCONFIG); print " Copying $CONFIG to $OLDCONFIG "; #before overwriting it with the new config my $lParser = new XML::DOM::Parser; my $lGIFTConfig = $lParser->parsefile ("$gGiftHome/gift-config.mrml") or die $!; if(0){ $CONFIG=">$CONFIG"; open OLDCONFIG or die "COULD NOT OPEN $OLDCONFIG"; open CONFIG or die "COULD NOT OPEN $CONFIG"; while () { if (m/$lTheLine/) { print CONFIG qq( \n\n); } s/\_\_COLLECTION\_\_/$lUniqueCollectionID/g; } }else{ my $lString=&safeConvertString(qq( \n\n)); #WORKAROUND: apparently under perl 5.8.0 XML::DOM::Parse has a problem # when parsing from strings. Solution: 1. write to a temporary file # 2. parse the file. 3. delete the file. my $lName=""; { do { $lName = tmpnam(); } until sysopen(FH, $lName, O_RDWR|O_CREAT|O_EXCL, 0600); print FH $lString; close FH; } my $lCollection=$lParser->parsefile($lName); unlink $lName; &addCollection(collection=>$lCollection, document=>$lGIFTConfig); &setDefaultCollectionID("collection-id"=>$lUniqueCollectionID, document=>$lGIFTConfig); $lGIFTConfig->printToFile ("$gGiftHome/gift-config.mrml") or die $!; } } #print "The image count: ",$main::lImageCount,"\n"; print "\nPROGRESS: 100%\n"; }else{ # remove a collection # rescue the old config $CONFIG="$gGiftHome/gift-config.mrml"; $OLDCONFIG="${CONFIG}-old"; copy($CONFIG,$OLDCONFIG); print " Copying $CONFIG to $OLDCONFIG "; #before overwriting it with the new config my $lParser = new XML::DOM::Parser; my $lGIFTConfig = $lParser->parsefile ("$gGiftHome/gift-config.mrml") or die $!; &removeCollection("collection-name"=>$lCollectionName, document=>$lGIFTConfig) if $gDoRemove; &fixit("collection-name"=>$lCollectionName, document=>$lGIFTConfig) if $gDoFixConfig; $lGIFTConfig->printToFile ("$gGiftHome/gift-config.mrml") or die $!; } sub findOutEncodings{ my %lFoundEncodings; my $lInEncoding="US-ASCII"; { open LOCALELIST, "locale -m |" or die "$!"; while(){ chomp $_; $lFoundEncodings{$_}=1 if($_); } } { open LOCALELIST, "locale LC_MONETARY |" or die "$!"; while(){ chomp $_; $lInEncoding=$_ if($lFoundEncodings{$_}); } } return(($lInEncoding || "UTF-8"),"UTF-8"); } sub safeConvertString( $ ){ my $lStringCopy=shift; return $gStringConverter->convert($lStringCopy) || $lStringCopy;# is now in UTF-8 or what it was before } # CONFIG SERVER CODE sub setDefaultCollectionID{ my $inParameters={}; %{$inParameters}=@_; # find the attributes collection-id in my(@lToBeChanged)=$inParameters->{document}->xql("/mrml/cui-configuration/algorithm-list/algorithm/\@collection-id=\'__COLLECTION__\'"); my $i; # replace __COLLECTION__ by actual collection ID. foreach $i (@lToBeChanged){ $i->setNodeValue($inParameters->{"collection-id"}); } } sub fixit{ print "Fixing config file by adjusting the collection ID of the default algorithm"; my $inParameters={}; %{$inParameters}=@_; my $lReturnValue={success=>1}; # get a list of collections my(@lCollections)=$inParameters->{document}->xql("/mrml/cui-configuration/collection-list/collection"); #make the first collection a default collection if(@lCollections){# clean out the files mentioned in the collection tag my $lId=$lCollections[0]->getAttribute("collection-id"); $inParameters->{"collection-id"}=$lId; &setDefaultCollectionID((%$inParameters)); }else{ # no collection found --> failure $lReturnValue->{success}=0; } return $lReturnValue; } sub addCollection{ my $inParameters={}; %{$inParameters}=@_; my $lReturnValue={success=>1}; my $lCollectionID=$inParameters->{collection}->getDocumentElement()->getAttribute("collection-id") or die; my $lCollectionName=$inParameters->{collection}->getDocumentElement()->getAttribute("collection-name") or die; my(@lConflict)=$inParameters->{document}->xql("/mrml/cui-configuration/collection-list/collection/\@collection-name=\'$lCollectionName\'"); if(@lConflict){ print join(",",@lConflict); my $lAttributes=$inParameters->{collection}->getDocumentElement()->getAttributes(); my $i; for $i ($lAttributes->getValues( )){ my $lName= $i->getName(); my $lValue= $i->getNodeValue(); print "\n----> $lName $lValue <----"; if($lConflict[0]->getAttribute("$lName")){ unless (($lConflict[0]->getAttribute("$lName") eq $lValue)){ $lReturnValue->{error}="attribute value conflict $lName $lValue\n"; $lReturnValue->{success}=0; last; } }else{ $lConflict[0]->setAttribute("$lName",$lValue); } } if($lReturnValue->{success}){ my @lQueryParadigmLocation=$inParameters->{document}->xql("/mrml/cui-configuration/collection-list/collection/query-paradigm-list"); my $lHasQueryParadigm=scalar(@lQueryParadigmLocation); for $i ($inParameters->{collection}->getChildNodes()){ unless(($i->getNodeName() eq "query-paradigm-list") && $lHasQueryParadigm){ $i->setOwnerDocument($inParameters->{document}); $lConflict[0]->insertBefore($i); } } if($lHasQueryParadigm){# merge two query paradigm lists my $lQPTag=$lQueryParadigmLocation[0]; # find all query paradigms to be added my @lQueryParadigms=$inParameters->{collection}->xql("/mrml/cui-add-collection/collection/query-paradigm-list/*"); #add them to the list #FIXME: there is no elimination of duplicates if(scalar @lQueryParadigms){ my $i; for $i (@lQueryParadigms){ $i->setOwnerDocument($inParameters->{document}); $lQPTag->insertBefore($i); } } } } }else{ my $lCollection=$inParameters->{collection}->getDocumentElement(); $inParameters->{collection}->removeChild($lCollection); $lCollection->setOwnerDocument($inParameters->{document}); my @lInsertLocation=$inParameters->{document}->xql("mrml//collection-list"); $lCollection->setOwnerDocument($inParameters->{document}); unless(@lInsertLocation){ die "Wrong config file format. tag expected => Could not find suitable insert location within config file"; }else{ $lInsertLocation[0]->insertBefore($lCollection); my $lNewLine=$inParameters->{document}->createTextNode("\n"); $lInsertLocation[0]->insertBefore($lNewLine); } } return $lReturnValue; } sub removeCollection{ my $inParameters={}; %{$inParameters}=@_; my $lReturnValue={success=>1}; my $lCollectionName=$inParameters->{"collection-name"}; print "Removing collection with name $lCollectionName\n"; my(@lToBeDeleted)=$inParameters->{document}->xql("/mrml/cui-configuration/collection-list/collection[\@collection-name=\'$lCollectionName\']"); if(@lToBeDeleted){# clean out the files mentioned in the collection tag my $lBaseDirectory=$lToBeDeleted[0]->getAttribute("cui-base-dir"); my $lURL2FTSLocation=$lBaseDirectory."/".$lToBeDeleted[0]->getAttribute("cui-feature-file-location"); unlink($lBaseDirectory."/".$lToBeDeleted[0]->getAttribute("cui-offset-file-location")); unlink($lBaseDirectory."/".$lToBeDeleted[0]->getAttribute("cui-inverted-file-location")); my $lParser= new XML::Parser(Handlers=>{Start => sub{ my $inUserData=shift; my $inElement=shift; my $inAttributes={}; %{$inAttributes}=(@_); print "Clearing out collection $lCollectionName: Deleting ", $inAttributes->{"feature-file-name"},"\n"; unlink $inAttributes->{"feature-file-name"}; unlink $inAttributes->{"feature-file-name"}.".ADI"; }}); unlink $lURL2FTSLocation; # now remove the collection element $lToBeDeleted[0]->getParentNode()->removeChild($lToBeDeleted[0]); my $lURL2FTS= $lParser->parsefile($lURL2FTSLocation); } return $lReturnValue; } gift-0.1.14/scripts/perl/CGraphCollection.pre-pm0000644000175200001440000001272110153634156016407 00000000000000#!/usr/bin/perl -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 #!/usr/bin/perl -w use POSIX ;#(floor ceil) =pod This class addresses the problem of constructing a graph from many graphs. In general this will be something like constucting an average graph from a graph. To a graph collection, you can add point lists, which will be treated like a non-closed polygon drawing You can unite two collections, and you can turn the collection into a string. =cut package CGraphCollection; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(new init addPointList unite toString transform output); ############################### # # constructs a new graph collection # Parameters # from, to, stepwidth sub new( $;){ my $class=shift; my $self={}; bless $self,$class; $self->init(@_); return $self; } sub init{ my$self=shift; my $inFrom=shift; my $inTo=shift; my $inStepWidth=shift; my @lPlot; my $i; for($i=$inFrom; $i<=$inTo; $i+=$inStepWidth){ push @lPlot,[$i,[]]; # an X and a List of Ys } $self->{from}=$inFrom; $self->{to}=$inFrom; $self->{stepWidth}=$inStepWidth; $self->{points}=\@lPlot; } ############################### # # transform a value into an array index # # sub xToIndex( $ ){ my$self=shift; my $inX=shift; return POSIX::floor( ($inX-$self->{from})/$self->{stepWidth} ); } ############################### # # Add a list of points to the graph. # the points are given as a flat list # of values in the sequence x,y,x,y... # sub addPointList( @ ){ my$self=shift; my($oldX,$oldY); my($x,$y); while(defined($x=shift) && defined($y=shift)){ if(defined($oldX) && defined($oldY)){ my $lFrom=$self->xToIndex($oldX); my $lTo=$self->xToIndex($x); my $lSteps=$lTo-$lFrom; my $lDifference=0; my @lIteratorList; if($lSteps>=1){ @lIteratorList=($lFrom..($lTo-1)); $lDifference=($y-$oldY)/$lSteps; }else{ $lDifference=0; @lIteratorList=($lFrom); } print "($x;$y) $lFrom $lTo STEPS: $lSteps, $lDifference\n" if($self->{DEBUG}->{addPointList}); my $i; for $i (@lIteratorList){ my $lPushValue=$oldY+(($i-$lFrom) *$lDifference); if($self->{DEBUG}->{addPointList}){ print "pushing into $i the value ",$lPushValue,"\n"; } push (@{$self->{points}->[$i]->[1]}, $lPushValue); } # print "ENDFOR\n"; } $oldX=$x; $oldY=$y; } if(defined($oldX) && defined($oldY)){ push (@{$self->{points}->[$self->xToIndex($oldX)]->[1]}, $oldY+($lSteps*$lDifference)); } } ############################### # # unite the data in two graphcollections # in a way that they can be used for the calculation # of averages etc. sub unite{ my$self=shift; my $inGraph=shift; print "uniting $self with $inGraph\n"; if($self->{from}== $inGraph->{from} and $self->{to}== $inGraph->{to} and $self->{stepWidth}== $inGraph->{stepWidth} ){ #simply splice the lists my $i; my $endfor=scalar(@{$self->{points}}); for($i=0; $i<$endfor; $i++){ @{$self->{points}->[$i]->[1]}= (@{$self ->{points}->[$i]->[1]}, @{$inGraph->{points}->[$i]->[1]}); } }else{ die "Graph parameters are not the same!\n"; } } ############################### # # turn this list of point lists into a string # using a string to evaluate # this string assumes to be fed its data in $lPoint # (one list of x value and y values sub toString( ;$ ){ my$self=shift; my $lResult; my $printer=shift || ' my($lSum,$i); foreach $i (@{$lPoint->[1]}){ $lSum+=$i; $lSquareSum+=$i*$i; } if(defined($lSum)){ my $lAverage=$lSum/scalar(@{$lPoint->[1]}); $lResult.= "$lPoint->[0], Average: $lAverage, Points: "; foreach $i (@{$lPoint->[1]}){ $lResult.="$i "; } $lResult.="\n"; } '; my $lPoint; foreach $lPoint (@ {$self->{points}}){ eval($printer); if($@){ print "an eval error occurred $@\n"; } } return $lResult; } ############################### # # like toString it allows looking # at each element of the list, # however, it does not print sub transform( ;$ ){ my$self=shift; my $lResult; my $printer=shift || ' my($lSum,$i); foreach $i (@{$lPoint->[1]}){ $lSum+=$i; $lSquareSum+=$i*$i; } if(defined($lSum)){ my $lAverage=$lSum/scalar(@{$lPoint->[1]}); $lResult.= "$lPoint->[0], Average: $lAverage, Points: "; foreach $i (@{$lPoint->[1]}){ $lResult.="$i "; } $lResult.="\n"; } '; my $lPoint; foreach $lPoint (@ {$self->{points}}){ eval($printer); } return $lResult; } gift-0.1.14/scripts/perl/Makefile.am0000644000175200001440000001155510153634156014145 00000000000000# GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # # we configure the add collection program to work even if gift is not in the path # this is also necessary for installing several versions of GIFT at the same time # EXTRA_DIST= CTripleTransfer.pre-pl\ CGLDAudreyMTam.pre-pl\ CGLStructuredAnnotation.pre-pm\ CGIFTLink.pre-pm\ CGLDistanceMatrix.pre-pm\ CGIFTLinkDemo.pre-pl\ CXMLTreeBuilder.pre-pm\ CXMLTreeWriter.pre-pm\ CXMLTreeVisitor.pre-pm\ CXTVWriter.pre-pm\ CXTVTripletList.pre-pm\ gift-dtd-to-keywords.pre-pl\ gift-add-collection.pre-pl\ gift-remove-collection.pre-pl\ gift-browser-benchmark.pre-pl\ gift-ranking-comparison.pre-pl\ gift-mrml-client.pre-pl\ gift-url-to-fts.pre-pl\ CQueryParadigmMatcher.pre-pm\ CFeedbackClient.pre-pm\ CGraphCollection.pre-pm\ CFCMovingTarget.pre-pm\ CFCRankingComparison.pre-pm\ gift-diagnose-print-all-ADI.pre-pl\ gift-perl-example-server.pre-pl\ gift-dtd-to-tex.pre-pl\ gift-extract-text-features.pre-pl\ gift-annotation-to-html.pre-pl\ gift-old-to-new-url2fts.pre-pl\ gift-start.pre-pl PERLCONFIG=sed -e "s:__EXECBINDIR__:@DEBEXECBINDIR@:g;s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@DEBPERLLIBDIR@:g;s:__DATADIR__:@DEBDATADIR@:g;s:__LIBDIR__:@DEBSHAREDIR@:g;s:__HOME__:${HOME}:g;s:__WEB_PUBLISHING_DIRECTORY__:@WEB_PUBLISHING_DIRECTORY@:g;s§__WEB_PUBLISHING_LOCATION__§@WEB_PUBLISHING_LOCATION@§g;" < $< > $@ CTripleTransfer.pl: CTripleTransfer.pre-pl $(PERLCONFIG) CGLDAudreyMTam.pl: CGLDAudreyMTam.pre-pl $(PERLCONFIG) CGLStructuredAnnotation.pm: CGLStructuredAnnotation.pre-pm $(PERLCONFIG) CGIFTLink.pm: CGIFTLink.pre-pm $(PERLCONFIG) CGLDistanceMatrix.pm: CGLDistanceMatrix.pre-pm $(PERLCONFIG) CGIFTLinkDemo.pl: CGIFTLinkDemo.pre-pl $(PERLCONFIG) CXMLTreeBuilder.pm: CXMLTreeBuilder.pre-pm $(PERLCONFIG) CXMLTreeWriter.pm: CXMLTreeWriter.pre-pm $(PERLCONFIG) CXMLTreeVisitor.pm: CXMLTreeVisitor.pre-pm $(PERLCONFIG) CXTVWriter.pm: CXTVWriter.pre-pm $(PERLCONFIG) CXTVTripletList.pm: CXTVTripletList.pre-pm $(PERLCONFIG) gift-dtd-to-keywords.pl: gift-dtd-to-keywords.pre-pl $(PERLCONFIG) gift-add-collection.pl: gift-add-collection.pre-pl $(PERLCONFIG) gift-remove-collection.pl: gift-remove-collection.pre-pl $(PERLCONFIG) gift-browser-benchmark.pl: gift-browser-benchmark.pre-pl $(PERLCONFIG) gift-ranking-comparison.pl: gift-ranking-comparison.pre-pl $(PERLCONFIG) gift-mrml-client.pl: gift-mrml-client.pre-pl $(PERLCONFIG) gift-url-to-fts.pl: gift-url-to-fts.pre-pl $(PERLCONFIG) CQueryParadigmMatcher.pm: CQueryParadigmMatcher.pre-pm $(PERLCONFIG) CFeedbackClient.pm: CFeedbackClient.pre-pm $(PERLCONFIG) CGraphCollection.pm: CGraphCollection.pre-pm $(PERLCONFIG) CFCMovingTarget.pm: CFCMovingTarget.pre-pm $(PERLCONFIG) CFCRankingComparison.pm: CFCRankingComparison.pre-pm $(PERLCONFIG) gift-diagnose-print-all-ADI.pl: gift-diagnose-print-all-ADI.pre-pl $(PERLCONFIG) gift-perl-example-server.pl: gift-perl-example-server.pre-pl $(PERLCONFIG) gift-dtd-to-tex.pl: gift-dtd-to-tex.pre-pl $(PERLCONFIG) gift-extract-text-features.pl: gift-extract-text-features.pre-pl $(PERLCONFIG) gift-annotation-to-html.pl: gift-annotation-to-html.pre-pl $(PERLCONFIG) gift-old-to-new-url2fts.pl: gift-old-to-new-url2fts.pre-pl $(PERLCONFIG) gift-start.pl: gift-start.pre-pl $(PERLCONFIG) bin_SCRIPTS= @GIFT_INTERNAL_PERLS@ gift-url-to-fts.pl gift-diagnose-print-all-ADI.pl gift-mrml-client.pl CFeedbackClient.pm CFCMovingTarget.pm gift-perl-example-server.pl gift-add-collection.pl gift-remove-collection.pl gift-dtd-to-tex.pl gift-dtd-to-keywords.pl CQueryParadigmMatcher.pm CTripleTransfer.pl CGLDAudreyMTam.pl CGLStructuredAnnotation.pm CGIFTLink.pm CGLDistanceMatrix.pm CGIFTLinkDemo.pl CXMLTreeBuilder.pm CXMLTreeWriter.pm CXMLTreeVisitor.pm CXTVTripletList.pm CXTVWriter.pm CGraphCollection.pm gift-old-to-new-url2fts.pl gift-start.pl gift-diagnose-print-all-ADI.pl EXTRA_SCRIPTS=gift-browser-benchmark.pl gift-extract-text-features.pl gift-annotation-to-html.pl gift-ranking-comparison.pl CFCRankingComparison.pm CGraphCollection.pm clean: -rm *.pl *.pm distclean: -rm *.pl *.pm gift-0.1.14/scripts/perl/Makefile.in0000644000175200001440000003577310220474100014150 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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@ # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # # we configure the add collection program to work even if gift is not in the path # this is also necessary for installing several versions of GIFT at the same time # 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 = : host_triplet = @host@ subdir = scripts/perl DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = CTripleTransfer.pre-pl\ CGLDAudreyMTam.pre-pl\ CGLStructuredAnnotation.pre-pm\ CGIFTLink.pre-pm\ CGLDistanceMatrix.pre-pm\ CGIFTLinkDemo.pre-pl\ CXMLTreeBuilder.pre-pm\ CXMLTreeWriter.pre-pm\ CXMLTreeVisitor.pre-pm\ CXTVWriter.pre-pm\ CXTVTripletList.pre-pm\ gift-dtd-to-keywords.pre-pl\ gift-add-collection.pre-pl\ gift-remove-collection.pre-pl\ gift-browser-benchmark.pre-pl\ gift-ranking-comparison.pre-pl\ gift-mrml-client.pre-pl\ gift-url-to-fts.pre-pl\ CQueryParadigmMatcher.pre-pm\ CFeedbackClient.pre-pm\ CGraphCollection.pre-pm\ CFCMovingTarget.pre-pm\ CFCRankingComparison.pre-pm\ gift-diagnose-print-all-ADI.pre-pl\ gift-perl-example-server.pre-pl\ gift-dtd-to-tex.pre-pl\ gift-extract-text-features.pre-pl\ gift-annotation-to-html.pre-pl\ gift-old-to-new-url2fts.pre-pl\ gift-start.pre-pl PERLCONFIG = sed -e "s:__EXECBINDIR__:@DEBEXECBINDIR@:g;s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@DEBPERLLIBDIR@:g;s:__DATADIR__:@DEBDATADIR@:g;s:__LIBDIR__:@DEBSHAREDIR@:g;s:__HOME__:${HOME}:g;s:__WEB_PUBLISHING_DIRECTORY__:@WEB_PUBLISHING_DIRECTORY@:g;s§__WEB_PUBLISHING_LOCATION__§@WEB_PUBLISHING_LOCATION@§g;" < $< > $@ bin_SCRIPTS = @GIFT_INTERNAL_PERLS@ gift-url-to-fts.pl gift-diagnose-print-all-ADI.pl gift-mrml-client.pl CFeedbackClient.pm CFCMovingTarget.pm gift-perl-example-server.pl gift-add-collection.pl gift-remove-collection.pl gift-dtd-to-tex.pl gift-dtd-to-keywords.pl CQueryParadigmMatcher.pm CTripleTransfer.pl CGLDAudreyMTam.pl CGLStructuredAnnotation.pm CGIFTLink.pm CGLDistanceMatrix.pm CGIFTLinkDemo.pl CXMLTreeBuilder.pm CXMLTreeWriter.pm CXMLTreeVisitor.pm CXTVTripletList.pm CXTVWriter.pm CGraphCollection.pm gift-old-to-new-url2fts.pl gift-start.pl gift-diagnose-print-all-ADI.pl EXTRA_SCRIPTS = gift-browser-benchmark.pl gift-extract-text-features.pl gift-annotation-to-html.pl gift-ranking-comparison.pl CFCRankingComparison.pm CGraphCollection.pm all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(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 scripts/perl/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu scripts/perl/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done 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 $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -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-am: clean-generic clean-libtool mostlyclean-am 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-binSCRIPTS 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-binSCRIPTS 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-binSCRIPTS 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-binSCRIPTS uninstall-info-am CTripleTransfer.pl: CTripleTransfer.pre-pl $(PERLCONFIG) CGLDAudreyMTam.pl: CGLDAudreyMTam.pre-pl $(PERLCONFIG) CGLStructuredAnnotation.pm: CGLStructuredAnnotation.pre-pm $(PERLCONFIG) CGIFTLink.pm: CGIFTLink.pre-pm $(PERLCONFIG) CGLDistanceMatrix.pm: CGLDistanceMatrix.pre-pm $(PERLCONFIG) CGIFTLinkDemo.pl: CGIFTLinkDemo.pre-pl $(PERLCONFIG) CXMLTreeBuilder.pm: CXMLTreeBuilder.pre-pm $(PERLCONFIG) CXMLTreeWriter.pm: CXMLTreeWriter.pre-pm $(PERLCONFIG) CXMLTreeVisitor.pm: CXMLTreeVisitor.pre-pm $(PERLCONFIG) CXTVWriter.pm: CXTVWriter.pre-pm $(PERLCONFIG) CXTVTripletList.pm: CXTVTripletList.pre-pm $(PERLCONFIG) gift-dtd-to-keywords.pl: gift-dtd-to-keywords.pre-pl $(PERLCONFIG) gift-add-collection.pl: gift-add-collection.pre-pl $(PERLCONFIG) gift-remove-collection.pl: gift-remove-collection.pre-pl $(PERLCONFIG) gift-browser-benchmark.pl: gift-browser-benchmark.pre-pl $(PERLCONFIG) gift-ranking-comparison.pl: gift-ranking-comparison.pre-pl $(PERLCONFIG) gift-mrml-client.pl: gift-mrml-client.pre-pl $(PERLCONFIG) gift-url-to-fts.pl: gift-url-to-fts.pre-pl $(PERLCONFIG) CQueryParadigmMatcher.pm: CQueryParadigmMatcher.pre-pm $(PERLCONFIG) CFeedbackClient.pm: CFeedbackClient.pre-pm $(PERLCONFIG) CGraphCollection.pm: CGraphCollection.pre-pm $(PERLCONFIG) CFCMovingTarget.pm: CFCMovingTarget.pre-pm $(PERLCONFIG) CFCRankingComparison.pm: CFCRankingComparison.pre-pm $(PERLCONFIG) gift-diagnose-print-all-ADI.pl: gift-diagnose-print-all-ADI.pre-pl $(PERLCONFIG) gift-perl-example-server.pl: gift-perl-example-server.pre-pl $(PERLCONFIG) gift-dtd-to-tex.pl: gift-dtd-to-tex.pre-pl $(PERLCONFIG) gift-extract-text-features.pl: gift-extract-text-features.pre-pl $(PERLCONFIG) gift-annotation-to-html.pl: gift-annotation-to-html.pre-pl $(PERLCONFIG) gift-old-to-new-url2fts.pl: gift-old-to-new-url2fts.pre-pl $(PERLCONFIG) gift-start.pl: gift-start.pre-pl $(PERLCONFIG) clean: -rm *.pl *.pm distclean: -rm *.pl *.pm # 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: gift-0.1.14/scripts/perl/CGIFTLink.pre-pm0000644000175200001440000003623610153634156014710 00000000000000#!__PERL_LOCATION__ -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # Author of this file: Wolfgang Müller # # contact people for MRML and MPEG # check things out: would we be at a pre-meeting? # require 5.002; use lib '__BINDIR__'; # for including CFeedbackClient use CXMLTreeVisitor; use CXTVTripletList; use POSIX qw(floor ceil); =pod =head1 NAME CGIFTLink - Linking the GNU Image Finding Tool to Perl =head1 SYNOPSIS =head1 DESCRIPTION CGIFTLink is the baseclass for packages that are designed for linking up to the GIFT. =head2 The big picture To put you into context: the server of the GNU Image Finding Tool has been developed entirely in c++. However, it clearly is desirable to have a more malleable environment for I when designing new query engines. Another big advantage is that Perl is a I designed for interfacing all sorts of packages and programs with each other. What we are doing here, is that upon request we create a Perl interpreter within the GIFT. Into this Perl interpreter we load all scripts which you have given in your configuration (see below). On further request, i.e. each time a query engine is requested by the user that is implemented as a Perl object, we will create the appropriate Perl object within this interpreter. We will delete it once it is not needed any more. (Why we don't use multiple intepreters? The user's Perl has to have been compiled with special flags to enable you to do that without harm. we do not want to impose a way of having compiled Perl to the user.) =head2 What happens when GIFT calls your package What Perl gives you for free, that's passing flat lists as parameters. Unfortunately, what really interests us, that is passing a tree, an XML parsing tree, in fact. However, we would like to shield the program from the burden of parsing. So what we are doing is to send a list of (instruction,attribute,value) triplets to the perl program. CGIFTLink will construct an XML parse tree from it, which is done using a very simple, albeit nonstandard API: Your function which is called, will get something like ' { element=>'an-element-name', attributes=>{ 'attribute-1' => 'value-1', 'attribute-2' => 'value-2', 'attribute-3' => 'value-3', }, children=> [ { element=>'an-element-name', attributes=>{'some-other-attribute' =>'some-other-value'}, children=>[] } ... ] } as a parameter. In short, we are expressing only parts of the DOM semantic, but in a way that is very convenient for the programmer, and that exactly suits our needs. In the following, we will refer to this structure by the term I. You, after having done the processing based on the parameters, give back another parse tree as result. C will flatten this parse tree and give it back to the GIFT. =head2 How to proceed. Please do not change CGIFTLink. Use the code in this class as a source of documentation (it itself is an example on how to use CGIFTLink). To write your own CGIFTLinks, please overload the following methods in this class. =over 2 =item * $self->query( $in_parse_tree ); The parameter is a parse tree which contains a C mrml element. =item * $self->randomQuery( $in_parse_tree ); Again, the parameter is a parse tree which contains a C mrml element. =item * $self->configure( ); This function is called to give your class the opportunity to configure itself. You willl probably load some data, or open some sockets, etc. . I.e. you will do things that will affect the whole lifetime of your object. For this you will be able to use the variables $self->{algorithm} and $self->{collection} which will contain the configuration of your object. =back =head1 EXAMPLES =head1 FILES =head1 SEE ALSO =head1 DIAGNOSTICS =head1 BUGS =head1 RESTRICTIONS =head1 AUTHOR Wolfgang Müller for the CUI Geneva =cut ############################################################ # # CGIFTLink # # A class for Perl-side of the link between # GIFT and Perl # # YOU SHOULD NOT NEED TO TOUCH THIS CLASS # THERE IS AN ERROR # # SUBCLASS THIS FOR CREATING YOUR OWN QUERY PROCESSORS # use lib '__BINDIR__'; # adding the install directory to the library directory package CGIFTLink; @ISA= qw(Exporter); @EXPORT_OK= qw(new processGIFTQueryCall processGIFTRandomQueryCall tripletListToTree treeToTripletList traverseTree setAlgorithm setCollection traverseTree configure ); sub new(){ my $class = shift; my $self = {}; bless $self, $class; $self->initialize(); return $self; } sub initialize(){ my$self=shift; } ######################################## # # tripletListToTree # # Transforms a list of triplets given by gift # into a tree of XML elements # # PARAMETERS: @_ contains a flat list of elements # instruction, name, value, instruction, name, value, ... # # RETURNS: the root of the tree generated # # # YOU SHOULD NOT NEED TO TOUCH THIS FUNCTION UNLESS # THERE IS AN ERROR # sub tripletListToTree{ my$self=shift; $const_element=1; $const_up=2; $const_attribute=3; $const_text=4; my $lInstruction; my $lName; my $lValue; my $lReturnTree; do{ $lInstruction=shift; $lName=shift; $lValue=shift; print "Received: $lInstruction," if (defined($lInstruction)); print " $lName," if (defined($lName)); print " $lValue," if (defined($lValue)); print "\n"; if(defined($lInstruction)){ if(($lInstruction == $const_element) ||($lInstruction == $const_text) ){ # # I make a new subtree # containing just the name # of the element # my $lTree; if($lInstruction == $const_element){ $lTree={ element => $lName, attributes => {}, children => [] }; } if($lInstruction == $const_text){ print "BEFORE TEXTT _{$lValue}_\n"; unless($lValue=~m/^(\s|\n)+$/s){ print "TEXTT _{$lName}_\n"; $lTree={ text => $lName }; } } if(defined($lTree)){ unless(defined($lReturnTree)){ $lReturnTree=$lTree; }else{ push @{$self->{"insertion-stack"}->[0]->{children}},$lTree; } unshift @{$self->{"insertion-stack"}},$lTree; } } if($lInstruction == $const_up){ unless(scalar(@{$self->{"insertion-stack"}})){ print "ERRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRROR\n"; } shift @{$self->{"insertion-stack"}}; } if($lInstruction == $const_attribute){ $self->{"insertion-stack"}->[0]->{attributes}->{$lName} = $lValue; } } }while(defined($lInstruction) && defined($lName) && defined($lValue)); return $lReturnTree; } ######################################## # # traverseTree # # traverses a tree (as formed by tripletListToTree) # and lets a CXMLVisitor startVisit each node # # RETURNS: nothing # sub traverseTree( $$ ){ my$self=shift; my $lRoot=shift; my $lVisitor=shift; $lVisitor->startVisit($lRoot); if(defined($lRoot->{children})){ my $i; foreach $i (@{$lRoot->{children}}){ $self->CGIFTLink::traverseTree($i,$lVisitor); } } $lVisitor->endVisit($lRoot); return; } ######################################## # # processGIFTQueryCall # # PARAMETERS: @_ contains a flat list of elements # instruction, name, value, instruction, name, value, ... # it is suspected to contain a "query" element # # RETURNS: REVERSED, a flat list of elements of the same structure # as the parameters, however containing a "query-result" # element. THE LIST IS REVERSED TO MAKE THINGS EASIER FOR GIFT # WHO WILL POP THINGS OFF A STACK. # # YOU SHOULD NOT NEED TO TOUCH THIS FUNCTION UNLESS # THERE IS AN ERROR # sub processGIFTQueryCall( ; ){ my$self=shift; # transform all parameters to a tree... my $lQueryTree=$self->CGIFTLink::tripletListToTree(@_); #...then call query,... my $lQueryResultTree=$self->query($lQueryTree); #...and return the reversed triplet list return reverse($self->CGIFTLink::treeToTripletList($lQueryResultTree)); } ######################################## # # processGIFTRandomQueryCall # # PARAMETERS: @_ contains a flat list of elements # instruction, name, value, instruction, name, value, ... # it is exspected to contain a "query" element # # RETURNS: REVERSED, a flat list of elements of the same structure # as the parameters, however containing a "query-result" # element. THE LIST IS REVERSED TO MAKE THINGS EASIER FOR GIFT # WHO WILL POP THINGS OFF A STACK. # # YOU SHOULD NOT NEED TO TOUCH THIS FUNCTION UNLESS # THERE IS AN ERROR # sub processGIFTRandomQueryCall( ; ){ my$self=shift; # transform all parameters to a tree... my $lRandomQueryTree=$self->CGIFTLink::tripletListToTree(@_); #...then call randomQuery,... my $lRandomQueryResultTree=$self->randomQuery($lRandomQueryTree); #...and return the reversed triplet list return reverse($self->CGIFTLink::treeToTripletList($lRandomQueryResultTree)); } ######################################## # # treeToTripletList # # transforms an XML tree into a triplet list # # PARAMETERS: the root of the subtree to be transformed # # RETURNS: a flat list of # instruction, value, name, instruction, value, name, instruction ... # # YOU SHOULD NOT NEED TO TOUCH THIS FUNCTION UNLESS # THERE IS AN ERROR # sub treeToTripletList( $ ){ my$self=shift; my $lRoot=shift; my $lVisitor=new CXTVTripletList(); $self->CGIFTLink::traverseTree($lRoot, $lVisitor); if($self->{DEBUG}->{treeToTripletList}){ print "The triplets: ",join(":",$lVisitor->getTripletList()),"\n"; } return $lVisitor->getTripletList(); } ######################################## # # setAlgorithm # # sets $self->{algorithm} to the root of an XML tree # containing an "algorithm" element. This can contain # useful configuration information, depending on your # algorithm # # PARAMETERS: tripletList containing "algorithm" element # # SIDE EFFECTS: sets $self->{algorithm} # # YOU SHOULD NOT NEED TO TOUCH THIS FUNCTION UNLESS # THERE IS AN ERROR # sub setAlgorithm( ; ){ my$self=shift; print "setAlgorithm was called \n"; my $lRoot=$self->CGIFTLink::tripletListToTree(@_); $self->{algorithm}=$lRoot; } ######################################## # # setCollection # # sets $self->{collection} to the root of an XML tree # containing a "collection" element. This can contain # useful configuration information, depending on your # algorithm # # PARAMETERS: tripletList containing "collection" element # # SIDE EFFECTS: sets $self->{collection} # # YOU SHOULD NOT NEED TO TOUCH THIS FUNCTION UNLESS # THERE IS AN ERROR # sub setCollection( ; ){ my$self=shift; print "setCollection was called \n"; my $lRoot=$self->CGIFTLink::tripletListToTree(@_); $self->{collection}=$lRoot; } ######################################## # # query # # Processes the query given by $self->{tree} # # PARAMETERS: The tree to be processed # # RETURNS: an XML tree containing a "query-result" element # # THIS FUNCTION IS INTENDED TO BE OVERLOADED # sub query( $ ){ my $self=shift; my $inQuery= shift;# this would now contain an XML tree print "CGIFTLink---------->query:",$inQuery->{attributes}->{"result-size"},":",keys(%{$inQuery->{attributes}}),"\n\n"; #returning a constant XML tree my $lResult=[]; @{$lResult}=@{$self->{url2fts}}[0..($inQuery->{attributes}->{"result-size"}-1)]; return { element => "query-result", attributes => {}, children => [ { element => "query-result-element-list", attributes => {}, children => $lResult } ] }; } ######################################## # # query # # Processes the query given by $inQuery # give back $inQuery->{attributes}->{"result-size"} random images # # PARAMETERS: The "query" tree to be processed # # RETURNS: an XML tree containing a "query-result" element # # THIS FUNCTION IS INTENDED TO BE OVERLOADED # sub randomQuery( $ ){ my $self=shift; my $inQuery= shift;# this would now contain an XML tree print "CGIFTLink---------->randomQuery:",$inQuery->{element},",",$inQuery->{attributes}->{"result-size"},":",keys(%{$inQuery->{attributes}}),"\n\n"; my $lResultSize=$inQuery->{attributes}->{"result-size"}; my $i; my %lUsed; my $lResult=[]; if(scalar(@{$self->{url2fts}})<$lResultSize){ $lResult=$self->{url2fts}; }else{ while(scalar(keys %lUsed)<$lResultSize){ my $lNew=POSIX::floor(rand()*scalar(@{$self->{url2fts}})); $lUsed{$lNew}=1; } $lResult=[]; @{$lResult}=@{$self->{url2fts}}[(keys %lUsed)]; } #returning a constant XML tree return { element => "query-result", attributes => {}, children => [ { element => "query-result-element-list", attributes => {}, children => $lResult } ] }; } ######################################## # # configure # # processes the configuration data present in # $self->{collection} and $self->{algorithm}. # possible examples would be the opening of a # connection to an SQL database. # # PARAMETERS: expects $self->{collection} and $self->{algorithm} # to be set # # RETURNS: nothing # # THIS FUNCTION IS INTENDED TO BE OVERLOADED # sub configure( ){ my $self=shift; die unless defined($self); die unless defined($self->{collection}); my $inFileName=$self->{collection}->{attributes}->{'cui-base-dir'} ."/" .$self->{collection}->{attributes}->{'cui-feature-file-location'}; open(IF,$inFileName) or die "no url2fts file defined!\n"; print "reading $inFileName\n"; $self->{url2fts}=[]; my $lCount; while(){ my($lLocation,$lThumb,$lIgnoreFeatures); if(m/url\-postfix="(.*?)"/){ $lLocation=$1; m/thumbnail\-url\-postfix="(.*?)"/; $lThumb=$1; m/url\-postfix="(.*?)"/; #$lIgnoreFeatures=$1; print "$lCount: $lLocation,$lThumb,$lIgnoreFeatures\n"; $lCount++; push @{$self->{url2fts}},{ element =>'query-result-element', attributes =>{ 'image-location'=>$lLocation, 'thumbnail-location'=>$lThumb, 'calculated-similarity'=>$lCount }, children=> [] } } } print "finished reading $inFileName\nURL2FTS WAS LOADED SUCCESSFULLY!\n"; # does nothing at present } gift-0.1.14/scripts/perl/gift-extract-text-features.pre-pl0000644000175200001440000002315210153634156020425 00000000000000#!__PERL_LOCATION__ -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # Author of this file: Wolfgang Müller ############################### # # This is used for making inverted files # from files which contain pure text annotation # require 5.002; #use strict; use Socket; use FileHandle; use English; use IO::Socket; use XML::Parser; package CUsedWordHash; require Exporter; @ISA= qw(Exporter); @EXPORT= qw(new addWords getWords generateLookup getSize wordToNumber translate ); ############################################################# # # This script is useful for collecting, which # words have been used in the annotation # this is a precondition for creating an inverted file # from it. # ############################################################# # # # WARNING: this code is quick and dirty, but flexible. # it will be difficult to make it multi-threaded, but # this probably will not be interesting for a while # # ############################################################# sub new { my $class = shift; my $self = {}; bless $self, $class; $self->initialize(); return $self; } sub initialize(){ my$self=shift; $self->{used}={}; ############################### # # for quick changes what to look at when debugging/testing # # $self->{vDEBUG}={ }; print "Printing debugging info for the functions:\n"; { my $i; foreach $i (keys(%{$self->{vDEBUG}})){ if($self->{vDEBUG}->{$i}){ print "$i\n"; } } } } sub addWords(;){ my$self=shift; foreach $i (@_){ $self->{used}->{$i}++; } } sub getWords(){ my$self=shift; return keys(%{$self->{used}}); } sub getSize(){ my$self=shift; return scalar(keys(%{$self->{used}})); } sub generateLookup( $ ){ my$self=shift; my $inOffset=shift; $self->{lookup}={}; for $i (sort(keys(%{$self->{used}}))){ $self->{lookup}->{$i}= $inOffset++; } return $inOffset; } sub wordtoNumber( $ ){ my$self=shift; my $inWord; return $self->{lookup}->{$inWord}; } sub translate( $$ ){ my$self=shift; my $inString=shift; my $inCount=shift; foreach $i (@_){ print "_",$self->{lookup}->{$i},"."; $inString.=pack "if",$self->{lookup}->{$i},1; $inCount++; } return ($inString,$inCount); } sub statistics( $ ){ my$self=shift; my $inName=shift; print "In cathegory $inName: ",scalar(keys(%{$self->{lookup}}))," different Words. \n"; my @lWords; foreach $i (keys(%{$self->{used}})){ push @lWords,[$i,$self->{used}->{$i}]; } @lSortedWords=sort {$a->[1] <=> $b->[1];} @lWords; print "Words and their frequency: "; $lCount=0; $lDiffcount=0; $lSum=0; $lPrevious=0; my @lWordTimes; foreach $i (@lSortedWords){ $lDiffcount++; if($lPrevious != $i->[1]){ push @lWordTimes,[$lPrevious,$lDiffcount]; print "$lDiffcount words\n"; $lDiffcount=0; } print ++$lCount,": $i->[1] $i->[0]\n"; $lSum+=$i->[1]; $lPrevious=$i->[1]; } print "$lSum words total\n\n"; print "To express things otherwise:\n"; foreach $i (@lWordTimes){ print "$i->[1] words arose $i->[0] times\n" if $i->[0]; } } package main; sub WNOutputToWordList( $ ){ my $lNounHyper=shift; @lLines=split("\n",$lNounHyper); $lNounHyper=""; foreach $j (@lLines){ $lNounHyper.=$j unless($j=~m/^S/); } $lNounHyper=~s/Sense.*\n//g; @lShortNounList=split("=>",$lNounHyper); foreach $j (@lShortNounList){ my @lList=split(", ",$j); push @lNounList,(@lList); } my @lAux=@lNounList; @lNounList=(); foreach $j (@lAux){ $j=~s/^\s+//; $j=~s/\s+$//; if($j){ push @lNounList,$j; } } return(@lNounList); } sub removeDoubles{ my %lRemoverHash; my $lCurrent; while($lCurrent=shift){ $lRemoverHash{$lCurrent}=1; } #print "KEYS:",join(",",keys(%lRemoverHash)),"\n"; print "\n->",scalar(keys(%lRemoverHash)),"\n"; return keys(%lRemoverHash); } sub useThesaurus( $$ ){ my $inThesaurus=shift; my $inWordList=shift; my @lOutList; my $i; # # push the word and its associated list for each word in the word list # for $i (@$inWordList){ push @lOutList,$i; push @lOutList,$inThesaurus->{$i}; # $lNounHyper=`/home/wolfgang/wordnet1.6/bin/wn $i -hypen -n1`; # if($lNounHyper){ # push @lOutList,WNOutputToWordList($lNounHyper); # } # $lVerbHyper=`/home/wolfgang/wordnet1.6/bin/wn $i -hypev -n1`; # if($lVerbHyper){ # push @lOutList,WNOutputToWordList($lVerbHyper); # } } #print "\n------------------------------\n",join(",_",@lOutList),"\n------------------------------\n",; print scalar(@lOutList),$lOutList[0],".\n"; return @lOutList; } my %lThesaurus; open INTHESAURUS,"thesaurus" or die "No thesaurus"; { print "I opened successfully the thesaurus\n"; while(){ my @lLine=split(/\s+/,$_); if(scalar(@lLine)>1){ my $lIndex=shift @lLine; $lThesaurus{$lIndex}=\@lLine; print "Inserting to thesaurus: $lIndex: (",join(", ",@lLine),")\n"; } } } $/="";#slurp whole paragraphs my $inFileName=shift; open INFILE,$inFileName or die "Could not open $inFileName\n"; my $lCount=0; my $lOneWordUsed =new CUsedWordHash; my $lFreeUsed =new CUsedWordHash; my $lForegroundUsed=new CUsedWordHash; my $lBackgroundUsed=new CUsedWordHash; while(){ if(m/:\n/){ s/:\n//; chomp; my $lImage=$_; $_=; chomp;chomp; my @lOneWordAnnotation=split(/\s+/,$_); $lOneWordUsed->addWords(@lOneWordAnnotation); $_=; chomp;chomp; my @lFreeAnnotation=split(/\s+/,$_); @lAugmentedFreeAnnotation=removeDoubles(useThesaurus(\%lThesaurus, \@lFreeAnnotation )); $lFreeUsed->addWords(@lAugmentedFreeAnnotation); $_=; chomp;chomp; my @lForegroundAnnotation=split(/\s+/,$_); $lForegroundUsed->addWords(@lForegroundAnnotation); $_=; chomp;chomp; my @lBackgroundAnnotation=split(/\s+/,$_); $lBackgroundUsed->addWords(@lBackgroundAnnotation); } } print "Oneword:",join(", ",sort($lOneWordUsed->getWords())),"\n"; print "Free:",join(", ",sort($lFreeUsed->getWords())),"\n"; print "Foreground:",join(", ",sort($lForegroundUsed->getWords())),"\n"; print "Background:",join(", ",sort($lBackgroundUsed->getWords())),"\n"; $lBackgroundUsed ->generateLookup($lForegroundUsed ->generateLookup($lFreeUsed ->generateLookup($lOneWordUsed ->generateLookup(0)))); ${gBaseDir}="/home/wolfgang/a2notated/"; sub writeFeatureDescription{ open IFFI,">${gBaseDir}InvertedFileFeatureDescription.db" or die "no IFFI"; my $lShiftCount=0; foreach $lSize(@_){ my $i; my $lCount=0; for($i=0; $i<$lSize; $i++){ print IFFI "$lCount $lShiftCount\n"; $lCount++; } $lShiftCount=0; } } writeFeatureDescription($lOneWordUsed->getSize(), $lFreeUsed->getSize(), $lForegroundUsed->getSize(), $lBackgroundUsed->getSize()); close INFILE; open URL2FTS,">${gBaseDir}url2fts"; open INFILE,$inFileName or die "Could not open $inFileName\n"; while(){ if(m/:\n/){ s/:\n//; chomp; m/([^\/]*)$/; $_=$1; print URL2FTS "http://gift.unige.ch/images/TSR500/$_ http://gift.unige.ch/images/TSR500/$_ "; s/jpg$/fts/; my $lFeature="${gBaseDir}$_"; print URL2FTS "$lFeature\n"; print "Opening: >$lFeature\n"; open OUTFILE,">$lFeature" or die "Could not open $lFeature\n"; my $lFeatureString=""; my $lCount=0; $_=; chomp;chomp; my @lOneWordAnnotation=split(/\s+/,$_); ($lFeatureString,$lCount)=$lOneWordUsed->translate($lFeatureString, $lCount, @lOneWordAnnotation); $_=; chomp;chomp; my @lFreeAnnotation=split(/\s+/,$_); @lAugmentedFreeAnnotation=removeDoubles(useThesaurus(\%lThesaurus, \@lFreeAnnotation )); ($lFeatureString,$lCount)=$lFreeUsed->translate($lFeatureString, $lCount, @lAugmentedFreeAnnotation); $_=; chomp;chomp; my @lForegroundAnnotation=split(/\s+/,$_); ($lFeatureString,$lCount)=$lForegroundUsed->translate($lFeatureString, $lCount, @lForegroundAnnotation); $_=; chomp;chomp; my @lBackgroundAnnotation=split(/\s+/,$_); ($lFeatureString,$lCount)=$lBackgroundUsed->translate($lFeatureString, $lCount, @lBackgroundAnnotation); $lAddString=pack "i",scalar(split("",$lFeatureString))/8; $lFeatureString=$lAddString.$lFeatureString; print OUTFILE $lFeatureString; #print "\nFS: $lFeatureString\n"; } } #$lOneWordUsed->statistics("One word annotation"); #$lFreeUsed->statistics("Free annotation"); #$lForegroundUsed->statistics("Foreground Visual"); #$lBackgroundUsed->statistics("Background Visual"); gift-0.1.14/scripts/perl/gift-ranking-comparison.pre-pl0000644000175200001440000001722410153634156017761 00000000000000#!__PERL_LOCATION__ -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 =pod =Title1 gift-ranking-comparison.pl This program does a ranking comparison: it calls two servers, performs QBE queries for a set of images, and does a comparison on how images are ranked in the two systems. These comparisons are put down in a gnuplot file. =cut ############################################################# # # if you need printouts for what happens inside CFeedbackClient, # modify CFeedbackClient.pre-pm: # # the hash vDEBUG (line 98) in CFeedbackClient.pre-pm # will be of interest for you # ############################################################# # Author of this file: Wolfgang Müller 2000-03-15 require 5.002; #use strict; use lib '__BINDIR__'; # for including CFeedbackClient use CFCRankingComparison; package main; print "Usage: gift-ranking-comparison.pl \[all parameters have to be given in the code\]"; # # Read the images from the command line # { #for scoping my $lHost= shift || "localhost:12789"; my $OUTFILE=shift || "gift-mrml-browser-benchmark-outfile.html"; $OUTFILE=">$OUTFILE"; my @lQuery; #we are making a list of #pairs from the flat list of #arguments # a default query my $lFeedbackClient=new CFCRankingComparison(); $lFeedbackClient->setAddress($lHost); $lFeedbackClient->setResultSize(100); # my $lPrefix= "file:/home/wolfgang/db_images"; my $lPrefix= "http://gift.unige.ch/images"; my $lPrefix2= "http://gift.unige.ch/images"; $lFeedbackClient->doQueryGroup([ "$lPrefix/TSR500/b_1007_scaled_small.jpg", "$lPrefix/TSR500/b_1014_scaled_small.jpg", "$lPrefix/TSR500/b_1020_scaled_small.jpg", "$lPrefix/TSR500/b_1023_scaled_small.jpg", "$lPrefix/TSR500/b_1024_scaled_small.jpg", "$lPrefix/TSR500/b_1025_scaled_small.jpg", "$lPrefix/TSR500/b_1026_scaled_small.jpg", "$lPrefix/TSR500/b_1029_scaled_small.jpg", "$lPrefix/TSR500/b_1030_scaled_small.jpg", "$lPrefix/TSR500/b_1038_scaled_small.jpg", "$lPrefix/TSR500/b_1041_scaled_small.jpg", "$lPrefix/TSR500/b_1049_scaled_small.jpg", "$lPrefix/TSR500/b_1050_scaled_small.jpg", "$lPrefix/TSR500/b_1054_scaled_small.jpg", "$lPrefix/TSR500/b_1084_scaled_small.jpg", "$lPrefix/TSR500/b_1090_scaled_small.jpg", "$lPrefix/TSR500/b_1091_scaled_small.jpg", "$lPrefix/TSR500/b_1093_scaled_small.jpg", "$lPrefix/TSR500/b_1098_scaled_small.jpg", "$lPrefix/TSR500/b_1110_scaled_small.jpg", "$lPrefix/TSR500/b_1117_scaled_small.jpg", "$lPrefix/TSR500/b_1119_scaled_small.jpg", "$lPrefix/TSR500/b_1123_scaled_small.jpg", "$lPrefix/TSR500/b_1130_scaled_small.jpg", "$lPrefix/TSR500/b_1141_scaled_small.jpg", "$lPrefix/TSR500/b_1144_scaled_small.jpg", "$lPrefix/TSR500/b_1145_scaled_small.jpg", "$lPrefix/TSR500/b_1151_scaled_small.jpg", "$lPrefix/TSR500/b_1152_scaled_small.jpg", "$lPrefix/TSR500/b_1154_scaled_small.jpg", "$lPrefix/TSR500/b_1157_scaled_small.jpg", "$lPrefix/TSR500/b_1158_scaled_small.jpg", "$lPrefix/TSR500/b_1161_scaled_small.jpg", "$lPrefix/TSR500/b_1162_scaled_small.jpg", "$lPrefix/TSR500/b_1163_scaled_small.jpg", "$lPrefix/TSR500/b_1165_scaled_small.jpg", "$lPrefix/TSR500/b_1170_scaled_small.jpg", "$lPrefix/TSR500/b_1174_scaled_small.jpg", "$lPrefix/TSR500/b_1180_scaled_small.jpg", "$lPrefix/TSR500/b_1192_scaled_small.jpg", "$lPrefix/TSR500/b_1193_scaled_small.jpg", "$lPrefix/TSR500/b_1195_scaled_small.jpg", "$lPrefix/TSR500/b_1197_scaled_small.jpg", "$lPrefix/TSR500/b_1198_scaled_small.jpg", "$lPrefix/TSR500/b_1206_scaled_small.jpg", "$lPrefix/TSR500/b_1207_scaled_small.jpg", "$lPrefix/TSR500/b_1212_scaled_small.jpg", "$lPrefix/TSR500/b_1219_scaled_small.jpg", "$lPrefix/TSR500/b_1220_scaled_small.jpg", "$lPrefix/TSR500/b_1227_scaled_small.jpg", "$lPrefix/TSR500/b_1228_scaled_small.jpg", "$lPrefix/TSR500/b_1229_scaled_small.jpg", "$lPrefix/TSR500/b_1239_scaled_small.jpg", "$lPrefix/TSR500/b_1241_scaled_small.jpg", "$lPrefix/TSR500/b_1247_scaled_small.jpg", "$lPrefix/TSR500/b_1251_scaled_small.jpg", "$lPrefix/TSR500/b_1260_scaled_small.jpg", "$lPrefix/TSR500/b_1284_scaled_small.jpg", "$lPrefix/TSR500/b_1290_scaled_small.jpg", "$lPrefix/TSR500/b_1293_scaled_small.jpg", "$lPrefix/TSR500/b_1299_scaled_small.jpg", "$lPrefix/TSR500/b_1304_scaled_small.jpg", "$lPrefix/TSR500/b_1313_scaled_small.jpg", "$lPrefix/TSR500/b_1323_scaled_small.jpg", "$lPrefix/TSR500/b_1329_scaled_small.jpg", "$lPrefix/TSR500/b_1335_scaled_small.jpg", "$lPrefix/TSR500/b_1341_scaled_small.jpg", "$lPrefix/TSR500/b_1345_scaled_small.jpg", "$lPrefix/TSR500/b_1346_scaled_small.jpg", "$lPrefix/TSR500/b_1355_scaled_small.jpg", "$lPrefix/TSR500/b_1359_scaled_small.jpg", "$lPrefix/TSR500/b_1363_scaled_small.jpg", "$lPrefix/TSR500/b_1366_scaled_small.jpg", "$lPrefix/TSR500/b_1371_scaled_small.jpg", "$lPrefix/TSR500/b_1380_scaled_small.jpg", "$lPrefix/TSR500/b_1385_scaled_small.jpg", "$lPrefix/TSR500/b_1388_scaled_small.jpg", "$lPrefix/TSR500/b_1405_scaled_small.jpg", "$lPrefix/TSR500/b_1408_scaled_small.jpg", "$lPrefix/TSR500/b_1421_scaled_small.jpg", "$lPrefix/TSR500/b_1428_scaled_small.jpg", "$lPrefix/TSR500/b_1436_scaled_small.jpg", "$lPrefix/TSR500/b_1440_scaled_small.jpg", "$lPrefix/TSR500/b_1447_scaled_small.jpg", "$lPrefix/TSR500/b_1450_scaled_small.jpg", "$lPrefix/TSR500/b_1456_scaled_small.jpg", "$lPrefix/TSR500/b_1460_scaled_small.jpg", "$lPrefix/TSR500/b_1462_scaled_small.jpg", "$lPrefix/TSR500/b_1469_scaled_small.jpg", "$lPrefix/TSR500/b_1470_scaled_small.jpg", "$lPrefix/TSR500/b_1471_scaled_small.jpg", "$lPrefix/TSR500/b_1473_scaled_small.jpg", "$lPrefix/TSR500/b_1475_scaled_small.jpg", "$lPrefix/TSR500/b_1479_scaled_small.jpg", "$lPrefix/TSR500/b_1484_scaled_small.jpg", "$lPrefix/TSR500/b_1485_scaled_small.jpg", "$lPrefix/TSR500/b_1488_scaled_small.jpg", "$lPrefix/TSR500/b_1491_scaled_small.jpg", "$lPrefix/TSR500/b_1498_scaled_small.jpg", "$lPrefix/TSR500/b_1499_scaled_small.jpg" ], {address => "localhost:12790", algorithm => "for-matrix", collection => "c-52-41-23-27-2-100-1-86-0", "url-prefix" => $lPrefix }, {address => "localhost:12790", algorithm => "reference", collection => "c-52-41-23-27-2-100-1-86-0", "url-prefix" => $lPrefix2 }, ); } print "Usage: gift-ranking-comparison.pl \[all parameters have to be given in the code\]"; gift-0.1.14/scripts/perl/gift-dtd-to-tex.pre-pl0000644000175200001440000002023310153634156016143 00000000000000#!__PERL_LOCATION__ -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # # gift-dtd-to-tex.pl # # This program turns a simple sgml dtd (with does not contain external # entities) into a class, which contains all keywords as string constants # # The use of this is to improve type safety when extendint MRML or changing # things in the program # use Getopt::Long; use XML::Parser; require 5.002; #use strict; use Socket; use FileHandle; use English; use IO::File; use XML::Parser; ######################################## # # slurps in some DTD and translates all te # keywords of the DTD into constant strings of # the language wanted # ######################################## package CDTDToTeX; require Exporter; @ISA= qw(Exporter); @EXPORT= qw(new slurpDTD translateToLanguage ); sub new { my $class = shift; my $self = {}; bless $self, $class; $self->initialize(); return $self; } sub initialize(){ my$self=shift; $self->{parser} = new XML::Parser(Handlers => {Element => \&handleElement, Comment => \&handleComment, Attlist => \&handleAttlist, }); # Make the parser know who is this structure $self->{parser}->{mCaller}=$self; $self->{parser}->{mMagic}=42; ############################### #§ # for quick changes what to look at when debugging/testing # # $self->{vDEBUG}={ handleComment => 0, handleElement => 0, handleAttlist => 0, processDTD => 0, }; print "Printing debugging info for the functions:\n"; { my $i; foreach $i (keys(%{$self->{vDEBUG}})){ if($self->{vDEBUG}->{$i}){ print "$i\n"; } } } ############################### # # this structure contains the attribute-lists for all # elements # $self->{attribute_list}={}; } ############################## # # Expat parser handlers # sub handleComment( $$ ){ my $self=shift; die "BLACK MAGIC!" if ($self->{mMagic}!=42); $self=$self->{mCaller}; my $lComment=shift; $lComment=~s/\+\+\++//g; print "Comment: $lComment\n" if($self->{vDEBUG}->{handleComment}); $self->addComment($lComment); } sub handleElement( $$$ ){ my $self=shift; die "BLACK MAGIC!" if ($self->{mMagic}!=42); $self=$self->{mCaller}; my $inElementName=shift; my $inElementModel=shift; print "\n" if($self->{vDEBUG}->{handleElement}); $self->addElement($inElementName, $inElementModel); } sub handleAttlist( $$$$$$ ){ my $self=shift; die "BLACK MAGIC!" if ($self->{mMagic}!=42); $self=$self->{mCaller}; my $inElement=shift; my $inAttributeName=shift; my $inAttributeType=shift; my $inDefault=shift; my $inFixed=shift || ""; unless($inAttributeName=~m/^cui-/){ $self->addAttribute($inElement,[$inAttributeName, $inAttributeType, $inDefault ]); print "Attribute: $inAttributeName $inAttributeType $inDefault $inFixed\n" if($self->{vDEBUG}->{handleAttlist}); } } sub processDTD( $$$$ ){ my$self=shift; my $lDTDHandle=shift; my $lEmptyText=shift; my $lStartTeX=shift; my $lEndTeX=shift; print "\nNow I will try to read...\n" if($self->{vDEBUG}->{processDTD}); #we read, and then we parse #for this reason, we can return the #string read $self->initialiseSequence($lStartTeX); { my $lRead=join("",$lDTDHandle->getlines()); if($lRead){ if($self->{vDEBUG}->{processDTD}){ print "Parsing: $lRead"; open OF,">mrml-parsing-log"; print OF $lRead; } $self->{parser}->parse("$lRead $lEmptyText"); } $lRead; } $self->buildStringFromSequence(); $self->endSequence($lEndTeX); return $self->{string_from_sequence}; } sub addAttribute( $$ ){ my $self=shift; my $inElement=shift; my $inAttributeDescription=shift; unless(ref($self->{attribute_list}->{$inElement})){ $self->{attribute_list}->{$inElement}=[]; push @{$self->{printer_sequence}},["attribute",$inElement]; } push @{$self->{attribute_list}->{$inElement}}, $inAttributeDescription; } sub addText( $ ){ my $self=shift; my $inText=shift; push @{$self->{printer_sequence}},["text",$inText]; } sub addComment( $ ){ my $self=shift; my $inText=shift; push @{$self->{printer_sequence}},["comment",[$inText]]; } sub addElement( $ ){ my $self=shift; my $inElementName=shift; my $inModel=shift; push @{$self->{printer_sequence}},["element",[$inElementName,$inModel]]; } sub addToSequence( $ ){ my$self=shift; my $inText=shift; $self->{string_from_sequence}.=$inText; } sub initialiseSequence( $ ){ my$self=shift; my$inStart=shift || "\n%TESTBEGIN\n"; $self->{string_from_sequence}=$inStart; } sub endSequence( $ ){ my$self=shift; my$inEnd=shift || "\n%TESTEND\n"; $self->{string_from_sequence}.=$inEnd; } sub buildStringFromSequence( ){ my $self=shift; my $i; foreach $i (@{$self->{printer_sequence}}){ $self->printText($i->[1]) if( $i->[0] eq "text"); $self->printComment($i->[1]) if( $i->[0] eq "comment"); $self->printAttribute($i->[1]) if( $i->[0] eq "attribute"); $self->printElement($i->[1]) if( $i->[0] eq "element"); } } sub printElement( $ ){ my $self=shift; my $inElement=shift; unless($inElement->[0]=~m/^cui-/){ $lModel=$inElement->[1]; #remove cui-private tags $lModel=~s/cui[\-a-zA-Z]*//g; #clean up resulting untidiness $lModel=~s/(\||,)(\s|\n)*([\)\|])/$3/g; $self->addToSequence("\\begin{verbatim}\n[0] $lModel \n>\\end{verbatim}\n\n"); } } sub printComment( $ ){ my $self=shift; my $inComment=shift; my $lCommentString=$inComment->[0]; $self->addToSequence("\\begin{verbatim}\\end{verbatim}\n\n\n\n") unless($lCommentString=~m/==HIDE/); } sub printAttribute( $ ){ my $self=shift; my $inElement=shift; $self->addToSequence("\\begin{verbatim}\n{attribute_list}->{$inElement}}){ $self->addToSequence("\n ".(" " x length($inElement)).join(" ",@$i)); } $self->addToSequence("\n>\\end{verbatim}\n\n"); } sub printText( $ ){ my $self = shift; my $inText = shift; $self->addToSequence("$inText\n"); } package main; %lOptions=(); GetOptions(\%lOptions, "fragment" ); my $inDTDFile=shift; my $inTag=(split(/(\.)|(\/)/,$inDTDFile))[-4]; if(!$inDTDFile){ print " Usage: gift-dtd-to-tex.pl infile [--fragment] This program turns a simple sgml dtd (with does not contain external entities) into LaTeX. Options: --fragment create a fragment which can be included into other LaTeX files "; } my $lDTDToTeX=new CDTDToTeX(); { my $lFH=new IO::File; my $lOH=new IO::File; $lFH->open("< $inDTDFile") or die "there is no $inDTDFile $!\n"; $lOH->open("> ${inDTDFile}.tex") or die "there is no ${inDTDFile}.tex $!\n"; unless(%lOptions->{fragment}){ print $lOH $lDTDToTeX->processDTD($lFH,"<$inTag>", '\documentclass{article} \newcommand{\requesttitle}[1]{\textbf{Request: }{\texttt{#1}}\\\\} \newcommand{\responsetitle}[1]{\textbf{Response: }{\texttt{#1}}\\\\} \newcommand{\tagtitle}[1]{\textbf{Tag: }{\texttt{#1}}\\\\} \newcommand{\MRML}{\textrm{MRML}} \newcommand{\tag}[1]{\texttt{#1}} \begin{document} ', '\end{document} ' ); }else{ print $lOH $lDTDToTeX->processDTD($lFH,"<$inTag>"); } } gift-0.1.14/scripts/perl/gift-url-to-fts.pre-pl0000644000175200001440000001041110153634156016163 00000000000000#!__PERL_LOCATION__ -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # # This script gets an URL and creates a corresponding thumbnail and *.fts file # it also adds something to a corresponding URL2FTS file # use Getopt::Long; use File::Find; use File::Path; use File::Copy; use HTTP::Request; use LWP::UserAgent; use English; print &convertURLToFeatureFile(@ARGV); sub convertURLToFeatureFile( $ ){ my $inUserAgent=LWP::UserAgent->new; my $inURL=shift; my $inFinalFeatureDestination=shift; # # note that there I am shifting an optional parameter FAR BELOW # # # Finding out the path names (where to write things) # my $lDestination= $ENV{GIFT_HOME} || $ENV{HOME} || "/tmp"; my $lImageDestination= "$lDestination/new-images"; my $lFeatureDestination="$lDestination/new-features"; # # get the image using HTTP # my $lRequest = HTTP::Request->new(GET => $inURL); $lResponse = $inUserAgent->request($lRequest); # # further processing if the document downloaded # was an image # if($lResponse->content_type()=~m[^image]){ # # tell the user which type the image has # my $lType=(split("/",$lResponse->content_type()))[-1]; print "Image found: The type is $lType\n"; my $lTempFileName="$inFinalFeatureDestination.ppm"; # note that the feature file name is an optional parameter my $lFeatureFileName= "$lFeatureDestination/request-${PID}_${lType}_convert.fts"; my $lConvertedFileName="$lFeatureDestination/request-${PID}_${lType}_convert.ppm"; my $lThumbnailFileName="$lImageDestination/request-${PID}_${lType}_thumbnail.jpg"; # # making the path (where to write things) # print("making the path $lImageDestination\n"); mkpath([$lImageDestination],1,0711); mkpath([$lFeatureDestination],1,0711); # # write the content of the request # { open IMAGEFILE,">$lTempFileName" or die "Could not open $lTempFileName for writing"; print IMAGEFILE $lResponse->content(); close IMAGEFILE; } # # write information about image processed to another file # { open EXTERNAL_LOG,">>gift-external-urls.txt"; my $lGMTime=gmtime; # if i am not mistaken, the splitting character § is illegal in URLs print "$lGMTime§$inURL§$lTempFileName§$inFinalFeatureDestination\n"; } # # convert the images and extract the features # print("Converting $lTempFileName to $lConvertedFileName\n"); system("convert -geometry 256x256! $lTempFileName $lConvertedFileName"); print("Extracting features from $lConvertedFileName\n"); system("__EXECBINDIR__/gift-extract-features $lConvertedFileName"); unlink($lConvertedFileName); if (defined($inFinalFeatureDestination)){ #copy this feature file at a place where viper expects it.... system("cp $lFeatureFileName $inFinalFeatureDestination"); #....instead of moving move($lFeatureFileName,$inFinalFeatureDestination); $lFeatureFileName=$inFinalFeatureDestination; } print("Converting $lTempFileName to $lThumbnailFileName\n"); system("convert -geometry 256x256 $lTempFileName $lThumbnailFileName"); # # append the new image to the URL2FTS # open URL2FTS,">>$lFeatureDestination/url2fts" or die "could not open >>$lFeatureDestination/url2fts"; print URL2FTS "$inURL $lThumbnailFileName $lFeatureFileName\n"; return $lFeatureFileName; } } gift-0.1.14/scripts/perl/gift-start.pre-pl0000644000175200001440000001376210153634156015320 00000000000000#!__PERL_LOCATION__ -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # # this script starts the gift and opens at least one session # use IO::Socket; use lib '__BINDIR__'; # for including CFeedbackClient use CXMLTreeWriter; use CXMLTreeBuilder; use CXMLTreeVisitor; use Net::SMTP; use POSIX ":sys_wait_h"; use Getopt::Long; use strict; use vars qw($lHost $lPort $gMailTo $gMailFromUser $gSMTPHost $lDirectory ); print " gift-start.pl [--gift-host host] [--gift-port port] [--gift-home gift-home] \\ [--smtp-host host] [--mail-from-user user(s)] [--mail-to user(s)] This program starts one instance of the GIFT. If this instance dies, it will send out a message to a list of addresses, saying that the GIFT has died. It will then automatically restart the GIFT. STDOUT from the GIFT will be redirected to /dev/null --gift-host this is the host the GIFT will listen to (currently NOT USED) --gift-port this is the port the GIFT will listen to --gift-home this is the directory where the GIFT will expect its configuration data. --smtp-host this is the smtp host which will be used for sending out mail --mail-to a mail will be sent to this user. THIS CAN BE A COMMA-SEPARATED LIST OF EMAIL ADDRESSES --mail-from-user This program will contact the SMTP server as the following user "; # Begin: # this code is taken from the perlipc manpage # sub REAPER { my $child; $child = wait; # loathe sysV: it makes us not only reinstate # the handler, but place it after the wait $SIG{CHLD} = \&REAPER; } # End: # this code is taken from the perlipc manpage # print "$0: Diagnose: I just installed the REAPER\n"; ($lHost,$lPort)=split(":","localhost:12789"); $lDirectory=$ENV{GIFT_HOME} || $ENV{HOME}; $gSMTPHost="localhost"; $gMailTo="root\@localhost"; $gMailFromUser=$ENV{USER}; GetOptions('gift-home=s'=>\$lDirectory, 'gift-host=s'=>\$lHost, 'gift-port=s'=>\$lPort, 'smtp-host=s'=>\$gSMTPHost, 'mail-from-user=s'=>\$gMailFromUser, 'mail-to=s'=>\$gMailTo); die "something wrong, no gift-home directory given" unless $lDirectory; while(1){ print "doing ps\n"; open PS,"ps -axww|" or die "could not ps"; my $lFound=0; my $lPID=0; while(){ my $lLine=$_; my(@lParsed)=split(/:\d\d\s/,$lLine); my $lCall=$lParsed[-1]; if($lCall=~m/gift\s+(\d+)/){ print "FOUND GIFT WITH PORT $1\n"; if($1 == $lPort){ $lFound=1; $lParsed[0]=~m/^\s+(\d+)/; $lPID=$1; } } } unless($lFound){ $SIG{CHLD} = \&REAPER; print "Before fork to sendit"; if(fork == 0){ &sendIt($lHost,$lPort); die "Sendit dies"; }else{ my $lCallstring="__EXECBINDIR__/gift $lPort $lDirectory > /dev/null"; system("$lCallstring"); print STDERR "gift DIED!\nCalled: $lCallstring\n"; print STDERR "trying to send mail to $gMailTo, using $gSMTPHost, user $gMailFromUser\n"; my $smtp = Net::SMTP->new($gSMTPHost) or die "NO MAILHOST $gSMTPHost"; $smtp->mail($gMailFromUser) or die "Sending mail failed: $!"; $smtp->to((split(",",$gMailTo))) or die "Sending mail failed: $!"; $smtp->data() or die "Sending mail failed: $!"; $smtp->datasend("To: $gMailTo\n") or die "Sending mail failed: $!"; $smtp->datasend("Subject: [dead-GIFT] $lHost:$lPort Reviving: $lCallstring\n") or die "Sending mail failed: $!"; $smtp->datasend("\n") or die "Sending mail failed: $!"; $smtp->datasend("$lCallstring\n just died It has been restarted automatically. this message has been generated automatically by $0 ") or die "Sending mail failed: $!"; $smtp->dataend() or die "Sending mail failed: $!"; $smtp->quit or die "Sending mail failed: $!"; print "Mail successfully sent to $gMailTo\n"; sleep 10; } }else{ sleep 300;#sleep for 5 minutes and try again } } sub sendIt( $$ ){ my $lHost=shift; my $lPort=shift; sleep 5; my $self={}; my $lTree={ element=>"mrml", attributes=>{ }, children=>[ { element=>"open-session", attributes=>{ "user-name"=>"giftstart", "session-name"=>"something", }, children=>[] } , { element=>"get-algorithms", attributes=>{}, children=>[] } , { element=>"get-collections", attributes=>{}, children=>[] } ] }; my $lSocket = IO::Socket::INET->new(PeerAddr => $lHost, PeerPort => $lPort, Proto => 'tcp') or die "No socket to $lHost:$lPort\n"; $lSocket->autoflush(1); my $lWriter=new CXMLTreeWriter(); $lWriter->writeToStream($lTree, $lSocket); $lSocket->shutdown(1); my $lRead=""; while(<$lSocket>){ $lRead.=$_; } print "READ:$lRead:READ"; my $lBuilder=new CXMLTreeBuilder(); my $lParsed=$lBuilder->stringToTree($lRead); print "The sessionID is : $lParsed->{attributes}->{'session-id'}\n"; # very GENEVA SPECIFIC: system("find /usr/local/httpd/htdocs/tutorial/ -name \"*.html.in\" -exec perl /home/wolfgang/configure-tutorial.pl $lParsed->{attributes}->{'session-id'} \{\} \\;"); } gift-0.1.14/scripts/perl/CFCMovingTarget.pre-pm0000644000175200001440000003051110153634156016146 00000000000000#!__PERL_LOCATION__ -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # Author of this file: Wolfgang Müller require 5.002; #use strict; use Socket; use FileHandle; use English; use IO::File; use IO::Socket; use XML::Parser; require Exporter; use CFeedbackClient; ############################################################ # # This package performs a moving target test. # # package CFCMovingTargetTest; require Exporter; @ISA= qw(Exporter CFeedbackClient); @EXPORT= qw(doQueryGroup); sub new { my $class = shift; my $self = {}; bless $self, $class; $self->initialize(); return $self; } sub initialize(){ my$self=shift; $self->SUPER::initialize(); } ############################## # # What to do when the search starts # sub onSearchStart( ){ my$self=shift; $self->clearHierarchyPath(); $self->clearImageClicked(); } ############################## # # What to do when one target is found # sub onTargetFound( ){ my$self=shift; $self->clearHierarchyPath(); $self->clearImageClicked(); return ("query-step",[]); } ############################## # # this compares two lists # this is a service to # sub isEqualList( $$ ){ my$self=shift; my $inList1=shift; my $inList2=shift; if(scalar(@$inList1) != scalar(@$inList2)){ print "lengths: ",scalar(@$inList1),";",scalar(@$inList2),"\n"; return 0; } my @lSorted1=sort {$a->[0] cmp $b->[0]} @{$inList1}; my @lSorted2=sort {$a->[0] cmp $b->[0]} @{$inList2}; my $i; for($i=0; $i < scalar(@$inList2); $i++){ print "COMPARING: $lSorted1[$i]->[0] , \n $lSorted2[$i]->[0]\n"; return 0 unless ($lSorted1[$i]->[0] eq $lSorted2[$i]->[0]) ; } return 1; } ############################## # # The first step of separation # sub hierarchyCreateFeedback( ){ my$self=shift; my @lResultList=@{$self->getResultList()}; my $lPositiveImage={ name=> "__up__", rank=> 999_999_999 }; # print "------------------------------", # join ("--\n",keys (%{$self->{mRanks}->{$iTarget}})), # "\n"; my @lUntouchedResultList=@{$self->getResultList()}; ############################## # # Assume that if the display does not change # you have not moved. # { if($self->isEqualList( \@lUntouchedResultList, $self->{"untouched-result-list"} )){ $self->moveUpClicked(); } $self->{"untouched-result-list"}=\@lUntouchedResultList; } foreach $j (@lResultList){ print "Looking at ",$j->[0],", Rank:"; print $self->{mRanks}->{$iTarget}->{$j->[0]} if(defined ($self->{mRanks}->{$iTarget}->{$j->[0]})); print "\n"; if((!$self->isImageClicked($j->[0])) && ($self->{mRanks}->{$iTarget}->{$j->[0]}) && ($self->{mRanks}->{$iTarget}->{$j->[0]} < $lPositiveImage->{rank})){ $lPositiveImage={ name=>$j->[0], rank=>$self->{mRanks}->{$iTarget}->{$j->[0]} }; } } foreach $j (@lResultList){ if(($lPositiveImage->{name} eq "__up__") && (!$self->isImageClicked($j->[0]))){ $lPositiveImage={ name=>$j->[0], rank=> 0 }; } } if(!($lPositiveImage->{name} eq "__up__")){ $self->addImageClicked($lPositiveImage->{name}); $lFeedbackList=[[$lPositiveImage->{name},1], ]; return ("query-step", $lFeedbackList); }else{ print "WE GO UP\n"; $self->moveUpClicked(); return ("cui-hierarchy-up", []); } } ############################## # # The first step of separation # sub createFeedback(){ my$self=shift; my @lResultList=@{$self->getResultList()}; my $lPositiveImage={ name=> "__up__", rank=> 999_999_999 }; my $lNegativeImage={ name=> "__up__", rank=> 0 }; # print "------------------------------", # join ("--\n",keys (%{$self->{mRanks}->{$iTarget}})), # "\n"; foreach $j (@lResultList){ print "Looking at ",$j->[0],","; print $self->{mRanks}->{$iTarget}->{$j->[0]}; print "\n"; if((!$self->isImageSeen($j->[0])) && ($self->{mRanks}->{$iTarget}->{$j->[0]}) && ($self->{mRanks}->{$iTarget}->{$j->[0]} < $lPositiveImage->{rank})){ $lPositiveImage={ name=>$j->[0], rank=>$self->{mRanks}->{$iTarget}->{$j->[0]} }; } } foreach $j (@lResultList){ print "Looking at ",$j->[0],","; print $self->{mRanks}->{$iTarget}->{$j->[0]}; print "\n"; if((!$self->isImageSeen($j->[0])) && ($self->{mRanks}->{$iTarget}->{$j->[0]}) && ($self->{mRanks}->{$iTarget}->{$j->[0]} > $lNegativeImage->{rank})){ $lNegativeImage={ name=>$j->[0], rank=>$self->{mRanks}->{$iTarget}->{$j->[0]} }; } } # # note which images we have seen # foreach $j (@lResultList){ $self->addImageClicked($j->[0]) } $lFeedbackList=[[$lPositiveImage->{name},1], [$lNegativeImage->{name},-1]]; return (0, $lFeedbackList); } sub clearHierarchyPath(){ my$self=shift; $self->{path}=[]; } sub clearImageClicked(){ my$self=shift; $self->{clicked}={}; } sub isImageClicked( $ ){ my$self=shift; my$lImage=shift; return $self->{clicked}->{join(":",@{$self->{path}},$lImage)}; } sub moveUpClicked( $ ){ my$self=shift; my$lImage=shift; pop @{$self->{path}}; } sub addImageClicked( $ ){ my$self=shift; my$inImage=shift; push @{$self->{path}},$inImage; print "Current Path:",join("\n",@{$self->{path}}),"\n"; $self->{clicked}->{join(":",@{$self->{path}})}=1; } ############################### # # This function creates a CFeedback client # to perform a # sub createDistanceMeasure( $$ ){ my$self=shift; my $inImages=shift; my $inCollection1=shift; my $inCollection2=shift; my $lDistanceMeasureCreator=new CFeedbackClient(); ############################### # # First we need a distance measure for each target # $self->{mRanks}={}; $lDistanceMeasureCreator->setAddress($inCollection1->{address}); $lDistanceMeasureCreator->startSession("--making-distance-measure--"); # # is this # my $lCollection=$lDistanceMeasureCreator->getCollection($inCollection1->{"collection-id"}); # # get all algorithms that fit our requirements (i.e. they should be queried by QBE) #§ my $lInteractionType={"interaction-type"=>"qbe"}; my(@lAlgorithms)=$lDistanceMeasureCreator->getAlgorithmsByParadigmAndCollection([$lInteractionType],$lCollection); print "-------------------- using $lQBEAlgorithmCollectionPair->[0] and $lQBEAlgorithmCollectionPair->[1] for creating the distance measure\n "; $lDistanceMeasureCreator->configureSession($self->getSessionID(), $self->algorithmToID( $lAlgorithms[0] ), $inCollection1->{"collection-id"}); print "Session configured\n"; foreach $i (@$inImages){ # # Retrieve, if possible, all images from the database. # $lDistanceMeasureCreator->setResultSize( 1_000_000_000 ); print "Result size set, querying for $i\n"; $lDistanceMeasureCreator->doFirstQueryStep("query-step", [[$i,1]], $lDistanceMeasureCreator->getSessionID(), $self->algorithmToID( $lAlgorithms[0] ), $inCollection2->{"collection-id"}); # # This means, for all that the URL in $i # (which is an URL incollection c1) has # been translated in an URL for the collection c2 $i=~s/^$inCollection1->{"url-prefix"}/$inCollection2->{"url-prefix"}/; print "\nIn the following we operate on the URL $i\n\n"; # # make a hash # (URL->Rank) # my $lRank=0; $self->{mRanks}->{$i}={}; foreach $j (@{$lDistanceMeasureCreator->getResultList()}){ $j->[0]=~s/^$inCollection1->{"url-prefix"}/$inCollection2->{"url-prefix"}/; print "Rank for $j->[0]: $lRank\n"; $self->{mRanks}->{$i}->{$j->[0]}=$lRank++; } } $lDistanceMeasureCreator->saveSession(); $lDistanceMeasureCreator->closeSession(); } ############################################################## # # This function performs a complete moving target test # # It calls two servers: # One server provides a distance measure. # The only requirement is that it has to be queried by example. ("qbe"); # # The other server is the server to be benchmarked. # It has to be queried using the "browsing" query paradigm # sub doQueryGroup( $$$ ){ my$self=shift; my $inImages=shift; my $inCollection1=shift; my $inCollection2=shift; $self->onSearchStart(); $self->createDistanceMeasure($inImages, $inCollection1, $inCollection2); ############################### # # Then we perform a target test for each target given # # here was $lDistanceMeasureCreator instead of "self" $self->setAddress($inCollection2->{address}); $self->startSession("--browsing-user--"); # # is this #§ my $lCollection=$self->getCollection($inCollection2->{"collection-id"}); my($lBrowserAlgorithm)=$self->getAlgorithmsByParadigmAndCollection([{"interaction-type"=>"browsing"}], $lCollection); print "THERE $lBrowserAlgorithm->{'algorithm-id'}"; unless(defined($lBrowserAlgorithm->{'algorithm-id'})){ print STDERR "I was looking for $inCollection2->{collection} and browsing as characteristics"; die "FATAL ERROR: There is no browser which I could benchmark!\n" ; } print "-------------------- using $lBrowserAlgorithmCollectionPair->[0] and $lBrowserAlgorithmCollectionPair->[1] for browsing\n "; $self->configureSession($self->getSessionID(), $lBrowserAlgorithmCollectionPair->[0], $lBrowserAlgorithmCollectionPair->[1]); $self->setResultSize( 10 ); my $lCount=0; my $lInstruction="query-step"; ############################## # # Initialisation of the variables which will contain the statistics in the end # my($lRetrievedCounter)=0; my($lClickedCounter)=0; my @lUntouchedResultList=@{$self->getResultList()}; foreach $iTarget (@$inImages){ print "\nWe are now tryingto find the image URL $iTarget\n\n"; my $lFeedbackList=[]; $lOldCount=$lCount; while(($lOldQuery=$self->doFirstQueryStep($lInstruction, $lFeedbackList, $self->getSessionID(), $lBrowserAlgorithmCollectionPair->[0], $lBrowserAlgorithmCollectionPair->[1])) && ($lCount-$lOldCount<200)){ ++$lCount; # in the my $lRetrieved=$self->getResultHash(); my @lUntouchedResultList=@{$self->getResultList()}; ############################## # # count the images retrieved after display changes # { if($self->isEqualList( \@lUntouchedResultList, \@lOldUntouchedResultList, )){ $lRetrievedCounter+=scalar(@lUntouchedResultList); } @lOldUntouchedResultList=@lUntouchedResultList; } if(defined $lRetrieved->{$iTarget}){ print "Target $iTarget found after $lCount tries\n"; goto TARGET_FOUND; } # now create some feedback # find the maximum and the minimum image. # these two will make up the query ($lInstruction,$lFeedbackList)=$self->hierarchyCreateFeedback(); $lClickedCounter+=scalar(@$lFeedbackList) if(defined(@$lFeedbackList)); } TARGET_FOUND: # # this is overloaded by the classes which inherit from this benchmark base class # $lClickedCounter-=scalar(@$lFeedbackList) if(defined(@$lFeedbackList)); ($lInstruction,$lFeedbackList)=$self->onTargetFound(); } print "Looking for images:\n",join("\n", @$inImages); print "\n\n$lClickedCounter relevance judgements ('clicks').\n"; print "$lRetrievedCounter images were loaded changing the display \n"; } gift-0.1.14/scripts/perl/CXMLTreeWriter.pre-pm0000644000175200001440000000331010153634156016001 00000000000000#!/usr/bin/perl -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 package CXMLTreeWriter; use lib '__BINDIR__'; # for including CFeedbackClient use CXMLTreeBuilder; use CXTVWriter; @ISA=qw(Exporter); @EXPORT_OK=qw(new writeToStream); sub new(){ my $class = shift; my $self = {}; bless $self, $class; $self->initialize(@_); return $self; } sub initialize(){ my$self=shift; } sub writeToStream( $$ ){ my$self=shift; my $inRoot=shift; my $inStream=shift; $self->{visitor}=new CXTVWriter($inStream); $self->_traverse($inRoot,$self->{visitor}); } sub _traverse( $$ ){ my$self=shift; my $lRoot=shift; my $lVisitor=shift; $lVisitor->startVisit($lRoot); if(defined($lRoot->{children})){ my $i; foreach $i (@{$lRoot->{children}}){ $self->_traverse($i,$lVisitor); } } $lVisitor->endVisit($lRoot); return; } gift-0.1.14/scripts/perl/gift-mrml-client.pre-pl0000644000175200001440000001576210153634156016410 00000000000000#!__PERL_LOCATION__ -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # # A simple one-shot-query to GIFT # ############################################################# # # if you need printouts for what happens inside CFeedbackClient, # modify CFeedbackClient.pre-pm: # # the hash vDEBUG (line 98) in CFeedbackClient.pre-pm # will be of interest for you # ############################################################# # Author of this file: Wolfgang Müller 2000-02-18 require 5.002; #use strict; use lib '__BINDIR__'; # for including CFeedbackClient use Getopt::Long; %lOptions=(); GetOptions(\%lOptions, "help", "cgi", "user-id=s", "algorithm-id=s", "collection-id=s", "additional-algorithm-attributes=s", ); if($lOptions{help}){ print " gift-mrml-client.pl: this program starts a one-shot-query to a given MRML server Usage: gift-mrml-client.pl host:port? output-file? (image-url image-relevance)* --help shows this string --cgi this script is run by a CGI script --user-id the user-id to be used when connecting --algorithm-id the algorithm-id to be used when configuring --collection-id the collection-id to be used when configuring --additional-algorithm-attributes the string given will be passed through to the algorithm in place of an attribute. (see configuration documentation about this) "; exit; } my $lUserID= $lOptions{"user-id"} || "-perl-one-shot-query-" ; my $lAlgorithmID= $lOptions{"algorithm-id"}; my $lCollectionID=$lOptions{"collection-id"}; my $lAdditionalAlgorithmAttributes=$lOptions{"additional-algorithm-attributes"}; #$lAdditionalAlgorithmAttributes="BLABLA"; use CFeedbackClient; package main; my @dummy=( 'file:/home/muellerw/TestCase/TSR500/b_1000_scaled.gif', 'file:/home/muellerw/TestCase/TSR500/b_1015_scaled.gif', 'file:/home/muellerw/TestCase/TSR500/b_1030_scaled.gif', 'file:/home/muellerw/TestCase/TSR500/b_1040_scaled.gif', 'file:/home/muellerw/TestCase/TSR500/b_1050_scaled.gif', 'file:/home/muellerw/TestCase/TSR500/b_1060_scaled.gif', 'file:/home/muellerw/TestCase/TSR500/b_1070_scaled.gif', 'file:/home/muellerw/TestCase/TSR500/b_1080_scaled.gif', 'file:/home/muellerw/TestCase/TSR500/b_1090_scaled.gif', ); my @dummy2=('file:/home/muellerw/TSR2500/tsr1_0046_small.jpg'); my @dummy3=('file:/home/muellerw/TSR2500/tsr1_0046_small.jpg', 'file:/home/muellerw/TSR2500/tsr1_0047_small.jpg', 'file:/home/muellerw/TSR2500/tsr1_0048_small.jpg', 'file:/home/muellerw/TSR2500/tsr1_0049_small.jpg', 'file:/home/muellerw/TSR2500/tsr1_0050_small.jpg', 'file:/home/muellerw/TSR2500/tsr1_0051_small.jpg', 'file:/home/muellerw/TSR2500/tsr1_0052_small.jpg', 'file:/home/muellerw/TSR2500/tsr1_0053_small.jpg', 'file:/home/muellerw/TSR2500/tsr1_0054_small.jpg', 'file:/home/muellerw/TSR2500/tsr1_0055_small.jpg', 'file:/home/muellerw/TSR2500/tsr1_0056_small.jpg', 'file:/home/muellerw/TSR2500/tsr1_0057_small.jpg', 'file:/home/muellerw/TSR2500/tsr1_0058_small.jpg', 'file:/home/muellerw/TSR2500/tsr1_0059_small.jpg' ); # # how to use the automatic benchmark # # if(1==1){ # my $lFeedbackClient=new CFCMovingTargetTest(); # $lFeedbackClient->doQueryGroup(\@dummy2); # }else{ # my $lFeedbackClient=new CFeedbackClient(); # $lFeedbackClient->doQueryGroup(\@dummy3); # } # # At present no choice of algorithm # print "Usage: gift-mrml-client.pl host:port? output-file? (image-url image-relevance)*\n" ; # # Read the images from the command line # {#for scoping my $lHost= shift || "localhost:12789"; my $OUTFILE=shift || "gift-mrml-client-outfile.html"; $OUTFILE=">$OUTFILE"; my @lQuery; #we are making a list of #pairs from the flat list of #arguments # a default query @lQuery=([(shift || "http://gift.unige.ch/images//TSR500/b_1007_scaled_small.jpg"), 1]); while(scalar(@_)){ push @lQuery,[shift,shift]; } # # Our gift feedback client # we should be able to tell it the port # my $lFeedbackClient=new CFeedbackClient(); #the following line is redundant, because #this is the default $lFeedbackClient->setAddress($lHost); $lFeedbackClient->setResultSize(20);# set the size of the desired query result $lFeedbackClient->startSession($lUserID); $lFeedbackClient->configureSession( $lFeedbackClient->getSessionID(), $lAlgorithmID, $lCollectionID, $lAdditionalAlgorithmAttributes );#take the defaults print "Making query\n"; my $lQueryToSend=$lFeedbackClient->makeQueryString( \@lQuery, $lFeedbackClient->getSessionID(), $lAlgorithmID, $lCollectionID, ); # SENDING THE QUERY and # printing the MRML we got back from the query print "MRML-----xx-----------------------------------\n"; print $lFeedbackClient->sendQueryString($lQueryToSend); print "MRML-----xx-----------------------------------\n"; # #now transform the results into HTML # my $lResultList=$lFeedbackClient->getResultList(); open OUTFILE, $OUTFILE or die "\ncould not open $OUTFILE\n$!"; print OUTFILE " One shot query\n

One shot query

"; foreach $i (@lQuery){ my($lImage,$lRelevance)=@$i; print "QUERY: $lImage, $lRelevance\n"; print OUTFILE "\n"; } print OUTFILE "
URL Relevance
$lImage$lRelevance

"; my $i; my $lCount=0; foreach $i (@$lResultList){ if(!($lCount%4)){ print OUTFILE ""; } my($lImage,$lRelevance)=@$i; print "RESULT: $lImage, $lRelevance\n"; print OUTFILE "\n"; #
$lImage
insert this into print statement if you want to be able to read the URL $lCount++; } print OUTFILE "
$lRelevance
"; } print " Simple MRML client: Usage: gift-mrml-client.pl host:port? output-file? (image-url image-relevance)*\n" ; gift-0.1.14/scripts/perl/gift-perl-example-server.pre-pl0000644000175200001440000000420010153634156020045 00000000000000#!__PERL_LOCATION__ -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 #!/usr/bin/perl -w require 5.002; BEGIN {$ENV{PATH}='';} use Socket; use Carp; sub logmsg {print "$0 $$: @_ at ", scalar localtime, "\n"} my $lHandshake = shift; my $lResult = shift; my $port = shift || 12789; my $proto = getprotobyname('tcp'); socket(Server,PF_INET,SOCK_STREAM,$proto) or die "socket: $!"; setsockopt(Server,SOL_SOCKET,SO_REUSEADDR,pack("l",1)) or die "setsockopt: $!"; bind(Server,sockaddr_in($port,INADDR_ANY)) or die "bind: $!";# listen(Server,SOMAXCONN) or die "listen: $!"; logmsg "server started on port $port"; my $paddr; $SIG{CHLD}=\&REAPER; my $lCount=0; for(;$paddr=accept(Client,Server);close Client){ my($port,$iaddr)=sockaddr_in($paddr); my($name)=gethostbyaddr($iaddr,AF_INET); logmsg "connection from $name [",inet_ntoa($iaddr),"] at port $port"; for($i=0;$i<1000000;$i++){}; my(@lSent); while(){ print; push @lSent,$_; last if(m/<\/mrml>/); } if(!$lCount){ open INFILE,$lHandshake or die "couldd'nt open $file"; # while(){ print Client $_; } }else{ open INFILE,$lResult or die "couldd'nt open $file"; # while(){ print Client $_; } } $lCount++; "you sent me ",@lSent; } gift-0.1.14/scripts/perl/CFCRankingComparison.pre-pm0000644000175200001440000001247210153634156017172 00000000000000#!__PERL_LOCATION__ -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # Author of this file: Wolfgang Müller require 5.002; #use strict; use Socket; use FileHandle; use English; use IO::File; use IO::Socket; use XML::Parser; use CFeedbackClient; use CGraphCollection; require Exporter; # =pod # =TITLE1 CFCRankingComparison # This package performs a ranking comparison of two algorithms. # This means, it performs a couple of queries using two different algorithms # (possibly on two different MRML servers). # The results obtained are then plotted such, that for each image retrieved, with # rank r1 using server s1 and with rank r2 using server s2, there will be a point # (r1,r2) in the plot. If the measures are perfectly equal, the result will contain # points only on the diagonal. # =cut package CFCRankingComparison; require Exporter; @ISA= qw(Exporter CFeedbackClient); @EXPORT_OK= qw(doQueryGroup); sub new { my $class = shift; my $self = {}; bless $self, $class; $self->initialize(); return $self; } sub initialize(){ my$self=shift; $self->SUPER::initialize(); } =pod =TITLE1 doQueryGroup This is the function which does the real work described above =cut sub doQueryGroup( $$$ ){ my$self=shift; my $inImages=shift; my $inCollection1=shift; my $inCollection2=shift; my $lGraph=new CGraphCollection(0, 100,#better: $self->getResultSize(), 1); my $i; # # # # make a deep copy of the image list entered # # # my @lModifiedImages; # foreach $i (@{$inImages}){ # my $lPair=[]; # @{$lPair}=@{$i}; # push @lModifiedImages,$lPair; # } my @lModifiedImages=@$inImages; foreach $i (@lModifiedImages){ print "\nImage $i\n"; $i=~s/^$inCollection1->{"url-prefix"}/$inCollection2->{"url-prefix"}/; } $self->subDoQueryGroup("x-ranks", $inImages, $inCollection1); $self->subDoQueryGroup("y-ranks", \@lModifiedImages, $inCollection2); # do something with these data foreach $iQueryImage (keys(%{$self->{"x-ranks"}})){ print "Ranks for $iQueryImage\n",$self->{"x-ranks"}->{$iQueryImage},"\n"; my %lRankToImage=reverse(%{$self->{"x-ranks"}->{$iQueryImage}}); print join(",",sort {$a <=> $b;} keys(%lRankToImage)),"\n"; my @lPointList; foreach $i (sort {$a <=> $b;} keys(%lRankToImage)){ my $lRankedImage=$lRankToImage{$i}; my $lRank=$self->{"y-ranks"}->{$iQueryImage}->{$lRankedImage}; $lRank=$self->getResultSize() unless defined($lRank); print "$lRankedImage: \[$i,$lRank\]\n"; push @lPointList,$i; push @lPointList,$lRank; } $lGraph->addPointList(@lPointList); } # # Add to the collection of graphs # print "The resulting graph:"; print $lGraph->toString(q( my($lSum,$i,$lMin,$lMax); $lMin=$lPoint->[1]->[0]; $lMax=$lPoint->[1]->[0]; foreach $i (@{$lPoint->[1]}){ $lSum+=$i; $lMin = $i if $i<$lMin; $lMax = $i if $i>$lMax; } if(defined($lSum)){ my $lAverage=$lSum/scalar(@{$lPoint->[1]}); $lResult.= "$lPoint->[0] $lMin $lAverage $lMax"; $lResult.="\n"; } )#do not forget the q-operator! ); } sub subDoQueryGroup( $$$ ){ my$self=shift; my $inResultField=shift; my $inImages=shift; my $inCollection1=shift; # # This is the session whose data will be on the x-axis # $self->{mRanks}={}; $self->setAddress($inCollection1->{address}); $self->startSession($inResultField); # # Configure the session to # $self->configureSession($self->getSessionID(), $inCollection1->{algorithm}, $inCollection1->{collection}); print "Session configured\n"; # # for each of the query images # foreach $i (@$inImages){ print "Result size set, querying for $i\n"; $self->doFirstQueryStep("query-step", [[$i,1]], $self->getSessionID(), $inCollection1->{algorithm}, $inCollection1->{collection}); # # make a hash # (URL-suffix->Rank) # my $lRank=0; $self->{$inResultField}->{$i}={}; my @lResultList=@{$self->getResultList()}; $_=scalar($i); s/^$inCollection1->{"url-prefix"}//;#i.e. retract the prefix from $_ foreach $j (@lResultList){ $j->[0]=~s/^$inCollection1->{"url-prefix"}//;#i.e. retract the prefix print "Rank for $j->[0]: $lRank\n"; $self->{$inResultField}->{$_}->{$j->[0]}=$lRank++; } } $self->saveSession(); $self->closeSession(); } gift-0.1.14/scripts/perl/CGLStructuredAnnotation.pre-pm0000644000175200001440000002474310153634156017763 00000000000000#!/usr/bin/perl -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 require Exporter; use lib '__BINDIR__'; # for including CFeedbackClient use CGIFTLink qw(processGIFTQueryCall processGIFTRandomQueryCall traverseTree configure); use CXMLTreeBuilder; use XML::Parser;# YOU HAVE TO INSTALL XML::PARSER you get it at www.cpan.org ############################################################ # # An example for subclassing CGIFTLink for your needs # ############################################################ package CVLStructuredAnnotation; @ISA= qw(Exporter CGIFTLink); @EXPORT_OK= qw(new processGIFTQueryCall processGIFTRandomQueryCall setCollectionTree configure ); sub new(){ my $class = shift; my $self = new CGIFTLink(); bless $self, $class; $self->initialize(); return $self; } sub initialize(){ my$self=shift; } sub processGIFTQueryCall{ my$self=shift; return $self->CGIFTLink::processGIFTQueryCall(@_); } ######################################## # # configure (OVERLOADED FROM CGIFTLink) # # processes the configuration data present in # $self->{collection} and $self->{algorithm}. # possible examples would be the opening of a # connection to an SQL database. # # PARAMETERS: expects $self->{collection} and $self->{algorithm} # to be set # # SIDE EFFECTS: sets "collection tree" to an XML tree containing # your annotation. Getting the URLs in there is # left to the interested reader. # prints the resulting tree in an ugly fashion # # RETURNS: nothing # # THIS FUNCTION IS INTENDED TO BE OVERLOADED # sub configure(){ my $self=shift; $self->{"collection-file"} = $self->{algorithm}->{attributes}->{"cwi-annotation-ds-collection-file"}; $self->{urls} = {}; my $lTreeBuilder=new CXMLTreeBuilder(); print "XML COLLECTION: I will load the file $self->{'collection-file'}\n"; $self->{"collection-tree"} = $lTreeBuilder->fileToTree($self->{"collection-file"}); my $allImg = $self->{"collection-tree"}->{children}; print "#img = ", $#{$allImg}, "\n"; # initialize urls and thumbnail-urls from the collection my $img; foreach $img ( @$allImg ) { if($img->{element}){ my $id = $img->{attributes}->{"ID"}; print "Image: ",$img->{element}, ":", $id, "\n"; $self->{urls}->{$id} = "http://gift.unige.ch/images/PolarBears/$id.jpg"; } } } ######################################## # # query HERE GOES YOUR QUERY PROCESSOR # # Processes the query given by $self->{tree} # # PARAMETERS: The tree to be processed # # RETURNS: an XML tree containing a "query-result" element # # THIS FUNCTION IS OVERLOADED from CGIFTLink # sub similarity_order( $$ ) { $b->{attributes}->{"calculated-similarity"} <=> $a->{attributes}->{"calculated-similarity"}; } # # match_elt() -- match on a single element. # sub match_elt( $$ ) { my $self=shift; my $elt1 = shift; my $elt2 = shift; #changed WM: text nodes have no name, named elements have no unparsed text print "\n($elt1->{text})/($elt1->{element}) != ($elt2->{text})/($elt2->{element})\n"; { if (defined($elt1->{text}) && defined($elt2->{text}) && ($elt1->{text} eq $elt2->{text})){ print "\n($elt1->{text}) t-matches ($elt2->{text})\n"; print "T"; return 1.0; } if (defined($elt1->{element}) && defined($elt2->{element}) && ($elt1->{element} eq $elt2->{element})){ print "\n($elt1->{element}) e-matches ($elt2->{element})\n"; print "E"; return 1.0; }; } print "FAIL"; return 0.0; } # # rec_match() -- recursive sub-tree match. # sub rec_match( $$ ) { my$self=shift; my $num_children, $query_term, $sa_term, $rec_sim; my $sim = 0.0; my $image = shift; my $query = shift; if ($self->match_elt($image, $query)) { # Terminating condition if we're at leaves in query. if ((!defined($query->{children})) || (0==scalar(@{$query->{children}}))) { print "\n\nLEAF MATCH $sim\n"; return 1.0; } {# eliminate whitespace-only text children from QUERY my $i; my $lResultList=[]; foreach $i (@{$query->{children}}){ if(defined( $i->{text}) && ($i->{text}=~m/^(\s*)$/s)){ print "\n _{$i->{text}}_ matched _$1_\n REJECTED"; }else{ push(@{$lResultList},$i); } } $query->{children}=$lResultList; } $num_children = scalar(@{$query->{children}}); foreach $query_term (@{$query->{children}}) { my $lQueryTermUsed=0; foreach $sa_term (@{$image->{children}}) { my $rec_sim = $self->rec_match($sa_term, $query_term); if($rec_sim>0) { $sim += $rec_sim / $num_children unless $lQueryTermUsed; $lQueryTermUsed=1; print "REC MATCH $sim\n"; } } } } else { return 0.0; } return $sim; } # # andys_ham() -- Andy's half-assed match. # sub andys_ham( $$ ) { my $self=shift; my ($query_term, $sa_term, $and_term, $and_sim, $temp); my $sim = 0; # Deref the children member on the query and image set. my $image = shift; my $query = shift; print "++++++++++IN ANDYS HAM \n"; # Iterate over all top level query elements. foreach $query_term (@{$query->{children}}) { print "--$query_term->{element}--"; # And now over all top-level SA elements. $and_sim = 0.0; foreach $sa_term (@{$image->{children}}) { print "++$sa_term->{element}++"; my $temp = $self->rec_match($sa_term, $query_term); if ($temp) { $and_sim += $temp unless $and_sim; print "andys ham matches $sim\n"; ; } } if ($and_sim > $sim) { $sim = $and_sim; }#is this a succesful fix #$sim += $and_sim; } return $sim; } sub query_match_anImg( $$$ ) { my $self=shift; my $id = shift; my $img = shift; my $query = shift; return { element => "query-result-element", attributes => { "calculated-similarity" => $self->andys_ham($img, $query), "image-location" => $self->{urls}->{$id}, "thumbnail-location" => "http://no_thumbnail.org" }, children => [] }; } sub query( $ ){ my $self=shift; my $inQuery= shift; # $inQuery contains now an XML tree # The top element of the tree you get ALWAYS will be a "query-step" # The attribute "result-size" contains the maximum number of images to be retrieved # (comes from the interface). # the direct children of query-step will be anything you like. # print "---------->query:$inQuery->{attributes}:",$inQuery->{attributes}->{"result-size"},":",join(",",keys(%{$inQuery->{attributes}})),"\n\n"; # match the elements in the collection # to get inside the mpeg-7-qbe tag my $i; my $lMPEG_QBE; print "\n","QueryChildren\n",join("xx",@{$inQuery->{children}}),"\n"; foreach $i (@{$inQuery->{children}}){ print "Looking at child ",$i->{element},"\n"; $lMPEG_QBE=$i if($i->{element} eq "mpeg-7-qbe"); } { my $lVisitor=new CXMLTreeVisitor(); print "\nUGLY\n"; # "ugly-prints" the result of the query. $self->traverseTree($lMPEG_QBE,$lVisitor); print "\nUGLY\n"; } my $allImg = $self->{"collection-tree"}->{children}; my %res = (); foreach $img ( @$allImg ) { my $id = $img->{attributes}->{"ID"}; print "Looking at Image with ID: $id\n" if defined($id); print "ERROR: ID not defined\n" unless defined($id); print("OK: $lMPEG_QBE->{element}(" , join(",", @{$lMPEG_QBE->{children}}) ,")\n") if defined($lMPEG_QBE->{element}); print "ERROR: lMPEG_QBE-element undefined!\n" unless defined($lMPEG_QBE->{element}); if( (defined($img)) && (defined($id)) && (defined($lMPEG_QBE))){ print "actually calling query_match_anImg ( $id, $img, $lMPEG_QBE )\n"; $res{$id} = $self->query_match_anImg( $id, $img, $lMPEG_QBE ); } } my @allmatches = values( %res ); my @sortedmatches = sort similarity_order @allmatches; $#sortedmatches = $inQuery->{attributes}->{"result-size"} - 1 if(scalar(@sortedmatches) > $inQuery->{attributes}->{"result-size"} - 1); #returning the final tree return { element => "query-result", attributes => {}, children => [ { element => "query-result-element-list", attributes => {}, children => \@sortedmatches } ] }; } ######################################## # # randomQuery HERE GOES SOMETHING WHICH GIVES BACK A RANDOM NUMBER OF IMAGES # # Processes the query given by $inQuery # give back $inQuery->{attributes}->{"result-size"} random images # # PARAMETERS: The "query" tree to be processed # # RETURNS: an XML tree containing a "query-result" element # # THIS FUNCTION IS OVERLOADED from CGIFTLink # sub randomQuery( $ ){ my $self=shift; my $inQuery= shift;# this would now contain an XML tree print "---------->randomQuery:",$inQuery->{element},",",$inQuery->{attributes}->{"result-size"},":",keys(%{$inQuery->{attributes}}),"\n\n"; #returning a constant XML tree return { element => "query-result", attributes => {}, children => [ { element => "query-result-element-list", attributes => {}, children => [ ({ element => "query-result-element", attributes => { "calculated-similarity" => rand(), "image-location" => "http://gift.unige.ch/images/TSR500/b_1111_scaled_small_thumbnail_jpg.jpg", "thumbnail-location" => "http://gift.unige.ch/images/TSR500/b_1111_scaled_small_thumbnail_jpg.jpg" }, children => [] }) x $inQuery->{attributes}->{"result-size"} # result-size-times ] } ] }; } gift-0.1.14/scripts/perl/gift-diagnose-print-all-ADI.pre-pl0000644000175200001440000000224410153634156020240 00000000000000#!__PERL_LOCATION__ -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # This prints all the *.ADI files in a directory. # The ADI files contain normalising information for the documents foreach $FILE (<*.ADI>){ open FILE or die "somethingwrongwith $FILE\n"; print "\n\nFile: $FILE\n"; while(){ print; } } gift-0.1.14/scripts/perl/CXMLTreeVisitor.pre-pm0000644000175200001440000000514310153634156016172 00000000000000#!/usr/bin/perl -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 ############################################################# # # CXMLTreeVisitor # # this visitor class is intended as parameter to # CGIFTLink::traverseTree # CGIFTLink::traverseTree will call the startVisit function of # this class. # # YOU SHOULD NOT NEED TO TOUCH THIS CLASS # THERE IS AN ERROR # # SUBCLASS THIS CLASS TO OBTAIN WHAT YOU WANT # package CXMLTreeVisitor; require Exporter; @ISA= qw(Exporter); @EXPORT_OK= qw(new startVisit endVisit ); sub new(){ my $class = shift; my $self = {}; bless $self, $class; $self->initialize(); return $self; } sub initialize(){ my$self=shift; } ######################################### # # startVisit # # this startVisit function is intended as example, and prints the node # it gets as a parameter. # # PARAMETERS: The startVisit function takes a tree node (i.e. a hash reference) # as parameter. The parameter is provided by CGIFTLink::traverse # # RETURNS: nothing # sub startVisit( $ ){ my $self=shift; my $lRoot=shift; if(defined($lRoot->{element})){ print "{element}, "\n"; my $i; for $i (keys(%{$lRoot->{attributes}})){ print " ",$i,"=\"",$lRoot->{attributes}->{$i},"\"\n"; } print ">\n"; }else{ print "TEXT NODE:{",$lRoot->{text},"}\n\n"; } } ######################################### # # endVisit # # this endVisit function does plain nothing # # PARAMETERS: The endVisit function takes a tree node (i.e. a hash reference) # as parameter. The parameter is provided by CGIFTLink::traverse # # RETURNS: nothing # sub endVisit( $ ){ my $self=shift; my $lRoot=shift; if(defined($lRoot->{element})){ print "{element}, ">\n"; } } gift-0.1.14/scripts/perl/CFeedbackClient.pre-pm0000644000175200001440000007441410153634156016164 00000000000000#!__PERL_LOCATION__ -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # Author of this file: Wolfgang Müller # require 5.002; #use strict; use Socket; use FileHandle; use English; use IO::File; use IO::Socket; use XML::Parser; use CQueryParadigmMatcher; =pod It might be useful for a feedback client to treat multiple sessions at the same time and to gather the corresponding information. The session data is stored in CSessions =cut package CFeedbackClient; require Exporter; @ISA= qw(Exporter CQueryParadigmMatcher); @EXPORT= qw(new setAddress doQueryGroup startSession saveSession closeSession configureSession makeQueryString sendQueryString ); ############################################################# # # A script for performing # benchmarks on CBIRS systems # which use MRML # ############################################################# # # # WARNING: this code is quick and dirty, but flexible. # it will be difficult to make it multi-threaded, but # this probably will not be interesting for a while # # ############################################################# ################################################## # # maintaining the xpath to the currently parsed tag # # what we are doing here is to have a path like # /root-element-name/child-element-name/grandchild-element-name # to the currently parsed XML element. # In the example above, the root XML element of the document # has the name "root-element-name", the currently parsed XML element # has the name "grandchild-element-name" ############################## # # pushes the currently parsed XML element to the back of the path # sub pushToXMLPath( $ ){ my$self=shift; my$inElement=shift; push @{$self->{path}},$inElement; } ############################## # # pops the last name from the path # sub popFromXMLPath( ){ my$self=shift; return pop @{$self->{path}}; } ############################## # # clears the path # sub clearXMLPath( ){ my$self=shift; $self->{path}=[]; } ############################## # # transforms the path to a string # sub getXMLPath( ){ my$self=shift; "/".join("/",@{$self->{path}}); } ############################################################ # # constructor # ############################## # # new # sub new( ){ my $class = shift; my $self = {}; bless $self, $class; $self->initialize(); return $self; } ############################## # # initialises this: # create an XML parser # sub initialize(){ my$self=shift; $self->clearResultList(); $self->{locQuery}=[]; $self->{parser} = new XML::Parser(Handlers => {Start => \&handleStart, End => \&handleEnd, }); # Make the parser know who is this structure $self->{parser}->{mCaller}=$self; $self->{parser}->{mMagic}=42; ############################### # # for quick changes what to look at when debugging/testing # set the value for a given function to "1" for getting # debugging code printed in this function # warning: this is done by hand, there is nothing automatic... # # HM 070301 added debug switch others, so we can have a completely silent mode $self->{vDEBUG}={ configureSession => 0, startSession => 0, addCollection => 0, doFirstQueryStep => 0, doQueryStep => 0, readAndParse => 0, buildNewQuery => 0, handleStart => 0, handleEnd => 0, setRelevantImages => 0, sendQueryString => 0, others => 0, }; # # printing which functions are to be debugged # print "Printing debugging info for the functions:\n" if ($self->{debug}->{others}); { my $i; foreach $i (keys(%{$self->{vDEBUG}})){ if($self->{vDEBUG}->{$i}){ print "$i\n"; } } } ############################### # # Initialise using reasonable values # # # initially no algorithms available and none chosen # $self->clearAlgorithm(); $self->clearCollection(); $self->setSessionID(""); # # query for 20 images without cutoff # $self->setCutoff(0.0); $self->setResultSize(20); # # talk to the localhost at port 12789 # $self->setAddress("localhost:12789"); } ############################## # # Set a new address for the CBIR server # # Parameters: # inAddress: Address in "server:port" format # e.g. "localhost:12789" sub setAddress( $ ){ my$self=shift; my $inAddress=shift; ($self->{mHost},$self->{mPort})=split(":",$inAddress); } ############################### # # Setting the array of relevant images # the relevance feedback will be generated # based on these images. # # Parameter: # a list of URLs of relevant images # sub setRelevantImages{ my$self=shift; #a list of the relevant images $self->{gRelevantImages}=[]; @{$self->{gRelevantImages}}=@_; # # building a hash to look up # if a given url belongs to an # image from the list # my $i; foreach $i (@{$self->{gRelevantImages}}){ print "relevant image: $i\n" if($self->{vDEBUG}->{setRelevantImages}); $self->{locRelevantHash}->{$i}=1; } } ############################### # # get the list of relevant images # sub getRelevantImages(){ my$self=shift; return $self->{gRelevantImages}; } ######################################### # # HELPERS FOR XML WRITING # (largely unused, but its a c++-reflex ;-) # in perl things like that are more quickly done # by hand) # # # attribute-value pair to attribute="value" # sub toAttribute{ my$self=shift; my $inName= shift; my $inValue= shift; return " $inName=\"$inValue\""; } # # Elementname, list of attribute/value pairs => element start tag # sub toStartTag( $$$ ){ my$self=shift; my $inEmpty=shift; my $inName=shift; my $inAttributes=shift; my $lReturnValue=""; my $i; foreach $i (values(%$inAttributes)){ $lReturnValue.=$self->toAttribute(@{$i}); } if($inEmpty){ return "<$inName $lReturnValue/>\n"; }else{ return "<$inName $lReturnValue>\n"; } } # # Element name to element end tag # sub toEndTag( $ ){ my$self=shift; my $inName=shift; return "\n"; } ######################################## # # making a query string # # PARAMETERS: # lQueryImages: a REFERENCE to a list of URLs # # OPTIONAL: # # inSession: the MRML session-id of this session # inAlgorithm: the number of the algorithm to be used # inCollection: the number of the collection to be used. # both numbers are the number in the sequence in which they # were sent by the MRML server when the information was requested # by this client sub makeQueryString( $;$$$ ){ my$self=shift; my $lQueryImages=shift; my $inSession=(shift || $self->getSessionID()); my ($inAlgorithm)=$self->getAlgorithmID(shift); my ($inCollection)=$self->getCollectionID(shift); my $lAdditionalAlgorithmAttributes=shift || ""; my $inResultSize=$self->getResultSize(); # the desired result size my $inCutoff=$self->getCutoff(); # the cutoff. if($self->{vDEBUG}->{makeQueryString}){ print $inSession,"\n"; print $inResultSize,"\n"; print $inCutoff,"\n"; print $inCollection,"\n"; print $inAlgorithm,"\n"; } # # building the string "query-step" + headers # my $lResult=qq( ); foreach $i (sort {$$a[0] cmp $$b[0]} @$lQueryImages){ my($lURL,$lRelevance)=@$i; $lResult.=qq( ); } $lResult.=qq( ); return $lResult; } ############################################################ # # Handling incoming MRML # using XML::Parser # ######################################## # # Building and maintaining a list of query results # ############################## # # clear the list of results # sub clearResultList(){ my$self=shift; $self->{locResultList}=[]; } ############################## # # add a URL-userrelevance pair to the list of results # PARAMETERS: # inURL the URL # inUserRelevance the relevancelevel sub addToResultList( $$ ){ my$self=shift; my $inURL= shift; my $inUserRelevance= shift; push @{$self->{locResultList}},[$inURL,$inUserRelevance]; } ############################## # # get the list of URL-userrelevance pairs # the result is a reference. # sub getResultList( ){ my$self=shift; return $self->{locResultList}; } ############################## # # turns the list of URL-userrelevance pairs # into a hash and returns a reference to this hash # sub getResultHash( ){ my$self=shift; my @lResultList=@{$self->getResultList( )}; my $lReturnValue={}; foreach $i (@lResultList){ $lReturnValue->{$i->[0]}=$i->[1]; } return $lReturnValue; } ######################################## # # Expat parser handlers # ############################## # # handle the start of an element # sub handleStart( $$ ){ my $self=shift; die "BLACK MAGIC!" if ($self->{mMagic}!=42); $self=$self->{mCaller}; my $inElement=shift; $self->pushToXMLPath($inElement); my %inAttributes=@_; my $lPath=$self->getXMLPath(); # # print debugging info if necessary # if($self->{vDEBUG}->{handleStart}){ print("start ",$inElement,",",join(":",%inAttributes),"\n"); } # # add an algorithm to the list of possible algorithms # if($lPath=~m:algorithm-list/algorithm$:){ $self->addAlgorithm($inAttributes{"algorithm-type"}); } # # add a collection to the list of possible collections # if($lPath=~m:collection-list/collection$:){ $self->addCollection($inAttributes{"collection-id"}); } # # add a collection to the list of possible collections # if($lPath=~m:algorithm/query-paradigm-list/query-paradigm:){ if($self->{vDEBUG}->{handleStart}){ print "add-QP§§§§§§§§§§§§§$inAttributes{'interaction-type'}§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§\n"; } $self->addQueryParadigmToCurrentAlgorithm(\%inAttributes); } if($lPath=~m:collection/query-paradigm-list/query-paradigm:){ $self->addQueryParadigmToCurrentCollection(\%inAttributes); } if($lPath eq "/mrml"){ $self->setSessionID($inAttributes{"session-id"}); } if($inElement eq "query-result-element-list"){ $self->clearResultList(); } # # # if($inElement eq "query-result-element"){ $self->addToResultList($inAttributes{"image-location"}, $inAttributes{"calculated-similarity"}); } } ############################## # # handle the end of an element # sub handleEnd( $ ){ my $self=shift; $self=$self->{mCaller}; my $inElement=shift; $self->popFromXMLPath($inElement); if($inElement eq "query-result"){ $self->buildNewQuery($self->getResultList(), $self->{locRelevantHash}); } print "end ",$inElement,"\n" if($self->{vDEBUG}->{handleEnd}); } ############################################################ # # Accessors # # ############################### # # The following three functions support you in # opening several sessions # ############################## # # Clear the list of open sessions # sub clearSessionIDList(){ my$self=shift; $self->{mSessionIDList}=[]; } ############################## # # add an MRML session-id to the list of open sessions # sub addSessionIDToList( $ ){ my$self=shift; my $lAddedItem= shift || $self->getSessionID(); $self->clearSessionID() unless defined($self->{mSessionIDList}); push @{$self->{mSessionIDList}}, } ############################## # # get either the last or the nth session-id # from the list # PARAMETER # inN : the n-th session-id in the list is to be returned sub getSessionIDFromList( ;$ ){ my$self=shift; return $self->{mSessionIDList}->[(0 || shift)]; } ############################### # # setSessionID is used at each mrml-message # to set the SessionID # TO THE ONE USED IN THE LAST MESSAGE # # remark: THIS IS NOT BEAUTIFUL # sub setSessionID( $ ){ my$self=shift; $self->{gSessionID}=shift; } # # get the sessionID as written by the function above # sub getSessionID( ){ my$self=shift; return $self->{gSessionID} if defined($self->{gSessionID}); return "no-session-id-available"; } ######################################## # # creating/maintaining a list of all algorithms available # # ############################## # # clear # sub clearAlgorithm( ){ my$self=shift; return $self->{algorithm}=[]; } ############################## # # add to the "current" algorithm a query-paradigm. # the "current" algorithm is defined as the one # containing the query-paradigm tag in question # sub addQueryParadigmToCurrentAlgorithm( $ ){ my $self=shift; my $lNewQueryParadigm=shift; if($self->{vDEBUG}->{addQueryParadigmToCurrentAlgorithm}){ print "addQueryParadigmToCurrentAlgorithm Acting on algorithm $self->{algorithm}->[-1]->{'algorithm-id'}\n"; } $self->{algorithm}->[-1]->{"query-paradigm-list"}=[] unless defined($self->{algorithm}->[-1]->{"query-paradigm-list"}); # add this paradigm to the hash of query paradigms push @{$self->{algorithm}->[-1]->{"query-paradigm-list"}},$lNewQueryParadigm; } ############################## # # add an algorithm to the list of available algorithms # sub addAlgorithm( $ ){ my$self=shift; my $lAlgorithmID=shift; my $lNewAlgorithm={"algorithm-id" => $lAlgorithmID, "query-paradigm-list" => []}; print("\naddalgorithm ",join(",",@{$lNewAlgorithm}),"\n") if $vDEBUG{addAlgorithm}; $self->clearAlgorithm() unless defined $self->{algorithm}; push @{$self->{algorithm}},$lNewAlgorithm; } ############################## # # get either the 0th or the Nth algorithm from the list of available algorithms # Parameters: N # # RETURNVALUE: the algorithm given back by this is a hash containing the algorithm-id # as well as the list of available query paradigms # sub getAlgorithm( ;$){ my$self=shift; return $self->{algorithm}->[(shift || 0)]; } ############################## # # get either the 0th or the Nth algorithm-id from the list of available algorithms # # sub getAlgorithmID( ;$){ my$self=shift; my $inAlgorithmNumber=shift; if($inAlgorithmNumber=~m/[^0-9 \t]/){ return $inAlgorithmNumber;#in fact, the algorithm number was already an ID } return $self->getAlgorithm($inAlgorithmNumber||0)->{"algorithm-id"} if defined($self->getAlgorithm($inAlgorithmNumber||0)->{"algorithm-id"}); return "adefault"; } ############################## # # get either the 0th or the Nth algorithm-type from the list of available algorithms # # XXX: CHECK IF THIS FUNCTION IS USED # sub getAlgorithmType( ;$){ my$self=shift; return $self->getAlgorithm(shift||0)->{"algorithm-type"}; } ############################################################ # # Making and maintaining a list of all collections available # # sub clearCollection( ){ my$self=shift; return $self->{collection}=[]; } ############################## # # adding a query paradigm to the list of query-paradigms allowed for this collection # # sub addQueryParadigmToCurrentCollection( $ ){ my $self=shift; my $lNewParadigm=shift; # add this paradigm to the hash of query paradigms push @{$self->{collection}->[-1]->{"query-paradigm-list"}},$lNewQueryParadigm; } ############################## # # adding a collection to this list # PARAMETER: ID of the collection # sub addCollection( $ ){ my$self=shift; my $lCollectionID=shift; my $lNewCollection={"collection-id" => $lCollectionID, "query-paradigm-list" => []}; print("\nxxx addcollection $lCollectionID:",join(",",(%{$lNewCollection})),"\n") if $vDEBUG{addCollection}; $self->clearCollection() unless defined $self->{collection}; push @{$self->{collection}},$lNewCollection; } ############################## # # Get a hash describing the Nth collection # PARAMETER: N/CollectionID # sub getCollection( ;$){ my$self=shift; my $inCollectionID=shift; if($inCollectionID=~m/[a-zA-Z]/){ foreach $i (@{$self->{collection}}){ print "\ncollection-id: $i->{'collection-id'}\n"; if($i->{"collection-id"} eq $inCollectionID){ return $i; } } die "in CFeedbackClient::getCollection Could not get any collection matching $inCollectionID " } return $self->{collection}->[($inCollectionID || 0)]; } ############################## # # Get the collection ID of the Nth collection # sub getCollectionID( ;$){ my$self=shift; my $inCollectionNumber=shift; if($inCollectionNumber=~m/[^0-9 \t]/){ return $inCollectionNumber;#in fact, the collection number was already an ID } return $self->getCollection(shift||0)->{"collection-id"}; } ############################## # # Find out which algorithms fit your preferred query paradigm # PARAMETERS: inParadigm, a query paradigm element represented # by a hash from attriute to value sub getAlgorithmsByParadigm( $ ){ my$self=shift; my $inParadigm=shift; my @lResult; foreach $i (@{$self->{algorithm}}){ if($self->isMatchingQueryParadigmList($i->{"query-paradigm-list"}, $inParadigm)){ print "found ",$i->{"algorithm-id"},":",join(",",(%$i)),"\n"; push @lResult,$i; } } return @lResult; } ############################## # # Find out which algorithms fit your preferred query paradigm and collection # sub getAlgorithmsByParadigmAndCollection( $$ ){ my$self=shift; my $inParadigm=shift; my $inCollection=shift; my @lResult; foreach $i (@{$self->{algorithm}}){ if(($self->isMatchingQueryParadigmList($inParadigm, $i->{"query-paradigm-list"}))){ print ("HIER\n"); if(($self->isMatchingQueryParadigmList($i->{"query-paradigm-list"}, $inCollection->{"query-paradigm-list"}))) { print "found algorithm ",$i->{"algorithm-id"},":",join(",",(%$i)),"\n"; push @lResult,$i; } } } return @lResult; } sub getCollectionsByParadigm( $ ){ my$self=shift; my $inParadigm=shift; my @lResult; foreach $i (@{$self->{collection}}){ if($self->isMatchingQueryParadigmList($i->{"query-paradigm-list"}, $inParadigm)){ print "found ",$i->{"collection-id"},":",join(",",(%$i)),"\n"; push @lResult,$i->{"collection-id"}; } } return @lResult; } sub collectionToParadigmList( $ ){ my$self=shift; my $inCollection=shift; return $inCollection->{"query-paradigm-list"}; } sub collectionToID( $ ){ my$self=shift; my $inCollection=shift; return $inCollection->{"collection-id"}; } sub algorithmToParadigmList( $ ){ my$self=shift; my $inAlgorithm=shift; return $inAlgorithm->{"query-paradigm-list"}; } sub algorithmToID( $ ){ my$self=shift; my $inAlgorithm=shift; return $inAlgorithm->{"algorithm-id"}; } ############################## # # Setting the desired maximum # size of the result of the next query # # sub getResultSize( ){ my$self=shift; return $self->{gResultSize}; } sub setResultSize( $ ){ my$self=shift; $self->{gResultSize}=shift; } ############################## # # Setting the "cutoff": minimal desired calculated relevance # of the retrieved result # sub getCutoff( ){ my$self=shift; return $self->{gCutoff}; } sub setCutoff( $ ){ my$self=shift; $self->{gCutoff}=shift; } ############################## # # Build a new query using makeQueryString # out of a list of retrieved images. # # # In fact this is the main function which users of this class # will need to overload # sub buildNewQuery( $$ ){ my$self=shift; #a reference to an ARRAY containing the retrieved images my $inRetrieved=shift; if($self->{vDEBUG}->{buildNewQuery}){ print "--------------------buildNewQuery"; my $i; foreach $i (@$inRetrieved){ print "buildNewQuery: $$i[0]\n"; }; } #a reference to a HASH containing the relevant images as keys my $inRelevantHash=shift; # this array has to be filled up using the feedback algorithm my @outQueryImages=(); ################################################## # # This is the real feedback algorithm # Heirs put changements here! # # in this case: {#these braces are there for scoping reasons my $i; foreach $i (@$inRetrieved){#for each retrieved image,... if($$inRelevantHash{$$i[0]}){#...which is in the hash of relevant images... push @outQueryImages,[$$i[0],1];#...add it to the query. #... and give some output , if requested print "adding query image $$i[0]\n" if $self->{vDEBUG}->{buildNewQuery}; } } }#these braces are there for scoping reasons # # this was the feedback algorithm # ################################################## # die qq(Error in feedback generating algorithm: $@) if $@; $locQuery=$self->makeQueryString(\@outQueryImages, $self->getSessionID(0), $self->getAlgorithmID(0), $self->getCollectionID(0), ); } ############################################################# # # # NETWORKING # # sub old_opensock( ;$$ ){ my$self=shift; #snipped from the perlbook my($remote,$port,$iaddr,$paddr,$proto,$line,$newport); $remote = shift || 'localhost'; $port = shift || 12789; $newport=$port; if($port=~/\D/){$newport=getservbyname($newport,'tcp');} die "No port" unless $newport; $iaddr = main::inet_aton($remote) or die "no host: $remote"; $paddr = main::sockaddr_in($newport,$iaddr); $proto = getprotobyname('tcp'); socket(SOCK,main::PF_INET,main::SOCK_STREAM,$proto) or die "socket: $!"; connect(SOCK,$paddr) or die "connect: $!"; autoflush SOCK 1; autoflush STDOUT 1; } ############################################################# # # # NETWORKING open a socket # PARAMETERS: remote host, port. # # by default the values of $self->{mHost} and $self->{mPort}; # are taken. sub opensock( ;$$ ){ my$self=shift; #snipped from man IO::Socket my($remote,$port,$iaddr,$paddr,$proto,$line,$newport); $remote = shift || $self->{mHost}; $port = shift || $self->{mPort}; autoflush STDOUT 1; print "connecting to: $remote:$port\n" if $vDEBUG{opensock}; $self->{mSocket} = IO::Socket::INET->new(PeerAddr => $remote, PeerPort => $port, Proto => 'tcp'); print "finished making the socket" if $vDEBUG{opensock}; $self->{mSocket}->autoflush(1); } ############################### # # read from the socket and parse. # returns the string read. # sub readAndParse( ){ my$self=shift; print "\nNow I will try to read...\n" if($self->{vDEBUG}->{readAndParse}); #parsing directly from the stream # $self->{parser}->parse($self->{mSocket}); # "\nthis value should not be used!\n"; #we read, and then we parse #for this reason, we can return the #string read { my $lRead=join("",$self->{mSocket}->getlines()); if($lRead){ if($self->{vDEBUG}->{readAndParse}){ print "Parsing: $lRead"; $lOF= new IO::File; $lOF->open(">mrml-parsing-log"); print $lOF $lRead; print "--\n"; } # $self->clearXMLPath(); $self->{parser}->parse($lRead); } $lRead; } } ############################### # # sends an ihandshake message # to the server. # sub startSession(){ my$self=shift; my $lUser=shift || "default-user"; my $lSession=shift || "--feedback-client-session--"; $self->opensock(); $_= qq( ); $self->{mSocket}->print($_); print "Sent: $_" if($vDEBUG{startSession}); $self->readAndParse(); } ############################### # # Save the state of the session on the server # # FIXME: presently this is empty # sub saveSession(){ my$self=shift; } ############################### # # close the session # # FIXME: presently this is empty # sub closeSession(){ my$self=shift; } ############################### # # FOR TESTING ONLY: TRYING TO SIMULATE A SESSION # # configures an algorithm # to the server. # HM 060201 added parametres that are needed for the benchmark # sub configureSession(;$$$$$$$$$ ){ my$self=shift; my $inSessionID=shift || $self->getSessionID(); my $inAlgorithmID=shift || $self->getAlgorithmID(); my $inCollectionID=shift || $self->getCollectionID(); my $inAdditionalAlgorithmAttributes=shift || ""; my $inColorHistogramBlocked=shift || "false"; my $inColorBlocksBlocked=shift || "false"; my $inGaborHistogramBlocked=shift || "false"; my $inGaborBlocksBlocked=shift || "false"; my $inFeaturePercentage=shift || "100"; my $MESSAGEFILE="__DATADIR__/gift-iconfigure.mrml"; $self->opensock(); ############################### # # We read a prefabricated configuration message, in which we # replace the appropriate attribute values # # open MESSAGEFILE,$MESSAGEFILE or die "There is no $MESSAGEFILE: $!"; # while(){ # s/PPsessionidPP/$inSessionID/; # s/PPalgorithmidPP/$inAlgorithmID/; # s/PPcollectionidPP/$inCollectionID/; # s/PPadditionalalgorithmattributesPP/$inAdditionalAlgorithmAttributes/; # $self->{mSocket}->print($_); # print "Sent: $_" if $self->{vDEBUG}->{configureSession}; # } $_= qq( ); $self->{mSocket}->print($_); print "Sent: $_" if($vDEBUG{startSession}); $self->readAndParse(); } ############################## # # Send a query to the server # sub sendQueryString( $ ){ my$self=shift; my $lQuery=shift; $self->opensock(); if($self->{vDEBUG}->{sendQueryString}){ print "sendQueryString++++++++++++++++++++++++++++++Sending query....\n\n"; print $lQuery; print "\nsendQueryString------------------------------Sending query....\n\n"; } $self->{mSocket}->print($lQuery); $self->readAndParse(); $self->{mSocket}->close(); } ############################## # # generate a query and feed it to the server. # subsequent queries will be generated by the xml parser # and its helpers. sub doFirstQueryStep( $;$$$ ){ my$self=shift; my $lInstruction=shift; my $lQuery=shift || [[$self->getRelevantImages()->[0],1]]; my $inSession=(shift || ($self->getSessionID(0))); my $inAlgorithm=(shift || ($self->getAlgorithmID(0))); my $inCollection=(shift || ($self->getCollectionID(0))); my $lQueryString; if($lInstruction eq "query-step"){ $lQueryString=$self->makeQueryString($lQuery, $inSession, $inAlgorithm, $inCollection); } if($lInstruction eq "cui-hierarchy-up"){ my $inResultSize=$self->getResultSize(); my $inCutoff=$self->getCutoff(); $lQueryString=qq( ); } if($self->{vDEBUG}->{doFirstQueryStep}){ print "doFirstQueryStep++++++++++++++++++++++++++++++Sending query....\n\n"; } $self->sendQueryString($lQueryString); { print "\ndoFirstQueryStep------------------------------Sending query....\n\n"; } return $lQueryString; } ############################### # # send a feedback query, if the same query was not performed # in the last step. # sub doQueryStep( $$ ){ my$self=shift; my $inCount=shift; my $lOld=shift; my $lNow=$locQuery; if ($lOld ne $lNow){ if($self->{vDEBUG}->{doQueryStep}){ print "$inCount ++++++++++++++++++++++++++++++Sending query....\n\n"; print $locQuery; print "\n$inCount ------------------------------Sending query....\n\n"; } $self->opensock(); $self->{mSocket}->print($locQuery); $self->readAndParse(); return $lNow; }else{ if($self->{vDEBUG}->{doQueryStep}){ print "$inCount ++NOT SENDING QUERY\n"; print $locQuery; print "\n$inCount --NOT SENDING QUERY\n"; } } return ""; } ############################################################ # # perform a group of queries. This can be a browsing # query process or a simple sequence of next neigbour # query feedback steps. What it really is depends on the # heir which overloads doQueryStep # # PARAMETERS: # $inImages reference to a list containing the relevant images # sub doQueryGroup( $ ){ my$self=shift; my $inImages=shift; $self->setRelevantImages(@$inImages); $self->startSession("default-user"); $self->configureSession(); { my $lOldQuery=$self->doFirstQueryStep("query-step"); my $lCount=1; while(($lOldQuery=$self->doQueryStep($lCount, $lOldQuery)) && ($lCount<100)){ ++$lCount; }; } } gift-0.1.14/scripts/Makefile.am0000644000175200001440000000003110153634156013166 00000000000000SUBDIRS= perl emacs-lispgift-0.1.14/scripts/Makefile.in0000644000175200001440000003452110220474100013174 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = scripts DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = 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 ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = perl emacs-lisp all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(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 scripts/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu scripts/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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: # 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): @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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: @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; 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='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="../$(top_distdir)" \ distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive 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-info \ install-info-am install-man 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-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: gift-0.1.14/scripts/emacs-lisp/0000777000175200001440000000000010220511621013243 500000000000000gift-0.1.14/scripts/emacs-lisp/gift-server-compile.el0000644000175200001440000000323310153634156017403 00000000000000;; -*- mode: emacs-lisp -*- ; GIFT, a flexible content based image retrieval system. ; Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva ; 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 ;--------------------------------------------------------------------- ; ; Macros FOR THE USE WITH C++ ; Author: Wolfgang Müller (wolfgang.mueller@cui.unige.ch) ; ; find the server and compile it ; (useful when testing) ; ;--------------------------------------------------------------------- (defun gift-general-compile (file-in-gift-tree target) "Find a file and compile it" (interactive) (progn (find-file (gift-de-double-slash (concat (getenv "GIFT") "/" file-in-gift-tree)) ) (insert " ") (delete-backward-char 1) (compile (concat "make -k " target)) ) ) (defun gift-server-compile () "Find the file containing the GIFT server, then compile" (interactive) (progn (gift-general-compile "GIFTServer/Server.cc" " ") ) ) gift-0.1.14/scripts/emacs-lisp/elisp-comp0000755000175200001440000000324210153634156015174 00000000000000#!/bin/sh # Copyright (C) 1995 Free Software Foundation, Inc. # François Pinard , 1995. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # This script byte-compiles all `.el' files which are part of its # arguments, using GNU Emacs, and put the resulting `.elc' files into # the current directory, so disregarding the original directories used # in `.el' arguments. # # This script manages in such a way that all Emacs LISP files to # be compiled are made visible between themselves, in the event # they require or load-library one another. if test $# = 0; then echo 1>&2 "No files given to $0" exit 1 else if test -z "$EMACS" || test "$EMACS" = "t"; then # Value of "t" means we are running in a shell under Emacs. # Just assume Emacs is called "emacs". EMACS=emacs fi tempdir=elc.$$ mkdir $tempdir cp $* $tempdir cd $tempdir echo "(setq load-path (cons nil load-path))" > script $EMACS -q -batch -l script -f batch-byte-compile *.el mv *.elc .. cd .. rm -fr $tempdir fi gift-0.1.14/scripts/emacs-lisp/gift-c-macros.el0000644000175200001440000000661410153634156016161 00000000000000;; -*- mode: emacs-lisp -*- ; GIFT, a flexible content based image retrieval system. ; Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva ; 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 ;--------------------------------------------------------------------- ; ; MACROS FOR THE USE WITH C++ ; Author: Wolfgang Müller (wolfgang.mueller@cui.unige.ch) ; ;--------------------------------------------------------------------- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Make set/get functions for a given c++ variable ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun sub1-gift-make-accessors (); puts the right stuff in the kill ring (copy-region-as-kill (- (re-search-forward "[a-zA-Z]") 1) (- (search-forward " " nil nil 1) 1)) ; get the type name ;(assuming there are no spaces in the type (copy-region-as-kill (re-search-forward "[a-zA-Z]") (- (search-forward ";" nil nil 1) 1)) ;get the variable name ) (defun sub2-gift-make-accessors (in-setfun in-getfun); (let ((l-name (car kill-ring-yank-pointer)) (l-type (car (cdr kill-ring-yank-pointer)))) (beginning-of-line) (next-line 1) (insert "\n") (insert "///\nvoid set") (insert l-name) (insert "(const ") (insert l-type) (insert "& in") (insert l-name) (insert ")") (funcall in-setfun l-type l-name) (insert "///\n") (insert l-type) (insert " get") (insert l-name) (insert "()const") (funcall in-getfun l-type l-name) ) ) (defun gift-header-set-accessor (in-type in-name) (insert ";\n")) (defun gift-header-get-accessor (in-type in-name) (insert ";\n")) (defun gift-body-set-accessor (in-type in-name) (insert "{\n m") (insert in-name) (insert "= in") (insert in-name) (insert ";\n};\n\n")) (defun gift-body-get-accessor (in-type in-name) (insert "{\n return m") (insert in-name) (insert ";\n};\n\n")) (defun gift-make-header-accessors () "make accessors for variable" (interactive) (save-excursion (sub1-gift-make-accessors) (sub2-gift-make-accessors 'gift-header-set-accessor 'gift-header-get-accessor))) (defun gift-make-body-accessors () "make accessors for variable" (interactive) (save-excursion (sub1-gift-make-accessors) (sub2-gift-make-accessors 'gift-body-set-accessor 'gift-body-get-accessor))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; For Diff: keep the version A ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defalias 'gift-keepA (read-kbd-macro "C-s <<<<<<<<<<<<<< SPC variant SPC A C-a 2* C-s > > > > > > > > > > > > > > SPC variant SPC B C-a C-s ======= SPC end SPC of SPC combination C-x C-x C-w")) gift-0.1.14/scripts/emacs-lisp/Makefile.am0000644000175200001440000000044410153634156015233 00000000000000# The macros in this directory are intended for use # when editing gift files, so they are not installed EXTRA_DIST=gift-c-macros.el gift-initial-header.el gift-server-compile.el \ gift-compile-current.el gift-kdocify.el gift-transpose-params.el \ gift-header-to-body.el gift-load-macros.el gift-0.1.14/scripts/emacs-lisp/Makefile.in0000644000175200001440000002307510220474100015233 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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@ # The macros in this directory are intended for use # when editing gift files, so they are not installed 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 = : host_triplet = @host@ subdir = scripts/emacs-lisp DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in elisp-comp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = gift-c-macros.el gift-initial-header.el gift-server-compile.el \ gift-compile-current.el gift-kdocify.el gift-transpose-params.el \ gift-header-to-body.el gift-load-macros.el all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(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 scripts/emacs-lisp/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu scripts/emacs-lisp/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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: -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: gift-0.1.14/scripts/emacs-lisp/gift-load-macros.el0000644000175200001440000000350310153634156016650 00000000000000;; -*- mode: emacs-lisp -*- ; GIFT, a flexible content based image retrieval system. ; Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva ; 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 ; ; Load macros which are useful for editing gift files ; (defun gift-de-double-slash (in-string) (replace-in-string in-string "//" "/" )) ; for doing things by hand, if necessary: ; (progn (setq gift-script-dir (gift-de-double-slash (concat (getenv "GIFT") "/scripts/emacs-lisp/"))) (load (gift-de-double-slash (concat gift-script-dir "gift-load-macros.el")))) (load (gift-de-double-slash (concat gift-script-dir "gift-server-compile.el"))) (load (gift-de-double-slash (concat gift-script-dir "gift-compile-current.el"))) (load (gift-de-double-slash (concat gift-script-dir "gift-kdocify.el"))) (load (gift-de-double-slash (concat gift-script-dir "gift-c-macros.el"))) (load (gift-de-double-slash (concat gift-script-dir "gift-initial-header.el"))) (load (gift-de-double-slash (concat gift-script-dir "gift-header-to-body.el"))) (load (concat gift-script-dir "gift-transpose-params.el")) (load (concat gift-script-dir "gift-add-gpl.el"))gift-0.1.14/scripts/emacs-lisp/gift-transpose-params.el0000644000175200001440000000262710153634156017754 00000000000000;; -*- mode: emacs-lisp -*- ; GIFT, a flexible content based image retrieval system. ; Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva ; 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 (defun gift-kill-param () "Kill the c++ parameter containing the cursor " (progn (search-backward-regexp "[(,]") (forward-char) (search-forward-regexp "[),]") (backward-char) (exchange-point-and-mark) (kill-region) ) ) (defun gift-transpose-params () "Transpose the c++ parameter containing the cursor with the following one" (interactive) (progn (gift-kill-param) (forward-char) (gift-kill-param) (kill-region) (backward-char) (yank 2) (forward-char) (yank 1)))gift-0.1.14/scripts/emacs-lisp/gift-header-to-body.el0000644000175200001440000000224410153634156017253 00000000000000;; -*- mode: emacs-lisp -*- ; GIFT, a flexible content based image retrieval system. ; Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva ; 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 ; ; Transforms in the current file a header to body ; this function is in construction ; ;(defun gift-header-to-body () ; "transform a c++ class definition into a suitable c++-body file" ; (interactive) ; (progn ; (re-search-forward "class\\s+\\(\\w+\\):") ; (setq gift-class-name gift-0.1.14/scripts/emacs-lisp/gift-compile-current.el0000644000175200001440000001403610153634156017562 00000000000000;; -*- mode: emacs-lisp -*- ; GIFT, a flexible content based image retrieval system. ; Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva ; 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 ;--------------------------------------------------------------------- ; ; Macros FOR THE USE WITH C++ ; Author: Wolfgang Müller (wolfgang.mueller@cui.unige.ch) ; ; find the server and compile it ; (useful when testing) ; ;--------------------------------------------------------------------- (defun gift-switch-to-associated-c++ () "For a given h file usually the c++ file is in ../cc/" (interactive) (let ( (cc-file-other-dir (replace-in-string (buffer-file-name) "\\(lib.+\\)/include/\\(.*\\)\\.h" "\\1/cc/\\2.cc" )) (cc-file-same-dir (replace-in-string (buffer-file-name) "\\(.*\\)\\.h" "\\1.cc" )) (pre-cc-file (replace-in-string (buffer-file-name) "\\(lib.+\\)/include/\\(.*\\)\\.h" "\\1/cc/\\2.pre-cc" )) (bn (buffer-file-name)) ) (if (and (or (string< pre-cc-file bn) (string< bn pre-cc-file)) (file-readable-p pre-cc-file) ) (find-file pre-cc-file) (if (file-readable-p cc-file-same-dir) (find-file cc-file-same-dir) (find-file cc-file-other-dir)) ) ) ) (defun gift-switch-to-associated-h () "For a given h file usually the c++ file is in ../include/" (interactive) (let ( (include-file-other-dir (replace-in-string (buffer-file-name) "\\(lib.+\\)/cc/\\(.*\\)\\..*cc" "\\1/include/\\2.h" )) (include-file-same-dir (replace-in-string (buffer-file-name) "\\(.*\\)\\.cc" "\\1.h" )) ) (if (file-readable-p include-file-same-dir) (find-file include-file-same-dir) (find-file include-file-other-dir)) ) ) (defun gift-associated () "For a given file switch to the associated c++/h file" (interactive) (if (string-match ".*cc" (buffer-file-name) ) (gift-switch-to-associated-h) (gift-switch-to-associated-c++) ) ) (defun gift-2 () "After this the frame contains two windows, containing header and cc of the current file" (interactive) (progn (gift-switch-to-associated-h) (delete-other-windows) (split-window) (other-window 1) (gift-associated))) (defun gift-utomake () "Load GIFT's configure.in and run automake. strange name for quicker use without keybindings" (interactive) (progn (find-file (gift-de-double-slash (concat (getenv "GIFT") "/configure.in"))) (compile (gift-de-double-slash (concat "rm config.cache; sh boostrap-cvs.sh ;./configure --enable-multi-threading --prefix " (getenv "GIFT") "/../GIFTInstall"))))) (defun gift-Utomake () "Like gift-utomake, but starts make install afterwards" (interactive) (progn (progn (find-file (gift-de-double-slash (concat (getenv "GIFT") "/GIFTServer/Server.cc"))) (insert " ") (delete-backward-char 1) (basic-save-buffer) ) (progn (find-file (gift-de-double-slash (concat (getenv "GIFT") "/configure.in"))) (compile (gift-de-double-slash (concat "sh boostrap-cvs.sh && ./configure " "--enable-multi-threading " "--prefix " (getenv "GIFT") "/../GIFTInstall; make install")))) )) (defun gift-Itomake () "Like gift-Utomake, but make internal" (interactive) (progn (progn (find-file (gift-de-double-slash (concat (getenv "GIFT") "/GIFTServer/Server.cc"))) (insert " ") (delete-backward-char 1) (basic-save-buffer) ) (progn (find-file (gift-de-double-slash (concat (getenv "GIFT") "/configure.in"))) (compile (gift-de-double-slash (concat "sh boostrap-cvs.sh && ./configure --enable-multi-threading --enable-gift --prefix " (getenv "GIFT") "/../GIFTInstall; make install")))) )) (defun gift-GIFTServerMake () "Makes the server without running sh boostrap-cvs.sh && configure first." (interactive) (progn (progn; touch the server file (find-file (gift-de-double-slash (concat (getenv "GIFT") "/GIFTServer/Server.cc"))) (insert " ") (delete-backward-char 1) (basic-save-buffer) ) (progn (find-file (gift-de-double-slash (concat (getenv "GIFT") "/configure.in"))) (compile "make;make install")) ) ) (defun gift-compile-current () "Compile the current cc file. switch to it if necessary" (interactive) (progn (if (string-match "\\.java" (buffer-name)) (compile (concat "javac " (buffer-name))) (progn (gift-switch-to-associated-c++) ; this does plain nothing if ; the current buffer is not a header ; in a lib.*/include/ directory (compile (concat "make -k " (replace-in-string (buffer-name) "\\.\\(pre-\\)?cc" "\\.o" ))) ; so the last expression will almost ; always do something useful ) ) ) ) (defun gift-directory-compile-current () "Compile the current cc/ directory. switch to it if necessary" (interactive) (progn (progn (gift-switch-to-associated-c++) ; this does plain nothing if ; the current buffer is not a header ; in a lib.*/include/ directory (compile "make -k all install" ) ; so the last expression will almost ; always do something useful ) ) ) gift-0.1.14/scripts/emacs-lisp/gift-initial-header.el0000644000175200001440000000374210153634156017333 00000000000000;; -*- mode: emacs-lisp -*- ; GIFT, a flexible content based image retrieval system. ; Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva ; 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 ;--------------------------------------------------------------------- ; ; ; A function inserting the initial header for a ; gift file ; ;--------------------------------------------------------------------- (defun gift-file-name-to-define (in-file-name) (concat "_" (upcase (replace-in-string in-file-name "\\..*" "" ))) ) (defun gift-initial-header () "Bracket the current file into #ifndefs to avoid double inclusion" (interactive) (progn (beginning-of-buffer) (insert "// -*- mode: c++ -*-\n") (insert (concat "#ifndef " (gift-file-name-to-define (buffer-name)) "\n")) (insert (concat "#define " (gift-file-name-to-define (buffer-name)) "\n")) (end-of-buffer) (insert "#endif\n") ) ) (defun gift-prototype-to-comment () "generate an empty comment for this function" (interactive) (progn (re-search-forward "::") (kill-word 1) (yank) (previous-line 1) (insert "\n\n/** \n") (yank) (insert ": \n*/ \n") ) ) (defun gift-header-to-c++ () "make a new .cc file to a given header file" (interactive) (pprint "There is nothing yet")) gift-0.1.14/scripts/emacs-lisp/gift-kdocify.el0000644000175200001440000000421710153634156016102 00000000000000;; -*- mode: emacs-lisp -*- ; GIFT, a flexible content based image retrieval system. ; Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva ; 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 ;--------------------------------------------------------------------- ; ; Macros FOR THE USE WITH C++ ; Author: Wolfgang Müller (wolfgang.mueller@cui.unige.ch) ; ; Changing Henning's old comment format to something ; which can be digested by KDOC ; ;--------------------------------------------------------------------- (defun gift-doc-to-kdoc () "kdocify one-line comments starting at the beginning of the file, unify multiline one-line-comments" (beginning-of-buffer) (interactive) ;turning one-line comments into kdoc comments (query-replace-regexp "//+\\([^-*\n]+\\)" "/** \\1 */") ;unify multiline comments into one multiline comment (query-replace-regexp "\\*/[ \t]*\n[ \t]*/\\*\\*" "\n") ) (defun gift-kdocify-file () "kdocify starting at the beginning of the file" (interactive) (beginning-of-buffer) (while (re-search-forward "/\\*\\*\\**" nil t) (replace-match "/**" nil nil)) (beginning-of-buffer) (while (re-search-forward "\\*+/" nil t) (replace-match "*/" nil nil)) (beginning-of-buffer) (while (re-search-forward "^\\*\\*+" nil t) (replace-match "*" nil nil)) (beginning-of-buffer) (while (re-search-forward "///\\(.*\\)" nil t) (replace-match "/** \\1 */" nil nil)) (beginning-of-buffer) (gift-doc-to-kdoc) ) gift-0.1.14/libMRML/0000777000175200001440000000000010220511622010756 500000000000000gift-0.1.14/libMRML/cc/0000777000175200001440000000000010220511623011344 500000000000000gift-0.1.14/libMRML/cc/CAttributeList.cc0000644000175200001440000002532410220502727014504 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/CAttributeList.h" #include "string.h" #include #include "libMRML/include/CMutex.h" #include #include extern CMutex* gMutex; CAttributeList::CAttributeList(const char * const * const inAttributeList){ clear(); if(inAttributeList){ const char*const* lAttributes(inAttributeList); while(lAttributes[0] && strlen(lAttributes[0])){ if(strlen(lAttributes[0])>200){ cerr << __FILE__ << ":" << __LINE__ << ":" << flush << "lAttributes[0] too long:[" << endl << lAttributes[0] << "]ENDOF STRING" << endl; };//for debugging purposes DEBUG if(strlen(lAttributes[1])>200){ cerr << __FILE__ << ":" << __LINE__ << ":" << flush << "lAttributes[1] too long:[" << endl << lAttributes[1] << "]ENDOF STRING" << endl; };//for debugging purposes DEBUG #ifndef _IS_SEQUENCE_AL gMutex->lock(); if(lAttributes[1]){ // cout << "[L" << strlen(lAttributes[1]) << "L]" << flush; if(strlen(lAttributes[1])){ int lLen(strlen(lAttributes[1])+1); char* lBuffer(new char[lLen]); strcpy(lBuffer,lAttributes[1]); char* lBuffer2(new char[lLen]); strcpy(lBuffer2,lAttributes[1]); insert(make_pair(lAttributes[0], make_pair(lBuffer,lBuffer2))); //cout << "[" << lBuffer << "]" << flush; assert(strlen(operator[](lAttributes[0]).second)==lLen-1); assert(strlen(operator[](lAttributes[0]).first)==lLen-1); }else{ char* lBuffer(new char[1]); lBuffer[0]=char(0); char* lBuffer2(new char[1]); lBuffer2[0]=char(0); insert(make_pair(string(lAttributes[0]), make_pair(lBuffer,lBuffer2))); } } gMutex->unlock(); #else push_back(make_pair(string(lAttributes[0]), string((lAttributes[1] && strlen(lAttributes[1]))?lAttributes[1]:""))); #endif lAttributes+=2; } } } CAttributeList::~CAttributeList(){ //checkNPrint(); for(iterator i=begin(); i!=end(); i++){ if(strcmp(i->second.first, i->second.second)){ cout << "DELETING FAILED" << flush << int(i->second.second) << flush << i->second.first << i->second.second << endl; assert(0); } delete[] i->second.first; delete[] i->second.second; } } CAttributeList::CAttributeList(const list >& inAttributes){ gMutex->lock(); clear(); for(list >::const_iterator i=inAttributes.begin(); i!=inAttributes.end(); i++){ if(i->second.size()>200){ cerr << __FILE__ << ":" << __LINE__ << ":" << flush << "i->second too long:[" << endl << i->second << "]ENDOF STRING" << endl; } #ifndef _IS_SEQUENCE_AL int lLen(i->second.size()+1); char* lBuffer(new char[lLen]); strcpy(lBuffer,i->second.c_str()); char* lBuffer2(new char[lLen]); strcpy(lBuffer2,i->second.c_str()); insert(make_pair(i->first, make_pair(lBuffer, lBuffer2))); // insert(*i); if the representation is map #else push_back(*i); #endif } gMutex->unlock(); } CAttributeList::CAttributeList(const CAttributeList& inAttributes){ gMutex->lock(); clear(); for(CAttributeList::const_iterator i=inAttributes.begin(); i!=inAttributes.end(); i++){ #ifndef _IS_SEQUENCE_AL if(strcmp(i->second.first, i->second.second)){ if(strcmp(i->second.first, i->second.second)){ cout << "ASSERTION FAILED" << i->second.first << "/" << i->second.second << endl; assert(0); } } assert(!strcmp(i->second.first, i->second.second)); int lLen(strlen(i->second.first)+1); char* lBuffer(new char[lLen]); strcpy(lBuffer,i->second.first); int lLen2(strlen(i->second.second)+1); char* lBuffer2(new char[lLen2]); strcpy(lBuffer2,i->second.second); insert(make_pair(i->first,make_pair(lBuffer,lBuffer2))); #else push_back(*i); #endif } gMutex->unlock(); } CAttributeList::const_iterator CAttributeList::find(string inString)const{ //check(); #ifdef _PRINTOUTS_AL cout << endl << "CAttributeList::find(" << flush; cout << inString << ") size " << flush; cout << size() << " " << inString.size() << endl; #endif #ifndef _CAL_FIND_WORKAROUND return CAttributeList::CBase::find(inString); #else for(const_iterator i=begin(); i!=end(); i++){ #ifdef _PRINTOUTS_AL cout << "~" << flush; cout << "[" << flush; cout << i->first <second << flush; cout << "]" << flush; #endif if(i->first==inString){ #ifdef _PRINTOUTS_AL cout << "+" << flush; #endif return i; } #ifdef _PRINTOUTS_AL cout << "." << flush; #endif } cout << "-" << flush; return end(); #endif } void CAttributeList::add(const string& inFirst, const string& inSecond){ gMutex->lock(); #ifdef _PRINTOUTS_AL checkNPrint(); cout << "Adding to CAttributeList " << inFirst << " " << inSecond << endl; #endif #ifndef _IS_SEQUENCE_AL char* lBuffer=new char[inSecond.size()+1]; lBuffer[inSecond.size()]=char(0); strncpy(lBuffer,inSecond.c_str(),inSecond.size()); char* lBuffer1=new char[inSecond.size()+1]; lBuffer1[inSecond.size()]=char(0); strncpy(lBuffer1,inSecond.c_str(),inSecond.size()); operator[](inFirst)=make_pair(lBuffer,lBuffer1); // (*this).insert(make_pair(inFirst,inSecond)); #else (*this).push_back(make_pair(inFirst,inSecond)); #endif gMutex->unlock(); } /** adding an attribute for integers */ void CAttributeList::add(const string& inAttribute,long inValue){ char lBuffer[20]; for(int i=0; i<20; i++){ lBuffer[i]=0; } sprintf(lBuffer, "%ld", inValue); add(inAttribute, lBuffer); }; /** adding an attribute for doubles */ void CAttributeList::add(const string& inAttribute,double inValue){ char lBuffer[20]; for(int i=0; i<20; i++){ lBuffer[i]=0; } sprintf(lBuffer, "%lf", inValue); add(inAttribute, lBuffer); }; /** reading an attribute for integers */ pair CAttributeList::boolReadAttribute(const string& inAttribute)const{ pair lReadAttribute=stringReadAttribute(inAttribute); if(!lReadAttribute.first){ return make_pair(bool(0),bool(0)); }else{ char* lLastCorrectCharacter=0; bool lReturnValue=((lReadAttribute.second=="yes") || (lReadAttribute.second=="y") || (lReadAttribute.second=="true") || (lReadAttribute.second=="t")); return make_pair(lReadAttribute.first, lReturnValue); } }; /** reading an attribute for integers */ pair CAttributeList::longReadAttribute(const string& inAttribute)const{ pair lReadAttribute=stringReadAttribute(inAttribute); if(!lReadAttribute.first){ return make_pair(bool(0),long(0)); }else{ char* lLastCorrectCharacter=0; long lReturnValue=strtol(lReadAttribute.second.c_str(), &lLastCorrectCharacter, 10); bool lIsValid=!(*lLastCorrectCharacter); return make_pair(lIsValid, lReturnValue); } }; /** reading an attribute for doubles */ pair CAttributeList::doubleReadAttribute(const string& inAttribute)const{ #ifdef __D_CATTRIBUTELIST__DOUBLEREADATTRIBUTE__ cout << "In doubleReadAttribute " << flush << endl; #endif pair lReadAttribute=stringReadAttribute(inAttribute); #ifdef __D_CATTRIBUTELIST__DOUBLEREADATTRIBUTE__ cout << "AGAIN In doubleReadAttribute " << flush << endl; #endif if(!lReadAttribute.first){ return make_pair(bool(0), double(0)); }else{ char* lLastCorrectCharacter=0; double lReturnValue=strtod(lReadAttribute.second.c_str(), &lLastCorrectCharacter); bool lIsValid=!(*lLastCorrectCharacter); return make_pair(lIsValid, lReturnValue); } }; /** reading an attribute for strings */ pair CAttributeList::stringReadAttribute(const string& inAttribute)const{ //check, if the magic number is correct at this time #ifdef _PRINTOUTS_AL checkNPrint(); cout << inAttribute << endl << flush; #endif #ifdef _PRINTOUTS_AL find(inAttribute); cout << "came back from find()" << flush; #endif CAttributeList::const_iterator lFoundPosition(find(inAttribute)); #ifdef _PRINTOUTS_AL cout << "came back 2nd time from mAttributes.find()" << flush; #endif if(lFoundPosition != end()){ assert(!strcmp(lFoundPosition->second.first, lFoundPosition->second.second)); string lFoundString(lFoundPosition->second.first); pair lReturnValue=make_pair(bool(1), lFoundString); return lReturnValue; } return make_pair(bool(0), string("")); }; /** reading an attribute for strings */ void CAttributeList::toXML(string& outString)const{ outString += " "; for(const_iterator i=begin(); i!=end(); i++){ outString += i->first + "=\"" + i->second.first + "\" "; assert(!strcmp(i->second.second, i->second.first)); } }; /** reading an attribute for strings */ void CAttributeList::check()const{ for(const_iterator i=begin(); i!=end(); i++){ assert(!strcmp(i->second.second, i->second.first)); } }; /** a local function */ template static const string& _CAL_getFirst(const pair& inElement){ return inElement.first; } /** Get the keys of all attributes in this list*/ list CAttributeList::getKeys()const{ list lReturnValue; // the following two implementations are equivalent transform(this->begin(), this->end(), back_inserter(lReturnValue), _CAL_getFirst ); // #ifdef GCC30 // for(const_iterator i=begin(); // i!=end(); // i++){ // lReturnValue.push_back(i->first); // } // #endif return lReturnValue; } gift-0.1.14/libMRML/cc/CAccessor.cc0000644000175200001440000000351110220502727013441 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/CAccessor.h" #include void CAccessor::dummy()const{ }; CAccessor::~CAccessor(){ cout << __FILE__ << "calling destructor" << endl; }; /** If a new collection is created during runtime, this function prepares the indexing structures such that they are able to accept new objects. The collection id and name must be given when constructing *this. All other data are added to the configuration tag in this. The resulting configuration tag is output as result of prepareDatabase. @returns configuration element that contains new configuration data as result of prepareDatabase */ CXMLElement* CAccessor::prepareDatabase(){ return 0; }; /** Here: do plain nothing. Return false, so the default is to initialise rather than not. */ bool CAccessor::isPreparedDatabase()const{ return false; }; //@} gift-0.1.14/libMRML/cc/CAFPlugin.cc0000644000175200001440000000404010220502727013342 00000000000000#include "libMRML/include/CAFPlugin.h" #include "libMRML/include/CAccessorFactoryContainer.h" #include "libMRML/include/GIFTExceptions.h" /** makes a CAccessor object*/ CAccessor* CAFPlugin::makeAccessor(const CXMLElement& inXMLElement)const{ return (*mMakeAccessor)(inXMLElement); } /** gets the name of the plugin*/ char* CAFPlugin::getName(){ return (*mGetName)(); }; /** makes the CAFPlugin. All it needs is: @param inLibraryFileName the file name of the shared object to be treated */ CAFPlugin::CAFPlugin(string inLibraryDirName, string inLibraryFileName, string inLibraryName): mGetName(0), mMakeAccessor(0), mName("no name given"), mIsSane(0){ const char* lError; string lLibraryPath=inLibraryDirName+"/"+inLibraryFileName; string lStringGetClassName(inLibraryName+"_getClassName"); string lStringMakeAccessor(inLibraryName+"_makeAccessor"); mDlOpenHandle = dlopen (lLibraryPath.c_str(), RTLD_LAZY); if (!mDlOpenHandle) { cerr << "Could not open library: " << endl << dlerror() << endl; //throw VEConfigurationError(dlerror()); mIsSane=0; }else{ mGetName = (typeof(mGetName))dlsym(mDlOpenHandle, lStringGetClassName.c_str()); if ((lError = dlerror()) != NULL) { cerr << "Could not link to symbol " << lStringGetClassName << ":" << lError << endl; }else{ mName=(*mGetName)(); mMakeAccessor=(typeof(mMakeAccessor))dlsym(mDlOpenHandle, lStringMakeAccessor.c_str()); if ((lError = dlerror()) != NULL) { cerr << "Could not link to symbol " << lStringMakeAccessor << ":" << lError << endl; }else{ mIsSane=1; } } } } CAFPlugin::CAFPlugin(CAFPlugin& inPlugin): mGetName(inPlugin.mGetName), mMakeAccessor(inPlugin.mMakeAccessor), mName(inPlugin.mName){ } CAFPlugin::~CAFPlugin(){ if(mDlOpenHandle){ dlclose(mDlOpenHandle); } } bool CAFPlugin::isSane()const{ return mIsSane; } void CAFPlugin::registerFactory(CAccessorFactoryContainer& outContainer){ outContainer.registerFactory(this, getName()); }; gift-0.1.14/libMRML/cc/CIDRelevanceLevelPair.cc0000644000175200001440000001024110220502727015622 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CIDRelevanceLevelPair * **************************************** * * modification history: * * HM 090399 created the documentation * WM 1198 created file * * @Author: Wolfgang Müller **************************************** * * compiler defines used: * * ****************************************/ #include #include "libMRML/include/CIDRelevanceLevelPair.h" /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ /* Constructor with no inputs */ CIDRelevanceLevelPair::CIDRelevanceLevelPair(): mID(0), mRelevanceLevel(0) {}; /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ /* constructor with input */ CIDRelevanceLevelPair::CIDRelevanceLevelPair(const TID inID, double inRelevanceLevel): mID(inID), mRelevanceLevel(inRelevanceLevel){ }; /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ /* constructur with input */ CIDRelevanceLevelPair::CIDRelevanceLevelPair(const CIDRelevanceLevelPair& inElement): mID(inElement.mID), mRelevanceLevel(inElement.mRelevanceLevel) { }; /*************************************** * * getURL * **************************************** * * modification history * * * ****************************************/ /* returns the URL */ TID CIDRelevanceLevelPair::getID()const{ return mID; }; /*************************************** * * getRelevanceLevel * **************************************** * * modification history * * * ****************************************/ /* returns only the relevance level */ double CIDRelevanceLevelPair::getRelevanceLevel()const{ return mRelevanceLevel; }; /*************************************** * * setRelevanceLevel * **************************************** * * modification history * * * ****************************************/ /* sets the relevance level directly */ void CIDRelevanceLevelPair::setRelevanceLevel(const double inRelevanceLevel){ mRelevanceLevel= inRelevanceLevel; }; /*************************************** * * adjustRelevanceLevel - adds another relevance level to the current * **************************************** * * modification history * * * ****************************************/ void CIDRelevanceLevelPair::adjustRelevanceLevel(const double inRelevanceLevel){ mRelevanceLevel+= inRelevanceLevel; }; /*************************************** * * divideRelevanceLevelBy * **************************************** * * modification history * * * ****************************************/ void CIDRelevanceLevelPair::divideRelevanceLevelBy(const double inDivisor) { mRelevanceLevel/= inDivisor; }; /*************************************** * * < * **************************************** * * modification history * * * ****************************************/ bool operator<(const CIDRelevanceLevelPair& l,const CIDRelevanceLevelPair& t) { return l.getRelevanceLevel()addAttribute(mrml_const::message,inErrorMessage); return lReturnValue; } CXMLElement* createErrorMessage(const GIFTException& inException){ return createErrorMessage(inException.getMessage()); } CXMLElement* createErrorMessage(const GIFTException* inException){ return createErrorMessage(inException->getMessage()); } gift-0.1.14/libMRML/cc/CAlgorithmCollection.cc0000644000175200001440000002461710220502727015653 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/mrml_const.h" // for parsing #include "libMRML/include/my_throw.h" #include "libMRML/include/my_assert.h" #include "libMRML/include/GIFTExceptions.h" #include "libMRML/include/CAlgorithmCollection.h" #include // for reading the xml #include "libMRML/include/CXMLHelper.h" #include #include "libGIFTQuInvertedFile/include/CQInvertedFile.h" #ifdef __GIFT_BAYESIAN__ #include "CIFQuickAndDirtyHunter.h" #endif #include "libMRML/include/CQParallel.h" void startAlgorithmCollectionElement(void *userData, const char *inElementName, const char **inAttributes){ bool lSuccessful=true; //the calling CSessionManager CAlgorithmCollection* lCaller((CAlgorithmCollection*)userData); #ifdef CAlC_DEBUG_PRINTOUT cout << "<" << inElementName << " WhileReading=\"true\" " << flush; #endif CAttributeList lAttributes(inAttributes); // if(string(inElementName)== // string(mrml_const::cui_property_list)){ // lCaller->startPropertySheetSubtree(); // } // //if we have started a property sheet list // //everything goes there // if(lCaller->getPropertySheetSubtree()){ // if((string(inElementName)== // string(mrml_const::cui_property_item)) // || // (string(inElementName)== // string(mrml_const::property_sheet))){ // lCaller->getPropertySheetSubtree() // ->addChild(inElementName, // inAttributes); // } // } if(string(inElementName) == string(mrml_const::algorithm) || (lCaller->getAlgorithmInConstruction()) ){ { if(!lCaller->getAlgorithmInConstruction()){ lCaller->startAlgorithmConstruction(new CAlgorithm(inElementName, inAttributes)); }else{ lCaller->getAlgorithmInConstruction()->addChild(inElementName, inAttributes); } } } #ifdef CAlC_DEBUG_PRINTOUT cout << " >" << endl << flush; #endif } void endAlgorithmCollectionElement(void *userData, const char *inElementName){ CAlgorithmCollection* lCaller((CAlgorithmCollection*)userData); if((string(inElementName) == string(mrml_const::algorithm)) ||lCaller->getAlgorithmInConstruction()){ { my_assert(lCaller->getAlgorithmInConstruction(), "Algorithm in construction not found"); lCaller->getAlgorithmInConstruction()->moveUp(); if(lCaller->getAlgorithmInConstruction()->isSubtreeFinished()){ lCaller->addAlgorithm(lCaller->getAlgorithmInConstruction()); lCaller->startAlgorithmConstruction((CAlgorithm*)0); } } } //if we have started a property sheet list //everything goes there // if(lCaller->getPropertySheetSubtree()){ // if((string(inElementName)== // string(mrml_const::cui_property_item)) // || // (string(inElementName)== // string(mrml_const::property_sheet))){ // lCaller->getPropertySheetSubtree() // ->moveUp(); // } // } // if(string(inElementName)== // string(mrml_const::cui_property_list)){ // lCaller->endPropertySheetSubtree(); // } #ifdef CAlC_DEBUG_PRINTOUT cout << "" << endl; #endif } CAlgorithmCollection::CAlgorithmCollection(string inConfigFileName): mAlgorithmInConstruction(0) { ifstream lConfigFile(inConfigFileName.c_str()); if(lConfigFile){ lConfigFile.seekg(0,ios::end); int lSize=lConfigFile.tellg(); char lConfigFileContent[lSize+1]; lConfigFile.seekg(0,ios::beg); lConfigFile.read(lConfigFileContent, lSize); lConfigFileContent[lSize]=0; cout << "gift: CAlgorithmCollection: The following is the config file " << endl << "located at \"" << inConfigFileName << "\" as read by this program: " << endl; cout << lConfigFileContent << endl << "This config file content will now be parsed by an XML parser " << endl << "If error messages occur, these are related to the content shown above." << endl; XML_Parser lParser = XML_ParserCreate(NULL);//default encoding XML_SetUserData(lParser, this); XML_SetElementHandler(lParser, startAlgorithmCollectionElement, endAlgorithmCollectionElement); int lDone=true; do { if (!XML_Parse(lParser, lConfigFileContent, lSize, lDone)) { cerr << "CAlgorithmCollection.cc: XML ERROR: " << XML_ErrorString(XML_GetErrorCode(lParser)) << " at line " << XML_GetCurrentLineNumber(lParser) << endl << "file was:[" << endl << lConfigFileContent << "]" << endl; my_throw(GIFTException("XML Error")); } } while (!lDone); XML_ParserFree(lParser); cout << "gift: CAlgorithmCollection: The config file has " << endl << "been parsed successfully by CAlgorithmCollection" << endl << "maybe other parts of the program will also parse" << endl << "the same config file. " << endl; }else{ //here I get an internal compiler error with egcs my_throw(VENotFound(inConfigFileName.c_str())); cerr << "gift: this line should not be reached" << endl; cerr << "gift: I could not find config file: " << inConfigFileName << endl; exit(1); } } CAlgorithmCollection::~CAlgorithmCollection(){ for(CContent::iterator i=mContent.begin(); i!=mContent.end(); i++){ delete i->second; } }; /** for being able to read all the content */ CAlgorithmCollection ::CContent::const_iterator CAlgorithmCollection::begin()const{ return mContent.begin(); } /** for being able to read all the content */ CAlgorithmCollection ::CContent::const_iterator CAlgorithmCollection::end()const{ return mContent.end(); } ///adding an algorithm with a given ID/name and a given base void CAlgorithmCollection::addAlgorithm(CAlgorithm* inAlgorithm){ inAlgorithm->check(); mContent.insert(make_pair(inAlgorithm->getType().second, inAlgorithm)); }; bool CAlgorithmCollection::containsAlgorithmByType(const string& inType)const{ CContent::const_iterator lFound(mContent.find(inType)); return(lFound!=mContent.end()); }; CAlgorithm& CAlgorithmCollection::getAlgorithmByType(const string& inType)const{ CContent::const_iterator lFound(mContent.find(inType)); if(lFound!=mContent.end()){ return *lFound->second; }else{ // return a default algorithm, if none was found. cout << "returning a default algorithm:" << mContent.begin()->first << ": " << mContent.begin()->second << endl; if(mContent.find("adefault")!=mContent.end()){ return *mContent.find("adefault")->second; } assert(mContent.size()); return *mContent.begin()->second; } } CAlgorithm* CAlgorithmCollection::makeAlgorithmByType(const string& inType)const{ CContent::const_iterator lFound(mContent.find(inType)); if(lFound!=mContent.end()){ return lFound->second->clone(); }else{ return 0; } }; CAlgorithm* CAlgorithmCollection::getDefaultAlgorithm()const{ //at present, take simply the first element //it might be an xml tag in the future cout << "We have " << mContent.size() << " algorithms in the algorithm collection." << endl; CContent::const_iterator lFound=mContent.find(string("adefault")); cout << __FILE__ << ":" << __LINE__ << ":default algorithm found" << endl; my_assert(lFound!=mContent.end(), "There SHOULD be a 'adefault' algorithm in the config file!"); return lFound->second; }; CAlgorithm* CAlgorithmCollection::makeDefaultAlgorithm()const{ //at present, take simply the first element //it might be an xml tag in the future CAlgorithm* lDefaultAlgorithm(getDefaultAlgorithm()); if(lDefaultAlgorithm){ cout << __FILE__ << ":" << __LINE__ << ":going to check default algorithm" << endl; lDefaultAlgorithm->check(); } cout << __FILE__ << ":" << __LINE__ << ":checked, now copying " << endl; CAlgorithm* lReturnValue(new CAlgorithm(*lDefaultAlgorithm)); cout << __FILE__ << ":" << __LINE__ << ":copied, now checking again " << endl; lReturnValue->check(); return lReturnValue; }; string CAlgorithmCollection::toXML(bool inIsPrivate)const{ CXMLHelper lHelper; lHelper.setName(mrml_const::algorithm_list); string lReturnValue=lHelper.toString()+"\n"; for(CContent::const_iterator i=mContent.begin(); i!=mContent.end(); i++){ i->second->toXML(lReturnValue); } lHelper.setEnd(); lReturnValue+=lHelper.toString()+"\n"; return lReturnValue; } CXMLElement* CAlgorithmCollection::toXMLElement()const{ CXMLElement* lReturnValue(new CXMLElement(mrml_const::algorithm_list,0)); for(CContent::const_iterator i=mContent.begin(); i!=end(); i++){ CXMLElement* lNewChild=new CXMLElement(*i->second); lReturnValue->addChild(lNewChild); lReturnValue->moveUp(); } return lReturnValue; } CXMLElement* CAlgorithmCollection::getAlgorithmList(const CXMLElement& inGetAlgorithms)const{ return 0; }; //-------------------------------------------------- CAlgorithm* CAlgorithmCollection::getAlgorithmInConstruction(){ return mAlgorithmInConstruction; } //-------------------------------------------------- void CAlgorithmCollection::startAlgorithmConstruction(CAlgorithm* inAlgorithm){ mAlgorithmInConstruction=inAlgorithm; } //-------------------------------------------------- CQuery* CAlgorithmCollection::makeQuery(const string & inBaseType, CAccessorAdminCollection & inAccessorAdminCollection, CAlgorithm & inAlgorithm, CStaticQueryFactory & inFactory){ assert(!"this should not be called"); return inFactory.makeQuery(inBaseType, inAccessorAdminCollection, inAlgorithm); } gift-0.1.14/libMRML/cc/CQueryParadigmMatcher.cc0000644000175200001440000000535410220502727015764 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/CQueryParadigmMatcher.h" #include "libMRML/include/mrml_const.h" // mrml string constants bool CQueryParadigmMatcher::matches(const CXMLElement& inQuery,const CXMLElement& inResult)const{ const CXMLElement* lQuery(&inQuery); const CXMLElement* lResult(&inResult); //as the relation we are describing is symmetric, //we permit ourselves to swap things in a way, that //processing time is minimal if(lQuery->getNumberOfAttributes() > lResult->getNumberOfAttributes()){ swap(lQuery,lResult); } list >* lQueryAttributes(lQuery->createNamedValueList()); bool lMatches(true); for(list >::const_iterator i=lQueryAttributes->begin(); lMatches && (i!=lQueryAttributes->end()); i++){ // get the query attribute in the result element pair lAttribute(lResult->stringReadAttribute(i->first)); // they match, unless // the query attribute exsists in the result element // and the attribute values differ between query and result if(lAttribute.first && (lAttribute.second != i->second)){ lMatches=false; } } delete lQueryAttributes; return lMatches; } bool CQueryParadigmMatcher::operator()(const CXMLElement& inQuery,const CXMLElement& inResult)const{ // nothing matches everything if(!(&inQuery) || !(&inResult)){ return true; } if((inQuery.getName()==mrml_const::query_paradigm_list) && (inQuery.getName()==mrml_const::query_paradigm_list)){ for(list::const_iterator i=inQuery.child_list_begin(); i!=inQuery.child_list_end(); i++){ for(list::const_iterator j=inResult.child_list_begin(); j!=inResult.child_list_end(); j++){ if(matches(**i,**j)){ return true; } } }; } return false; }; gift-0.1.14/libMRML/cc/CRPipe.cc0000644000175200001440000000051710220502727012721 00000000000000#include "libMRML/include/CReaper.h" #include "libMRML/include/CRPipe.h" #include using namespace std; CRPipe::CRPipe(int inPID, int inPipeToClose) :CReaper(inPID), mPipeToClose(inPipeToClose){ } void CRPipe::reap(){ //cout << "ing..." << flush; close(mPipeToClose); //cout << "...finished" << endl; } gift-0.1.14/libMRML/cc/CAccessorAdmin.cc0000644000175200001440000001237710220502727014424 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/mrml_const.h" // for parsing #include "libMRML/include/CXMLElement.h" // mCollectionElement #include "libMRML/include/CXMLHelper.h" #include "libMRML/include/CMutex.h" extern CMutex* gMutex; #include #include // printing process ID for debugging #include "libMRML/include/CAccessorAdmin.h" /// void CAccessorAdmin::setCollectionElement(CXMLElement* inElement){ mCollectionElement=inElement; }; /// const CXMLElement* CAccessorAdmin::getCollectionElement()const{ return mCollectionElement; }; /// CAccessorAdmin::CAccessorAdmin(CAccessorFactoryContainer& inFactoryContainer): mFactoryContainer(inFactoryContainer), mContent() { }; /// CAccessor* CAccessorAdmin::openAccessor(string inName){ CContent::const_iterator lFound=mContent.find(inName); if(lFound==mContent.end()){ mContent[inName].mOpenCloseCounter=0; mContent[inName].mAccessor=0; } { if(!(mContent[inName].mOpenCloseCounter)){ mContent[inName].mAccessor=mFactoryContainer.openAccessor(inName, *mCollectionElement); mContent[inName].mOpenCloseCounter++; cerr << endl << "CAccessorAdmin::openAccessor:" << inName << endl << " NEWLY GENERATED." << endl; }else{ mContent[inName].mOpenCloseCounter++; cerr << endl << "CAccessorAdmin::openAccessor:" << inName << endl << " REUSED. (" << mContent[inName].mOpenCloseCounter++ << " times in use)"<< endl; } return mContent[inName].mAccessor; } assert(!"Execution should never arive here"); }; /// void CAccessorAdmin::closeAccessor(string inName){ if(gMutex){ gMutex->lock(); } CContent::iterator lFound=mContent.find(inName); cout << __FILE__ << ":" << __LINE__ << "PID:" << getpid() << "OpenCloseCounter[" << inName << "]" << (mContent[inName].mOpenCloseCounter) << endl; //this is a hack. See the changelog for thisx #ifdef __GIFT_FREE_UNUSED_ACCESSORS if((lFound!=mContent.end()) && !(--(mContent[inName].mOpenCloseCounter))){ delete lFound->second.mAccessor; mContent.erase(lFound); mFactoryContainer.closeAccessor(inName); } #endif if(gMutex){ gMutex->unlock(); } }; /// string CAccessorAdmin::toXML(bool isPrivate)const{ CXMLHelper lHelper; lHelper.setName(mrml_const::collection); lHelper.setEmpty(); lHelper.addAttribute(mrml_const::collection_id,mCollectionElement->stringReadAttribute(mrml_const::collection_id).second); lHelper.addAttribute(mrml_const::collection_name,mCollectionElement->stringReadAttribute(mrml_const::collection_name).second); lHelper.addAttribute(mrml_const::cui_algorithm_id_list_id,getAlgorithmIDListID()); string lReturnValue=lHelper.toString(); return lReturnValue; } /// CXMLElement* CAccessorAdmin::toXMLElement()const{ CXMLElement* lReturnValue(0); if(mCollectionElement){ lReturnValue=new CXMLElement(*mCollectionElement); } return lReturnValue; } string CAccessorAdmin::getAlgorithmIDListID()const{ return mCollectionElement->stringReadAttribute(mrml_const::cui_algorithm_id_list_id).second; } string CAccessorAdmin::getName()const{ return mCollectionElement->stringReadAttribute(mrml_const::collection_name).second; } string CAccessorAdmin::getID()const{ return mCollectionElement->stringReadAttribute(mrml_const::collection_id).second; } const CXMLElement* CAccessorAdmin::getQueryParadigmList()const{ for(list::const_iterator i(mCollectionElement->child_list_begin()); i!=mCollectionElement->child_list_end(); i++){ if((*i)->getName()=="query-paradigm-list"){ return *i; } } return 0; }; /** destructor */ CAccessorAdmin::~CAccessorAdmin(){ for(CContent::const_iterator i=mContent.begin(); i!=mContent.end(); i++){ printf("%s:%d:%s,%p\n",__FILE__,__LINE__,"DELETING",i->second.mAccessor); delete i->second.mAccessor; } } /** */ list* CAccessorAdmin::getAvailableIndices()const{ list* lReturnValue=new list(); lReturnValue->push_back("inverted_file"); return lReturnValue; }; /// bool CSortByName_pAP::operator()(const CAccessorAdmin* l, const CAccessorAdmin* t){ return l->mCollectionElement->stringReadAttribute(mrml_const::collection_name).second < t->mCollectionElement->stringReadAttribute(mrml_const::collection_name).second; } gift-0.1.14/libMRML/cc/CAccessorFactoryContainer.cc0000644000175200001440000001524310220502727016641 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/my_throw.h" #include "libMRML/include/GIFTExceptions.h" #include "libMRML/include/CAccessor.h" #include "libMRML/include/CAccessorFactory.h" #include "libMRML/include/CAccessorFactoryContainer.h" #include // reading a directory #include // reading a directory // classes to include into the CAccessorFactoryContainer #include "libGIFTAcInvertedFile/include/CAFInvertedFile.h" #include "libGIFTAcInvertedFile/include/CAFIFMySQL.h" #include "libGIFTAcPerl/include/CAFPerl.h" #include "libGIFTAcURL2FTS/include/CAFURL2FTS.h" #include "libGIFTAcDistanceMatrix/include/CAFDistanceMatrix.h" #include "libGIFTAcHierarchy/include/CAFHierarchy.h" #include "libMRML/include/CXMLElement.h" #include "libMRML/include/CAFPlugin.h" #include #include #include #include "libMRML/include/getLibNameFromFileName.h" CAccessorFactoryContainer::CAccessorFactoryContainer(): mConfigurationData(0){ //fill the accessor factory container in a sensible way // (new CAFInvertedFile())->registerFactory(*this); // #ifdef __GIFT_BAYESIAN__ // (new CAFDistanceMatrix())->registerFactory(*this); // #endif // #ifdef __GIFT_WITH_MYSQL__ // (new CAFIFMySQL())->registerFactory(*this); // #endif #ifdef __GIFT_WITH_PERL__ (new CAFPerl())->registerFactory(*this); #endif //(new CAFURL2FTS())->registerFactory(*this); //(new CAFHierarchy())->registerFactory(*this); } /** configure this */ void CAccessorFactoryContainer::configure(CXMLElement* inConfigurationData){ mConfigurationData=inConfigurationData; #ifdef LINK_DYNAMICALLY cout << "--" << endl << "Configuring the CAccessorFactoryContainer:" << endl << "I am going to scan the following directorys for plugins "<< endl; set lSeenLibs; if(inConfigurationData){ for(list::const_iterator i=inConfigurationData->child_list_begin(); i!=inConfigurationData->child_list_end(); i++ ){ if((*i)->getName()=="directory"){ cout << (*i)->stringReadAttribute("name").second << endl; { pair lDirectoryName((*i)->stringReadAttribute("name")); DIR* lDirectory(0); if(lDirectoryName.first){ lDirectory=opendir(lDirectoryName.second.c_str()); } if(!lDirectory){ cerr << "FATAL ERROR, cannot find " << flush; if(lDirectoryName.first){ cerr << lDirectoryName.second ; } cerr << endl; exit(20); }else{ dirent* lDirectoryEntry; while(lDirectoryEntry=readdir(lDirectory)){ string lFileName(lDirectoryEntry->d_name); pair lIsLibAndLibName(getLibNameFromFileName("libGIFTAc",lFileName)); bool lIsLib(lIsLibAndLibName.first); string lLibName(lIsLibAndLibName.second); if(lIsLib && (lSeenLibs.find(lLibName)==lSeenLibs.end())){ CAFPlugin* lPlugin(new CAFPlugin(lDirectoryName.second.c_str(), lFileName, lLibName)); if(lPlugin->isSane()){ cout << lFileName << " contains a sane GIFT Accessor plugin: " << lPlugin->getName() << endl; registerFactory(lPlugin,string(lPlugin->getName())); lSeenLibs.insert(lLibName); }else{ cout << lFileName << " tested. Test FAILED. " << endl; delete lPlugin; } } else{ if(!lIsLib){ cout << "Not testing file:" << lFileName << " (File name does not match plugin name) " << endl; }else{ cout << "Lib:" << lLibName << ", to be linked from " << lFileName << " already registered! " << endl; } } } } } } } } cout << "FINISHED configuring the CAccessorFactoryContainer." << endl; #endif }; /** The destructor destroys the CContentElements properly */ CAccessorFactoryContainer::~CAccessorFactoryContainer(){ for(CContent::iterator i=mContent.begin(); i!=mContent.end(); i++){ delete i->second.mFactory; } }; /** adding a factory to the content */ void CAccessorFactoryContainer::registerFactory(CAccessorFactory* inFactory, string inName){ CContent::const_iterator lFound=mContent.find(inName); if(lFound!=mContent.end()){ string lMessage("Accessor "); lMessage+=inName; lMessage+=" tried to register twice!"; my_throw(VEProgrammingMistake(lMessage.c_str())); }else{ mContent[inName].mFactory=inFactory; mContent[inName].mOpenCloseCounter=0; } }; bool CAccessorFactoryContainer::isPresentFactory(string inName)const{ return(mContent.find(inName)!=mContent.end()); } /** opening an accessor: if the accessor is already constructed, then simply give the pointer, otherwhise construct a new one using the appropriate factory */ CAccessor* CAccessorFactoryContainer::openAccessor(string inName, const CXMLElement& inCollectionElement){ CContent::const_iterator lFound=mContent.find(inName); if(lFound==mContent.end()){ cerr << endl << "CAccessorFactoryContainer::openAccessor:" << inName << endl << " NOT FOUND." << endl; return 0; }else{ if(!(mContent[inName].mOpenCloseCounter)){ mContent[inName].mOpenCloseCounter++; cerr << endl << "CAccessorFactoryContainer::openAccessor:" << inName << endl << " NEWLY GENERATED." << endl; }else{ cerr << endl << "CAccessorFactoryContainer::openAccessor:" << inName << endl << " REUSED." << endl; } return mContent[inName].mFactory->makeAccessor(inCollectionElement); } }; /** closing an accessor. If there have been as many openAccessor as closeAccessor calls, the accessor will be delete-d. */ void CAccessorFactoryContainer::closeAccessor(string inName){ CContent::iterator lFound=mContent.find(inName); if((lFound!=mContent.end()) && !(--(lFound->second.mOpenCloseCounter))){ lFound->second.mFactory->closeAccessor(); } }; gift-0.1.14/libMRML/cc/CRelevanceLevelList.cc0000644000175200001440000000443310220502727015433 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CRelevanceLevelList * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #include "libMRML/include/CRelevanceLevelList.h" /*************************************** * * writeBinary * **************************************** * * modification history * * * ****************************************/ // void CRelevanceLevelList::writeBinary(ostream& outStream)const{ // for(const_iterator i=begin(); // i!=end(); // i++){ // (*i).writeBinary(outStream); // } // }; /*************************************** * * writeBinary * **************************************** * * modification history * * * ****************************************/ CRelevanceLevelList::CRelevanceLevelList(const list& inList){ for(list::const_iterator i=inList.begin(); i!=inList.end(); i++){ push_back(CRelevanceLevel(*i,0)); } }; CRelevanceLevelList::CRelevanceLevelList(){ }; string CRelevanceLevelList::toXML()const{ string lReturnValue ="\n"; for(const_iterator i=begin(); i!=end(); i++){ lReturnValue+=i->toXML(); } lReturnValue+="\n"; return lReturnValue; } gift-0.1.14/libMRML/cc/CAccessorAdminCollection.cc0000644000175200001440000002371110220502727016432 00000000000000// -*- mode: c++ -*- #line 3 "CAccessorAdminCollection.pre-cc" /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/mrml_const.h" #include "libMRML/include/my_throw.h" #include "libMRML/include/my_assert.h" #include #include "libMRML/include/GIFTExceptions.h" #include "libMRML/include/CAccessorAdminCollection.h" #include "libMRML/include/CAttributeList.h" //#include "expat/xmlparse/xmlparse.h" #include #include #include "libMRML/include/CXMLElement.h" // for adding collections #include "libMRML/include/directory.h" void startAccessorAdminCollectionElement(void *userData, const char *inElementName, const char **inAttributes) { bool lSuccessful=true; //the calling CSessionManager CAccessorAdminCollection* lCaller((CAccessorAdminCollection*)userData); #ifdef CAC_DEBUG_PRINTOUT cout << "<" << inElementName << " WhileReading=\"true\" _" << flush; #endif CAttributeList lAttributes(inAttributes); #ifdef CAC_DEBUG_PRINTOUT cout << "--" << flush; cout << lAttributes.size() << "." << flush; #endif if(string(inElementName) == string(mrml_const::collection) || (lCaller->getCollectionInConstruction()) ){ { if(!lCaller->getCollectionInConstruction()){ lCaller->startCollectionConstruction(new CXMLElement(inElementName, inAttributes)); }else{ lCaller->getCollectionInConstruction()->addChild(inElementName, inAttributes); } } } #ifdef CAC_DEBUG_PRINTOUT cout << " >" << endl << flush; #endif } void endAccessorAdminCollectionElement(void *userData, const char *inElementName){ CAccessorAdminCollection* lCaller((CAccessorAdminCollection*)userData); if((string(inElementName) == string(mrml_const::collection)) ||lCaller->getCollectionInConstruction()){ { my_assert(lCaller->getCollectionInConstruction(), "Collection in construction not found"); lCaller->getCollectionInConstruction()->moveUp(); if(lCaller->getCollectionInConstruction()->isSubtreeFinished()){ lCaller->addCollection(lCaller->getCollectionInConstruction()); lCaller->startCollectionConstruction((CXMLElement*)0); } } } #ifdef CAC_DEBUG_PRINTOUT cout << "" << endl; #endif } CAccessorAdminCollection::const_iterator CAccessorAdminCollection::begin()const{ return mIDToProxy.begin(); }; CAccessorAdminCollection::const_iterator CAccessorAdminCollection::end()const{ return mIDToProxy.end(); }; CAccessorAdminCollection::CAccessorAdminCollection(string inFileName): mCollectionInConstruction(0), mFactory(new CAccessorFactoryContainer()){ { cout << "-----" << endl << "Configuring CAccessorAdminCollection" << endl; // an XMLElement specifying what directories to scan // presently this is just one directory, // the libdir CXMLElement* lFilesToScan(new CXMLElement("directories-to-scan",0)); assert(lFilesToScan); cout << "." << flush; CXMLElement* lTemp(new CXMLElement("directory",0)); assert(lTemp); cout << "." << __LIBDIR__ << "." << flush; lTemp->addAttribute("name",__LIBDIR__); cout << "." << flush; lFilesToScan->addChild(lTemp); cout << "." << flush; lFilesToScan->moveUp(); cout << "." << flush; // configure the factory i.e. make it scan directories mFactory->configure(lFilesToScan); cout << "." << flush; } ifstream lConfigFile(inFileName.c_str()); if(lConfigFile){ lConfigFile.seekg(0,ios::end); int lSize=lConfigFile.tellg(); char lConfigFileContent[lSize+1]; lConfigFile.seekg(0,ios::beg); lConfigFile.read(lConfigFileContent, lSize); lConfigFileContent[lSize]=0; cout << "--" << "gift::CAccessorAdminCollection : I read the config file " << endl << inFileName << endl #ifdef CAC_DEBUG_PRINTOUT << "This file contains the following string: " << endl << lConfigFileContent << endl #endif << "Now we will parse the contents of this file using an XML parser " << endl; XML_Parser lParser = XML_ParserCreate(NULL);//default encoding XML_SetUserData(lParser, this); XML_SetElementHandler(lParser, startAccessorAdminCollectionElement, endAccessorAdminCollectionElement); int lDone=true; do { if (!XML_Parse(lParser, lConfigFileContent, lSize, lDone)) { cerr << "CAccessorAdminCollection: XML ERROR: " << XML_ErrorString(XML_GetErrorCode(lParser)) << " at line " << XML_GetCurrentLineNumber(lParser) << endl << "file was:[" << endl << lConfigFileContent << "]" << endl; exit(1);// this happens only in the config file } } while (!lDone); cout << "The config file has been parsed " << endl << "successfully maybe other parts" << endl << "of the program will also parse" << endl << "the same config file. " << endl << "FINISHED configuring CAccessorAdminCollection." << endl; XML_ParserFree(lParser); }else{ my_throw(string(string("could not open config file_")+inFileName+string("_")).c_str()); } }; /// void CAccessorAdminCollection::addCollection(CXMLElement* inCollectionElement){ pair lID=inCollectionElement->stringReadAttribute(mrml_const::collection_id); if(!lID.first){ cout << "throwing: " << VEProgrammingMistake("addAccessor") << endl << flush; my_throw(VEProgrammingMistake("addAccessor")); } if(mIDToProxy.find(lID.second) != mIDToProxy.end()){ cout << "The ID I am looking for is:" << lID.second << ", and I did not find it" << endl; cout << "throwing: " << VEDoubleInsert("addAccessor") << endl << flush; my_throw(VEDoubleInsert("addAccessor")); }else{ mIDToProxy[lID.second] = (mCurrentProxy = new CAccessorAdmin(*mFactory)); mIDToProxy[lID.second]->setCollectionElement(inCollectionElement); cout << "CAccessorAdminCollection: Adding collection " << inCollectionElement->stringReadAttribute("collection-name").second << endl << "under the ID " << lID.second << endl; } }; /// CAccessorAdmin& CAccessorAdminCollection::getCurrentProxy(){ return *mCurrentProxy; }; /// CAccessorAdmin& CAccessorAdminCollection::getProxy(const string& inID){ if(mIDToProxy.find(inID)!=mIDToProxy.end()) return *mIDToProxy[inID]; else{ cerr << "The ID I am looking for is:" << inID << ", and I did not find it" << endl; my_throw(VENotFound(string("I was looking for a proxy with the ID: mIDToProxy _"+inID+"_ . This probably means that the collection with the ID " + inID + " is not described in your config file.").c_str())); // my_throw(VENotFound(string("mIDToProxy _"+inID+"_").c_str())); // // quick fix by WM against people nuking our server... :-( // // BE WARNED: this can fail, if not every query // processor works with every collection. // this code will not be reached. return *mIDToProxy[this->getDefaultAccessorID()]; } }; //get some default accessor: simply take the first string CAccessorAdminCollection::getDefaultAccessorID()const{ return mIDToProxy.begin()->first; }; //turn this into xml (simplissime) CXMLElement* CAccessorAdminCollection::toXMLElement()const{ cout << "x" << flush << toXML(0) << endl; CXMLElement* lReturnValue(new CXMLElement(mrml_const::collection_list,0)); for(CContent::const_iterator i=mIDToProxy.begin(); i!=mIDToProxy.end(); i++){ CXMLElement* lNewChild(i->second->toXMLElement()); if(lNewChild){ lReturnValue->addChild(lNewChild); lReturnValue->moveUp(); } } return lReturnValue; }; //turn this into xml (simplissime) string CAccessorAdminCollection::toXML(bool isPrivate)const{ string lRetVal=string("<")+mrml_const::collection_list+">\n"; for(CContent::const_iterator i=mIDToProxy.begin(); i!=mIDToProxy.end(); i++){ lRetVal+=i->second->toXML(isPrivate); } lRetVal+=string("\n"; return lRetVal; }; CXMLElement* CAccessorAdminCollection::getCollectionInConstruction(){ return mCollectionInConstruction; } void CAccessorAdminCollection::startCollectionConstruction(CXMLElement* inCollection){ mCollectionInConstruction=inCollection; } //destroying the content of this CAccessorAdminCollection::CContent::~CContent(){ for(const_iterator i=begin(); i!=end(); i++){ delete i->second; } }; /** get a collection configuration element by its ID */ const CXMLElement* CAccessorAdminCollection::getCollectionElement(string inID)const{ CContent::const_iterator lFound(mIDToProxy.find(inID)); if(lFound!=mIDToProxy.end()){ return lFound->second->getCollectionElement(); } return 0; } /** get a query paradigm element by the ID of its collection */ const CXMLElement* CAccessorAdminCollection::getQueryParadimList(string inID)const{ CContent::const_iterator lFound(mIDToProxy.find(inID)); if(lFound!=mIDToProxy.end()){ return lFound->second->getQueryParadigmList(); } return 0; } gift-0.1.14/libMRML/cc/CRelevanceLevel.cc0000644000175200001440000001304010220502727014571 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CRelevanceLevel * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #include #include "libMRML/include/CRelevanceLevel.h" /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ /* Constructor with no inputs */ CRelevanceLevel::CRelevanceLevel(): mURL("No URL!"), mRelevanceLevel(0) {}; /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ /* constructor with input */ CRelevanceLevel::CRelevanceLevel(const string& inURL, double inRelevanceLevel): mURL(inURL), mRelevanceLevel(inRelevanceLevel){ }; /*************************************** * * Constructor * **************************************** * * modification history * * * ****************************************/ /* constructur with input */ CRelevanceLevel::CRelevanceLevel(const CRelevanceLevel& inElement): mURL(inElement.mURL), mRelevanceLevel(inElement.mRelevanceLevel) { }; /*************************************** * * input * **************************************** * * modification history * * * ****************************************/ /* reads URL and relevance level from a file */ bool CRelevanceLevel::input(istream& inStream){ inStream >> mURL >> mRelevanceLevel; }; /*************************************** * * output * **************************************** * * modification history * * * ****************************************/ /* writes URL and relevance level to a file */ bool CRelevanceLevel::output(ostream& outStream)const{ outStream << mURL << " " << mRelevanceLevel << endl; }; /*************************************** * * outputHTML * **************************************** * * modification history * * * ****************************************/ /* writes the output data as an html file */ bool CRelevanceLevel::outputHTML(ostream& outStream)const{ outStream << "" << endl << "

" << endl << mRelevanceLevel << endl << "
" << endl; }; /*************************************** * * getURL * **************************************** * * modification history * * * ****************************************/ /* returns the URL */ string CRelevanceLevel::getURL()const{ return mURL; }; /*************************************** * * getRelevanceLevel * **************************************** * * modification history * * * ****************************************/ /* returns only the relevance level */ double CRelevanceLevel::getRelevanceLevel()const{ return mRelevanceLevel; }; /*************************************** * * setRelevanceLevel * **************************************** * * modification history * * * ****************************************/ /* sets the relevance level directly */ void CRelevanceLevel::setRelevanceLevel(const double inRelevanceLevel){ mRelevanceLevel= inRelevanceLevel; }; /*************************************** * * adjustRelevanceLevel - adds another relevance level to the current * **************************************** * * modification history * * * ****************************************/ void CRelevanceLevel::adjustRelevanceLevel(const double inRelevanceLevel){ mRelevanceLevel+= inRelevanceLevel; }; /*************************************** * * divideRelevanceLevelBy * **************************************** * * modification history * * * ****************************************/ void CRelevanceLevel::divideRelevanceLevelBy(const double inDivisor) { mRelevanceLevel/= inDivisor; }; string CRelevanceLevel::toXML()const{ char lBuffer[20]; sprintf(lBuffer,"%lf",mRelevanceLevel); return string(string("\n")); }; /*************************************** * * < * **************************************** * * modification history * * * ****************************************/ bool operator<(const CRelevanceLevel& l,const CRelevanceLevel& t) { return l.getRelevanceLevel() #include /** */ extern CMutex* gMutex; CXMLElement* CTimeStampGenerator::generateTimeStamp()const{ gMutex->lock(); time_t lNow(time(0)); CXMLElement* lReturnValue=new CXMLElement(mrml_const::cui_time_stamp,0); if(lNow>0){ string lNowASCII=string(ctime(&lNow)); lReturnValue->addAttribute(mrml_const::calendar_time, lNowASCII); } gMutex->unlock(); return lReturnValue; } gift-0.1.14/libMRML/cc/CI18nTranslator.cc0000644000175200001440000001274710220502727014503 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/CI18nTranslator.h" #include "libMRML/include/CXEVI18nTranslator.h" #include #include /** This class offers runtime translation of strings. In contrast to GNU gettext we can chose during runtime the language without additional overhead. */ /** The constructor */ CI18nTranslator::CI18nTranslator(string inTranslationFileName){ ifstream inFile(inTranslationFileName.c_str()); inFile.seekg(0,ios::end); int lFileSize(inFile.tellg()); inFile.seekg(0,ios::beg); cout << "FileSize:" << lFileSize << " characters" << endl; if(inFile){ char* lBuffer=new char[lFileSize+1]; inFile.read(lBuffer,lFileSize); lBuffer[lFileSize]=char(0); cout << "Read " << inTranslationFileName << endl; XML_Parser lParser = XML_ParserCreate(NULL);//default encoding XML_SetUserData(lParser, this); XML_SetElementHandler(lParser, CI18nTranslator::startXMLElement, CI18nTranslator::endXMLElement); bool lDone=false; if (!XML_Parse(lParser, lBuffer, lFileSize, lDone)) { cerr << __FILE__ <<":" << __LINE__ << ": XML ERROR: " << XML_ErrorString(XML_GetErrorCode(lParser)) << " at line " << XML_GetCurrentLineNumber(lParser) << endl << "Internationalization will be disabled in this run of the GIFT" << endl; } XML_ParserFree(lParser); }else{ cerr << __FILE__ <<":" << __LINE__ << ": File unreadable." << endl << "Internationalization will be disabled in this run of the GIFT" << endl; } }; /** Get an MRML tag containing all offered languages*/ const CXMLElement* CI18nTranslator::getLanguagesXML()const{ return 0; }; /** Get an MRML tag containing all offered languages*/ bool CI18nTranslator::hasLanguage(string inLanguage)const{ return mLanguageMap.find(inLanguage)!=mLanguageMap.end(); }; /** Translate an attribute given by its name and its value @returns pair: first, if the string should be translated, second, its value */ const pair CI18nTranslator::translateAttribute(string inLanguageCode, const string& inAttribute, const string& inValue)const{ return make_pair(true, inValue); }; /** Translate an tag containing pdata given by its name and its value @returns pair: first, if the string should be translated, second, its value */ const pair CI18nTranslator::translateText(string inLanguageCode, const string& inContainingTag, const string& inText){ return make_pair(true, inText); }; /** Translate a complete XML Tree*/ void CI18nTranslator::translateXMLTree(string inLanguageCode, CXMLElement& inoutToBeTranslated)const{ CXEVI18nTranslator lVisitor(*this,inLanguageCode); inoutToBeTranslated.traverse(lVisitor); }; void CI18nTranslator::setCurrentLanguage(const string& inLanguage){ mCurrentLanguage=inLanguage; } string CI18nTranslator::getCurrentLanguage()const{ return mCurrentLanguage; } /** Should the attribute be translated */ void CI18nTranslator::setShouldBeTranslatedAttribute(string inString){ mShouldBeTranslatedAttribute[inString]=true; }; /** Should the attribute be translated */ bool CI18nTranslator::shouldBeTranslatedAttribute(string inString)const{ return mShouldBeTranslatedAttribute.find(inString)!=mShouldBeTranslatedAttribute.end() && mShouldBeTranslatedAttribute.find(inString)->second; }; /** Add one translation pair */ void CI18nTranslator::addTranslationPair(string inString,string inTranslatedString){ mLanguageMap[mCurrentLanguage][inString]=inTranslatedString; }; void CI18nTranslator::startXMLElement(void *inUserData, const char *inElementName, const char **inAttributes){ CI18nTranslator* self=(CI18nTranslator*)inUserData; CAttributeList lAttributes(inAttributes); if(strcmp("attribute",inElementName) && lAttributes.stringReadAttribute("name").first){ self->setShouldBeTranslatedAttribute(lAttributes.stringReadAttribute("name").second); } if(strcmp("translation-list",inElementName) && lAttributes.stringReadAttribute("language-code").first){ self->setCurrentLanguage(lAttributes.stringReadAttribute("language-code").second); } if(strcmp("translate",inElementName) && lAttributes.stringReadAttribute("key").first && lAttributes.stringReadAttribute("to").first){ self->addTranslationPair(lAttributes.stringReadAttribute("key").second, lAttributes.stringReadAttribute("to").second); } } void CI18nTranslator::endXMLElement(void *inUserData, const char *inElementName){ CI18nTranslator* self=(CI18nTranslator*)inUserData; } gift-0.1.14/libMRML/cc/GIFTExceptions.cc0000644000175200001440000001060010220502730014356 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/GIFTExceptions.h" GIFTException::GIFTException(const char* inMessage): mMessage(inMessage), mDestroy(0){ } GIFTException::GIFTException(char* inMessage): mMessage(inMessage), mDestroy(1){ } GIFTException::~GIFTException(){ if(mDestroy){ delete ((char*)mMessage); } } const char* GIFTException::getMessage()const{ return mMessage; } ostream& operator<<(ostream& outStream,const GIFTException& inException){ outStream << "AnGIFTException occured: " << flush << inException.mMessage << flush << endl; } void GIFTException::dummy(){//needed for RTTI/exception catching } VEProgrammingMistake::VEProgrammingMistake(const char* inMessage): GIFTException(inMessage){ }; ostream& operator<<(ostream& outStream,const VEProgrammingMistake& inException){ outStream << "You are experiencing a CLEAR programming mistake in" << endl << "the c++ part of the server. Please write a bugreport." << endl << "These were the last words before the error:" << endl << flush << inException.mMessage << flush << endl; } VENotFound::VENotFound(const char* inMessage): GIFTException(inMessage){ }; ostream& operator<<(ostream& outStream,const VENotFound& inException){ outStream << "AnVENotFound occured: " << flush << inException.mMessage << flush << endl; } VEBaseUnknown::VEBaseUnknown(const char* inMessage): GIFTException(inMessage){ }; ostream& operator<<(ostream& outStream,const VEBaseUnknown& inException){ outStream << "AnVEBaseUnknown occured: " << flush << inException.mMessage << flush << endl; } VEDoubleInsert::VEDoubleInsert(const char* inMessage): GIFTException(inMessage){ }; ostream& operator<<(ostream& outStream,const VEDoubleInsert& inException){ outStream << "AnVEDoubleInsert occured: " << flush << inException.mMessage << flush << endl; } VEWrongAccessor::VEWrongAccessor(const char* inMessage): GIFTException(inMessage){ }; ostream& operator<<(ostream& outStream,const VEWrongAccessor& inException){ outStream << "AnVEWrongAccessor occured: " << flush << inException.mMessage << flush << endl; } VEWrongAlgorithm::VEWrongAlgorithm(const char* inMessage): GIFTException(inMessage){ }; ostream& operator<<(ostream& outStream,const VEWrongAlgorithm& inException){ outStream << "AnVEWrongAlgorithm occured: " << flush << inException.mMessage << flush << endl; } VEWrongBaseType::VEWrongBaseType(const char* inMessage): GIFTException(inMessage){ }; ostream& operator<<(ostream& outStream,const VEWrongBaseType& inException){ outStream << "AnVEWrongBaseType occured: " << flush << inException.mMessage << flush << endl; } VEConfigurationError::VEConfigurationError(const char* inMessage): GIFTException(inMessage){ }; ostream& operator<<(ostream& outStream,const VEConfigurationError& inException){ outStream << "AnVEConfigurationError occured: " << flush << inException.mMessage << flush << endl; } VEUnknownSession::VEUnknownSession(const char* inMessage): GIFTException(inMessage){ }; ostream& operator<<(ostream& outStream,const VEUnknownSession& inException){ outStream << "AnVEUnknownSession occured: " << flush << inException.mMessage << flush << endl; } gift-0.1.14/libMRML/cc/CStaticQueryFactory.cc0000644000175200001440000000350210220502730015476 00000000000000#include "libMRML/include/my_throw.h" #include "libMRML/include/CStaticQueryFactory.h" #include "libMRML/include/GIFTExceptions.h" #include "libMRML/include/CAlgorithm.h" #include "libGIFTQuInvertedFile/include/CQInvertedFile.h" #include "libMRML/include/CQParallel.h" #include "libMRML/include/CQMultiple.h" #ifdef __GIFT_BAYESIAN__ #include "CIFQuickAndDirtyHunter.h" #endif #include "libGIFTQuHierarchy/include/CQHierarchy.h" #ifdef __GIFT_WITH_PERL__ #include "libGIFTQuPerl/include/CQPerl.h" #endif //These are files which belong to yet unpublished worked #ifdef __GIFT_UNPUBLISHED_WORK__ #include "CQIFFerDeLance.h" #endif #include "libMRML/include/CAccessorAdminCollection.h" CQuery* CStaticQueryFactory::makeQuery(const string & inBaseType, CAccessorAdminCollection & inAccessorAdminCollection, CAlgorithm & inAlgorithm){ #ifndef LINK_DYNAMICALLY if(inBaseType=="inverted_file"){ return(new CQInvertedFile(inAccessorAdminCollection, inAlgorithm)); } #ifdef __GIFT_BAYESIAN__ if(inBaseType=="bayesian"){ return(new CIFQuickAndDirtyHunter(inAccessorAdminCollection, inAlgorithm)); } #endif #ifdef __GIFT_WITH_PERL__ if(inBaseType=="perl"){ return(new CQPerl(inAccessorAdminCollection, inAlgorithm)); } #endif // if(inBaseType=="parallel"){ // return(new CQParallel(inAccessorAdminCollection, // inAlgorithm)); // } if(inBaseType=="multiple"){ return(new CQMultiple(inAccessorAdminCollection, inAlgorithm)); } #ifdef __GIFT_UNPUBLISHED_WORK__ if(inBaseType=="fer_de_lance"){ return(new CQIFFerDeLance(inAccessorAdminCollection, inAlgorithm)); } #endif if(inBaseType=="hierarchy"){ return(new CQHierarchy(inAccessorAdminCollection, inAlgorithm)); } my_throw(VEWrongBaseType(inBaseType.c_str())); #endif return 0; } gift-0.1.14/libMRML/cc/CReaperDistributor.cc0000644000175200001440000000222110220502730015337 00000000000000#include "libMRML/include/CReaperDistributor.h" #include "libMRML/include/CReaper.h" CReaperDistributor& getReaperDistributor(); void reaper(int){ getReaperDistributor().reap(); signal(SIGCHLD, reaper); } bool CReaperDistributor::addReaper(CReaper* inReaper){ if(inReaper){ mReapers[inReaper->getPID()]=inReaper; return 1; }else{ return 0; } } CReaperDistributor::CReaperDistributor(){ signal(SIGCHLD, reaper); } CReaperDistributor::~CReaperDistributor(){ for(CReaperMap::iterator i=mReapers.begin(); i!=mReapers.end(); i++){ delete i->second; } signal(SIGCHLD, SIG_DFL); } void CReaperDistributor::reap(){ int lChildTask; int lStatus; while ((lChildTask = waitpid(-1,&lStatus,WNOHANG))>0) { cout << "R" << endl; CReaperMap::iterator lFound=mReapers.find(lChildTask); if(lFound!=mReapers.end()) cout << "reap" << flush; lFound->second->reap(); } } CReaperDistributor* gReaperDistributor(0); CReaperDistributor& getReaperDistributor(){ if(gReaperDistributor){ return *gReaperDistributor; }else{ return *(gReaperDistributor=new CReaperDistributor()); } } gift-0.1.14/libMRML/cc/CQMultiple.cc0000644000175200001440000005556010220502730013620 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/CQMultiple.h" #include "libMRML/include/mrml_const.h" #ifdef __GIFT_CQMULTIPLE_THREADS__ #define __GIFT_USES_THREADS__ #endif #ifdef __NO_GIFT_CQMULTIPLE_THREADS__ #undef __GIFT_USES_THREADS__ #endif #ifdef HAVE_LIBPTHREAD #include #endif //§#undef HAVE_LIBPTHREAD//for debugging purposes /** We read the algorithm to find out how we will dispatch the queries to the child nodes in which way we will merge the results coming from the child nodes */ void CQMultiple::init(){ }; /** * * default constructor * */ CQMultiple::CQMultiple(){ assert(0); }; /** * constructor * see CQuery */ CQMultiple::CQMultiple(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm): CQuery(inAccessorAdminCollection, inAlgorithm){ { pair lUsesURLs(inAlgorithm.boolReadAttribute("cui-uses-result-urls")); mUsesResultURLs=(lUsesURLs.first && lUsesURLs.second); // mproxy has been filled in a reasonable way // by CQuery::CQuery mAccessor=mAccessorAdmin->openAccessor("url2fts"); assert(mAccessor); } }; /** * * destructor: at present empty * */ CQMultiple::~CQMultiple(){ cout << "destroying this " << __FILE__ << __LINE__ << flush << endl; //i thought i will need this, but at present I do not have this impression //it does not hurt, so we leave it in }; class CWeightedResult{ public: /** The weight of this */ double mWeight; /** The weight of this */ CIDRelevanceLevelPairList* mList; /** The weight of this */ CIDRelevanceLevelPairList::iterator mI; }; /** everything happening in the children */ bool CQMultiple::setAlgorithm(CAlgorithm & inAlgorithm){ if(mAlgorithm && mAlgorithm->getCollectionID()==inAlgorithm.getCollectionID()){ return true; }else{ //close the old collection, if exsisting if(mAccessorAdmin) mAccessorAdmin->closeAccessor("url2fts"); // mAccessorAdmin=&mAccessorAdminCollection->getProxy(inAlgorithm.getCollectionID()); mAccessor=mAccessorAdmin->openAccessor("url2fts"); assert(mAccessor); // return (CQuery::setAlgorithm(inAlgorithm) && mAccessor); } }; /** * * calls fastQuery for every child, merges the results * and translates them back into URLs * NOTE THIS IS COMMENTED OUT. IT WAS TOO INEFFICIENT. IT WOULD BECOME A CHOICE IF WE WOULD OUTPUT THINGS RATHER SORTED BY THEIR URL THAN BY THEIR SCORE CIDRelevanceLevelPairList* CQMultiple::fastQuery(const CXMLElement& inQuery, int inNumberOfInterestingImages, double inDifferenceToBest){ cout << "CMultiple Number of children:" << mChildren.size() << endl; list lTemporary; double lWeightSum(0); for(lCChildren::const_iterator i=mChildren.begin(); i!=mChildren.end(); i++){ lWeightSum+=i->mWeight; lTemporary.push_back(CWeightedResult()); cout << "this CMultiple:" << this << ", i->mQuery:" << i->mQuery << ", i->mWeight:" << i->mWeight << endl; lTemporary.back().mList=i->mQuery->fastQuery(inQuery, mAccessor->size(), inDifferenceToBest); if(lTemporary.back().mList){ lTemporary.back().mList->sort(CSortByID_IRLP()); lTemporary.back().mI=lTemporary.back().mList->begin(); lTemporary.back().mWeight=i->mWeight; }else{ lTemporary.pop_back(); } } CIDRelevanceLevelPairList* lReturnValue=new CIDRelevanceLevelPairList(); while(lTemporary.size()){ list::iterator lMinimumIterator=lTemporary.begin(); for(list::iterator i=++lTemporary.begin(); i!=lTemporary.end(); i++){ //the ID pointed to by i is smaller lMinimumIterator if((i->mI)->getID()<(lMinimumIterator->mI)->getID()){ lMinimumIterator=i; } } if((lReturnValue->size()) && ((lMinimumIterator->mI)->getID()==lReturnValue->back().getID())){ lReturnValue->back().setRelevanceLevel( lReturnValue->back().getRelevanceLevel() + ((lMinimumIterator->mI)->getRelevanceLevel() * lMinimumIterator->mWeight) ); }else{ lReturnValue->push_back(*lMinimumIterator->mI); lReturnValue->back().setRelevanceLevel( ((lMinimumIterator->mI)->getRelevanceLevel() * lMinimumIterator->mWeight) ); } (lMinimumIterator->mI)++; //end of this list, so we delete it if(lMinimumIterator->mI==lMinimumIterator->mList->end()){ lTemporary.erase(lMinimumIterator); } } //lReturnValue->sort(CSortByID_IRLP());// for testing, to see if there are any duplicates lReturnValue->sort(); lReturnValue->reverse(); cout << "Size of the result " << lReturnValue->size() << endl; { CIDRelevanceLevelPairList::iterator iSkip=lReturnValue->begin(); for(int i=0; isize(); i++){ iSkip->setRelevanceLevel(iSkip->getRelevanceLevel()/lWeightSum); iSkip++; } lReturnValue->erase(iSkip,lReturnValue->end()); } return lReturnValue; }; */ /** all information about a query thread for a CQMultiple*/ class CQMThread{ /** the thread administrator */ #ifdef __GIFT_USES_THREADS__ #warning treading active pthread_t mThread; #endif /** is this called as a thread or as a function */ bool mIsThreaded; /** this is the weight the result should receive */ double mWeight; public: /** query processor used in this thread*/ CQuery& mQueryProcessor; /** the query (an xml parse tree) */ const CXMLElement* mQuery; /** the desired result size */ int mResultSize; /** the cutoff */ double mDifferenceToBest; /** the result of the query*/ CXMLElement* mResult; /** the result of the fastQuery*/ CIDRelevanceLevelPairList* mFastResult; /** destructor */ ~CQMThread(){ delete mQuery; } /** constructor */ CQMThread(CQuery& inQueryProcessor, const CXMLElement& inQuery, double inWeight, int inResultSize, double inDifferenceToBest): mQueryProcessor(inQueryProcessor), mQuery(new CXMLElement(inQuery)), mWeight(inWeight), mResultSize(inResultSize), mDifferenceToBest(inDifferenceToBest), mFastResult(0), mResult(0){ }; /** copy constructor */ CQMThread(const CQMThread& in): mQueryProcessor(in.mQueryProcessor), mQuery(new CXMLElement(*in.mQuery)), mWeight(in.mWeight), mResultSize(in.mResultSize), mDifferenceToBest(in.mDifferenceToBest), mResult(0), mFastResult(0), mIsThreaded(0){ }; /** running the thread */ void runThread(void){ mResult=0; #ifdef __GIFT_USES_THREADS__ #warning treading active mIsThreaded=true; pthread_create(&mThread,0,CQMultiple::doQueryThread,this); #else #warning treading blocked CQMultiple::doQueryThread(this); #endif } /** running the thread */ void runFastThread(void){ mFastResult=0; #ifdef __GIFT_USES_THREADS__ #warning treading active mIsThreaded=true; pthread_create(&mThread,0,CQMultiple::doFastQueryThread,this); #else #warning treading blocked CQMultiple::doFastQueryThread(this); #endif } /** joining this thread with the caller */ void join(void){ #ifdef __GIFT_USES_THREADS__ void** lReturnValue(NULL); cout << "PREJOIN" << endl; if(mIsThreaded){ int lJoinResult(pthread_join(mThread,lReturnValue)); if(lJoinResult){ cout << "CQMultiple: ERROR IN JOINING " << lJoinResult << endl; } }else{ cout << "This was an unthreaded join!" << endl; } mIsThreaded=false; cout << "POSTJOIN" << endl; #endif } /** gives back the weight the results should receive when summing up */ double getWeight()const{ return mWeight; } }; void* CQMultiple::doFastQueryThread(void* inParameter){ class CQMThread* lParam((CQMThread*) inParameter); lParam->mFastResult=lParam->mQueryProcessor.fastQuery(*(lParam->mQuery), lParam->mResultSize, lParam->mDifferenceToBest); cout << "I AM FINISHED HERE " << lParam << "result" << lParam->mResult << endl; return 0; } /** do the query thread, but starting query */ void* CQMultiple::doQueryThread(void* inParameter){ class CQMThread* lParam((CQMThread*) inParameter); lParam->mResult=lParam->mQueryProcessor.query(*(lParam->mQuery)); cout << "I AM FINISHED HERE " << lParam << "result" << lParam->mResult << endl; return 0; } /** * * calls fastQuery for every child, merges the results * and translates them back into URLs * * NEW, MORE EFFICIENT VERSION */ CIDRelevanceLevelPairList* CQMultiple::fastQuery(const CXMLElement& inQuery, int inNumberOfInterestingImages, double inDifferenceToBest){ cout << "CMultiple Number of children:" << mChildren.size() << endl; //list lTemporary; double lWeightSum(0); map lResultMap; // no mutex protection needed as this is not called except by main thread // // rip this into two parts // in order to // make it possible to run the querying in one thread // and do the merging after having waited for each thread // list lListOfThreads; lCChildren::const_iterator lLast=mChildren.end(); lLast--; for(lCChildren::const_iterator i=mChildren.begin(); i!=mChildren.end(); i++){ lWeightSum+=i->mWeight; //lTemporary.push_back(CWeightedResult()); cout << "çç---------------------this CMultiple:fastQuery" << this << ", i->mQuery:" << i->mQuery << ", i->mWeight:" << i->mWeight << endl; lListOfThreads.push_back(CQMThread(*(i->mQuery), // The Query processor to choose inQuery, // the query to be processed i->mWeight, // the weight the result will receive mAccessor->size(), // the size of the accessor (to get all potential results) inDifferenceToBest));// the difference to the best which is allowed for a result /* EX-LEAK the following was a special branch for reducing the number of spawned threads by one. Apparently this did not work and caused a memory leak. Now it seems to work. if(1==0 && (i==lLast)){ lListOfThreads.back().callFunction();//something to do for the main thread }else*/ { cout << "Running thread" << endl; lListOfThreads.back().runFastThread();//run the thread cout << "loop" << endl; } cout << "endloop" << endl; } // here we would join all threads for(list::iterator lThread=lListOfThreads.begin(); lThread!=lListOfThreads.end(); lThread++){ cout << "joining..." << endl; lThread->join(); cout << "before merging " << endl; if(!lThread->mFastResult){ cout << "THE THE RESULT OF THIS THREAD WAS NIL " << endl; } if(lThread->mFastResult){ for(CIDRelevanceLevelPairList::iterator i=lThread->mFastResult->begin(); i!=lThread->mFastResult->end(); i++){ map::const_iterator lFound=lResultMap.find(i->getID()); i->setRelevanceLevel(i->getRelevanceLevel()*lThread->getWeight()); if(lFound==lResultMap.end()){ lResultMap.insert(make_pair(i->getID(), *i)); }else{ lResultMap[i->getID()].setRelevanceLevel(lResultMap[i->getID()].getRelevanceLevel() +i->getRelevanceLevel() ); } } delete lThread->mFastResult; } cout << "after merging " << endl; } CIDRelevanceLevelPairList* lReturnValue=new CIDRelevanceLevelPairList(); cout << "" << endl; for(map::const_iterator i=lResultMap.begin(); i!=lResultMap.end(); i++){ lReturnValue->push_back(i->second); } cout << "\n" << endl; lReturnValue->sort(); lReturnValue->reverse(); cout << "Size of the result " << lReturnValue->size() << endl; cout << "" << endl; cout << "" << endl; { CIDRelevanceLevelPairList::iterator iSkip=lReturnValue->begin(); for(int i=0; isize(); i++){ iSkip->setRelevanceLevel(iSkip->getRelevanceLevel()/lWeightSum); iSkip++; } lReturnValue->erase(iSkip,lReturnValue->end()); } cout << "" << endl; return lReturnValue; }; /** A list of triplets to be merged */ class CMergeTriplet{ /** */ string mImageLocation; /** */ string mThumbnailLocation; /** */ float mRelevanceLevel; public: /** */ CMergeTriplet(const string& inImageLocation, const string& inThumbnailLocation ): mImageLocation(inImageLocation), mThumbnailLocation(inThumbnailLocation), mRelevanceLevel(0){}; /** */ CMergeTriplet(const CMergeTriplet& in): mImageLocation(in.mImageLocation), mThumbnailLocation(in.mThumbnailLocation), mRelevanceLevel(in.mRelevanceLevel){}; /** */ CMergeTriplet(): mImageLocation(""), mThumbnailLocation(""), mRelevanceLevel(0){}; /** */ void addToRelevance(float inToBeAdded){ mRelevanceLevel+=inToBeAdded; } /** */ void setSimilarity(float inValue){ mRelevanceLevel=inValue; } /** Return the accumulated similarity */ float getCalculatedSimilarity()const{ return mRelevanceLevel; } /** Return the thumbnail location */ string getThumbnailLocation()const{ return mThumbnailLocation; } /** Return the image location */ string getImageLocation()const{ return mImageLocation; } }; /** Sort MergeTriplets by relevance in descending order */ class CSortDescendingByRelevance_MT:binary_function{ public: bool operator() (CMergeTriplet& l, CMergeTriplet& t){ return l.getCalculatedSimilarity()>t.getCalculatedSimilarity(); } }; /** * * calls fastQuery for every child, merges the results * and translates them back into URLs * * NEW, MORE EFFICIENT VERSION */ CXMLElement* CQMultiple::query(const CXMLElement& inQuery){ if(!mUsesResultURLs){ // if the mUsesReusltURLs is not set, // just call fastquery, and assemble from that a result, // as CQuery does. return CQuery::query(inQuery); } pair lNumberOfInterestingImages= inQuery.longReadAttribute(mrml_const::result_size); int inNumberOfInterestingImages= lNumberOfInterestingImages.second; pair lCutoff= inQuery.longReadAttribute(mrml_const::result_cutoff); int inCutoff= lCutoff.second; // do a deep clone of the query (for const cast) CXMLElement* lQuery=inQuery.clone(1); if(lQuery->child_list_begin()!=lQuery->child_list_end()){ // // set the result size to a multiple of the // number of the images requested // to get a higher probability that // the combination reflects the real score // you want more explanation? // you get it at help-gift@gnu.org // lQuery->addAttribute(mrml_const::result_size, long(inNumberOfInterestingImages*5)); cout << "CMultiple::query Number of children:" << mChildren.size() << endl; //list lTemporary; double lWeightSum(0); map lResultMap; // no mutex protection needed as this is not called except by main thread // // rip this into two parts // in order to // make it possible to run the querying in one thread // and do the merging after having waited for each thread // list lListOfThreads; lCChildren::const_iterator lLast=mChildren.end(); lLast--; for(lCChildren::const_iterator i=mChildren.begin(); i!=mChildren.end(); i++){ lWeightSum+=i->mWeight; //lTemporary.push_back(CWeightedResult()); cout << "**-------------------------------this CMultiple QUERY:" << this << ", i->mQuery:" << i->mQuery << ", i->mWeight:" << i->mWeight << endl; lListOfThreads.push_back(CQMThread(*(i->mQuery), // The Query processor to choose *lQuery, // the query to be processed i->mWeight, // the weight the result will receive mAccessor->size(), // the size of the accessor (to get all potential results) inCutoff));// the difference to the best which is allowed for a result /* EX-LEAK the following was a special branch for reducing the number of spawned threads by one. Apparently this did not work and caused a memory leak. Now it seems to work. if(1==0 && (i==lLast)){ lListOfThreads.back().callFunction();//something to do for the main thread }else*/ { cout << "Running thread" << endl; lListOfThreads.back().runThread();//run the thread cout << "loop" << endl; } cout << "endloop" << endl; } // here we would join all threads for(list::iterator lThread=lListOfThreads.begin(); lThread!=lListOfThreads.end(); lThread++){ cout << "joining..." << endl; lThread->join(); cout << "before merging " << endl; if(!lThread->mResult){ cout << "THE THE RESULT OF THIS THREAD WAS NIL " << endl; } if(lThread->mResult){ /* OK. At this point we got back a query-result XML element. now we want the result-element-list */ cout << "H" << flush; for(CXMLElement::lCChildren::const_iterator i=lThread->mResult->child_list_begin(); i!=lThread->mResult->child_list_end(); i++){ cout << "I" << flush; if((*i)->getName() == mrml_const::query_result_element_list){ for(CXMLElement::lCChildren::const_iterator j=(*i)->child_list_begin(); j!=(*i)->child_list_end(); j++){ cout << "J" << flush; if((*j)->getName() == mrml_const::query_result_element){ cout << "K" << flush; /* inside this, *j points now to an XML element which is a query-result-element. from this we will read now the calculated-relevance, as well as the image and thumbnail location. */ pair lCalculatedRelevance= (*j)->doubleReadAttribute(mrml_const::calculated_similarity); pair lImageLocation= (*j)->stringReadAttribute(mrml_const::image_location); pair lThumbnailLocation= (*j)->stringReadAttribute(mrml_const::thumbnail_location); cout << "L" << flush; // no relevance corresponds to relevance 0 if(! lCalculatedRelevance.first){ lCalculatedRelevance=make_pair(bool(0), double(0)); } cout << "L" << flush; // if there is a thumbnail and no image, // we take the thumbnail location as image location if((lThumbnailLocation.first) && (!lImageLocation.first)){ lImageLocation=lThumbnailLocation; } cout << "L" << flush; // if there is an image and no thumbnail, // we take the image location as thumbnail location if((!lThumbnailLocation.first) && (lImageLocation.first)){ lThumbnailLocation=lImageLocation; } cout << "L" << flush; // now we are guaranteed to have a well-initialised // image location if(lImageLocation.first){ map::iterator lFound(lResultMap.find(lImageLocation.second)); if(lFound!=lResultMap.end()){ cout << "A" << flush; lFound->second.addToRelevance(lCalculatedRelevance.second); cout << "[" << lFound->second.getCalculatedSimilarity() << "]" << flush; }else{ // this result is not yet in the result map lFound=lResultMap.insert(make_pair(lImageLocation.second,CMergeTriplet(lImageLocation.second, lThumbnailLocation.second))).first; lFound->second.addToRelevance(lCalculatedRelevance.second); } cout << "M" << flush; } } } } } delete lThread->mFastResult; } cout << "after thread " << endl; } cout << "ALL THREADS FINISHED " << endl; { // now we build a list of merge triplets // that is sorted by score in descending order list lResultList; for(map::const_iterator i=lResultMap.begin(); i!=lResultMap.end(); i++){ lResultList.push_back(i->second); } cout << "DELETING " << endl; lResultList.sort(CSortDescendingByRelevance_MT()); cout << "DELETING " << endl; { list::iterator iSkip=lResultList.begin(); for(int i=0; isetSimilarity(iSkip->getCalculatedSimilarity()/lWeightSum); iSkip++; } lResultList.erase(iSkip,lResultList.end()); } // now let's build a result element tree CXMLElement* lReturnValue(new CXMLElement(mrml_const::query_result,0)); CXMLElement* lReturnList(new CXMLElement(mrml_const::query_result_element_list,0)); lReturnValue->addChild(lReturnList); assert(mAccessor); for(list::const_iterator i=lResultList.begin(); i!=lResultList.end(); i++){ CXMLElement* lReturnElement(new CXMLElement(mrml_const::query_result_element, 0)); { double lRelevanceLevel(i->getCalculatedSimilarity()); string lString(mrml_const::calculated_similarity); lReturnElement->addAttribute(lString, lRelevanceLevel); } { string lURL(i->getImageLocation()); string lString(mrml_const::image_location); lReturnElement->addAttribute(lString, lURL); } { string lURL(i->getThumbnailLocation()); string lString(mrml_const::thumbnail_location); lReturnElement->addAttribute(lString, lURL); } lReturnValue->addChild(lReturnElement); lReturnValue->moveUp(); } //gMutex->unlock();//debugging return lReturnValue; } }else{ //gMutex->unlock();//debugging return getRandomImages(inNumberOfInterestingImages); } //gMutex->unlock();//debugging // missing sort and output list > lAttributes; lAttributes.push_back(make_pair(mrml_const::message, string("empty query result, i seem to have missed all ifs and elses!"))); return new CXMLElement(mrml_const::error,lAttributes); }; gift-0.1.14/libMRML/cc/CXEVCommunication.cc0000644000175200001440000001314510220502730015065 00000000000000#include "libMRML/include/mrml_const.h" #include "libMRML/include/CCommunicationHandler.h" #include "libMRML/include/CXEVCommunication.h" #include "libMRML/include/GIFTExceptions.h" #include "libMRML/include/createErrorMessage.h" CXEVCommunication::CXEVCommunication(CCommunicationHandler* inHandler): mHandler(inHandler), mSessionID(""){ }; bool CXEVCommunication::startVisit(const CXMLElement& inElement){ CXMLElement* lFather(inElement.getFather()); try{ cout << "CHECKING: " << inElement.getName() << endl; if(lFather){ lFather->check(); }else{ inElement.check(); } inElement.checkNPrint(); cout << "VISITING: " << inElement.getName() << endl; CSessionManager& lSessionManager(mHandler->getSessionManager()); //---------------------------------------- //the (deprecated) ihandshake message if(inElement.getName()==string(mrml_const::cui_ihandshake)){ mHandler->sendHandshake(inElement.stringReadAttribute(mrml_const::user_name).second); //delete the multiresult. DIRTY mHandler->mMultiResponse=0; } //---------------------------------------- //thek start of the message: extract the session id if(inElement.getName()==mrml_const::mrml){ mSessionID=inElement.stringReadAttribute(mrml_const::session_id).second; mHandler->startMultiRequest(mSessionID); } //---------------------------------------- //the configure-session signal if(lFather && lFather->stringReadAttribute(mrml_const::session_id).first && (lFather->getName()==mrml_const::configure_session) && (inElement.getName()==mrml_const::algorithm)){ CXMLElement* lAcknowledgement=new CXMLElement(mrml_const::acknowledge_session_op,0); lAcknowledgement->addAttribute(mrml_const::session_id,mHandler->getCurrentSessionID()// was:lFather->stringReadAttribute(mrml_const::session_id).second ); cout << "CONFIGURESESSIONçççççççççççççççççççç" << mHandler->getCurrentSessionID() << "(would have been in old version:" << lFather->stringReadAttribute(mrml_const::session_id).second << ")" << endl; lSessionManager.setAlgorithm(mHandler->getCurrentSessionID(),//was: lFather->stringReadAttribute(mrml_const::session_id).second, ((CAlgorithm&)inElement).clone()); mHandler->addToMultiResponse(lAcknowledgement); //do not traverse deeper return false; } //---------------------------------------- //the get-sessions if(inElement.getName()==mrml_const::get_sessions){ mHandler->getSessions(inElement.stringReadAttribute(mrml_const::user_name).second); //do not traverse deeper return false; } //---------------------------------------- //the get-collections if(inElement.getName()==mrml_const::get_collections){ mHandler->getCollections(); //do not traverse deeper return false; } //---------------------------------------- //the get-algorithms if(inElement.getName()==mrml_const::get_algorithms){ mHandler->getAlgorithms(); //do not traverse deeper return false; } //------------------------------ // query-step if(inElement.getName()==mrml_const::query_step){ mHandler->addToMultiResponse(lSessionManager.query(mSessionID, inElement)); return false; } //------------------------------ // open-session if(inElement.getName()==mrml_const::open_session){ cout << "HIER OPEN SESSION" << endl; mHandler->openSession(inElement.stringReadAttribute(mrml_const::user_name).second, inElement.stringReadAttribute(mrml_const::session_name).second); return false; } //------------------------------ // rename-session if(inElement.getName()==mrml_const::rename_session){ mHandler->renameSession(inElement.stringReadAttribute(mrml_const::session_id).second, inElement.stringReadAttribute(mrml_const::session_name).second); return false; } //------------------------------ // close-session if(inElement.getName()==mrml_const::delete_session){ cout << "deleteSESSION" << endl; mHandler->deleteSession(inElement.stringReadAttribute(mrml_const::session_id).second); return false; } //------------------------------ // get-property-sheet if(inElement.getName()==mrml_const::get_property_sheet){ mHandler->renameSession(inElement.stringReadAttribute(mrml_const::session_id).second, inElement.stringReadAttribute(mrml_const::session_name).second); return false; } // if(inElement.getName()==string(mrml_const::cui_random_images)){ mHandler->sendRandomImages(mSessionID, inElement.stringReadAttribute(mrml_const::algorithm_id).second, inElement.stringReadAttribute(mrml_const::collection_id).second, inElement.stringReadAttribute(mrml_const::result_size).second); } // if(inElement.getName()==string(mrml_const::get_property_sheet)){ mHandler->getPropertySheet(mSessionID, inElement.stringReadAttribute(mrml_const::algorithm_id).second); } if((inElement.getName()==mrml_const::mrml) || (inElement.getName()==mrml_const::configure_session) || (inElement.getName()=="__ROOT__")){ return true; } } catch(GIFTException& inCaught){ cerr << "CAUGHT" << endl; mHandler->addToMultiResponse(createErrorMessage(inCaught)); } catch(GIFTException* inCaught){ cerr << "CAUGHT2" << endl; mHandler->addToMultiResponse(createErrorMessage(inCaught)); } return false; }; void CXEVCommunication::endVisit(const CXMLElement& inElement){ if(inElement.getName()==mrml_const::mrml){ mHandler->endMultiRequest(); } } gift-0.1.14/libMRML/cc/mrml_const.cc0000644000175200001440000001753410220502730013755 00000000000000 //Automatically generated from the dtd by gift-dtd-to-keywords #include #include "libMRML/include/mrml_const.h" const string mrml_const::coords("Coords"); const string mrml_const::acknowledge_session_op("acknowledge-session-op"); const string mrml_const::algorithm("algorithm"); const string mrml_const::algorithm_id("algorithm-id"); const string mrml_const::algorithm_list("algorithm-list"); const string mrml_const::algorithm_name("algorithm-name"); const string mrml_const::algorithm_type("algorithm-type"); const string mrml_const::allows_children("allows-children"); const string mrml_const::auto_id("auto-id"); const string mrml_const::auto_id_name("auto-id-name"); const string mrml_const::box("box"); const string mrml_const::calculated_similarity("calculated-similarity"); const string mrml_const::calendar_time("calendar-time"); const string mrml_const::caption("caption"); const string mrml_const::close_session("close-session"); const string mrml_const::collectiom_id("collectiom-id"); const string mrml_const::collection("collection"); const string mrml_const::collection_id("collection-id"); const string mrml_const::collection_list("collection-list"); const string mrml_const::collection_name("collection-name"); const string mrml_const::command("command"); const string mrml_const::configuration_description("configuration-description"); const string mrml_const::configure_session("configure-session"); const string mrml_const::cui_algorithm_id("cui-algorithm-id"); const string mrml_const::cui_algorithm_id_list("cui-algorithm-id-list"); const string mrml_const::cui_algorithm_id_list_id("cui-algorithm-id-list-id"); const string mrml_const::cui_algorithm_id_list_list("cui-algorithm-id-list-list"); const string mrml_const::cui_base_dir("cui-base-dir"); const string mrml_const::cui_base_type("cui-base-type"); const string mrml_const::cui_block_color_blocks("cui-block-color-blocks"); const string mrml_const::cui_block_color_histogram("cui-block-color-histogram"); const string mrml_const::cui_block_texture_blocks("cui-block-texture-blocks"); const string mrml_const::cui_block_texture_histogram("cui-block-texture-histogram"); const string mrml_const::cui_configuration("cui-configuration"); const string mrml_const::cui_distance_matrix_location("cui-distance-matrix-location"); const string mrml_const::cui_feature_description_location("cui-feature-description-location"); const string mrml_const::cui_feature_file_location("cui-feature-file-location"); const string mrml_const::cui_generate_inverted_file("cui-generate-inverted-file"); const string mrml_const::cui_hierarchy_file_location("cui-hierarchy-file-location"); const string mrml_const::cui_hierarchy_up("cui-hierarchy-up"); const string mrml_const::cui_ihandshake("cui-ihandshake"); const string mrml_const::cui_in_memory("cui-in-memory"); const string mrml_const::cui_inverted_file_location("cui-inverted-file-location"); const string mrml_const::cui_offset_file_location("cui-offset-file-location"); const string mrml_const::cui_pr_modulo("cui-pr-modulo"); const string mrml_const::cui_pr_modulo_class("cui-pr-modulo-class"); const string mrml_const::cui_pr_percentage_of_features("cui-pr-percentage-of-features"); const string mrml_const::cui_pr_score_board_reduced_at("cui-pr-score-board-reduced-at"); const string mrml_const::cui_pr_score_board_reduced_to("cui-pr-score-board-reduced-to"); const string mrml_const::cui_pr_time_cutoff_point("cui-pr-time-cutoff-point"); const string mrml_const::cui_property_item("cui-property-item"); const string mrml_const::cui_property_item_id("cui-property-item-id"); const string mrml_const::cui_property_list("cui-property-list"); const string mrml_const::cui_property_sheet_id("cui-property-sheet-id"); const string mrml_const::cui_random_images("cui-random-images"); const string mrml_const::cui_shandshake("cui-shandshake"); const string mrml_const::cui_sql_database_name("cui-sql-database-name"); const string mrml_const::cui_sql_host("cui-sql-host"); const string mrml_const::cui_sql_password("cui-sql-password"); const string mrml_const::cui_sql_username("cui-sql-username"); const string mrml_const::cui_text_query("cui-text-query"); const string mrml_const::cui_time_stamp("cui-time-stamp"); const string mrml_const::cui_weight("cui-weight"); const string mrml_const::cui_weighting_function("cui-weighting-function"); const string mrml_const::defaultstate("defaultstate"); const string mrml_const::delete_session("delete-session"); const string mrml_const::dim("dim"); const string mrml_const::error("error"); const string mrml_const::from("from"); const string mrml_const::get_algorithms("get-algorithms"); const string mrml_const::get_collections("get-collections"); const string mrml_const::get_configuration("get-configuration"); const string mrml_const::get_property_sheet("get-property-sheet"); const string mrml_const::get_segment_by_url("get-segment-by-url"); const string mrml_const::get_segment_by_url_list("get-segment-by-url-list"); const string mrml_const::get_sessions("get-sessions"); const string mrml_const::image_location("image-location"); const string mrml_const::max_subset_size("max-subset-size"); const string mrml_const::message("message"); const string mrml_const::min_subset_size("min-subset-size"); const string mrml_const::mrml("mrml"); const string mrml_const::open_session("open-session"); const string mrml_const::password("password"); const string mrml_const::poly("poly"); const string mrml_const::property_sheet("property-sheet"); const string mrml_const::property_sheet_id("property-sheet-id"); const string mrml_const::property_sheet_type("property-sheet-type"); const string mrml_const::query_paradigm("query-paradigm"); const string mrml_const::query_paradigm_id("query-paradigm-id"); const string mrml_const::query_paradigm_list("query-paradigm-list"); const string mrml_const::query_result("query-result"); const string mrml_const::query_result_element("query-result-element"); const string mrml_const::query_result_element_list("query-result-element-list"); const string mrml_const::query_result_element_segment("query-result-element-segment"); const string mrml_const::query_result_element_segment_list("query-result-element-segment-list"); const string mrml_const::query_step("query-step"); const string mrml_const::query_step_id("query-step-id"); const string mrml_const::query_string("query-string"); const string mrml_const::query_type("query-type"); const string mrml_const::rename_session("rename-session"); const string mrml_const::result_cutoff("result-cutoff"); const string mrml_const::result_size("result-size"); const string mrml_const::segmenet_id("segmenet-id"); const string mrml_const::segment_id("segment-id"); const string mrml_const::send_name("send-name"); const string mrml_const::send_type("send-type"); const string mrml_const::send_value("send-value"); const string mrml_const::session("session"); const string mrml_const::session_id("session-id"); const string mrml_const::session_list("session-list"); const string mrml_const::session_name("session-name"); const string mrml_const::step("step"); const string mrml_const::steps("steps"); const string mrml_const::thumbnail_location("thumbnail-location"); const string mrml_const::to("to"); const string mrml_const::transaction_id("transaction-id"); const string mrml_const::user_data("user-data"); const string mrml_const::user_name("user-name"); const string mrml_const::user_relevance("user-relevance"); const string mrml_const::user_relevance_element("user-relevance-element"); const string mrml_const::user_relevance_element_list("user-relevance-element-list"); const string mrml_const::user_relevence("user-relevence"); const string mrml_const::user_segmented_element("user-segmented-element"); const string mrml_const::user_segmented_element_list("user-segmented-element-list"); const string mrml_const::visibility("visibility"); gift-0.1.14/libMRML/cc/getLibNameFromFileName.cc0000644000175200001440000000257210220502730016030 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/getLibNameFromFileName.h" std::pair getLibNameFromFileName(std::string inPrefix,std::string inName){ std::string lReturnString(inName); bool lSuccess(inName.find(inPrefix)==0); if(lSuccess){ std::string::size_type lFirstPointPosition=inName.find_first_of(std::string(".")); lReturnString=inName.substr(0,lFirstPointPosition); } return make_pair(lSuccess,lReturnString); } gift-0.1.14/libMRML/cc/CPropertySheetList.cc0000644000175200001440000000545510220502730015353 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/CPropertySheetList.h" #include "libMRML/include/CXMLElement.h" #include "libMRML/include/mrml_const.h" /** */ CPropertySheetList::CPropertySheetList(CXMLElement* inUnprocessedContent): mUnprocessedContent(inUnprocessedContent){ //now there comes a small indexing party //we are looking at the children of the "vi-property-list" ... for(CXMLElement::lCChildren::iterator i= mUnprocessedContent->child_list_begin(); i!=mUnprocessedContent->child_list_end(); i++){ //which should all be vi-property-elements so each of them //SHOULD have an ID. We assert this. assert((*i)->stringReadAttribute(mrml_const::cui_property_item_id).first); //the children of each element should be properties //if not, that's not so cool. mContent.insert(make_pair((*i)->stringReadAttribute(mrml_const::cui_property_item_id).second, *((*i)->child_list_begin()))); } } /** ~CPropertySheetList */ CPropertySheetList::~CPropertySheetList(){ // for(CContent::iterator i=mContent.begin(); // i!=mContent.end(); // i++){ // delete i->second; // } } /** ...handing it through to the map */ void CPropertySheetList::insertPropertySheet(const string& inID, CXMLElement* inXMLElement){ mContent.insert(make_pair(inID, inXMLElement)); } /** ...handing it through to the map */ CXMLElement& CPropertySheetList::getPropertySheet(const string& inID){ CContent::const_iterator lFound=mContent.find(inID); if(lFound!=mContent.end()){ return *lFound->second; }else{ return (*((CXMLElement*)0)); } } /** ...handing it through to the map */ CXMLElement* CPropertySheetList::newPropertySheet(const string& inID){ CContent::const_iterator lFound=mContent.find(inID); if(lFound!=mContent.end()){ return new CXMLElement(*lFound->second); }else{ return 0; } } gift-0.1.14/libMRML/cc/CMagic.cc0000644000175200001440000000130410220502730012707 00000000000000#include "libMRML/include/CMagic.h" #include /** This function checks the magic number of this and asserts to zero, if something is wrong */ void CMagic::check()const{ if(mMagic==36){ cout << "Was constructed, has been destroyed in the meanwhile " << endl; assert(!"Was constructed, but destroyed to early"); }else{ if(mMagic!=42){ cout << "The magic number is: " << mMagic << endl; assert(!"No construction"); } } }; void CMagic::checkNPrint()const{ check(); cout << "CHECKING SUCCEEDED" << endl; }; /** sets the magic number */ CMagic::CMagic(){ mMagic=42; }; /** sets the magic to another value */ CMagic::~CMagic(){ mMagic=36; }; gift-0.1.14/libMRML/cc/CDynamicQueryFactory.cc0000644000175200001440000000704010220502730015634 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/CDynamicQueryFactory.h" #include "libMRML/include/CQMultiple.h" //#warning hard perl switchoff this should not go to distro #include "libGIFTQuPerl/include/CQPerl.h" #include "libMRML/include/GIFTExceptions.h" #include "libMRML/include/my_throw.h" // for file name treatment #include "libMRML/include/getLibNameFromFileName.h" #include CQuery* CDynamicQueryFactory::makeQuery(const string & inBaseType, CAccessorAdminCollection & inAccessorAdminCollection, CAlgorithm & inAlgorithm){ if(inBaseType=="multiple"){ return(new CQMultiple(inAccessorAdminCollection, inAlgorithm)); } #ifdef __GIFT_WITH_PERL__ if(inBaseType=="perl"){ return(new CQPerl(inAccessorAdminCollection, inAlgorithm)); } #endif const_iterator lFound(find(inBaseType)); if(lFound!=end()){ cout << "CDynamicQueryFactory" << endl; return lFound->second->makeQuery(inAccessorAdminCollection, inAlgorithm); }else{ cerr << "CDynamicQueryFactory: " << inBaseType << " was not found"; my_throw(VEConfigurationError(inBaseType.c_str())); } } CDynamicQueryFactory::CDynamicQueryFactory(string inDirectoryName){ cout << "--" << endl << "Configuring CDynamicQueryFactory " << endl << "Looking for libGIFTQu*.so in directory " << endl << inDirectoryName << endl; set lSeenLibs; DIR* lDirectory(opendir(inDirectoryName.c_str())); if(!lDirectory){ // this means the library has disappeared. cerr << "FATAL ERROR, cannot find " << inDirectoryName << endl; exit(20); }else{ dirent* lDirectoryEntry; while(lDirectoryEntry=readdir(lDirectory)){ string lFileName(lDirectoryEntry->d_name); pair lIsLibAndLibName(getLibNameFromFileName("libGIFTQu",lFileName)); bool lIsLib(lIsLibAndLibName.first); string lLibName(lIsLibAndLibName.second); if(lIsLib && (lSeenLibs.find(lLibName)==lSeenLibs.end())){ CQueryPlugin* lPlugin(new CQueryPlugin(inDirectoryName, lFileName, lLibName)); if(lPlugin->isSane()){ cout << lFileName << " contains a sane GIFT Query plugin: " << lPlugin->getName() << endl; insert(make_pair(string(lPlugin->getName()), lPlugin)); lSeenLibs.insert(lLibName); }else{ delete lPlugin; } }else{ if(!lIsLib){ cout << "Not testing file:" << lFileName << " (File name does not match plugin name) " << endl; }else{ cout << "Lib:" << lLibName << ", to be linked from " << lFileName << " already registered! " << endl; } } } } cout << "FINISHED Configuring CDynamicQueryFactory " << endl; } gift-0.1.14/libMRML/cc/CXMLHelper.cc0000644000175200001440000000427610220502730013502 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/CXMLHelper.h" #include #include //a class which helps with xml CXMLHelper::CXMLHelper(){ mIsEmpty=false; mIsEnd=false; }; /// string CXMLHelper::toString()const{ if(mIsEnd){ return string(""); } string lReturnValue=string("<")+mName; for(CContent::const_iterator i=mAttributes.begin(); i!=mAttributes.end(); i++){ lReturnValue+=string(" ")+i->first+string("=\"")+i->second+string("\""); } if(mIsEmpty){ lReturnValue+=" />\n"; }else{ lReturnValue+=">\n"; } return lReturnValue; }; /// void CXMLHelper::setName(const string& inName){ mName=inName; }; /// void CXMLHelper::setEmpty(){ mIsEmpty=true; }; /// void CXMLHelper::setEnd(){ mIsEnd=true; }; /// void CXMLHelper::addAttribute(const string& inAttribute, const string& inValue){ mAttributes[inAttribute]=inValue; }; /// void CXMLHelper::addAttribute(const string& inAttribute, int inValue){ char lValue[20]; sprintf(lValue,"%d",inValue); mAttributes[inAttribute]=string(lValue); }; /// void CXMLHelper::addAttribute(const string& inAttribute, double inValue){ char lValue[20]; sprintf(lValue,"%lf",inValue); mAttributes[inAttribute]=string(lValue); }; gift-0.1.14/libMRML/cc/CXMLElementVisitor.cc0000644000175200001440000000047410220502730015230 00000000000000#include "libMRML/include/CXMLElement.h" #include "libMRML/include/CXMLElementVisitor.h" bool CXMLElementVisitor::startVisit(CXMLElement& inVisited){ this->startVisit((const CXMLElement&)inVisited); }; void CXMLElementVisitor::endVisit(CXMLElement& inVisited){ this->endVisit((const CXMLElement&)inVisited); }; gift-0.1.14/libMRML/cc/CXMLElementBuilder.cc0000644000175200001440000000546510220502730015164 00000000000000#include #include // for printouts #include "libMRML/include/CXMLElementBuilder.h" void newStartXMLElement(void *inUserData, const char *inElementName, const char **inAttributes){ #ifdef XEB_PRINTOUT cout << "STARTING:" << inElementName << endl; #endif CXMLElement** lDocumentTree=(CXMLElement**)inUserData; if(!(*lDocumentTree)){ *lDocumentTree=new CXMLElement(inElementName, inAttributes); }else{ (*lDocumentTree)->addChild(inElementName, inAttributes); } } void newXMLTextElement(void *inUserData, const XML_Char *inText, const int inSize){ CSelfDestroyPointer lBuffer((char*)operator new(inSize+1)); strncpy(lBuffer,inText,inSize); lBuffer[inSize]=(char)0; string lText(lBuffer); #ifdef XEB_PRINTOUT cout << inSize << ":--------------------TEXT_" << lText << "_" << endl; #endif // bool lWhitespaceOnly(true); // for(char* i(lBuffer); // i!=((char*)lBuffer)+inSize; // i++){ // if((*i!=' ') // && (*i!='\n') // && (*i!='\t')){ // lWhitespaceOnly=false; // } // } // if(!lWhitespaceOnly){ CXMLElement** lDocumentTree=(CXMLElement**)inUserData; if(*lDocumentTree){ (*lDocumentTree)->addChild(new CXMLElement(CXMLElement::cTextNode, (char*)lBuffer)); (*lDocumentTree)->moveUp(); } //}else{ //cout << "rejected: WHITESPACE ONLY" // << endl; //} } void newEndXMLElement(void *inUserData, const char *inElementName){ #ifdef XEB_PRINTOUT cout << "ENDING:" << inElementName << endl; #endif CXMLElement** lDocumentTree=(CXMLElement**)inUserData; (*lDocumentTree)->moveUp(); } CXMLElement* CXMLElementBuilder::stringToElement(const string& inString){ XML_Parser lParser = XML_ParserCreate(NULL);//default encoding CXMLElement** lDocumentRoot=new CXMLElement*; *lDocumentRoot=0; XML_SetUserData(lParser, lDocumentRoot);//ex this XML_SetElementHandler(lParser, newStartXMLElement,//ex startMRMLElement newEndXMLElement);//ex endMRMLElement XML_SetCharacterDataHandler(lParser, newXMLTextElement); bool lDone=false; /* I just got a sligthly misterious bug in a realloc in expat. I try to solve this by copying c_str() to char* using a strdup() */ char* lCopy(strdup(inString.c_str())); if (!XML_Parse(lParser, lCopy, inString.size(), lDone)) { cerr << "CCommunicationHandler.cc: __LINE__ XML ERROR: " << XML_ErrorString(XML_GetErrorCode(lParser)) << " at line " << XML_GetCurrentLineNumber(lParser) << endl; delete *lDocumentRoot; delete lDocumentRoot; return 0;// instead of exit } free(lCopy); XML_ParserFree(lParser); CXMLElement* lReturnValue(*lDocumentRoot); delete lDocumentRoot; return lReturnValue; } CXMLElementBuilder::CXMLElementBuilder(){}; gift-0.1.14/libMRML/cc/CXEVI18nTranslator.cc0000644000175200001440000000234610220502730015052 00000000000000 #include "libMRML/include/CXEVI18nTranslator.h" #include "libMRML/include/CI18nTranslator.h" #include /** A visitor that visits XML elements in order to translate them */ CXEVI18nTranslator::CXEVI18nTranslator(const CI18nTranslator& inTranslator, string inLanguageCode):mTranslator(inTranslator), mLanguageCode(inLanguageCode){ }; /** actually carrying out the visit */ bool CXEVI18nTranslator::startVisit(const CXMLElement& inVisited){ assert(0); } /** actually carrying out the visit */ void CXEVI18nTranslator::endVisit(const CXMLElement& inVisited){ assert(0); } /** actually carrying out the visit */ bool CXEVI18nTranslator::startVisit(CXMLElement& inVisited){ list >* lNamedValueList=inVisited.createNamedValueList(); if(lNamedValueList){ for(list >::const_iterator i=lNamedValueList->begin(); i!=lNamedValueList->end(); i++){ if(mTranslator.shouldBeTranslatedAttribute(i->first)){ inVisited.addAttribute(i->first,mTranslator.translateAttribute(mLanguageCode, i->first, i->second).second); } } } }; /** actually carrying out the visit */ void CXEVI18nTranslator::endVisit(CXMLElement& inVisited){ } gift-0.1.14/libMRML/cc/Makefile.am0000644000175200001440000000656410170457766013354 00000000000000# -*- Mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # #Makefile for the inverted File library # CCCONFIG=sed -e "s:__EXECBINDIR__:@DEBEXECBINDIR@:g;s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@DEBPERLLIBDIR@:g;s:__DATADIR__:@DEBDATADIR@:g;s:__LIBDIR__:@DEBSHAREDIR@:g;s:__HOME__:${HOME}:g;s:__WEB_PUBLISHING_DIRECTORY__:@WEB_PUBLISHING_DIRECTORY@:g;s§__WEB_PUBLISHING_LOCATION__§@WEB_PUBLISHING_LOCATION@§g;" < $< > $@ # noinst_LIBRARIES= libMRML.a lib_LTLIBRARIES = libMRML.la INCLUDES= -DHAS_BOOL \ -DLINK_DYNAMICALLY\ -I$(top_srcdir) libMRML_la_LDFLAGS=@PRE_INSTALL_LIBDIRS@ -version-info 4:0:3 #CAccessorAdminCollection.cc: CAccessorAdminCollection.pre-cc # $(CCCONFIG) # libMRML_a_SOURCES= libMRML_la_SOURCES= \ getLibNameFromFileName.cc\ \ CAccessorElement.cc\ \ CAccessor.cc\ CAccessorImplementation.cc\ \ CAccessorFactoryContainer.cc\ CAccessorFactory.cc\ CAFPlugin.cc\ \ CRelevanceLevel.cc \ CRelevanceLevelList.cc \ \ CIDRelevanceLevelPair.cc \ CIDRelevanceLevelPairList.cc \ \ CAccessorAdmin.cc \ CAccessorAdminCollection.cc \ CPropertySheetList.cc \ CSessionManager.cc \ \ CAlgorithmCollection.cc \ \ CDynamicQueryFactory.cc\ CQueryPlugin.cc\ CStaticQueryFactory.cc\ \ GIFTExceptions.cc \ \ CAttributeList.cc \ CXMLHelper.cc \ CXMLElement.cc \ \ CAlgorithm.cc \ \ CQueryTreeNode.cc\ CQueryTreeBuilder.cc\ \ CQuery.cc \ CQMultiple.cc \ \ CMagic.cc\ \ CQueryParadigmMatcher.cc\ \ mrml_const.cc\ \ CXMLElementVisitor.cc\ CXMLElementBuilder.cc\ CXEVCommunication.cc\ \ CMutex.cc\ \ CCommunicationHandler.cc\ \ CTimeStampGenerator.cc\ \ CDebuggingMemoryManager.cc\ CRPipe.cc CReaper.cc CReaperDistributor.cc safePopen.cc\ createErrorMessage.cc\ CI18nTranslator.cc CXEVI18nTranslator.cc CLEANFILES=libMRML-config.cc #libMRML-config.cc: libMRML-config.pre-cc ../../make-gift-config.pl # perl ../../make-gift-config.pl CXXFLAGS ' $(CXXFLAGS) ' INCLUDES ' -I$(includedir)/libMRML/include ' LDFLAGS '$(LDFLAGS)' LIBS ' $(LIBS) ' libdir ' -L $(libdir) ' < libMRML-config.pre-cc > libMRML-config.cc libMRML-config.cc: libMRML-config.pre-cc sed -e "s§%CXXFLAGS%§$(CXXFLAGS) -I$(includedir)§g;\ s§%INCLUDES%§-I$(includedir)§g;\ s§%LDFLAGS%§$(LDFLAGS)§g;\ s§%LIBS%§$(LIBS)§ g;\ s§%GIFT_MYSQL_DIR%§@GIFT_MYSQL_DIR@§g;\ s§%libdir%§$(libdir)§g;" < libMRML-config.pre-cc > libMRML-config.cc bin_PROGRAMS= libMRML-config libMRML_config_SOURCES= libMRML-config.cc EXTRA_DIST=libMRML-config.pre-cc dist-hook: rm $(distdir)/libMRML-config.cc gift-0.1.14/libMRML/cc/Makefile.in0000644000175200001440000006531410220474100013334 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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@ # -*- Mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # #Makefile for the inverted File library # SOURCES = $(libMRML_la_SOURCES) $(libMRML_config_SOURCES) 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 = : host_triplet = @host@ bin_PROGRAMS = libMRML-config$(EXEEXT) subdir = libMRML/cc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libMRML_la_LIBADD = am_libMRML_la_OBJECTS = getLibNameFromFileName.lo CAccessorElement.lo \ CAccessor.lo CAccessorImplementation.lo \ CAccessorFactoryContainer.lo CAccessorFactory.lo CAFPlugin.lo \ CRelevanceLevel.lo CRelevanceLevelList.lo \ CIDRelevanceLevelPair.lo CIDRelevanceLevelPairList.lo \ CAccessorAdmin.lo CAccessorAdminCollection.lo \ CPropertySheetList.lo CSessionManager.lo \ CAlgorithmCollection.lo CDynamicQueryFactory.lo \ CQueryPlugin.lo CStaticQueryFactory.lo GIFTExceptions.lo \ CAttributeList.lo CXMLHelper.lo CXMLElement.lo CAlgorithm.lo \ CQueryTreeNode.lo CQueryTreeBuilder.lo CQuery.lo CQMultiple.lo \ CMagic.lo CQueryParadigmMatcher.lo mrml_const.lo \ CXMLElementVisitor.lo CXMLElementBuilder.lo \ CXEVCommunication.lo CMutex.lo CCommunicationHandler.lo \ CTimeStampGenerator.lo CDebuggingMemoryManager.lo CRPipe.lo \ CReaper.lo CReaperDistributor.lo safePopen.lo \ createErrorMessage.lo CI18nTranslator.lo CXEVI18nTranslator.lo libMRML_la_OBJECTS = $(am_libMRML_la_OBJECTS) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_libMRML_config_OBJECTS = libMRML-config.$(OBJEXT) libMRML_config_OBJECTS = $(am_libMRML_config_OBJECTS) libMRML_config_LDADD = $(LDADD) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/CAFPlugin.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CAccessor.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CAccessorAdmin.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CAccessorAdminCollection.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CAccessorElement.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CAccessorFactory.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CAccessorFactoryContainer.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CAccessorImplementation.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CAlgorithm.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CAlgorithmCollection.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CAttributeList.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CCommunicationHandler.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CDebuggingMemoryManager.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CDynamicQueryFactory.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CI18nTranslator.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CIDRelevanceLevelPair.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CIDRelevanceLevelPairList.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CMagic.Plo ./$(DEPDIR)/CMutex.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CPropertySheetList.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CQMultiple.Plo ./$(DEPDIR)/CQuery.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CQueryParadigmMatcher.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CQueryPlugin.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CQueryTreeBuilder.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CQueryTreeNode.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CRPipe.Plo ./$(DEPDIR)/CReaper.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CReaperDistributor.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CRelevanceLevel.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CRelevanceLevelList.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CSessionManager.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CStaticQueryFactory.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CTimeStampGenerator.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CXEVCommunication.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CXEVI18nTranslator.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CXMLElement.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CXMLElementBuilder.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CXMLElementVisitor.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CXMLHelper.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/GIFTExceptions.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/createErrorMessage.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/getLibNameFromFileName.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libMRML-config.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/mrml_const.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/safePopen.Plo CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libMRML_la_SOURCES) $(libMRML_config_SOURCES) DIST_SOURCES = $(libMRML_la_SOURCES) $(libMRML_config_SOURCES) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ CCCONFIG = sed -e "s:__EXECBINDIR__:@DEBEXECBINDIR@:g;s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@DEBPERLLIBDIR@:g;s:__DATADIR__:@DEBDATADIR@:g;s:__LIBDIR__:@DEBSHAREDIR@:g;s:__HOME__:${HOME}:g;s:__WEB_PUBLISHING_DIRECTORY__:@WEB_PUBLISHING_DIRECTORY@:g;s§__WEB_PUBLISHING_LOCATION__§@WEB_PUBLISHING_LOCATION@§g;" < $< > $@ # noinst_LIBRARIES= libMRML.a lib_LTLIBRARIES = libMRML.la INCLUDES = -DHAS_BOOL \ -DLINK_DYNAMICALLY\ -I$(top_srcdir) libMRML_la_LDFLAGS = @PRE_INSTALL_LIBDIRS@ -version-info 4:0:3 #CAccessorAdminCollection.cc: CAccessorAdminCollection.pre-cc # $(CCCONFIG) # libMRML_a_SOURCES= libMRML_la_SOURCES = \ getLibNameFromFileName.cc\ \ CAccessorElement.cc\ \ CAccessor.cc\ CAccessorImplementation.cc\ \ CAccessorFactoryContainer.cc\ CAccessorFactory.cc\ CAFPlugin.cc\ \ CRelevanceLevel.cc \ CRelevanceLevelList.cc \ \ CIDRelevanceLevelPair.cc \ CIDRelevanceLevelPairList.cc \ \ CAccessorAdmin.cc \ CAccessorAdminCollection.cc \ CPropertySheetList.cc \ CSessionManager.cc \ \ CAlgorithmCollection.cc \ \ CDynamicQueryFactory.cc\ CQueryPlugin.cc\ CStaticQueryFactory.cc\ \ GIFTExceptions.cc \ \ CAttributeList.cc \ CXMLHelper.cc \ CXMLElement.cc \ \ CAlgorithm.cc \ \ CQueryTreeNode.cc\ CQueryTreeBuilder.cc\ \ CQuery.cc \ CQMultiple.cc \ \ CMagic.cc\ \ CQueryParadigmMatcher.cc\ \ mrml_const.cc\ \ CXMLElementVisitor.cc\ CXMLElementBuilder.cc\ CXEVCommunication.cc\ \ CMutex.cc\ \ CCommunicationHandler.cc\ \ CTimeStampGenerator.cc\ \ CDebuggingMemoryManager.cc\ CRPipe.cc CReaper.cc CReaperDistributor.cc safePopen.cc\ createErrorMessage.cc\ CI18nTranslator.cc CXEVI18nTranslator.cc CLEANFILES = libMRML-config.cc libMRML_config_SOURCES = libMRML-config.cc EXTRA_DIST = libMRML-config.pre-cc all: all-am .SUFFIXES: .SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: $(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 libMRML/cc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libMRML/cc/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libMRML.la: $(libMRML_la_OBJECTS) $(libMRML_la_DEPENDENCIES) $(CXXLINK) -rpath $(libdir) $(libMRML_la_LDFLAGS) $(libMRML_la_OBJECTS) $(libMRML_la_LIBADD) $(LIBS) 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 libMRML-config$(EXEEXT): $(libMRML_config_OBJECTS) $(libMRML_config_DEPENDENCIES) @rm -f libMRML-config$(EXEEXT) $(CXXLINK) $(libMRML_config_LDFLAGS) $(libMRML_config_OBJECTS) $(libMRML_config_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAFPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAccessor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAccessorAdmin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAccessorAdminCollection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAccessorElement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAccessorFactory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAccessorFactoryContainer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAccessorImplementation.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAlgorithm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAlgorithmCollection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAttributeList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CCommunicationHandler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDebuggingMemoryManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDynamicQueryFactory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CI18nTranslator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CIDRelevanceLevelPair.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CIDRelevanceLevelPairList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CMagic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CMutex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CPropertySheetList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CQMultiple.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CQuery.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CQueryParadigmMatcher.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CQueryPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CQueryTreeBuilder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CQueryTreeNode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CRPipe.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CReaper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CReaperDistributor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CRelevanceLevel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CRelevanceLevelList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CSessionManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CStaticQueryFactory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CTimeStampGenerator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CXEVCommunication.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CXEVI18nTranslator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CXMLElement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CXMLElementBuilder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CXMLElementVisitor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CXMLHelper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GIFTExceptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/createErrorMessage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getLibNameFromFileName.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMRML-config.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mrml_const.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safePopen.Plo@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: 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 $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) install-binPROGRAMS: install-libLTLIBRARIES installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -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-libLTLIBRARIES \ 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-exec-am: install-binPROGRAMS install-libLTLIBRARIES 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-info-am \ uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libLTLIBRARIES clean-libtool ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-libLTLIBRARIES \ 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-info-am \ uninstall-libLTLIBRARIES #libMRML-config.cc: libMRML-config.pre-cc ../../make-gift-config.pl # perl ../../make-gift-config.pl CXXFLAGS ' $(CXXFLAGS) ' INCLUDES ' -I$(includedir)/libMRML/include ' LDFLAGS '$(LDFLAGS)' LIBS ' $(LIBS) ' libdir ' -L $(libdir) ' < libMRML-config.pre-cc > libMRML-config.cc libMRML-config.cc: libMRML-config.pre-cc sed -e "s§%CXXFLAGS%§$(CXXFLAGS) -I$(includedir)§g;\ s§%INCLUDES%§-I$(includedir)§g;\ s§%LDFLAGS%§$(LDFLAGS)§g;\ s§%LIBS%§$(LIBS)§ g;\ s§%GIFT_MYSQL_DIR%§@GIFT_MYSQL_DIR@§g;\ s§%libdir%§$(libdir)§g;" < libMRML-config.pre-cc > libMRML-config.cc dist-hook: rm $(distdir)/libMRML-config.cc # 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: gift-0.1.14/libMRML/cc/CCommunicationHandler.cc0000644000175200001440000005715710220502730016013 00000000000000//configuration files for sessions and algorithms/collections //Sockets #include #include #include #include #include #include #include // #include "libMRML/include/CXEVCommunication.h" // the visitor analyzing the document trees built #include "libMRML/include/CCommunicationHandler.h" #include #include #include #include "libMRML/include/mrml_const.h" //mrml string constants newStart/EndMRMLElement #include "../include/CTimeStampGenerator.h" // for time stamps string gGIFTHome;//dirty but necessary CMutex* gMutex(0); //we need a global one /*********************************************************************** itoa Function : Converts integer to String using sprintf Input : Integer Return : String ***********************************************************************/ string itoa (int val,int length) { char *car = new char[length+1]; for(int i=0; ilock(); outLogFile << inString << flush; gMutex->unlock(); //i get problems when writing more than 64K to a socket. #define _SOCKET_WORKAROUND #ifdef _SOCKET_WORKAROUND int i=0; int lWriteSize=0x1000; // //this is really embarassing //sleep(1); waitWriteStream(inSocket); for(; i0){ return false; } waitWriteStream(inSocket); } if(write(inSocket, inString.c_str() +i*lWriteSize, inString.size()%lWriteSize) // The flags are none for the moment. <=0 ) return false; #else if(write(inSocket, inString.c_str(), inString.size()) // The flags are none for the moment. <=0 )//this closing bracket has come still untouched from J Raki ;-) return false; #endif #ifdef _DEBUG cout << "END:Sending a message... " << endl << flush; #endif waitWriteStream(inSocket); cout << "Message successfully sent!" << endl; return true; } /*********************************************************************** ReadMessage Function : read the message coming from the Java Applet using the communication protocol Input : Socket stream s Return : 0 if no error else -1 ***********************************************************************/ bool asyncReadChar(int inSocket,char* outChar){ waitReadStream(inSocket); if(read(inSocket, outChar, 1)>=0) return true; else return false; } bool readChar(int inSocket,char* outChar){ *outChar=(char)0; if(read(inSocket, outChar, 1)>=0) return true; else{ return false; } } int readMessage(int inSocket, string& outMessage) { //J. Raki (obsolete) cout << "readMessage:" << flush; char lChar[2]; lChar[1]=0; while(readChar(inSocket,lChar)){ #ifdef _DEBUG cout << ValInt[0] << flush; #endif outMessage += lChar; } return 0; } extern string gGIFTHome;// this variable contains the directory which //contains the configuration of the GIFT extern bool asyncReadChar(int, char*); extern bool sendMessage(int, string, ostream&); void newStartMRMLElement(void *inUserData, const char *inElementName, const char **inAttributes){ cout << "STARTING:" << inElementName << endl; CXMLElement* lDocumentTree=(CXMLElement*)inUserData; lDocumentTree->addChild(inElementName, inAttributes); } void newMRMLTextElement(void *inUserData, const XML_Char *inText, const int inSize){ CSelfDestroyPointer lBuffer((char*)operator new(inSize+1)); strncpy(lBuffer,inText,inSize); lBuffer[inSize]=(char)0; string lText(lBuffer); cout << inSize << ":--------------------TEXT_" << lText << "_" << endl; // bool lWhitespaceOnly(true); // for(char* i(lBuffer); // i!=((char*)lBuffer)+inSize; // i++){ // if((*i!=' ') // && (*i!='\n') // && (*i!='\t')){ // lWhitespaceOnly=false; // } // } // if(!lWhitespaceOnly){ CXMLElement* lDocumentTree=(CXMLElement*)inUserData; lDocumentTree->addChild(new CXMLElement(CXMLElement::cTextNode, (char*)lBuffer)); lDocumentTree->moveUp(); //}else{ //cout << "rejected: WHITESPACE ONLY" // << endl; //} } void newEndMRMLElement(void *inUserData, const char *inElementName){ cout << "ENDING:" << inElementName << endl; CXMLElement* lDocumentTree=(CXMLElement*)inUserData; lDocumentTree->moveUp(); if(string(inElementName)==mrml_const::mrml){ lDocumentTree->moveUp(); } } //---------------------------------------- //communications: //---------------------------------------- /// setting the communication socket for this session void CCommunicationHandler::setSocket(int inSocket){ mSocket=inSocket; } //---------------------------------------- // helpers for creating mrml messages //---------------------------------------- //the preamble for a session string CCommunicationHandler::preamble(){ //ZORAN: I had to change this to something that is available all the time. // BTW, this also preoduced a Socket Error, namely a connection refused, // but was not linked to our problems. return string("\n " //"\n" //"\n" ); } //Frame: this is for all messages the same string CCommunicationHandler::frame(const string& inSession, const string& inString){ return string(preamble()+"\n"+inString+"\n\n"); } //---------------------------------------- //making attributes out of name/value pairs string CCommunicationHandler::toAttribute(string inName, string inString){ return inName +string("=\"") +inString +string("\""); } string CCommunicationHandler::toAttribute(string inName, int inInt){ char lBuffer[20]; sprintf(lBuffer,"%d",inInt); string lString(lBuffer); return inName +string("\"") +lBuffer +string("\" "); } string CCommunicationHandler::toAttribute(string inName, double inFloat){ char lBuffer[20]; sprintf(lBuffer,"%lf",inFloat); string lString(lBuffer); return inName +string("=\"") +lBuffer +string("\""); } // //---------------------------------------- // //turning a relevance level element into a string // //(obsolete) // string CCommunicationHandler::stringOfRelevanceLevelElement(const CRelevanceLevel& inRE, // double inUserRelevance=0.5){ // return string("\n"); // } // string CCommunicationHandler::stringOfRelevanceLevelList(const CRelevanceLevelList& inRLL){ // string lReturnValue("\n"); // for(CRelevanceLevelList::const_iterator i=inRLL.begin(); // i!=inRLL.end(); // i++){ // lReturnValue+=stringOfRelevanceLevelElement(*i); // } // return lReturnValue+"\n"; // } //---------------------------------------- //Error message int CCommunicationHandler::sendError(const string& inSession, const string& inMessage){ CXMLElement* lErrorElement=new CXMLElement("error",0); lErrorElement->addAttribute("message",inMessage); } //---------------------------------------- // making a new session void CCommunicationHandler::openSession(const string& inUserName, const string& inSessionName){ CXMLElement* lOpenedSession(mSessionManager.openSession(inUserName, "", inSessionName)); //HACK to change the session of the multi response if(lOpenedSession){ string lNewID(lOpenedSession->stringReadAttribute(mrml_const::session_id).second); cout << mMultiResponse->stringReadAttribute(mrml_const::session_id).second << "-> new Session ID: " << lNewID << endl; mMultiResponse->addAttribute(string(mrml_const::session_id), lNewID); cout << "current state in multi reponse :" << mMultiResponse->stringReadAttribute(mrml_const::session_id).second << endl; } addToMultiResponse(lOpenedSession); } // renaming the current session void CCommunicationHandler::renameSession(const string& inSessionID, const string& inName){ addToMultiResponse(mSessionManager.renameSession(inSessionID, inName)); //FIXME : here we need to do SOMETHING } // renaming the current session void CCommunicationHandler::deleteSession(const string& inSessionID){ addToMultiResponse(mSessionManager.deleteSession(inSessionID)); } // getting the property sheet for a given algorithm void CCommunicationHandler::getPropertySheet(const string& inSessionID, const string& inAlgorithmID){ CXMLElement* lPropertySheet(mSessionManager.getPropertySheet(inSessionID, inAlgorithmID)); if(lPropertySheet){ addToMultiResponse(lPropertySheet); } } //---------------------------------------- //the handshake message int CCommunicationHandler::sendHandshake(const string& inUser){ //at present this is only a dummy gMutex->lock(); pair lSessionIDHandshakePair=mSessionManager.toXMLHandshake(inUser); string& lNewestSession(lSessionIDHandshakePair.first); string& lHandshake(lSessionIDHandshakePair.second); int lReturnValue(sendMessage(mSocket, frame(lNewestSession, lHandshake).c_str(), mLog)); gMutex->unlock(); return lReturnValue; } //---------------------------------------- void CCommunicationHandler::getSessions(const string& inUser){ } //---------------------------------------- void CCommunicationHandler::getCollections(){ CXMLElement* lCollectionList(mSessionManager.getCollections()); addToMultiResponse(lCollectionList); } //---------------------------------------- void CCommunicationHandler::getAlgorithms(){ CXMLElement* lAlgorithms(mSessionManager.getAlgorithms()); addToMultiResponse(lAlgorithms); } //---------------------------------------- //the result of a query int CCommunicationHandler::sendResult(const string& inSession, const CXMLElement& inRLL){ assert("something wrong"); } //---------------------------------------- //random images int CCommunicationHandler::sendRandomImages(const string& inSession, const string& inAlgorithm, const string& inCollection, const string& inNumberOfImages) { int lNumberOfImages=atoi(inNumberOfImages.c_str()); CXMLElement* lRLL=mSessionManager.getRandomImages(inSession, inAlgorithm, lNumberOfImages); cout << "SENDRANDOM" << endl << flush; addToMultiResponse(lRLL); return true; }; //---------------------------------------- //setting properties of the query void CCommunicationHandler::setResultSize(int inResultSize){ mResultSize=inResultSize; } void CCommunicationHandler::setResultCutoff(const string& inCutoff){ setResultCutoff(atof(inCutoff.c_str())); } void CCommunicationHandler::setResultCutoff(double inCutoff){ mCutoff=inCutoff; } void CCommunicationHandler::setCollectionID(const string& inID){ mCollection=inID; } void CCommunicationHandler::setAlgorithmID(const string& inID){ mAlgorithm=inID; } //---------------------------------------- //parse XML using expat //---------------------------------------- void CCommunicationHandler::parseString(const string& inMessage){ gMutex->lock(); bool lDone=false; do { if (!XML_Parse(mParser, inMessage.c_str(), inMessage.size(), lDone)) { cerr << "CCommunicationHandler.cc: __LINE__ XML ERROR: " << XML_ErrorString(XML_GetErrorCode(mParser)) << " at line " << XML_GetCurrentLineNumber(mParser) << endl; mDocumentRoot=0; return;// instead of exit } } while (!lDone); gMutex->unlock(); } //---------------------------------------- //parsing from a stream: //read each character //parse it bool mParsingFinished; void CCommunicationHandler::clearParsingFinished(){ mParsingFinished=false; }; void CCommunicationHandler::setParsingFinished(){ mParsingFinished=true; }; bool CCommunicationHandler::isParsingFinished()const{ return mParsingFinished; }; bool CCommunicationHandler::readAndParse(){ gMutex->lock(); clearParsingFinished(); makeParser(); bool lSuccess=false; char lBuffer[20]; string lLogString; cerr << __FILE__ << ":" << __LINE__ << ":readAndParse before parse" << endl; do { cout //<< "-" << flush; #ifdef _DEBUG #endif //was asyncReadChar if(readChar(mSocket, lBuffer)) { cout //<< "<" << lBuffer[0] //<< ">" << flush; #ifdef _DEBUG #endif lBuffer[1]=0; lLogString+=lBuffer; if (!XML_Parse(mParser, lBuffer, 1, false)) { cerr << "CCommunicationHandler.cc:" << __LINE__ << ": XML ERROR " << XML_ErrorString(XML_GetErrorCode(mParser)) << " at xml line " << XML_GetCurrentLineNumber(mParser) << endl; lSuccess=false; }else lSuccess=true;// i read at least one character }else{ cerr << "Stream broke down!" << XML_ErrorString(XML_GetErrorCode(mParser)) << " at line " << XML_GetCurrentLineNumber(mParser) << endl << "The cstdio stream was " << mSocket << endl; lSuccess=false; } } while (lSuccess && //!isParsingFinished() ex !(mDocumentRoot->isSubtreeFinished()) ); XML_Parse(mParser, lBuffer, 0, true); { ofstream lInLogFile((gGIFTHome + string("/gift-last-in-message.mrml")).c_str()); lInLogFile << endl << " " << endl << lLogString << flush << endl; } if(lSuccess){ mLog << endl << " " << endl << lLogString << flush << endl; } CXEVCommunication lVisitor(this); gMutex->unlock(); cerr << __FILE__ << ":" << __LINE__ << ":readAndParse before visit" << endl; mDocumentRoot->check(); cerr << __FILE__ << ":" << __LINE__ << ":readAndParse before check" << endl; mDocumentRoot->traverse(lVisitor); cerr << __FILE__ << ":" << __LINE__ << ":readAndParse after visit" << endl; return lSuccess; } void CCommunicationHandler::makeParser(){ gMutex->lock(); if(mParser) XML_ParserFree(mParser); mParser = XML_ParserCreate(NULL);//default encoding mDocumentRoot=new CXMLElement("__ROOT__",0); XML_SetUserData(mParser, mDocumentRoot);//ex this XML_SetElementHandler(mParser, newStartMRMLElement,//ex startMRMLElement newEndMRMLElement);//ex endMRMLElement XML_SetCharacterDataHandler(mParser, newMRMLTextElement); gMutex->unlock(); } //---------------------------------------- /** Clears the algorithmTree element */ //---------------------------------------- void CCommunicationHandler::clearAlgorithmElement(){ mAlgorithmTree=0; }; //---------------------------------------- /** start of an element in the tree of configured algorithms. */ //---------------------------------------- void CCommunicationHandler::startAlgorithmElement(const char* inName, const char* const* const inAttributes){ if(!mAlgorithmTree){ mAlgorithmTree=new CAlgorithm(inName,inAttributes); }else{ mAlgorithmTree->addChild(inName,inAttributes); } }; //---------------------------------------- /** end of an element in the tree of configured algorithms */ //---------------------------------------- void CCommunicationHandler::endAlgorithmElement(){ if(mAlgorithmTree){ mAlgorithmTree->moveUp(); } }; //---------------------------------------- /** clear the pointer to the algorithm tree */ //---------------------------------------- void CCommunicationHandler::initAlgorithmElement(){ mAlgorithmTree=0; }; //---------------------------------------- /** read the pointer to the algorithm tree */ //---------------------------------------- CAlgorithm* CCommunicationHandler::readAlgorithmElement(){ return mAlgorithmTree; }; int CCommunicationHandler::getQueryAtRandomCount()const{ return mQueryAtRandomCount; } void CCommunicationHandler::incrementQueryAtRandomCount(){ mQueryAtRandomCount++; } //---------------------------------------- //Using the session manager which is a member //of this for other purposes //---------------------------------------- CSessionManager& CCommunicationHandler::getSessionManager(){ return mSessionManager; } //---------------------------------------- /** Start building a tree by successive adding of XML elements */ void CCommunicationHandler::startTreeBuilding(const char* inElementName, const char*const*const inAttributes){ mCurrentTree=new CXMLElement(inElementName, inAttributes); }; /** Start building a tree by successive adding of XML elements */ void CCommunicationHandler::addToCurrentTree(const char* inElementName, const char*const* inAttributes){ mCurrentTree->addChild(new CXMLElement(inElementName, inAttributes)); }; /** move up in the tree */ void CCommunicationHandler::moveUpCurrentTree(){ mCurrentTree->moveUp(); }; /** is this building a tree at present? */ bool CCommunicationHandler::isBuildingTree()const{ return (mCurrentTree && (!mCurrentTree->isSubtreeFinished())); }; //---------------------------------------- //constructor/destructor //---------------------------------------- CCommunicationHandler::CCommunicationHandler(CSessionManager& inSessionManager, ofstream& inLogFile): mSessionManager(inSessionManager), mLog(inLogFile), mQueryAtRandomCount(0), mCurrentTree(0){ mResultSize=0; mCutoff=0.0; ///Constructing an expat parser mParser=0; makeParser(); } CCommunicationHandler::~CCommunicationHandler(){ //deleting the expat parser gMutex->lock(); XML_ParserFree(mParser); gMutex->unlock(); } /** If we process multiple queries which are part of one message, we have to first collect the answers from the requests, and then send the whole message. startMultiRequest and endMultiRequest are the functions which administer this process. startMultiRequest clears the message which is going to be built. */ void CCommunicationHandler::startMultiRequest(const string& inSessionID, const string& inLanguageCode){ mMultiResponse=new CXMLElement("mrml",0); mMultiResponse->addAttribute("session-id", inSessionID); CTimeStampGenerator lGenerator; addToMultiResponse(lGenerator.generateTimeStamp()); }; /** sends the message which has been built*/ void CCommunicationHandler::endMultiRequest(){ if(mMultiResponse){ string lMessage; mMultiResponse->addAttribute("just-for-test", "and-of-course-for-fun"); CTimeStampGenerator lGenerator; addToMultiResponse(lGenerator.generateTimeStamp()); #warning FIXME add response translation here if(mMultiResponse->stringReadAttribute(mrml_const::session_id).first){ mSessionManager.translate(mMultiResponse->stringReadAttribute(mrml_const::session_id).second, *mMultiResponse); } gMutex->lock(); mMultiResponse->toXML(lMessage); cout << "endMultiRequest: WRITING: " << lMessage << endl; sendMessage(mSocket, preamble()+"\n"+lMessage+"\n", mLog); gMutex->unlock(); } }; /** adds an XMLElement to the multi-response which is built */ void CCommunicationHandler::addToMultiResponse(CXMLElement* inElement){ gMutex->lock(); if(0){ string lOutString; inElement->toXML(lOutString); cout << "CCommunicationHandler::addToMultiResponse: adding " << lOutString << endl; } assert(mMultiResponse); if(inElement){ mMultiResponse->addChild(inElement); mMultiResponse->moveUp(); } gMutex->unlock(); }; /** set the name of the peer, this is just an informative string, destined for the log. The string can contain either the IP of the connecting computer, or else the peer credentials of the connecting tasks. */ void CCommunicationHandler::setPeerAddressString(string inString){ gMutex->lock(); mPeerAddressString=inString; gMutex->unlock(); }; /** get the Peer adress string */ const string& CCommunicationHandler::getPeerAddressString()const{ return mPeerAddressString; } const string CCommunicationHandler::getCurrentSessionID(){ return mMultiResponse->stringReadAttribute(mrml_const::session_id).second; } gift-0.1.14/libMRML/cc/CMutex.cc0000644000175200001440000000352310220502730012776 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // WITHOUT THIS DEFINE THE INITIALISATION WILL COMPLAIN #define _GNU_SOURCE #include "libMRML/include/CMutex.h" #include #include #include #include CMutex::CMutex() { #ifdef __GIFT_USES_THREADS__ #warning using threads pthread_mutexattr_init(&mMutexAttribute); assert(!(pthread_mutexattr_settype(&mMutexAttribute, PTHREAD_MUTEX_RECURSIVE_NP))); assert(!pthread_mutex_init(&mMutex, &mMutexAttribute)); #else #warning NOT USING THREADS #endif } void CMutex::lock()const{ #ifdef __GIFT_USES_THREADS__ #warning using threads pthread_mutex_lock(&mMutex); //cout << "&{" << getpid() << "}"<< flush; #else #warning NOT USING THREADS #endif }; void CMutex::unlock()const{ #ifdef __GIFT_USES_THREADS__ #warning using threads pthread_mutex_unlock(&mMutex); // cout << "u{" << getpid() << "}"<< flush; #else #warning NOT USING THREADS #endif } gift-0.1.14/libMRML/cc/CQueryTreeBuilder.cc0000644000175200001440000000705210220502730015131 00000000000000#include "libMRML/include/my_throw.h" #include "libMRML/include/GIFTExceptions.h" #include "libMRML/include/CQueryTreeBuilder.h" #include "libMRML/include/CAlgorithm.h" #include "libMRML/include/mrml_const.h" //---------------------------------------- CQueryTreeBuilder::CQueryTreeBuilder(){}; /** Building a query tree out of the information we have gathered true indicates success... */ pair CQueryTreeBuilder::buildQueryTree(CAlgorithm& inAlgorithm, CAccessorAdminCollection& inBaseConfiguration, CStaticQueryFactory& inBaseTypeFactory, CQueryContainer* inoutContainer)const{ // cout << __FILE__ << ":" << __LINE__ << ":WARNING returning 0,0 as query tree" << endl; // cerr << __FILE__ << ":" << __LINE__ << ":WARNING returning 0,0 as query tree" << endl; // return pair(0,0); // // 1. generate a CQuery structure with the right type // cout << "[mQ:" << inAlgorithm.getBaseType() << endl; CQueryTreeNode* lRoot=new CQueryTreeNode(); if(!inoutContainer){ inoutContainer=new CQueryContainer(); } // CSelfDestroyPointer > > lAttributes=inAlgorithm.createNamedValueList(); cout << "mQ]"<getTypeOfNode()==CXMLElement::cElementNode){ CXMLElement* lDereferencedI=*i; CAlgorithm* iAlgorithm=(CAlgorithm*)(lDereferencedI); cout << "Build subalgorithm" << lDereferencedI << " {" << iAlgorithm->getName() << "}:" << iAlgorithm->getBaseType() << endl; // check, that this XML element is really an algorithm if(iAlgorithm->getName()==mrml_const::algorithm){ cout << "really doing it" << endl; pair lNewNode=buildQueryTree(*iAlgorithm, inBaseConfiguration, inBaseTypeFactory, inoutContainer); lRoot->addChild(lNewNode.second, iAlgorithm->getWeight()); } } // // at the end, we tell the query structure // that it has recieved all the data it can // get, and that it better should get ready. // cout << "hier " << flush << endl; cout << inAlgorithm.getID() << flush << endl; // // In the very end configure the root // lRoot->configure(inAlgorithm, inBaseConfiguration, inBaseTypeFactory); return make_pair(inoutContainer,lRoot); } //---------------------------------------- /** given an ID find the right item in the query tree */ CQueryTreeNode* CQueryContainer::getQueryByID(const string& inID)const{ const_iterator lFound=find(inID); if(lFound==end()){ cout << "THROWING UP IN getQueryByID" << endl; string lThrowString= string("Current content of mQueryContainer \n"); for(const_iterator i=begin(); i!=end(); i++){ lThrowString+=i->first + string(",\n"); } lThrowString+=string("\n and we were searching for ")+inID; // if(size()){ // cerr << lThrowString << flush << endl; // return begin()->second; // } my_throw(VENotFound(strdup(lThrowString.c_str()))); return 0; }else{ return lFound->second; } } gift-0.1.14/libMRML/cc/CIDRelevanceLevelPairList.cc0000644000175200001440000000252510220502730016456 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CIDRelevanceLevelPairList * **************************************** * * modification history: * * WM 19990930 created file * **************************************** * * compiler defines used: * * ****************************************/ #include "libMRML/include/CIDRelevanceLevelPairList.h" CIDRelevanceLevelPairList::CIDRelevanceLevelPairList(){ }; gift-0.1.14/libMRML/cc/CQueryPlugin.cc0000644000175200001440000000525410220502730014163 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/CQueryPlugin.h" /** makes a CQuery object*/ CQuery* CQueryPlugin::makeQuery(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm){ return (*mMakeQuery)(inAccessorAdminCollection, inAlgorithm); } /** gets the name of the plugin*/ char* CQueryPlugin::getName(){ return (*mGetName)(); }; /** makes the CQueryPlugin. All it needs is: @param inLibraryFileName the file name of the shared object to be treated */ CQueryPlugin::CQueryPlugin(string inLibraryDirName, string inLibraryFileName, string inLibraryName): mGetName(0), mMakeQuery(0), mName("no name given"), mIsSane(0){ char* lError; string lLibraryPath=inLibraryDirName+"/"+inLibraryFileName; string lStringGetClassName(inLibraryName+"_getClassName"); string lStringMakeQuery(inLibraryName+"_makeQuery"); mDlOpenHandle = dlopen (lLibraryPath.c_str(), RTLD_LAZY); if (!mDlOpenHandle) { cerr << "..Could not open library: " << endl << dlerror() << endl; //exit(1); mIsSane=0; }else{ mGetName = (typeof(mGetName))dlsym(mDlOpenHandle, lStringGetClassName.c_str()); if ((lError = dlerror()) != NULL) { cerr << lError << endl; }else{ mName=(*mGetName)(); mMakeQuery=(typeof(mMakeQuery))dlsym(mDlOpenHandle, lStringMakeQuery.c_str()); if ((lError = dlerror()) != NULL) { cerr << lError << endl; }else{ mIsSane=1; } } } } CQueryPlugin::CQueryPlugin(CQueryPlugin& inPlugin): mGetName(inPlugin.mGetName), mMakeQuery(inPlugin.mMakeQuery), mName(inPlugin.mName){ } CQueryPlugin::~CQueryPlugin(){ if(mDlOpenHandle){ dlclose(mDlOpenHandle); } } bool CQueryPlugin::isSane()const{ return mIsSane; } gift-0.1.14/libMRML/cc/CAccessorImplementation.cc0000644000175200001440000001716510220502730016353 00000000000000// -*- Mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CAccessorImplementation - a base class for everything * accessing a GIFT database. * at present this will be either an inverted file * or a TrackingGIFT accessor. * **************************************** * * modification history: * * WM 19990804 created * **************************************** * * compiler defines used: * * _NO_PRINT_OFFSET_CHECK ? * _NO_CHECK_OFFSET_FILE ? * _NO_CHECK_CONSISTENCY ? * _NO_FIDPRINT ? * _NO_DIDPRINT ? * _NO_PRINT_ID ? * ****************************************/ #include #include #include "libMRML/include/CAccessorImplementation.h" #include #include #include #define _NO_PRINT_OFFSET_CHECK #define _NO_CHECK_OFFSET_FILE #define _NO_CHECK_CONSISTENCY #define _NO_FIDPRINT #define _NO_DIDPRINT #define _NO_PRINT_ID /*************************************** * * getAllIDs - make a list of all IDs * **************************************** * * modification history * * * ****************************************/ void CAccessorImplementation::getAllIDs(list& outReturnList)const{ for(TID_CAccessorElement_map::const_iterator i=mIDToAccessorElement.begin(); i!=mIDToAccessorElement.end(); i++){ outReturnList.push_back(i->first); } } /*************************************** * * getAllAccessorElements * **************************************** * * modification history * * * ****************************************/ void CAccessorImplementation::getAllAccessorElements(list& outReturnList)const{ for(TID_CAccessorElement_map::const_iterator i=mIDToAccessorElement.begin(); i!=mIDToAccessorElement.end(); i++){ outReturnList.push_back(i->second); } } /*************************************** * * getRandomIDs - make a list of distinct random IDs * **************************************** * * modification history * WM created 19990520 * * ****************************************/ void CAccessorImplementation::getRandomIDs(list& outReturnList, list::size_type inRequestedSize)const{ const list::size_type lModulo=mIDToAccessorElement.size(); inRequestedSize=min(lModulo, inRequestedSize); set::size_type> lPositions; /// for(int i=0; i::size_type>::const_iterator i=lPositions.begin(); i!=lPositions.end(); i++){ for(; lCurrentPosition<*i; lCurrentPosition++){ lCurrentID++; } outReturnList.push_back(lCurrentID->first); } } /*************************************** * * getRandomAccessorElements - make a list of distinct random IDs * **************************************** * * modification history * WM created 19990520 * * ****************************************/ void CAccessorImplementation::getRandomAccessorElements(list& outReturnList, list::size_type inRequestedSize)const{ if(!inRequestedSize){ return; } outReturnList.clear(); const list::size_type lModulo=mIDToAccessorElement.size(); inRequestedSize=min(lModulo, inRequestedSize); set::size_type> lPositions; /// for(int i=0; i::size_type lCurrentPosition(0); /// TID_CAccessorElement_map::const_iterator lCurrentID=mIDToAccessorElement.begin(); /// for(set::size_type>::const_iterator i=lPositions.begin(); i!=lPositions.end(); i++){ // cout << "Before lCurrentID" // << lCurrentID->first // << endl; for(/* keep lCurrentPosition */; lCurrentPosition<*i; lCurrentPosition++){ lCurrentID++; } // cout << "lCurrentID" // << lCurrentID->first // << endl; outReturnList.push_back(lCurrentID->second); } // cout << "still ariving here " << endl; } /*************************************** * * IDToAccessorElement - return the AccessorElement for an image for a given image ID * **************************************** * * modification history * * * ****************************************/ pair CAccessorImplementation::IDToAccessorElement(TID inID)const { TID_CAccessorElement_map::const_iterator lI=mIDToAccessorElement.find(inID); if(lI!=mIDToAccessorElement.end()) { return make_pair(true,(*lI).second); } else { cerr << "Error in Conversion from ID " << inID << " to AccessorElement." << endl; return make_pair(false,CAccessorElement(-1, "error", "error", "error")); } } /*************************************** * * IDToURL - return the URL for an image for a given image ID * **************************************** * * modification history * * * ****************************************/ string CAccessorImplementation::IDToURL(TID inID)const { TID_CAccessorElement_map::const_iterator lI=mIDToAccessorElement.find(inID); if(lI!=mIDToAccessorElement.end()) { return (*lI).second.getURL(); } else { cerr << "Error in Conversion from ID " << inID << " to URL." << endl; return "error"; } } /*************************************** * * URLToID - return the ID for an image for a given image URL * **************************************** * * modification history * * * ****************************************/ pair CAccessorImplementation::URLToID(const string& inURL)const { string_TID_map::const_iterator lI=mURLToID.find(inURL); if(lI!=mURLToID.end()) { return make_pair(true,(*lI).second); } else { cerr << "Error in Conversion from URL " << inURL << " to ID." << endl; return make_pair(false,-1); } } /*************************************** * * URLToID - return the ID for an image for a given image URL * **************************************** * * modification history * * * ****************************************/ int CAccessorImplementation::size()const { return mURLToID.size(); } gift-0.1.14/libMRML/cc/CAccessorFactory.cc0000644000175200001440000000050510220502730014763 00000000000000#include "libMRML/include/CAccessorFactory.h" #include "libMRML/include/CAccessorFactoryContainer.h" void CAccessorFactory::registerFactory(CAccessorFactoryContainer& outContainer){ outContainer.registerFactory(this, mName); }; void CAccessorFactory::closeAccessor(){ //does plain nothing in the base class }; gift-0.1.14/libMRML/cc/CReaper.cc0000644000175200001440000000226410220502730013113 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/CReaper.h" /** set the PID for which this reaper is responsible */ CReaper::CReaper(int inPID):mPID(inPID){}; /** get the PID forr which this reaper is responsible */ int CReaper::getPID()const{ return mPID; } gift-0.1.14/libMRML/cc/CAlgorithm.cc0000644000175200001440000002144210220502730013622 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/mrml_const.h" #include "libMRML/include/my_throw.h" #include #include "libMRML/include/CQuery.h" #include "libMRML/include/CAlgorithm.h" #include "libMRML/include/CXMLHelper.h" #include "libMRML/include/CQueryTreeBuilder.h" #include "libMRML/include/CAlgorithmCollection.h" /** clone this*/ CAlgorithm* CAlgorithm::clone()const{ return new CAlgorithm(*this); }; /** clone this*/ CAlgorithm::CAlgorithm(const CAlgorithm& inAlgorithm): CXMLElement(inAlgorithm){ }; /** clone this*/ CAlgorithm::CAlgorithm(const CXMLElement& inAlgorithm): CXMLElement(inAlgorithm){ }; /** Add a child with the given attributes to the current node, and MAKE THIS CHILD THE NEW CURRENT NODE. */ void CAlgorithm::addChild(const string& inName, const char* const* const inAttributeList){ //initialize new child CXMLElement::addChild(static_cast (new CAlgorithm(inName.c_str(), inAttributeList))); } /** Add a child with the given attributes to the current node, and MAKE THIS CHILD THE NEW CURRENT NODE. */ void CAlgorithm::addChild(CXMLElement* inChild){ //initialize new child CXMLElement::addChild(inChild); } /** */ CAlgorithm::CAlgorithm(const char* inName, const char* const* const inAttributeList): CXMLElement(inName,inAttributeList){ }; /** */ CAlgorithm::CAlgorithm(const string& inName, const list >& inAttributeList): CXMLElement(inName,inAttributeList){ }; //---------------------------------------- //sending back the name of the collection treated by this string CAlgorithm::getCollectionID()const{ return stringReadAttribute(mrml_const::collection_id).second; }; //---------------------------------------- //sending back the name of the algorithm string CAlgorithm::getAlgorithmName()const{ return stringReadAttribute(mrml_const::algorithm_name).second; }; //---------------------------------------- //sending back the ID of the algorithm string CAlgorithm::getID()const{ return stringReadAttribute(mrml_const::algorithm_id).second; }; //---------------------------------------- //sending back the relative weight of the algorithm double CAlgorithm::getWeight()const{ if(doubleReadAttribute(mrml_const::cui_weight).first){ return (doubleReadAttribute(mrml_const::cui_weight).second); }else{ return 1; } }; //---------------------------------------- //sending back the Type of the algorithm pair CAlgorithm::getType()const{ return stringReadAttribute(mrml_const::algorithm_type); }; //---------------------------------------- //sending back the Type of the algorithm pair CAlgorithm::getInheritsFrom()const{ return stringReadAttribute("cui-inherits-from"); }; //---------------------------------------- //sending back the BaseType of the algorithm string CAlgorithm::getBaseType()const{ return stringReadAttribute(mrml_const::cui_base_type).second; }; //---------------------------------------- //making some old MRML for speaking with zoran string CAlgorithm::toOldMRML()const{ return string("<" + mrml_const::algorithm + " " + mrml_const::algorithm_name + "=\"") + getName() + "\" " + mrml_const::algorithm_id + "=\"" + getID() + "\"/>\n"; }; // //---------------------------------------- // /** reading attributes with defaults // */ // pair CAlgorithm::stringReadAttribute(const string& // inAttribute)const{ // return CXMLElement::stringReadAttribute(inAttribute); // ///code ignored from here ****************************** // cout << "StringReadAttribute:" // << inAttribute // << endl; // CAttributeList::const_iterator lFoundPosition=mAttributes.find(inAttribute); // if(lFoundPosition != mAttributes.end()){ // return make_pair(bool(1), // lFoundPosition->second); // } // if(mDefaultAlgorithm){ // pair lResult=mDefaultAlgorithm->stringReadAttribute(inAttribute); // if(lResult.first){ // return lResult; // } // } // if(getFather()){ // return getFather()->stringReadAttribute(inAttribute); // } // cout << "..failed: the ID of the element: " // << getID() // << endl; // return make_pair(0, // string("")); // }; //---------------------------------------- /** Building a query tree out of the information we have gathered true indicates success... */ bool CAlgorithm::configure(CAlgorithmCollection& inBaseConfiguration){ // // merge this with the default algorithm of this type // cout << this << endl; cout << "1" << flush; if((this->getType().first) &&(inBaseConfiguration.containsAlgorithmByType(this->getType().second))){ mergeAttributes(inBaseConfiguration.getAlgorithmByType(this->getType().second)); CAlgorithm& lDefault(inBaseConfiguration.getAlgorithmByType(this->getType().second)); //HACK clone children from default if this childlist is empty or contains //only text nodes. int lSize=0; for(lCChildren::const_iterator i=mChildren.begin(); i!=mChildren.end(); i++){ if((*i)->getName()==mrml_const::algorithm){ lSize++; } } if(!lSize){ cout << "°°" << endl; // mCurrentChild=this; for(lCChildren::const_iterator i=lDefault.child_list_begin(); i!=lDefault.child_list_end(); i++){ cout << " || " << mChildren.size() << ((CAlgorithm*)(*i))->getBaseType() << endl; addChild((*i)->clone(true)); moveUp(); } } cout << "NUMBER OF CHILDREN that are ALGORITHMS " << lSize << endl; //mergeChildLists(inBaseConfiguration.getAlgorithmByType(this->getType().second)); } cout << "2" << flush; // merge with the configuration of the father if(getFather()){ mergeAttributes(*(CAlgorithm*)(getFather())); } cout << "3" << flush; // // 3. Then build the query trees of the children and // add each child both to the query finding structure // as to the query tree. // for(CXMLElement::lCChildren::const_iterator i=child_list_begin(); i!=child_list_end(); i++){ CXMLElement* lDereferencedI=*i; if(lDereferencedI->getName()==mrml_const::algorithm){ CAlgorithm* iAlgorithm=(CAlgorithm*)(lDereferencedI); cout << "." << flush; iAlgorithm->configure(inBaseConfiguration); } } if(getFather()){ //mergeChildLists(*(CAlgorithm*)(getFather())); } cout << "4" << flush; } /** merging two algorithms. general rule: if something is contained already in *this the value of *this will be kept. first: default values. */ void CAlgorithm::mergeAttributes(const CAlgorithm& inAlgorithm){ if(&inAlgorithm){ //STOOPID way of merging, takes n log n time instead of n for(CAttributeList::const_iterator i=inAlgorithm.mAttributes.begin(); i!=inAlgorithm.mAttributes.end(); i++){ //add attributes which are not yet found if(mAttributes.find(i->first)==mAttributes.end()){ #ifdef SINGLE mAttributes.add(i->first,i->second); #else mAttributes.check(); mAttributes.add(i->first,i->second.first); #endif } } } } void CAlgorithm::mergeChildLists(const CAlgorithm& inAlgorithm){ if(&inAlgorithm){ //merge child lists copy(inAlgorithm.child_list_begin(), inAlgorithm.child_list_end(), inserter(mChildren, child_list_end())); } } //---------------------------------------- //Sorting algorithms by their ID (coming from a config file) bool CSortByID_CA::operator()(const CAlgorithm& l, const CAlgorithm& t)const{ return l.stringReadAttribute(mrml_const::algorithm_id) extern CReaperDistributor &getReaperDistributor(); int safePopen(char* const* argv){ int lMode[2]; if(pipe(lMode)){ cerr << "NO PIPE" << endl; }else{ int lExecveTask; if(!(lExecveTask=fork())){ // embarrassing, but necessary, for reasons of race conditions sleep(1); char lWrite[12]; sprintf(lWrite,"%d",lMode[1]); close(1); dup(lMode[1]); const char* lInstruction=argv[0]; if(execve(lInstruction, argv, 0)){ cerr << "Could not execute " << lInstruction << ":" << strerror(errno) << endl; }; }else{ CReaper* lReaper=new CRPipe(lExecveTask,lMode[1]); getReaperDistributor().addReaper(lReaper); return lMode[0]; } } return 0; } gift-0.1.14/libMRML/cc/CAccessorElement.cc0000644000175200001440000000311710220502730014747 00000000000000#include "libMRML/include/CAccessorElement.h" /** creating clean output */ ostream& operator<<(ostream& outStream, const CAccessorElement& inElement){ outStream << string("CAccessorElement("); outStream.operator<<(long(inElement.getID())); outStream << string(" ") << inElement.getURL() << string(" ") << inElement.getThumbnailURL() << string(" ") << inElement.getFeatureFileName() << string(")--") << endl; return outStream; }; /** Constructor */ CAccessorElement::CAccessorElement(const TID inID, const string& inURL, const string& inThumbnailURL, const string& inFeatureFileName): mID(inID), mURL(inURL), mThumbnailURL(inThumbnailURL), mFeatureFileName(inFeatureFileName){ }; /** get mURL */ string CAccessorElement::getURL()const{ return mURL; }; /** get mID */ TID CAccessorElement::getID()const{ return mID; }; /** */ string CAccessorElement::getThumbnailURL()const{ return mThumbnailURL; }; /** */ string CAccessorElement::getFeatureFileName()const{ return mFeatureFileName; }; /** sort CAccessorElements by their ID */ bool CSortByID_CAE::operator()(const CAccessorElement& l, const CAccessorElement& t)const{ return l.mIDfirst; cout << "DELETING" << endl; } delete mContent; delete mAlgorithm; }; /** Configure this */ void CQueryTreeNode::configure(CXMLElement& inAttributes, CAccessorAdminCollection& inAccessors, CStaticQueryFactory& inFactory){ mAlgorithm=new CAlgorithm(inAttributes); cout << "Deleting mContent"; mContent=0; cout << "done"; mContent=inFactory.makeQuery(mAlgorithm->getBaseType(), inAccessors, *mAlgorithm); cout << "MAKING " << this << "." << static_cast(mContent) << endl; mContent->checkNPrint(); // Build a local query tree for(CChildren::iterator i=mChildren.begin(); i!=mChildren.end(); i++){ cout << "ADDING " << this << "." << static_cast(mContent) << " <- " << i->first << "." << static_cast(i->first->mContent) << ", " << i->second << endl; cout << "i->first: " << flush ;i->first->checkNPrint(); cout << "i->first->Content: " << flush ;i->first->mContent->checkNPrint(); mContent->addChild(i->first->mContent, i->second); } }; /** add a child to this */ void CQueryTreeNode::addChild(CQueryTreeNode* inChild, double inWeight){ cout << "this " << flush ;checkNPrint(); cout << " CQueryTreeNode::addChild(inChild,1) " << inChild << flush ; inChild->checkNPrint(); mChildren.push_back(make_pair(inChild,inWeight)); cout << "AFTER CQueryTreeNode::addChild(inChild,1) " << inChild << flush ; mChildren.back().first->checkNPrint(); }; /** * * do a query * */ CXMLElement* CQueryTreeNode::query(const CXMLElement& inQuery){ if(mContent) return mContent->query(inQuery); return 0; }; /** * * @short a query which returns ID/RelevanceLevel pairs instead of * instead of URL/RelevanceLevel pairs * */ CIDRelevanceLevelPairList* CQueryTreeNode::fastQuery(const CXMLElement& inQuery, int inNumberOfInterestingImages, double inDifferenceToBest){ if(mContent) return mContent->fastQuery(inQuery, inNumberOfInterestingImages, inDifferenceToBest); return 0; } gift-0.1.14/libMRML/cc/CQuery.cc0000644000175200001440000002252410220502730013003 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CQuery.h * (abstract) parent of query structures. * Goal of this structure is to process a query * and to digest within--session feedback * this tries not to contain anything application * specific * **************************************** * * modification history: * * WM 08 99 creation * **************************************** * * compiler defines used: * * _NO_FIDPRINT * _TREE_BUILD_PRINTOUT in query(): building a result tree * ****************************************/ #include "libMRML/include/gift-config.h" // for defines about known headers #ifdef HAVE_SYS_TIMES_H #include #endif #include "libMRML/include/mrml_const.h" // for parsing #include "FeatureExtraction/gift_features.h" #include #include #include #include #include #include "libGIFTAcInvertedFile/include/map_to_list.h" #include "libMRML/include/CQuery.h" #include "libMRML/include/GIFTExceptions.h" #include #define _NO_FIDPRINT int gQuery; #include "libMRML/include/CMutex.h" extern CMutex* gMutex;//for debugging /*************************************** * * Constructor * **************************************** * * modification history * WM 19990804 created * * ****************************************/ CQuery::CQuery(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm ): mAccessorAdminCollection(&inAccessorAdminCollection), mAlgorithm(&inAlgorithm), mAccessorAdmin(0), mAccessor(0){ cout << "\nGQOUERY" << gQuery << endl; gQuery++; //get proxy by CollectionID mAccessorAdmin=&mAccessorAdminCollection->getProxy(mAlgorithm->getCollectionID()); } /*************************************** * * Constructor * **************************************** * * modification history * WM 19990804 created * * ****************************************/ CQuery::CQuery(): mAccessorAdmin(0), mAlgorithm(0), mAccessor((CAccessor*)0), mAccessorAdminCollection(0){ cout << "\nGQOUERY" << gQuery << endl; gQuery++; } CQuery::~CQuery(){ gQuery--; cout << "\n/DELGQOUERY" << gQuery << endl; } /*************************************** * * Getting random images as a seed * **************************************** * * modification history * WM 19990824 created * * ****************************************/ CXMLElement* CQuery::getRandomImages(int inNumberOfInterestingImages)const{ cout << "Getting " << inNumberOfInterestingImages << " random images " << endl; list lURLList; mAccessor->getRandomAccessorElements(lURLList, inNumberOfInterestingImages); CXMLElement* lResultList=new CXMLElement(mrml_const::query_result_element_list, 0); for(list::const_iterator i=lURLList.begin(); i!=lURLList.end(); i++){ CXMLElement* lResultElement=new CXMLElement(mrml_const::query_result_element, 0); lResultElement->addAttribute(mrml_const::image_location, i->getURL()); lResultElement->addAttribute(mrml_const::thumbnail_location, i->getThumbnailURL()); lResultElement->addAttribute(mrml_const::calculated_similarity, double(1)); lResultList->addChild(lResultElement); lResultList->moveUp(); } CXMLElement* lReturnValue=new CXMLElement(mrml_const::query_result, 0); lReturnValue->addChild(lResultList); return lReturnValue; }; /*************************************** * * Getting random images as a seed * **************************************** * * modification history * WM 19990824 created * * ****************************************/ CIDRelevanceLevelPairList* CQuery::getRandomIDs(int inNumberOfInterestingImages)const{ list lURLList; mAccessor->getRandomAccessorElements(lURLList, inNumberOfInterestingImages); CIDRelevanceLevelPairList* lReturnValue(new CIDRelevanceLevelPairList()); for(list::const_iterator i=lURLList.begin(); i!=lURLList.end(); i++){ lReturnValue->push_back(CIDRelevanceLevelPair(i->getID(),0)); } return lReturnValue; }; /*************************************** * * Getting all images for making distance matrices * or similar stuff * **************************************** * * modification history * WM 19990824 created * * ****************************************/ list* CQuery::getAllIDs()const{ list* lIDList=new list(); mAccessor->getAllIDs(*lIDList); return lIDList; }; /*************************************** * * Getting all images for making distance matrices * or similar stuff * **************************************** * * modification history * WM 19990824 created * * ****************************************/ list* CQuery::getAllAccessorElements()const{ list* lURLList=new list(); mAccessor->getAllAccessorElements(*lURLList); return lURLList; }; /*************************************** * * Setting the current algorithm * **************************************** * * modification history * WM 19990824 created * * ****************************************/ bool CQuery::setAlgorithm(CAlgorithm& inAlgorithm){ mAlgorithm=&inAlgorithm; }; /*************************************** * * getting the current algorithm * **************************************** * * modification history * WM 19990824 created * * ****************************************/ const CAlgorithm& CQuery::getAlgorithm()const{ return *mAlgorithm; }; /** adding a child to this. We expect children to be initialised when they are entered. *this assumes no destruction responsabilities for the entered data. */ void CQuery::addChild(CQuery* inChild, double inWeight){ mChildren.push_back(lCChild()); mChildren.back().mQuery=inChild; mChildren.back().mWeight=inWeight; }; /** initialisation taking place when all children etc have been added */ void CQuery::finishInit(){ // in the most general query nothing happens here // it is just a kind of container }; /** Query: do a fast query, then translate the results. */ CXMLElement* CQuery::query(const CXMLElement& inQuery){ pair lNumberOfInterestingImages= inQuery.longReadAttribute(mrml_const::result_size); int inNumberOfInterestingImages= lNumberOfInterestingImages.second; pair lCutoff= inQuery.doubleReadAttribute(mrml_const::result_cutoff); double inCutoff= lCutoff.second; //gMutex->lock();//debugging if(inQuery.child_list_begin()!=inQuery.child_list_end()){ CSelfDestroyPointer lFastQueryResult(fastQuery(inQuery, inNumberOfInterestingImages, inCutoff)); #warning put time stamp here cout << "Assembling a query result tree " << endl; if(lFastQueryResult){ cout << "from a result of size" << lFastQueryResult->size() << endl; }else{ cout << "THERE IS NO RESULT" << (CIDRelevanceLevelPairList*)lFastQueryResult << endl; } #ifdef _TREE_BUILD_PRINTOUT #endif CXMLElement* lReturnValue(new CXMLElement(mrml_const::query_result,0)); CXMLElement* lReturnList(new CXMLElement(mrml_const::query_result_element_list,0)); lReturnValue->addChild(lReturnList); lReturnValue->moveUp(); assert(mAccessor); if(lFastQueryResult && mAccessor){ for(CIDRelevanceLevelPairList::const_iterator i=lFastQueryResult->begin(); i!=lFastQueryResult->end(); i++){ CXMLElement* lReturnElement(new CXMLElement(mrml_const::query_result_element, 0)); { double lRelevanceLevel(i->getRelevanceLevel()); string lString(mrml_const::calculated_similarity); lReturnElement->addAttribute(lString, lRelevanceLevel); } { string lURL(mAccessor->IDToAccessorElement(i->getID()).second.getURL()); string lString(mrml_const::image_location); lReturnElement->addAttribute(lString, lURL); } { string lURL(mAccessor->IDToAccessorElement(i->getID()).second.getThumbnailURL()); string lString(mrml_const::thumbnail_location); lReturnElement->addAttribute(lString, lURL); } lReturnList->addChild(lReturnElement); lReturnList->moveUp(); } //gMutex->unlock();//debugging return lReturnValue; } }else{ //gMutex->unlock();//debugging return getRandomImages(inNumberOfInterestingImages); } //gMutex->unlock();//debugging return 0; } gift-0.1.14/libMRML/cc/libMRML-config.pre-cc0000644000175200001440000000700710153634161015070 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include /* for printf */ #include /* for exit */ #include # 27 "libMRML-config.pre-cc" int main (int argc, char **argv) { int lDigitOptionIndex = 0; bool lFirst=true; while (1) { int this_option_optind = optind ? optind : 1; #ifdef HAVE_GETOPT_LONG int option_index = 0; static struct option long_options[] = { {"cxxflags", 0, 0, 0}, {"ldflags", 0, 0, 0}, {"libs", 0, 0, 0}, {"includes", 0, 0, 0}, {"gift-mysql-dir", 0, 0, 0}, {"gift-plugin-dir", 0, 0, 0}, {"help", 0, 0, 0}, {0, 0, 0, 0} }; char lC = getopt_long (argc, argv, "cLlimph", long_options, &option_index); #warning GNU getopt long used #else #warning no getopt long present int lI = getopt (argc, argv, "cLlimph"); char lC=char(lI); #endif if (lC == -1) break; if(!lFirst){ printf(" "); } #ifdef HAVE_GETOPT_LONG switch (lC) { case 0: switch(option_index) { case 0: lC='c'; break; case 1: lC='L'; break; case 2: lC='l'; break; case 3: lC='i'; break; case 4: lC='p'; break; default: lC='h'; } break; } #endif switch (lC) { case 'c': printf("%CXXFLAGS%"); lFirst=false; break; case 'l': printf("%LIBS%"); lFirst=false; break; case 'L': printf("%LDFLAGS% -L%libdir%"); lFirst=false; break; case 'i': printf("%INCLUDES%"); lFirst=false; break; case 'm': printf("%GIFT_MYSQL_DIR%"); lFirst=false; break; case 'p': printf("%libdir%"); lFirst=false; break; default: #ifdef HAVE_GETOPT_LONG puts("gift-config [-c] [--cxxflags] [-l] [--ldflags] [--plugin-dir]"); puts("Gives back the flags you need to give to your "); puts("C++ compiler (--cxxflags or -c, for short) and/or"); puts("Linker (--ldflags, or -l for short) "); puts("Where gift expects its plugins \n"\ " (--plugin-dir, or -p for short) "); puts("MySQL directory"); puts(" (--gift-mysql-dir, or -m for short) for successfully"); puts("compiling extensions to the GNU Image Finding Tool"); #else puts("gift-config [-c] [-l]"); puts("Gives back the flags you need to give to your "); puts("C++ compiler (-c, for short) and/or"); puts("Linker (-l for short) "); puts("Where gift expects its plugins \n"\ " (-p for short) "); puts("MySQL directory"); puts(" (-m for short) for successfully"); puts("compiling extensions to the GNU Image Finding Tool"); #endif } } exit (0); } gift-0.1.14/libMRML/cc/CDebuggingMemoryManager.cc0000644000175200001440000001742110220502730016255 00000000000000#include #include "libMRML/include/CDebuggingMemoryManager.h" #include #include CDebuggingMemoryManager::CDebuggingMemoryManager(const CDebuggingMemoryManagerSize inSize): mBuffer(new lTChunk[inSize / sizeof(lTChunk) + 2]), mFreeList(mBuffer), mUsedList(mBuffer+1), cMagic(0x1), cUnMagic(0x2) { cVM=0x88414004; if(mBuffer) { mFreeList=mBuffer; mUsedList=mBuffer + 1; mFreeList->mPrev=0; mFreeList->mNext=mBuffer+2; mFreeList->mPreceding=0; mFreeList->mFollowing=mBuffer+1; mFreeList->mSize=0; mFreeList->mMagic=cUnMagic; mUsedList->mPrev=0; mUsedList->mNext=0; mUsedList->mPreceding=mBuffer; mUsedList->mFollowing=mBuffer+2; mUsedList->mSize=0; mUsedList->mMagic=cMagic; lTChunk* lFreeChunk=mBuffer+2; lTChunk* lLastNode=mBuffer+(inSize / sizeof(lTChunk)); lFreeChunk->mPrev=mBuffer; lFreeChunk->mNext=0; lFreeChunk->mPreceding=mBuffer+1; lFreeChunk->mSize=inSize - sizeof(lTChunk)*3; lFreeChunk->mFollowing=lLastNode; lFreeChunk->mMagic=cUnMagic; ///A last node, which marks the end for the Chunklist ///The other lists need no end node lLastNode->mPrev=0; lLastNode->mNext=0; lLastNode->mPreceding=mBuffer+2; lLastNode->mSize=0; lLastNode->mFollowing=lLastNode; lLastNode->mMagic=cMagic; } }; void* CDebuggingMemoryManager::getMem( CDebuggingMemoryManagerSize inSize){ mMutex.lock(); //inSize+=8; //Look for first free element of the right size; lTChunk* lCurrent= mFreeList; //For sake of cleanliness. //The number of Records for the strucure and the memblock CDebuggingMemoryManagerSize lNumRecords= (inSize + sizeof(lTChunk))/sizeof(lTChunk)+1; //the corresponding size CDebuggingMemoryManagerSize lSize= lNumRecords * sizeof(lTChunk) ; while(lCurrent && (lCurrent->mSize < lSize)) lCurrent= lCurrent->mNext; if(lCurrent){ assert(lCurrent->mMagic== cUnMagic); assert(lCurrent->mSize >= lSize); //Cut the chunk in two pieces lTChunk lNewChunk; //the preceding chunk of a free chunk is always occupied //and free chunk has always a preceding node: lNewChunk.mPrev= lCurrent->mPreceding; lNewChunk.mNext= lNewChunk.mPrev->mNext; lNewChunk.mPreceding=lCurrent; lNewChunk.mFollowing=lCurrent->mFollowing; lNewChunk.mSize= lSize - sizeof(lTChunk); lNewChunk.mMagic=cMagic; CDebuggingMemoryManagerSize lOffset =(lCurrent->mSize/sizeof(lTChunk))- lNumRecords; assert(lOffset >= 0); ///Position of the new occupied chunk lTChunk* lPos= lCurrent + 1 //lCurrent will not be overwritten + lOffset; assert(lNewChunk.mPrev); //A previous node of lCurrent ALWAYS exists, but... lNewChunk.mPrev->mNext= lPos; if(lNewChunk.mNext) lNewChunk.mNext->mPrev= lPos; //A chunk here has always a following and preceding chunk assert(lNewChunk.mFollowing); lNewChunk.mFollowing->mPreceding= lPos; assert(lNewChunk.mPreceding); lNewChunk.mPreceding->mFollowing= lPos; *lPos= lNewChunk; lCurrent->mSize -= lSize; mMutex.unlock(); return (void*)(lPos+1); }else assert(0); }; void CDebuggingMemoryManager::FreeChunk(lTChunk* inChunk){ mMutex.lock(); assert(inChunk); assert(inChunk->mPrev); assert(inChunk->mMagic==cMagic); if(inChunk->mNext) inChunk->mNext->mPrev=inChunk->mPrev; inChunk->mPrev->mNext=inChunk->mNext; inChunk->mMagic=cUnMagic; mMutex.unlock(); } bool CDebuggingMemoryManager::freeMem(void* inChunk){ mMutex.lock(); lTChunk* lChunk= ((lTChunk*) inChunk); lChunk--; if(lChunk->mMagic != cMagic){ //Deallocation of something free mMutex.unlock(); return false; }else{ //The previous node is free if(lChunk->mPreceding->mMagic == cUnMagic){ if(lChunk->mFollowing->mMagic == cUnMagic) { // both the preceding and the following node are free // and BOTH EXIST! => Three free nodes -> 1 free node lTChunk* lNew = lChunk->mPreceding; lNew->mSize+= lChunk->mSize + lChunk->mFollowing->mSize + 2 *sizeof(lTChunk); //New pointers to the successors lNew->mNext= lChunk->mFollowing->mNext; lNew->mFollowing = lChunk->mFollowing->mFollowing; //New pointers from successors to predecessor // has to exist because of the termination of the PrecFollow-list lTChunk* lNextOccupied= lChunk->mFollowing->mFollowing; assert(lNextOccupied); { // The next occupied node exists. lNextOccupied->mPreceding= lNew; } if(lNew->mNext) lNew->mNext->mPrev=lNew; }else{ // only the preceding node is free (and exists) // Changes of the FreeList and of the PF-list lTChunk* lNew = lChunk->mPreceding; lNew->mSize+= lChunk->mSize + sizeof(lTChunk); lNew->mFollowing = lChunk->mFollowing; //lNew->mNext stays: The FreeList is not changed // has to exist because of the termination of the PrecFollow-list lTChunk* lNextOccupied= lChunk->mFollowing; assert(lNextOccupied); { // The next occupied node exists. lNextOccupied->mPreceding= lNew; } } FreeChunk(lChunk); }else{ if(lChunk->mFollowing->mMagic == cUnMagic){ //only the following node is free (and exists) lTChunk* lFollowing = lChunk->mFollowing; lChunk->mSize+= lFollowing->mSize +sizeof(lTChunk); lChunk->mFollowing= lFollowing->mFollowing; //lFollowing out of the PF-List lFollowing->mFollowing->mPreceding= lChunk; //Chunk out of the OccupiedList FreeChunk(lChunk); //Move lChunk into the FreeList lChunk->mPrev=lFollowing->mPrev; lFollowing->mPrev->mNext= lChunk; // lFollowing out of FreeList lChunk->mNext= lFollowing->mNext; if(lChunk->mNext) lChunk->mNext->mPrev=lChunk; }else{ //Looking for the next piece of free mem. lTChunk* lCurrent=lChunk; while(lCurrent && (lCurrent->mPreceding->mMagic == cMagic)) lCurrent = lCurrent -> mPreceding; //lCurrent has to exist: Either the FreeList-anchor //or some other piece of free mem. assert(lCurrent); //lChunk out of the Occupied list FreeChunk(lChunk); // According to initialization, // lCurrent->mPreceding must be a free node. // and it exsists lTChunk* lFree=lCurrent -> mPreceding; assert(lFree); //lChunk into the FreeList lChunk->mNext=lFree->mNext; lChunk->mPrev=lFree; lFree->mNext= lChunk; if(lChunk->mNext) lChunk->mNext->mPrev= lChunk; } } } mMutex.unlock(); return true; }; bool CDebuggingMemoryManager::isValid()const{ return cVM==0x88414004; } ostream& operator<<(ostream& outStream,const CDebuggingMemoryManager& inMem){ outStream << endl << "List of free memory chunks" << endl; { lTChunk* i=inMem.mFreeList; while(i && i!=i->mNext){ outStream << i << "," << i->mPrev << "," << i->mSize << "," << i->mMagic%16 << endl; i=i->mNext; } outStream<< endl << "List of occupied memory chunks" << endl; i=inMem.mUsedList; while(i && i!=i->mNext){ outStream << i << "," << i->mPrev << "," << i->mSize << "," << i->mMagic%16 << endl; i=i->mNext; } outStream << endl << "PrecedingFollowList" << endl; i=inMem.mFreeList; while(i!=i->mFollowing){ outStream << i << "," << i->mPreceding << "," << i->mSize << "," << i->mMagic%16 << endl; i=i->mFollowing; } { outStream << i << "," << i->mPreceding << "," << i->mSize << "," << i->mMagic%16 << endl; i=i->mFollowing; } outStream << "END" << endl; i=inMem.mBuffer+(50000 / sizeof(lTChunk)); outStream << "Terminator" << endl; outStream << i << "," << i->mPreceding << "," << i->mSize << "," << i->mMagic%16 << endl; } return outStream; }; gift-0.1.14/libMRML/cc/CSessionManager.cc0000644000175200001440000011072610220502730014616 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /** my way of throwing exceptions */ #include "libMRML/include/mrml_const.h" #include "libMRML/include/my_throw.h" #include "libMRML/include/my_assert.h" #include "libMRML/include/my_diagnose.h" #include "libMRML/include/GIFTExceptions.h" #include #include //#include "expat/xmlparse/xmlparse.h" #include #include "libGIFTQuInvertedFile/include/CQInvertedFile.h" #include "libMRML/include/CSessionManager.h" #include "libMRML/include/CAttributeList.h" #include "libMRML/include/CXMLHelper.h" #include "libMRML/include/GIFTExceptions.h" #include "libMRML/include/CQueryTreeNode.h" #include #include "libMRML/include/CAlgorithm.h" //getPropertySheet #include "libMRML/include/directory.h" // directorys as determined by ./configure #include "libMRML/include/createErrorMessage.h" #include "libMRML/include/gift-config.h" #ifdef HAVE_LIBUUID extern "C"{ typedef unsigned char* uuid_t ; void uuid_generate(uuid_t); void uuid_unparse(uuid_t,char*); } #endif //the "ID administration subsystem" TID gID; void startConfigElement(void *userData, const char *inElementName, const char **inAttributes) { bool lSuccessful=true; //the calling CSessionManager CSessionManager* lCaller((CSessionManager*)userData); #ifdef CONFIG_PRINTOUT cout << "<" << inElementName << " WhileReading=\"true\" " << flush; #endif CAttributeList lAttributes(inAttributes); if(string(inElementName)== string(mrml_const::cui_property_list)){ lCaller->startPropertySheetSubtree(); } //if we have started a property sheet list //everything goes there if(lCaller->getPropertySheetSubtree()){ if((string(inElementName)== string(mrml_const::cui_property_item)) || (string(inElementName)== string(mrml_const::property_sheet))){ lCaller->getPropertySheetSubtree() ->addChild(inElementName, inAttributes); } } // / removing for removing cui-algorithm-id-list-list // // // // a list of algorithms // // // if(string(inElementName) // == // string(mrml_const::cui_algorithm_id_list)){ // string lListID=lAttributes[mrml_const::cui_algorithm_id_list_id]; // if(lListID.size()){ // lCaller->addAlgorithmIDList(lListID); // } // } // if(string(inElementName) // == // string(mrml_const::cui_algorithm_id)){ // cout << "HIER++" << endl; // string lID=lAttributes[mrml_const::cui_algorithm_id]; // if(lID.size()){ // lCaller->addToCurrent(lID); // } // } // if(string(inElementName) // == // string(mrml_const::cui_algorithm_id_list_list)){ // cout << "HIER" << endl; // } if(string(inElementName) == string(mrml_const::algorithm_list)){ //nothing } // if(string(inElementName) // == // string(mrml_const::algorithm) // || (lCaller->getAlgorithmInConstruction()) // ){ // { // if(!lCaller->getAlgorithmInConstruction()){ // lCaller->startAlgorithmConstruction(new CAlgorithm(inElementName, // inAttributes)); // }else{ // lCaller->getAlgorithmInConstruction()->addChild(inElementName, // inAttributes); // } // } // } #ifdef CONFIG_PRINTOUT cout << " >" << endl << flush; #endif } void endConfigElement(void *userData, const char *inElementName) { CSessionManager* lCaller((CSessionManager*)userData); // if((string(inElementName) // == // string(mrml_const::algorithm)) // ||lCaller->getAlgorithmInConstruction()){ // { // my_assert(lCaller->getAlgorithmInConstruction(), // "Algorithm in construction not found"); // lCaller->getAlgorithmInConstruction()->moveUp(); // if(lCaller->getAlgorithmInConstruction()->isSubtreeFinished()){ // lCaller->addAlgorithm(lCaller->getAlgorithmInConstruction()); // lCaller->startAlgorithmConstruction((CAlgorithm*)0); // } // } // } //if we have started a property sheet list //everything goes there if(lCaller->getPropertySheetSubtree()){ if((string(inElementName)== string(mrml_const::cui_property_item)) || (string(inElementName)== string(mrml_const::property_sheet))){ lCaller->getPropertySheetSubtree() ->moveUp(); } } if(string(inElementName)== string(mrml_const::cui_property_list)){ lCaller->endPropertySheetSubtree(); } #ifdef CONFIG_PRINTOUT cout << "" << endl; #endif } #include #include "libMRML/include/CSessionManager.h" #include "libMRML/include/TID.h" #include extern TID gID; string getNewID(){ #ifdef HAVE_LIBUUID char lUUIDString[200]; unsigned char lUUIDBinary[16]; uuid_t lUUID(lUUIDBinary); uuid_generate(lUUID); uuid_unparse(lUUID, lUUIDString); return lUUIDString; #else char lID[20]; sprintf(lID,"%ld",++gID); return lID; #endif } /** */ CQueryTreeBuilder CSession::mQueryTreeBuilder; ostream& CSession::write(ostream& outStream)const{ mMutexSession.lock(); outStream << mUser << " " << mID << " " << mSessionName << " " //<< mActiveAlgorithm << endl; mMutexSession.unlock(); return outStream; }; istream& CSession::read(istream& inStream){ mMutexSession.lock(); inStream >> mUser >> mID >> mSessionName; mMutexSession.unlock(); return inStream; //>> mActiveAlgorithm ; }; bool CSession::open(){ mMutexSession.lock(); if(mIsOpen){ return false; } mIsOpen=true; mMutexSession.unlock(); return mIsOpen; }; bool CSession::close(){ mMutexSession.lock(); mIsOpen=false; mMutexSession.unlock(); return true; }; bool CSession::rename(const string& inName){ mMutexSession.lock(); setSessionName(inName); mMutexSession.unlock(); return true; }; string CSession::toXML(bool isPrivate)const{ mMutexSession.lock(); CXMLHelper lHelper; lHelper.setName(mrml_const::session); lHelper.setEmpty(); lHelper.addAttribute(mrml_const::session_id,mID); lHelper.addAttribute(mrml_const::session_name,mSessionName); if(isPrivate){ lHelper.addAttribute("activealgorithm",mActiveAlgorithm->getID()); } mMutexSession.unlock(); return lHelper.toString(); } void CSession::clearLanguages(){ mLanguages.clear(); } void CSession::addLanguage(string inLanguageCode){ mLanguages.push_back(inLanguageCode); } /** commit the list of languages. That means, here the actual language that will be used throughout the translation is determined */ void CSession::commitLanguages(const CI18nTranslator& inTranslator){ for(CLanguageList::const_iterator i=mLanguages.begin(); i!=mLanguages.end(); i++){ if(inTranslator.hasLanguage(*i)){ mPreferredLanguage=*i; break; } } }; list CSession::getLanguages()const{ return mLanguages; } string CSession::getPreferredLanguage()const{ return mPreferredLanguage; } // CSession::CSession(): mActiveAlgorithm(0), mSessionName(""), mID(""), mIsOpen(0), mUser(""), mPreferredLanguage("de") { mMutexSession.lock(); // nothing: use it with read /** The information about the current query tree */ mQueryTree.first=0; mQueryTree.second=0; mMutexSession.unlock(); }; // CSession::CSession(string inUser, string inID, string inSessionName, CAlgorithm* inActiveAlgorithm): mPreferredLanguage("de") { // mutex not needed. if two call this // at the same time, there is some // s... happening any way. mUser=inUser; mID=inID; mSessionName=inSessionName; mActiveAlgorithm=inActiveAlgorithm; mQueryTree.first=0; mQueryTree.second=0; mIsOpen=false; }; /** delete all members */ CSession::~CSession(){ // mutex not needed. if two call this // at the same time, there is some // s... happening any way. delete mQueryTree.first; delete mQueryTree.second; delete mActiveAlgorithm; } // string CSession::getUser()const{ return mUser; }; void CSession::setUser(const string& inUser){ mMutexSession.lock(); mUser=inUser; mMutexSession.unlock(); }; string CSession::getID()const{ // mutex not needed. if two call this // at the same time, there is some // s... happening any way. return mID; }; void CSession::setID(const string& inID){ // mutex not needed. if two call this // at the same time, there is some // s... happening any way. mID=inID; }; string CSession::getSessionName()const{ return mSessionName; }; void CSession::setSessionName(const string& inSessionName){ mMutexSession.lock(); mSessionName=inSessionName; mMutexSession.unlock(); }; CAlgorithm* CSession::getActiveAlgorithm(){ return mActiveAlgorithm; }; bool CSession::setActiveAlgorithm(CAccessorAdminCollection& inCaller, CAlgorithmCollection& inAlgorithmCollection, CAlgorithm* inActiveAlgorithm, CStaticQueryFactory& inBaseTypeFactory){ mMutexSession.lock(); assert(inActiveAlgorithm); // inActiveAlgorithm->check(); { if(mQueryTree.first){ CQueryContainer::iterator lFound=mQueryTree.first->find(inActiveAlgorithm->getID()); if(lFound!=mQueryTree.first->end()){ mQueryTree.first->erase(lFound); } } delete mQueryTree.second; mQueryTree.second=0; } cout << "[set" << endl; mActiveAlgorithm=inActiveAlgorithm; if(inActiveAlgorithm->stringReadAttribute(mrml_const::algorithm_type).first){ cout << inActiveAlgorithm->stringReadAttribute(mrml_const::algorithm_type).second << endl; cout << "set]" << endl; cout << "[build" << endl; mActiveAlgorithm->configure(inAlgorithmCollection); string lString; mActiveAlgorithm->toXML(lString); cout << "-Algorithm CONFIGURED-: configuration" << endl << lString; cout << "-Algorithm CONFIGURED-" << endl; mQueryTree=mQueryTreeBuilder.buildQueryTree(*inActiveAlgorithm, inCaller, inBaseTypeFactory, 0); } cout << "build]" << endl; mMutexSession.unlock(); return true; }; //-------------------------------------------------- CXMLElement* CSession::query(CSessionManager& inCaller, const CXMLElement& inQuery){ try{ mMutexSession.lock(); // i.e. if a user opens a session twice, he it is impossible to // do two queries in parallel on this server pair lAlgorithmID=inQuery.stringReadAttribute(mrml_const::algorithm_id); if(lAlgorithmID.first){ cout << "THE ID " << lAlgorithmID.first << ";" << lAlgorithmID.second << endl; mQueryTree.first->checkNPrint(); CQueryTreeNode* lQuery(mQueryTree.first->getQueryByID(lAlgorithmID.second)); CXMLElement* lReturnValue(lQuery->query(inQuery)); mMutexSession.unlock(); return lReturnValue; }else{ CQueryTreeNode* lQuery(mQueryTree.first->getQueryByID("adefault")); CXMLElement* lReturnValue(lQuery->query(inQuery)); mMutexSession.unlock(); return lReturnValue; } } catch(GIFTException* inException){ cerr << "We have caught a GIFTException" << endl; cout << "We have caught a GIFTException" << endl; return createErrorMessage(inException->getMessage()); } catch(GIFTException& inException){ cerr << "We have caught a GIFTException" << endl; cout << "We have caught a GIFTException" << endl; return createErrorMessage(inException.getMessage()); } catch(...){ cout << "We have caught a non-GIFTException" << endl; cerr << "We have caught a non-GIFTException" << endl; exit(10); } }; //-------------------------------------------------- // retrieving random images as seeds CXMLElement* CSession::getRandomImages(CSessionManager& inCaller, const string& inAlgorithmID, int inNumberOfImages){ mMutexSession.lock(); CXMLElement lQuery(mrml_const::query_step, 0); lQuery.addAttribute(mrml_const::result_size, long(inNumberOfImages)); CXMLElement* lReturnValue(mQueryTree.first->getQueryByID(inAlgorithmID)->query(lQuery)); mMutexSession.unlock(); return lReturnValue; }; ostream& operator<<(ostream& outStream, const CSession& inSession){ inSession.write(outStream); return outStream; } /// CSessionManager::CSessionManager(string inSessionFileName, string inConfigFileName, string inI18nFileName): mPropertySheetList(0), mPropertySheetSubtree(0), mAccessorAdminCollection(inConfigFileName), CAlgorithmCollection(inConfigFileName), mI18nTranslator(inI18nFileName), mBaseTypeFactory(new CDynamicQueryFactory(__LIBDIR__)){ ifstream lSessions(inSessionFileName.c_str()); ifstream lConfigFile(inConfigFileName.c_str()); lConfigFile.seekg(0,ios::end); int lSize=lConfigFile.tellg(); char lConfigFileContent[lSize+1]; lConfigFile.seekg(0,ios::beg); lConfigFile.read(lConfigFileContent, lSize); lConfigFileContent[lSize]=0; #ifdef PRINTOUT_CONFIG cout << "I did it: I read the config file:" << lConfigFileContent << endl << flush; #endif XML_Parser lParser = XML_ParserCreate(NULL);//default encoding XML_SetUserData(lParser, this); XML_SetElementHandler(lParser, startConfigElement, endConfigElement); int lDone=true; do { if (!XML_Parse(lParser, lConfigFileContent, lSize, lDone)) { cerr << "CSessionManager: XML ERROR: " << XML_ErrorString(XML_GetErrorCode(lParser)) << " at line " << XML_GetCurrentLineNumber(lParser) << endl; exit(1);// this happens only when parsing the config file } } while (!lDone); XML_ParserFree(lParser); // #ifdef CONFIG_PRINTOUT cout << endl << endl << "Before generating XML" << endl << endl; cout << toXML() << endl; #endif } /// string CSessionManager::toXMLSessions(const string& inUser, bool isPrivate)const{ mMutexSessionManager.lock(); string lReturnValue; CXMLHelper lHelper; lHelper.setName("ssessionlist"); if(isPrivate){ lHelper.addAttribute("user",inUser); } lReturnValue+=lHelper.toString(); const list& lList=mUserToSessions.find(inUser)->second; for(list::const_iterator i=lList.begin(); i!=lList.end(); i++){ lReturnValue+=i->toXML(isPrivate); } lHelper.setEnd(); lReturnValue+=lHelper.toString(); mMutexSessionManager.unlock(); return lReturnValue; } string CSessionManager::toXML(bool isPrivate)const{ mMutexSessionManager.lock(); string lReturnValue(CAlgorithmCollection::toXML(isPrivate)); //lReturnValue += convertPropertyToXML(isPrivate); //lReturnValue += CAlgorithmIDListList::toXML(); lReturnValue += mAccessorAdminCollection.toXML(isPrivate); mMutexSessionManager.unlock(); return lReturnValue; } /** creates a full property sheet out of the data in this. string CSessionManager::convertPropertyToXML(bool isPrivate)const{ string lReturnValue("\n\n\n"); //0. The root of the property sheet which we want to generate CXMLElement lRootProperty(mrml_const::property_sheet,0); lRootProperty.addAttribute("caption","Algorithms"); lRootProperty.addAttribute(mrml_const::property_sheet_type,"subset"); lRootProperty.addAttribute(mrml_const::property_sheet_id,"all-algorithms"); lRootProperty.addAttribute(mrml_const::send_type,"element"); lRootProperty.addAttribute(mrml_const::send_value,"algorithm"); // 2. make out of each algorithm in the collection a property sheet. for(CAlgorithmCollection::CContent::const_iterator i= CAlgorithmCollection::begin(); i!=CAlgorithmCollection::end(); i++){ // CAlgorithm* lAlgorithm(i->second); string lType(lAlgorithm->getType().second); my_diagnose("in for loop: Algorithm type is " << lType); my_assert(lAlgorithm && lType.size(), "In the config file"); // 2.a. make a new XMLElement, initialise it with the algorithm // base settings CXMLElement* lAlgorithmSheet=new CXMLElement("property"); assert(lAlgorithmSheet); //set the caption lAlgorithmSheet->addAttribute("caption", lAlgorithm ->stringReadAttribute("name").second); lAlgorithmSheet->addAttribute("type","setelement"); //send the type of the algorithm lAlgorithmSheet->addAttribute("sendtype","attribute"); lAlgorithmSheet->addAttribute("sendname","type"); lAlgorithmSheet->addAttribute("sendvalue",lAlgorithm->getType().second); //send also an automatically generated id. lAlgorithmSheet->addAttribute("autoid","yes"); lAlgorithmSheet->addAttribute("autoidname","id"); // 2.a. which collections can be used with this algorithm? // look this up, make this the first child. // ---- this is the part I dread: // ---- this piece of code is amazingly ugly. // ---- but please remember: this happens only once in a session // ---- and this is what happens, if you change EVERYTHING and // ---- you would like interfaces to stay about the same.... // ---- frustration starts to get visible here... CXMLElement* lCollectionSheet=new CXMLElement("property"); //set the caption lCollectionSheet->addAttribute("caption", "Collections"); lCollectionSheet->addAttribute("type","subset"); lCollectionSheet->addAttribute("id","coll"+lAlgorithm->getType().second); lCollectionSheet->addAttribute("sendtype","element"); lCollectionSheet->addAttribute("sendname","algorithm"); //go over all collections for(CAccessorAdminCollection::const_iterator j=mAccessorAdminCollection.begin(); j!=mAccessorAdminCollection.end(); j++){ my_diagnose("checking for collection " << j->second->getAlgorithmIDListID()); //look if this algorithm is allowed for this collection //if yes, than add this to the collectionNode // j->first is the first element of the list bool lIsMember=CAlgorithmIDListList::isIDListMember(j->second->getAlgorithmIDListID(), lType); if(lIsMember){ //here we insert something containing the right caption CXMLElement* lCollectionSheetElement=new CXMLElement(mrml_const::property_sheet); //set the caption lCollectionSheetElement->addAttribute(mrml_const::caption, j->second->getName()); lCollectionSheetElement->addAttribute(mrml_const::property_sheet_type,"set-element"); //send the type of the collection lCollectionSheetElement->addAttribute(mrml_const::send_type,"attribute"); lCollectionSheetElement->addAttribute(mrml_const::send_name,mrml_const::collection_id); lCollectionSheetElement->addAttribute(mrml_const::send_value,j->second->getID()); lCollectionSheet->addChild(lCollectionSheetElement); lCollectionSheet->moveUp(); } } // 2.b. make the newly made lCollectionSheet a new child of the algorithm // sheet lAlgorithmSheet->addChild(lCollectionSheet); lAlgorithmSheet->moveUp(); // ---- now things are getting a bit cleaner again // 2.c. the property sheet chosen in the config // look this up, if it exsists make it the second child. { pair lUserConfigID= lAlgorithm->stringReadAttribute("vi-more-config"); if(lUserConfigID.first){ CXMLElement* lUserConfiguredProperties= mPropertySheetList->newPropertySheet(lUserConfigID.second); if(lUserConfiguredProperties){ lAlgorithmSheet->addChild(lUserConfiguredProperties); lAlgorithmSheet->moveUp(); } } } // 2.d. make the newly made lAlgorithmSheet a new child of the root. lRootProperty.addChild(lAlgorithmSheet); lRootProperty.moveUp(); } lRootProperty.toXML(lReturnValue); lReturnValue+="\n\n\n"; return lReturnValue; }*/ /// pair CSessionManager::toXMLHandshake(const string& inUser){ assert(!"I think I should delete this"); mMutexSessionManager.unlock(); // pair lReturnValue; //need to make a new default session: lReturnValue.first =newSession(inUser, ""); lReturnValue.second+="<"+mrml_const::cui_shandshake+">"; lReturnValue.second+=toXMLSessions(inUser,false);//this is going to be public lReturnValue.second+=toXML(false);//this is going to be public lReturnValue.second+=""; mMutexSessionManager.unlock(); return lReturnValue; } /// string CSessionManager::toXMLSessionConfiguration()const{ string lReturnValue; CXMLHelper lHelper; assert(!"here is no code!"); return lReturnValue; } /// istream& CSessionManager::read(istream& inStream){ mMutexSessionManager.lock(); while(!inStream.eof() && inStream){ CSession lSession; lSession.read(inStream); if(lSession.getUser().size()){ mUserToSessions[lSession.getUser()].push_back(lSession); } } mMutexSessionManager.unlock(); }; /// ostream& CSessionManager::write(ostream& outStream){ mMutexSessionManager.lock(); //for each list for(map >::const_iterator i=mUserToSessions.begin(); i!=mUserToSessions.end(); i++){ //write the list copy(i->second.begin(), i->second.end(), ostream_iterator(outStream)); } mMutexSessionManager.unlock(); }; string CSessionManager::newSession(const string& inUser, const string& inSessionName){ mMutexSessionManager.lock(); char now[20]; sprintf(now,"%ld",time(0)); string lID=getNewID(); lID=this->newSession(lID, inUser, inSessionName); mMutexSessionManager.unlock(); return lID; }; string CSessionManager::newSession(const string& inID, const string& inUser, const string& inSessionName){ mMutexSessionManager.lock(); char now[20]; sprintf(now,"%ld",time(0)); string lID=inID; string lSessionName("Session"+string(now)); if(inSessionName.size()){ lSessionName=inSessionName; } CSession lDefault(inUser, lID, lSessionName, 0); mUserToSessions[inUser].push_back(lDefault); //a pointer to the same session mIDToSession[lID]=&(mUserToSessions[inUser].back()); mIDToSession[lID]->open(); mIDToSession[lID]->setActiveAlgorithm(mAccessorAdminCollection, *this, makeDefaultAlgorithm(), *mBaseTypeFactory); mMutexSessionManager.unlock(); return inID; }; /// CXMLElement* CSessionManager::openSession(string inUserName, string inSessionID, string inSessionName){ mMutexSessionManager.lock(); cout << "ENTERING OPENSESSION" << endl; CXMLElement* lReturnValue(0); string lReturnID(""); if(inSessionID.size()){ CIDToSession::const_iterator lFound(mIDToSession.find(inSessionID)); if(lFound!=mIDToSession.end()){ if(lFound->second->open()) cout << "USING AN OLD SESSION" << endl; lReturnID=inSessionID; }else{ cout << "making a new session I" << endl; lReturnID= newSession(inUserName, inSessionName); } }else{ cout << "making a new session II" << endl; lReturnID= newSession(inUserName, inSessionName); } if(lReturnID.size()){ lReturnValue=new CXMLElement(mrml_const::acknowledge_session_op,0); if(lReturnValue){ lReturnValue->addAttribute(mrml_const::session_id, lReturnID); } }else{ lReturnValue=new CXMLElement(mrml_const::error,0); assert(lReturnValue); lReturnValue->addAttribute(mrml_const::message, "Open session: The session with name:" +inSessionName +" and ID:" +inSessionID +"could not be opened"); } // this is added for making parsing log files easier, // and to resolve possible ambiguities in log files. if(lReturnValue){ lReturnValue->addAttribute(mrml_const::session_name, inSessionName); lReturnValue->addAttribute(mrml_const::user_name, inUserName); } mMutexSessionManager.unlock(); return lReturnValue; }; /// CXMLElement* CSessionManager::renameSession(string inSessionID, string inSessionName){ mMutexSessionManager.lock(); CXMLElement* lReturnValue(0); string lReturnID(""); if(inSessionID.size()){ CIDToSession::const_iterator lFound(mIDToSession.find(inSessionID)); if(lFound!=mIDToSession.end()){ if(lFound->second->rename(inSessionName)) lReturnID=inSessionID; } } if(lReturnID.size()){ lReturnValue=new CXMLElement(mrml_const::acknowledge_session_op,0); assert(lReturnValue); lReturnValue->addAttribute(mrml_const::session_id, lReturnID); }else{ lReturnValue=new CXMLElement(mrml_const::error,0); assert(lReturnValue); lReturnValue->addAttribute(mrml_const::message, "Rename session: The session with name: `" +inSessionName +"' and ID: `" +inSessionID +"' could not be renamed"); } mMutexSessionManager.unlock(); return lReturnValue; }; /// CXMLElement* CSessionManager::closeSession(string inSessionID){ mMutexSessionManager.lock(); string lReturnID; if(inSessionID.size()){ CIDToSession::iterator lFound(mIDToSession.find(inSessionID)); if(lFound->second->close()){ lReturnID=inSessionID; } } CXMLElement* lReturnValue=new CXMLElement(mrml_const::acknowledge_session_op,0); lReturnValue->addAttribute(mrml_const::session_id, lReturnID); mMutexSessionManager.unlock(); return (CXMLElement*)0; } CXMLElement* CSessionManager::deleteSession(string inSessionID){ mMutexSessionManager.lock(); CXMLElement* lReturnValue(0); bool lSuccess=false; cout << endl << "BEFORE BEFORE Deleting session " << inSessionID << endl; if(inSessionID.size()){ CIDToSession::iterator lFound(mIDToSession.find(inSessionID)); cout << endl << "BEFORE Deleting session " << inSessionID << endl; if(lFound!=mIDToSession.end()){ lSuccess=true; string lUser(lFound->second->getUser()); mIDToSession.erase(lFound); cout << endl << "Deleting session " << inSessionID << " for user " << lUser << endl; CUserToSessions::iterator lUserFound=mUserToSessions.find(lUser); assert(lUserFound!=mUserToSessions.end()); for(list::iterator i=lUserFound->second.begin(); i!=lUserFound->second.end(); i++){ if(i->getID()==inSessionID){ lUserFound->second.erase(i); break; } } cout << "after break" << endl; } } if(lSuccess){ lReturnValue=new CXMLElement(mrml_const::acknowledge_session_op,0); assert(lReturnValue); lReturnValue->addAttribute(mrml_const::session_id, inSessionID); }else{ lReturnValue=new CXMLElement(mrml_const::error,0); assert(lReturnValue); lReturnValue->addAttribute(mrml_const::message, "Close session: The session with ID: `" +inSessionID +"' could not be deleted"); } mMutexSessionManager.unlock(); return lReturnValue; }; bool CSessionManager::setAlgorithm(const string& inSessionID, CAlgorithm* inAlgorithm){ mMutexSessionManager.lock(); //this should also kick of the //creation of a suitable query tree cout << "still here inSessionID: _" << inSessionID << "_" << flush << endl; CIDToSession::const_iterator lFound(mIDToSession.find(inSessionID)); // assert(lSession); if(lFound==mIDToSession.end()){ my_throw(VENotFound("Could not find Session ")); // // the following code has been deleted, as it would // generate a security problem: you could flood the GIFT // by querying with a host of unknown session IDs // // //create a session with the required sessionID // lSession=mIDToSession[this->newSession(inSessionID, // "I-dunno", // "I-know-even-less")]; // // if this fails this is a real programming mistake // // it should never happen // // please don't delete // assert(lSession); } // if this fails this is a real bug // it should never happen // please don't delete assert(lFound->second); bool lResult=lFound->second->setActiveAlgorithm(mAccessorAdminCollection, *this, inAlgorithm, *mBaseTypeFactory); mMutexSessionManager.unlock(); return lResult; }; bool CSessionManager::clearSessionLanguages(const string& inSessionID){ mMutexSessionManager.lock(); //this should also kick of the //creation of a suitable query tree CIDToSession::const_iterator lFound(mIDToSession.find(inSessionID)); // assert(lSession); if(lFound==mIDToSession.end()){ my_throw(VENotFound("Could not find Session")); } // if this fails this is a real bug // it should never happen // please don't delete assert(lFound->second); lFound->second->clearLanguages(); mMutexSessionManager.unlock(); return true; }; bool CSessionManager::addSessionLanguage(const string& inSessionID, const string& inLanguageCode){ mMutexSessionManager.lock(); //this should also kick of the //creation of a suitable query tree CIDToSession::const_iterator lFound(mIDToSession.find(inSessionID)); // assert(lSession); if(lFound==mIDToSession.end()){ my_throw(VENotFound("Could not find Session")); } // if this fails this is a real bug // it should never happen // please don't delete assert(lFound->second); lFound->second->addLanguage(inLanguageCode); mMutexSessionManager.unlock(); return true; }; bool CSessionManager::commitSessionLanguages(const string& inSessionID){ mMutexSessionManager.lock(); //this should also kick of the //creation of a suitable query tree CIDToSession::const_iterator lFound(mIDToSession.find(inSessionID)); // assert(lSession); if(lFound==mIDToSession.end()){ my_throw(VENotFound("Could not find Session")); } // if this fails this is a real bug // it should never happen // please don't delete assert(lFound->second); lFound->second->commitLanguages(mI18nTranslator); mMutexSessionManager.unlock(); return true; }; list CSessionManager::getSessionLanguages(const string& inSessionID)const{ mMutexSessionManager.lock(); //this should also kick of the //creation of a suitable query tree CIDToSession::const_iterator lFound(mIDToSession.find(inSessionID)); // assert(lSession); if(lFound==mIDToSession.end()){ my_throw(VENotFound("Could not find Session")); } // if this fails this is a real bug // it should never happen // please don't delete assert(lFound->second); list lResult=lFound->second->getLanguages(); mMutexSessionManager.unlock(); return lResult; }; CXMLElement* CSessionManager::query(const string& inSessionID, const CXMLElement& inRelevanceLevelList){ // this is function not completely locked, because the functions called do not neccessarily // need a lock. LOCKING THIS FUNCTION COMPLETELY WOULD MEAN LOSING CONCURRENCY. //mMutexSessionManager.lock();//debugging CIDToSession::const_iterator lFound(mIDToSession.find(inSessionID)); //mMutexSessionManager.unlock(); // try{ if(lFound==mIDToSession.end()){ #ifdef GIFT_THROW_UNKNOWN_SESSION // cout << "throwing: " // <<(VEUnknownSession(inSessionID.c_str())) // << endl // << flush; my_throw(VEUnknownSession((string(Could not process query: unknown session) +inSessionID).c_str())); #else //cout << "NOT throwing: " << endl; // my_throw(VEUnknownSession(inSessionID.c_str())); // cerr << "this line should not be reached" // << endl; // assert(0); CXMLElement* lError(new CXMLElement(mrml_const::error,0)); lError->addAttribute(mrml_const::message,"Could not process query: unknown session (ID:"+inSessionID+")."); return lError; #endif }else{ //cout << "querying: " << endl; CXMLElement* lReturnValue(lFound->second->query(*this, inRelevanceLevelList)); //mMutexSessionManager.unlock();//debugging return lReturnValue; } } catch(GIFTException& inCaught){ //cout << "CAUGHT3" << endl; return createErrorMessage(inCaught); } catch(GIFTException* inCaught){ //cout << "CAUGHT4" << endl; return createErrorMessage(inCaught); } }; //-------------------------------------------------- // retrieving random images as seeds CXMLElement* CSessionManager::getRandomImages(const string& inSessionID, const string& inAlgorithm, int inNumberOfImages){ // mMutexSessionManager.lock(); CIDToSession::const_iterator lFound=mIDToSession.find(inSessionID); mMutexSessionManager.unlock(); // if(lFound==mIDToSession.end()){ #ifdef GIFT_THROW_UNKNOWN_SESSION cout << "throwing: " <<(VEUnknownSession(inSessionID.c_str())) << endl << flush; #else my_throw(VEUnknownSession(inSessionID.c_str())); CXMLElement* lError(new CXMLElement("error",0)); lError->addAttribute("message","Could not process query: unknown session (ID:"+inSessionID+")."); #endif } // return lFound->second->getRandomImages(*this, inAlgorithm, inNumberOfImages); }; CQuery* CSessionManager::makeQuery(const string& inBaseType, CAlgorithm& inAlgorithm){ mMutexSessionManager.lock(); CQuery* lReturnValue=mBaseTypeFactory->makeQuery(inBaseType, mAccessorAdminCollection, inAlgorithm); mMutexSessionManager.unlock(); return lReturnValue; } //---------------------------------------- /** Building a property sheet list I consider building a list on a call by call basis as tedious. So what I do is: I first build a tree, and then I break down this tree into our list. This function makes a new tree */ void CSessionManager::startPropertySheetSubtree(){ //don't FIXME this should work without any if in real c++ delete mPropertySheetSubtree; mPropertySheetSubtree=new CXMLElement(mrml_const::cui_property_list, 0); }; /** This function gets us the current property sheet subtree. */ CXMLElement* CSessionManager::getPropertySheetSubtree(){ return mPropertySheetSubtree; }; /** This function does the actual breaking down into a CPropertySheetList. */ void CSessionManager::endPropertySheetSubtree(){ mPropertySheetList=new CPropertySheetList(mPropertySheetSubtree); mPropertySheetSubtree=0; }; /** gets a property sheet for the algorithm inAlgorithmID */ CXMLElement* CSessionManager::getPropertySheet(string /*ignored inSessionID*/, string inAlgorithmID)const{ mMutexSessionManager.lock(); CAlgorithm& lAlgorithm(getAlgorithmByType(inAlgorithmID)); CXMLElement* lReturnValue(0); if(lAlgorithm.stringReadAttribute(mrml_const::cui_property_sheet_id).first){ lReturnValue=mPropertySheetList->newPropertySheet(lAlgorithm .stringReadAttribute(mrml_const::cui_property_sheet_id).second); } mMutexSessionManager.unlock(); return lReturnValue; }; CXMLElement* CSessionManager::getCollections()const{ mMutexSessionManager.lock(); cout << "getcollections" << endl; CXMLElement* lReturnValue(mAccessorAdminCollection.toXMLElement()); mMutexSessionManager.unlock(); return lReturnValue; }; /** */ CXMLElement* CSessionManager::getAlgorithms()const{ mMutexSessionManager.lock(); CXMLElement* lReturnValue(((CAlgorithmCollection*)this)->toXMLElement()); mMutexSessionManager.unlock(); return lReturnValue; }; /** i18n: get the list of preferred languages of this session */ void CSessionManager::translate(string inSessionID, CXMLElement& inoutToBeTranslated)const{ mMutexSessionManager.lock(); //this should also kick of the //creation of a suitable query tree CIDToSession::const_iterator lFound(mIDToSession.find(inSessionID)); // assert(lSession); if(lFound==mIDToSession.end()){ //my_throw(VENotFound("Could not find Session")); cerr << "Unknown session " << inSessionID << endl; mMutexSessionManager.unlock(); return; } // if this fails this is a real bug // it should never happen // please don't delete assert(lFound->second); mI18nTranslator.translateXMLTree(lFound->second->getPreferredLanguage(), inoutToBeTranslated); mMutexSessionManager.unlock(); }; gift-0.1.14/libMRML/cc/CXMLElement.cc0000644000175200001440000002620310220502730013646 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/my_throw.h" #include "libMRML/include/CXMLElement.h" #include "libMRML/include/CXMLElementVisitor.h" #include #include /** change the father of this*/ void CXMLElement::setFather(CXMLElement* inFather){ mFather=inFather; }; /** change the father of this*/ CXMLElement* CXMLElement::getFather()const{ return mFather; }; /** get the name of this*/ int CXMLElement::getTypeOfNode()const{ return mTypeOfNode; }; /** get the text contained in this*/ string CXMLElement::getText()const{ return mText; }; /** get the name contained in this*/ string CXMLElement::getName()const{ return mName; }; /** adding an attribute for integers */ void CXMLElement::addAttribute(const string& inAttribute,long inValue){ mAttributes.add(inAttribute, inValue); }; /** adding an attribute for doubles */ void CXMLElement::addAttribute(const string& inAttribute,double inValue){ mAttributes.add(inAttribute, inValue); }; /** adding an attribute for strings */ void CXMLElement::addAttribute(const string& inAttribute,const string& inValue){ // cout << mName // << " adding " // << inAttribute // << "," // << inValue // << endl; mAttributes.add(inAttribute, inValue); }; /** reading an attribute for integers */ pair CXMLElement::boolReadAttribute(const string& inAttribute)const{ return mAttributes.boolReadAttribute(inAttribute); }; /** reading an attribute for integers */ pair CXMLElement::longReadAttribute(const string& inAttribute)const{ return mAttributes.longReadAttribute(inAttribute); }; /** reading an attribute for doubles */ pair CXMLElement::doubleReadAttribute(const string& inAttribute)const{ return mAttributes.doubleReadAttribute(inAttribute); }; /** reading an attribute for strings */ pair CXMLElement::stringReadAttribute(const string& inAttribute)const{ return mAttributes.stringReadAttribute(inAttribute); }; /** clone this element with all its content */ CXMLElement* CXMLElement::clone(bool inDeep)const{ CXMLElement* lReturnValue=new CXMLElement(mName,mAttributes); if(!lReturnValue){ my_throw("shit"); } // copy(mAttributes.begin(), // mAttributes.end(), // inserter(lReturnValue->mAttributes, // lReturnValue->mAttributes.begin())); if(inDeep){ for(lCChildren::const_iterator i=mChildren.begin(); i!=mChildren.end(); i++){ lReturnValue->mChildren.push_back((*i)->clone(inDeep)); } }else{ for(lCChildren::const_iterator i=mChildren.begin(); i!=mChildren.end(); i++){ lReturnValue->mChildren.push_back(*i); } } return lReturnValue; }; /** Convert this into an XML string */ void CXMLElement::toXML(string& outString, const int inNiveau)const{ #ifdef _MOVEDEBUG cout << "THIS" << this << endl; #endif if(mTypeOfNode==cElementNode){ for(int i=0; itoXML(outString,inNiveau+1); } //...and then close the tag. for(int i=0; i\n"); }else{ //if there are none, this will be an empty tag outString+="/>\n"; } }else{ if(mTypeOfNode==cTextNode){ outString+=""; outString+=mText; } } } /** visit this using a visitor */ void CXMLElement::traverse(CXMLElementVisitor& inoutVisitor)const{ //if there are children, visit them if(inoutVisitor.startVisit(*this)){ if(mChildren.size()){ for(lCChildren::const_iterator i=mChildren.begin(); i!=mChildren.end(); i++){ (*i)->traverse(inoutVisitor); } } inoutVisitor.endVisit(*this); } }; /** visit this using a visitor */ void CXMLElement::traverse(CXMLElementVisitor& inoutVisitor){ //if there are children, visit them if(inoutVisitor.startVisit(*this)){ if(mChildren.size()){ for(lCChildren::const_iterator i=mChildren.begin(); i!=mChildren.end(); i++){ (*i)->traverse(inoutVisitor); } } inoutVisitor.endVisit(*this); } }; /** get the first of the list of children */ list::const_iterator CXMLElement::child_list_begin()const{ return mChildren.begin(); }; /** get the first of the list of children */ list::const_iterator CXMLElement::child_list_end()const{ return mChildren.end(); }; /** get the first of the list of children */ list::iterator CXMLElement::child_list_begin(){ return mChildren.begin(); }; /** get the first of the list of children */ list::iterator CXMLElement::child_list_end(){ return mChildren.end(); }; /** Add a child with the given attributes to the current node, and MAKE THIS CHILD THE NEW CURRENT NODE. */ void CXMLElement::addChild(const string& inName, const char* const* const inAttributeList){ //initialize new child addChild(new CXMLElement(inName, inAttributeList)); } /** */ void CXMLElement::addChild(CXMLElement* inXMLElement){ /* if the assertion is zero, the this element is finished*/ assert(mCurrentChild); if(!mCurrentChild->mChildren.size() || (inXMLElement->mTypeOfNode==cElementNode) || ((mCurrentChild->mChildren.size()) && (mCurrentChild->mChildren.back()->mTypeOfNode==cElementNode))){ // either first node, or neighbour of a non-text node //eliminate whitespace-only nodes if(mCurrentChild->mChildren.size()){ if(mCurrentChild->mChildren.back()->mTypeOfNode==cTextNode){ bool lWhitespaceOnly(true); for(int i=0; imChildren.back()->mText.size(); i++){ if((mCurrentChild->mChildren.back()->mText[i]!=' ') && (mCurrentChild->mChildren.back()->mText[i]!='\n') && (mCurrentChild->mChildren.back()->mText[i]!='\t')){ lWhitespaceOnly=false; } } if(lWhitespaceOnly){ delete mCurrentChild->mChildren.back(); mCurrentChild->mChildren.pop_back(); } } } mCurrentChild->mChildren.push_back(inXMLElement); inXMLElement->setFather(mCurrentChild); }else{ //text node, unite with previous text nodes, if possible if((mCurrentChild->mChildren.size()) && (mCurrentChild->mChildren.back()->mTypeOfNode==cTextNode)){ mCurrentChild->mChildren.back()->mText+=inXMLElement->mText; delete inXMLElement; } } // move down #ifdef _MOVEDEBUG cout << "movingDown " << mCurrentChild << "->" << inXMLElement << endl; #endif mCurrentChild=mCurrentChild->mChildren.back(); }; /** make the father of the current node the new current node. */ void CXMLElement::moveUp(){ #ifdef _MOVEDEBUG cout << "movingUp " << mCurrentChild << "->" << mCurrentChild->getFather() <getFather(); }; /** construct this from what we get from expat Special: mCurrentChild=this for unifying the building up of this element. So this element can function as simply an element, but also as a DOM-builder. */ CXMLElement::CXMLElement(const string& inName, const char* const * const inAttributes): mAttributes(inAttributes), mText(""), mName(inName), mTypeOfNode(CXMLElement::cElementNode) { mFather=0; mCurrentChild=this; } /** destroy this and all its children */ CXMLElement::~CXMLElement(){ for(lCChildren::iterator i=mChildren.begin(); i!=mChildren.end(); i++){ delete *i; }; } /** Constructing this from more c++-like structures */ CXMLElement::CXMLElement(const string& inName, const list< pair >& inAttributes): mFather(0), mText(""), mName(inName), mAttributes(inAttributes), mTypeOfNode(CXMLElement::cElementNode){ }; /** Constructing this from more c++-like structures */ CXMLElement::CXMLElement(const string& inName, const CAttributeList& inAttributes): mFather(0), mText(""), mName(inName), mAttributes(inAttributes), mTypeOfNode(CXMLElement::cElementNode){ }; /** constructing */ CXMLElement::CXMLElement(int inType, const string& inText): mFather(0), mName(""), mText(inText), mAttributes(0), mTypeOfNode(inType){ }; /** a deep copy of this */ CXMLElement::CXMLElement(const CXMLElement& in): mAttributes(in.mAttributes), mName(in.mName), mText(in.mText), mTypeOfNode(in.mTypeOfNode){ mFather=0; mCurrentChild=this; cout << "checking before making children " << endl; check(); cout << "making children " << endl; for(lCChildren::const_iterator i=in.mChildren.begin(); i!=in.mChildren.end(); i++){ mChildren.push_back(new CXMLElement(**i)); mChildren.back()->setFather(this); } } bool CXMLElement::isSubtreeFinished()const{ return !mCurrentChild; // || (mCurrentChild==this); // we have moved up beyond the root of this tree, so // this element is finished } /** For doing flat configuration, we need to find out all attributes which are visible in this algorithm */ list >* CXMLElement::createNamedValueList()const{ list >* lReturnValue=new list >(); mAttributes.check(); if(lReturnValue) for(CAttributeList::const_iterator i=mAttributes.begin(); i!=mAttributes.end(); i++){ #ifdef SINGLE lReturnValue->push_back(*i); #else lReturnValue->push_back(make_pair(i->first,string(i->second.first))); #endif } return lReturnValue; }; /** get the number of attributes in this */ int CXMLElement::getNumberOfAttributes()const{ return mAttributes.size(); }; /** This constant is destined to be a value of mTypeOfNode */ int const CXMLElement::cTextNode=1; /** This constant is destined to be a value of mTypeOfNode */ int const CXMLElement::cElementNode=2; void CXMLElement::check()const{ mAttributes.check(); for(lCChildren::const_iterator i=mChildren.begin(); i!=mChildren.end(); i++){ cout << "+" << flush; (*i) ->check(); cout << "/" << flush; } } gift-0.1.14/libMRML/Makefile.am0000644000175200001440000000005010153634161012732 00000000000000EXTRA_DIST= include SUBDIRS= include cc gift-0.1.14/libMRML/Makefile.in0000644000175200001440000003454110220474077012762 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = libMRML DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = 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 ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = include SUBDIRS = include cc all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(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 libMRML/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libMRML/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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: # 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): @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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: @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; 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='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="../$(top_distdir)" \ distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive 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-info \ install-info-am install-man 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-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: gift-0.1.14/libMRML/include/0000777000175200001440000000000010220511622012401 500000000000000gift-0.1.14/libMRML/include/CVS/0000777000175200001440000000000010154072022013036 500000000000000gift-0.1.14/libMRML/include/CVS/Root0000644000175200001440000000005410153634161013626 00000000000000muellerw@subversions.gnu.org:/cvsroot/gift/ gift-0.1.14/libMRML/include/CVS/Repository0000644000175200001440000000002510153634161015060 00000000000000gift/libMRML/include gift-0.1.14/libMRML/include/CVS/Entries0000644000175200001440000000542510154072022014314 00000000000000/CAttributeList.h/1.10/Mon Jul 22 09:13:01 2002// /CCommunicationHandler.h/1.10/Tue Jul 23 18:34:02 2002// /CSessionManager.h/1.9/Mon Jul 22 12:43:57 2002// /CXMLElementBuilder.h/1.8/Tue Jul 23 18:34:03 2002// /CXMLElementVisitor.h/1.7/Mon Jul 22 09:46:25 2002// /CXMLElement.h/1.11/Wed Jul 24 15:00:38 2002// /CI18nTranslator.h/1.1/Tue Jul 23 18:32:03 2002// /CXEVI18nTranslator.h/1.1/Mon Jul 22 12:39:52 2002// /CAccessorAdmin.h/1.8/Mon Sep 30 20:01:00 2002// /mrml_const.h/1.6/Sun Sep 22 14:59:55 2002// /CAccessor.h/1.8/Mon Jul 22 07:09:29 2002// /CAccessorAdminCollection.h/1.9/Mon Jul 22 07:09:29 2002// /CAccessorElement.h/1.5/Mon Jul 22 07:09:29 2002// /CAccessorFactory.h/1.5/Mon Jul 22 07:09:29 2002// /CAccessorImplementation.h/1.8/Mon Jul 22 07:09:29 2002// /CAlgorithm.h/1.7/Mon Jul 22 07:09:29 2002// /CAlgorithmCollection.h/1.7/Mon Jul 22 07:09:29 2002// /CArraySelfDestroyPointer.h/1.3/Mon Jul 22 07:09:29 2002// /CDebuggingMemoryManager.h/1.7/Mon Jul 22 07:09:29 2002// /CDynamicQueryFactory.h/1.6/Mon Jul 22 07:09:29 2002// /CIDRelevanceLevelPair.h/1.9/Mon Jul 22 07:09:29 2002// /CIDRelevanceLevelPairList.h/1.6/Mon Jul 22 07:09:29 2002// /CMRMLStringConstants.h/1.5/Mon Jul 22 07:09:29 2002// /CMagic.h/1.4/Mon Jul 22 07:09:29 2002// /CMutex.h/1.6/Mon Jul 22 07:09:29 2002// /CNoDelete.h/1.6/Mon Jul 22 07:09:29 2002// /CPropertySheetList.h/1.6/Mon Jul 22 07:09:29 2002// /CQMultiple.h/1.10/Mon Jul 22 07:09:29 2002// /CQParallel.h/1.6/Mon Jul 22 07:09:29 2002// /CQuery.h/1.6/Mon Jul 22 07:09:29 2002// /CQueryParadigmMatcher.h/1.6/Mon Jul 22 07:09:29 2002// /CQueryTreeBuilder.h/1.4/Mon Jul 22 07:09:29 2002// /CQueryTreeNode.h/1.6/Mon Jul 22 07:09:29 2002// /CRPipe.h/1.2/Mon Jul 22 07:09:29 2002// /CReaper.h/1.3/Mon Jul 22 07:09:29 2002// /CReaperDistributor.h/1.4/Mon Jul 22 07:09:29 2002// /CRelevanceLevel.h/1.7/Mon Jul 22 07:09:29 2002// /CRelevanceLevelList.h/1.6/Mon Jul 22 07:09:29 2002// /CStaticQueryFactory.h/1.5/Mon Jul 22 07:09:29 2002// /CTimeStampGenerator.h/1.5/Mon Jul 22 07:09:29 2002// /CXEVCommunication.h/1.6/Mon Jul 22 07:09:29 2002// /CXEVTripletList.h/1.6/Mon Jul 22 07:09:29 2002// /CXMLHelper.h/1.5/Mon Jul 22 07:09:29 2002// /GIFTExceptions.h/1.6/Mon Jul 22 07:09:29 2002// /TID.h/1.3/Mon Jul 22 07:09:29 2002// /createErrorMessage.h/1.2/Mon Jul 22 07:09:29 2002// /myNew.h/1.6/Mon Jul 22 07:09:29 2002// /my_assert.h/1.4/Mon Jul 22 07:09:29 2002// /my_diagnose.h/1.3/Mon Jul 22 07:09:29 2002// /my_throw.h/1.3/Mon Jul 22 07:09:29 2002// /safePopen.h/1.2/Mon Jul 22 07:09:29 2002// /uses-declarations.h/1.2/Mon Jul 22 07:09:29 2002// /CAFPlugin.h/1.7/Wed Mar 24 08:36:11 2004// /CAccessorFactoryContainer.h/1.8/Wed Mar 24 08:31:26 2004// /CQueryPlugin.h/1.6/Wed Mar 24 09:34:25 2004// /CSelfDestroyPointer.h/1.6/Thu Dec 2 15:44:49 2004// /Makefile.am/1.11/Thu Dec 2 15:44:49 2004// D gift-0.1.14/libMRML/include/CAttributeList.h~0000644000175200001440000000606610153634161015607 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva 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 */ #ifndef _CATTRIBUTELIST #define _CATTRIBUTELIST #include "libMRML/include/uses-declarations.h" #include #include #include #include "libMRML/include/CMagic.h" //#define _PRINTOUTS_AL /** a simple class destined to contain attribute-value pairs in an easily accessible fashion */ class CAttributeList:public map >,public CMagic{ public: /** */ void check()const; /** */ typedef map > CBase; /** from expat */ CAttributeList(const char* const * const inAttributeList); /** from other c++ */ CAttributeList(const list >& inAttributes); /** copy constructor */ CAttributeList(const CAttributeList& inList); /** finding in this*/ const_iterator find(string inString)const; /** adding an attribute */ void add(const string& inFirst, const string& inSecond); /** adding an attribute for integers using the function for strings */ void add(const string& inAttribute,long inValue); /** adding an attribute for doubles using using the function for strings */ void add(const string& inAttribute,double inValue); /** reading an attribute for booleans using stringReadAttribute it supports several pairs: yes/no true/false y/n */ pair boolReadAttribute(const string& inAttribute)const; /** reading an attribute for integers using stringReadAttribute */ pair longReadAttribute(const string& inAttribute)const; /** reading an attribute for doubles using stringReadAttribute */ pair doubleReadAttribute(const string& inAttribute)const; /** reading an attribute for strings All the attribute functions implement a primitive version of inheritance: We look also at the parents of this, if we do not find a given attribute in this. this is virtual in order to plug in other methods of inheritance */ virtual pair stringReadAttribute(const string& inAttribute)const; /** Outputting a string to XML */ void CAttributeList::toXML(string& outString)const; /** the destructor in the case of char* as content it deletes the arrays of char. */ ~CAttributeList(); }; #endif gift-0.1.14/libMRML/include/CTimeStampGenerator.h0000644000175200001440000000256610220502730016354 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CTIMESTAMPGENERATOR #define _CTIMESTAMPGENERATOR #include "libMRML/include/uses-declarations.h" class CXMLElement; /** This class generates a cui-time-stamp MRML element */ class CTimeStampGenerator{ public: /** this generates a time stamp it might be interesting to inherit from this class, so we make it a virtual function*/ virtual CXMLElement* generateTimeStamp()const; }; #endif gift-0.1.14/libMRML/include/CI18nTranslator.h0000644000175200001440000000766610220502730015401 00000000000000// -*- mode: c++ -*- #ifndef _CI18NTRANSLATOR #define _CI18NTRANSLATOR /* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include "libMRML/include/CXMLElement.h" #include //#include "expat/xmlparse/xmlparse.h" /** This class offers runtime translation of strings. In contrast to GNU gettext we can chose during runtime the language without additional overhead. */ class CI18nTranslator{ /** a map that translates strings */ typedef map CTranslatorMap; /** a map that contains the decision if a given string is to be translated */ typedef map CShouldBeTranslatedMap; /** a map that contains translators for a number of languages */ typedef map CLanguageMap; /** This map contains translators for each language given in the gift-i18n file. */ CLanguageMap mLanguageMap; /** This map contains information about which */ CShouldBeTranslatedMap mShouldBeTranslatedAttribute; /** the current language while parsing the config file */ string mCurrentLanguage; protected: public: /** should a given attribute string be translated? */ bool shouldBeTranslatedAttribute(string inAttribute)const; /** should a given attribute string be translated? */ bool shouldBeTranslatedText(string inContainingTag)const; /** set the current language during construction */ void setCurrentLanguage(const string& inLanguage); /** set the current language during construction */ string getCurrentLanguage()const; /** Should the attribute be translated */ void setShouldBeTranslatedAttribute(string inString); /** Add one translation pair */ void addTranslationPair(string inString,string inTranslatedString); /** The constructor */ CI18nTranslator(string inTranslationFileName); /** Get an MRML tag containing all offered languages*/ const CXMLElement* getLanguagesXML()const; /** Get a string list containing all languages */ bool hasLanguage(string inLanguageCode)const; /** Translate an attribute given by its name and its value @returns pair: first, if the string should be translated, second, its value */ const pair translateAttribute(string inLanguageCode, const string& inAttribute, const string& inValue)const; /** Translate an tag containing pdata given by its name and its value @returns pair: first, if the string should be translated, second, its value */ const pair translateText(string inLanguageCode, const string& inContainingTag, const string& inText); /** Translate a complete XML Tree*/ void translateXMLTree(string inLanguageCode, CXMLElement& inoutToBeTranslated)const; /** for parsing the config file */ static void CI18nTranslator::startXMLElement(void *inUserData, const char *inElementName, const char **inAttributes); /** for parsing the config file */ static void CI18nTranslator::endXMLElement(void *inUserData, const char *inElementName); }; #endif gift-0.1.14/libMRML/include/CXEVCommunication.h0000644000175200001440000000372510220502730015770 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CXEVCOMMUNICATION #define _CXEVCOMMUNICATION #include "libMRML/include/uses-declarations.h" #include //mSessionID #include "libMRML/include/CXMLElementVisitor.h" //base class class CCommunicationHandler; /** A visitor visiting document trees built from the communication. */ class CXEVCommunication:public CXMLElementVisitor{ protected: /** the session in which this message is sent */ string mSessionID; /** CCommunicationHandler which will build the response from our calls */ CCommunicationHandler* mHandler; public: /** constructor. When traversing the tree we need to call member functions of the communication handler with subtrees of the tree we traverse. */ CXEVCommunication(CCommunicationHandler* inHandler); /** actually carrying out the visit */ virtual bool startVisit(const CXMLElement& inVisited); /** actually carrying out the visit */ virtual void endVisit(const CXMLElement& inVisited); }; #endif gift-0.1.14/libMRML/include/CXEVTripletList.h0000644000175200001440000000356510220502730015444 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CXEVTRIPLETLIST #define _CXEVTRIPLETLIST #include "libMRML/include/uses-declarations.h" #include //mSessionID #include "libGIFTQuPerl/include/CXMLTripletList.h" #include "libMRML/include/CXMLElementVisitor.h" //base class /** This visitor converts a CXMLTree into a list of (instruction,name,value) triplets, in order to pass them to Perl or CORBA. */ class CXEVTripletList:public CXMLElementVisitor{ protected: /** A list of (instruction,name,value) triplets. */ CXMLTripletList mTripletList; public: /** constructor. we do not need anything */ CXEVTripletList(); /** actually carrying out the visit */ virtual bool startVisit(const CXMLElement& inVisited); /** actually carrying out the visit */ virtual void endVisit(const CXMLElement& inVisited); /** getting the list which was built */ const CXMLTripletList& getTripletList(); }; #endif gift-0.1.14/libMRML/include/CMagic.h0000644000175200001440000000166410220502730013620 00000000000000// -*- mode: c++ -*- #ifndef _CMAGIC #define _CMAGIC #include "libMRML/include/uses-declarations.h" #include /** This is a simple class for debugging. It checks if it has been properly initialised or if it has been destroyed twice. The method is simple: On construction of a CMagicObject, its member mMagic is set to int(42). On destruction mMember is set to int(36). */ class CMagic{ /** This should contain the magic number if everything is right */ int mMagic; public: /** This function checks the magic number of this and asserts to zero, if something is wrong, if things are ok, this function keeps quiet. */ void check()const; /** as check(), but it also prints a small message to cout, saying that the check worked. */ void checkNPrint()const; /** sets the magic number to 42 */ CMagic(); /** sets the magic number to another value (36) */ ~CMagic(); }; #endif gift-0.1.14/libMRML/include/CSelfDestroyPointer.h0000644000175200001440000001154610220502730016404 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _CSELFDESTROYPOINTER #define _CSELFDESTROYPOINTER #include "libMRML/include/uses-declarations.h" /** destroys the element it points to or not (depending on user's choice). */ template class CSelfDestroyPointer{ /// mutable bool mIsSelfDestroyer; /// protected: T* mPointer; /// public: /// void resetWithoutDeleting(); /// inline bool isSelfDestroyer()const; /// inline void setIsSelfDestroyer(bool inisSelfDestroyer=true)const; /// void unsetIsSelfDestroyer()const; /// T* operator= (T* inPointer); /// T& operator*(); /// T const& operator*()const; /// T* operator -> (); /// T const* operator -> ()const; /// ~CSelfDestroyPointer(); /// CSelfDestroyPointer(T*, bool = true); /// CSelfDestroyPointer(const CSelfDestroyPointer& inSelfDestroyPointer); /// CSelfDestroyPointer(); /// operator bool()const; /// operator T*()const; }; /// template void CSelfDestroyPointer::resetWithoutDeleting(){ mPointer=0; } template T* CSelfDestroyPointer::operator=(T* inPointer){ if(mIsSelfDestroyer){ #ifdef _DEBUG_SELF_DESTROY_ cout <<"£"< T const& CSelfDestroyPointer::operator *()const{ return *mPointer; } template T const* CSelfDestroyPointer::operator ->()const{ return mPointer; } template T& CSelfDestroyPointer::operator *(){ return *mPointer; } template T* CSelfDestroyPointer::operator ->(){ return mPointer; } template CSelfDestroyPointer::CSelfDestroyPointer(T* inPointer, bool inIsSelfDestroyer): mPointer(inPointer), mIsSelfDestroyer(inIsSelfDestroyer) { } /// template CSelfDestroyPointer::CSelfDestroyPointer(const CSelfDestroyPointer& in): mPointer(in.mPointer), mIsSelfDestroyer(in.mIsSelfDestroyer) { }; template CSelfDestroyPointer::CSelfDestroyPointer(): mPointer(0), mIsSelfDestroyer(true) { } template CSelfDestroyPointer::~CSelfDestroyPointer() { if(mIsSelfDestroyer){ delete mPointer; } } template void CSelfDestroyPointer::setIsSelfDestroyer(bool inIsSelfDestroyer)const{ mIsSelfDestroyer= inIsSelfDestroyer; }; template bool CSelfDestroyPointer::isSelfDestroyer()const{ return mIsSelfDestroyer; }; template void CSelfDestroyPointer::unsetIsSelfDestroyer()const{ mIsSelfDestroyer=0; }; template CSelfDestroyPointer::operator bool()const{ return mPointer; }; template CSelfDestroyPointer::operator T*()const{ return mPointer; }; template class CSelfClonePointer: public CSelfDestroyPointer{ /// mutable bool mIsSelfCloner; /// public: /// CSelfClonePointer(T*, bool = true); /// CSelfClonePointer& operator= (T* in); /// CSelfClonePointer& operator= (const CSelfClonePointer& in); /// CSelfClonePointer(const CSelfClonePointer&); /// CSelfClonePointer(); /// operator bool()const; /// operator T*()const; }; template CSelfClonePointer& CSelfClonePointer::operator=(T* in){ CSelfDestroyPointer::operator=(in); return *this; }; template CSelfClonePointer& CSelfClonePointer::operator= (const CSelfClonePointer& in){ this->mPointer=in.mPointer; setIsSelfDestroyer(in.isSelfDestroyer()); return *this; }; template CSelfClonePointer::CSelfClonePointer(T* inPointer,bool inIsSelfCloner): CSelfDestroyPointer(inPointer, inIsSelfCloner) { } template CSelfClonePointer::CSelfClonePointer(): CSelfDestroyPointer(0, true) { } template CSelfClonePointer::CSelfClonePointer(const CSelfClonePointer& in): CSelfDestroyPointer(in) { if(in.mPointer && in.isSelfDestroyer()){ this->mPointer=in.mPointer->clone(); }else{ this->mPointer=in.mPointer; } } #endif gift-0.1.14/libMRML/include/Makefile0000644000175200001440000003531410220474120013764 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # libMRML/include/Makefile. Generated from Makefile.in by configure. # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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. srcdir = . top_srcdir = ../.. pkgdatadir = $(datadir)/gift pkglibdir = $(libdir)/gift pkgincludedir = $(includedir)/gift top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = /bin/install -c 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 = : host_triplet = i686-pc-linux-gnu subdir = libMRML/include DIST_COMMON = $(libMRML_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__installdirs = "$(DESTDIR)$(libMRMLdir)" libMRMLHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(libMRML_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = aclocal-1.8 AMDEP_FALSE = # AMDEP_TRUE = AMTAR = tar AR = ar AUTOCONF = autoconf AUTOHEADER = autoheader AUTOMAKE = automake-1.8 AWK = gawk BAYESIAN = BAYESIAN_LD_ADD = CA_X_DISTANCEMATRIX = CC = gcc CCDEPMODE = depmode=gcc3 CFLAGS = -g -O2 CONVERT = /usr/bin/convert CPP = gcc -E CPPFLAGS = CXX = g++ CXXCPP = g++ -E CXXDEPMODE = depmode=gcc3 CXXFLAGS = -g -O2 -DEF_PROTECT_BELOW=1 -DEF_PROTECT_FREE -DEF_PROTECT_ALIGNMENT=8 -DEF_FILL=42 -I /usr/include/mysql -D__GIFT_WITH_PERL__ -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl5/5.8.5/i686-linux/CORE CYGPATH_W = echo DEBDATADIR = ${prefix}/share DEBEXECBINDIR = ${exec_prefix}/bin DEBPERLLIBDIR = ${exec_prefix}/bin DEBSHAREDIR = ${exec_prefix}/lib DEFS = -DHAVE_CONFIG_H DEPDIR = .deps DOXYGEN = /usr/bin/doxygen ECHO = echo ECHO_C = ECHO_N = -n ECHO_T = EGREP = grep -E EMACS = emacs EMACSLOADPATH = EXEEXT = F77 = g77 FFLAGS = -g -O2 GIFT_BAYESIAN_DIR = GIFT_BAYESIAN_FLAG = GIFT_INTERNAL_FLAG = GIFT_INTERNAL_PERLS = GIFT_LIB_VERSION_INFO = -version-info 0:1:5 GIFT_MYSQL_DIR = /home/wolfgang/gift-mysql INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s LDFLAGS = LIBOBJS = LIBS = -luuid -lpthread -lm -lexpat LIBTOOL = $(SHELL) $(top_builddir)/libtool LIBTOOL_DEPS = ./ltmain.sh LN_S = ln -s LTLIBOBJS = MAGICK = /usr/bin/convert MAKEINFO = makeinfo OBJEXT = o PACKAGE = gift PACKAGE_BUGREPORT = PACKAGE_NAME = PACKAGE_STRING = PACKAGE_TARNAME = PACKAGE_VERSION = PATH_SEPARATOR = : PERL = /usr/bin/perl PERL_LD_ADD = -rdynamic -L/usr/local/lib /usr/lib/perl5/5.8.5/i686-linux/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl5/5.8.5/i686-linux/CORE -lperl -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc PRE_INSTALL_LIBDIRS = -L/home/wolfgang/gift/33gift/libMRML/cc/ -L/home/wolfgang/gift/33gift/libGIFTAcPerl/cc/ -L/home/wolfgang/gift/33gift/libGIFTQuPerl/cc/ -L/home/wolfgang/gift/33gift/libGIFTAcInvertedFile/cc/ -L/home/wolfgang/gift/33gift/libGIFTAcHierarchy/cc/ -L/home/wolfgang/gift/33gift/libGIFTAcDistanceMatrix/cc/ -L/home/wolfgang/gift/33gift/libGIFTQuInvertedFile/cc/ -L/home/wolfgang/gift/33gift/libGIFTQuBayesian/cc/ -L/home/wolfgang/gift/33gift/libGIFTQuHierarchy/cc/ -L/home/wolfgang/gift/33gift/libGIFTAcURL2FTS/cc/ PRE_INSTALL_LINKDIRS = --rpath/home/wolfgang/gift/33gift/libMRML/cc/ -L/home/wolfgang/gift/33gift/libGIFTAcPerl/cc/ -L/home/wolfgang/gift/33gift/libGIFTQuPerl/cc/ --rpath/home/wolfgang/gift/33gift/libGIFTAcInvertedFile/cc/ --rpath/home/wolfgang/gift/33gift/libGIFTAcHierarchy/cc/ --rpath/home/wolfgang/gift/33gift/libGIFTAcDistanceMatrix/cc/ --rpath/home/wolfgang/gift/33gift/libGIFTQuInvertedFile/cc/ --rpath/home/wolfgang/gift/33gift/libGIFTQuBayesian/cc/ --rpath/home/wolfgang/gift/33gift/libGIFTQuHierarchy/cc/ --rpath/home/wolfgang/gift/33gift/libGIFTAcURL2FTS/cc/ PTHREAD_CC = PTHREAD_CFLAGS = PTHREAD_LIBS = RANLIB = ranlib SET_MAKE = SGML2INFO = SGML2LATEX = SGML2TXT = SHELL = /bin/sh STRIP = strip UNPUBLISHED = UNPUBLISHED_DIR = VERSION = 0.1.14 WEB_PUBLISHING_DIRECTORY = /home/wolfgang/public_html/ WEB_PUBLISHING_LOCATION = http://localhost/~wolfgang ac_ct_AR = ar ac_ct_CC = gcc ac_ct_CXX = g++ ac_ct_F77 = g77 ac_ct_RANLIB = ranlib ac_ct_STRIP = strip acx_pthread_config = am__fastdepCC_FALSE = # am__fastdepCC_TRUE = am__fastdepCXX_FALSE = # am__fastdepCXX_TRUE = am__include = include am__leading_dot = . am__quote = bindir = ${exec_prefix}/bin build = i686-pc-linux-gnu build_alias = build_cpu = i686 build_os = linux-gnu build_vendor = pc datadir = ${prefix}/share exec_prefix = ${prefix} host = i686-pc-linux-gnu host_alias = host_cpu = i686 host_os = linux-gnu host_vendor = pc includedir = ${prefix}/include infodir = ${prefix}/info install_sh = /home/wolfgang/gift/33gift/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec lispdir = ${datadir}/emacs/site-lisp localstatedir = ${prefix}/var mandir = ${prefix}/man mkdir_p = mkdir -p -- . oldincludedir = /usr/include prefix = /home/wolfgang/gift-install/ program_transform_name = s,x,x, sbindir = ${exec_prefix}/sbin sharedstatedir = ${prefix}/com sysconfdir = ${prefix}/etc target_alias = #install-data-local: # echo "ca marche" #install-data-hook: # echo "pas" libMRMLdir = $(includedir)/libMRML/include libMRML_HEADERS = directory.h \ CAFPlugin.h CMRMLStringConstants.h CTimeStampGenerator.h \ CAccessor.h CMagic.h CXEVCommunication.h \ CAccessorAdmin.h CMutex.h CXEVTripletList.h \ CAccessorAdminCollection.h CNoDelete.h CXMLElement.h \ CAccessorElement.h CPropertySheetList.h CXMLElementBuilder.h \ CAccessorFactory.h CQMultiple.h CXMLElementVisitor.h \ CAccessorFactoryContainer.h CQParallel.h CXMLHelper.h \ CAccessorImplementation.h CQuery.h GIFTExceptions.h \ CAlgorithm.h CQueryParadigmMatcher.h TID.h \ CAlgorithmCollection.h CQueryPlugin.h directory.h \ CArraySelfDestroyPointer.h CQueryTreeBuilder.h mrml_const.h \ CAttributeList.h CQueryTreeNode.h myNew.h \ CCommunicationHandler.h CRelevanceLevel.h my_assert.h \ CDebuggingMemoryManager.h CRelevanceLevelList.h my_diagnose.h \ CDynamicQueryFactory.h CSelfDestroyPointer.h my_throw.h \ CIDRelevanceLevelPair.h CSessionManager.h \ CIDRelevanceLevelPairList.h CStaticQueryFactory.h uses-declarations.h \ CRPipe.h CReaper.h CReaperDistributor.h safePopen.h\ createErrorMessage.h CI18nTranslator.h CXEVI18nTranslator.h gift-config.h #install-data-hook: # $(INSTALL_DATA) $(srcdir)/gift-config.h $(includedir)/libMRML/include/gift-config.h CLEANFILES = directory.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(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 libMRML/include/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libMRML/include/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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-libMRMLHEADERS: $(libMRML_HEADERS) @$(NORMAL_INSTALL) test -z "$(libMRMLdir)" || $(mkdir_p) "$(DESTDIR)$(libMRMLdir)" @list='$(libMRML_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(libMRMLHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libMRMLdir)/$$f'"; \ $(libMRMLHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libMRMLdir)/$$f"; \ done uninstall-libMRMLHEADERS: @$(NORMAL_UNINSTALL) @list='$(libMRML_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f '$(DESTDIR)$(libMRMLdir)/$$f'"; \ rm -f "$(DESTDIR)$(libMRMLdir)/$$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 $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libMRMLdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -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 \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-libMRMLHEADERS 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 uninstall-libMRMLHEADERS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-libMRMLHEADERS install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-libMRMLHEADERS directory.h: echo "Making directory.h" @rm -f directory.h; \ echo '#define __LIBDIR__ "${exec_prefix}/lib"' > directory.h;\ echo '#define __PERL_LOCATION__ "/usr/bin/perl"' >> directory.h;\ echo '#define __BINDIR__ "${exec_prefix}/bin"' >> directory.h;\ echo '#define __EXECBINDIR__ "${exec_prefix}/bin"' >> directory.h;\ echo '#define __DATADIR__ "${prefix}/share"' >> directory.h all: directory.h dist-hook: rm $(distdir)/directory.h # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gift-0.1.14/libMRML/include/CAccessorFactory.h0000644000175200001440000000423410220502730015666 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CACCESSORFACTORY #define _CACCESSORFACTORY #include "libMRML/include/uses-declarations.h" #include //mName class CAccessor; class CAccessorFactory; class CAccessorFactoryContainer; class CXMLElement; /** * * This is a common abstract base class for all specialised * CAccessorFactories * *@see CAFSpecialised *@Author Wolfgang Müller */ class CAccessorFactory{ protected: /** This variable contains the name used for registration*/ string mName; public: /** (*this) has to register with a container. The container gets destruction responsability */ virtual void registerFactory(CAccessorFactoryContainer& outContainer); /** As the name sais: this makes an accessor. The parameter contains all attributes needes for a successful construction. */ virtual CAccessor* makeAccessor(const class CXMLElement& inConfiguration)const=0; /** This function does plain nothing in this class, however, it becomes interesting for plugins that have to free shared libraries presently this is unused. All plugins will be loaded at load time, there will be no unloading of plugins during runtime. */ virtual void closeAccessor(); }; #endif gift-0.1.14/libMRML/include/CReaper.h0000644000175200001440000000355010220502730014012 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- /** Author of this file: Wolfgang Müller */ #ifndef _CREAPER #define _CREAPER #include #include #include #include #include #include #include #include #include #include #include /** This file is what Wall et al. call REAPER in the perlipc manpage. It class knows which PID it's waiting for. When the time has come the reaper distributor will call reap() on this. @author: Wolfgang Mueller @see: CReaperDistributor, man perlipc */ class CReaper{ protected: /** the ID of the process to which the reaper belongs */ int mPID; public: /** the PID for which this reaper is responsible */ CReaper(int inPID); /** react to a sigchild signal */ virtual void reap()=0; /** get the PID of this reaper */ int getPID()const; }; #endif gift-0.1.14/libMRML/include/CAFPlugin.h~0000644000175200001440000000450510153634161014451 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva 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 */ // -*- mode: c++ -*- #ifndef _CACCESSORPLUGIN #define _CACCESSORPLUGIN #include "libMRML/include/uses-declarations.h" #include // reading a directory #include // reading a directory #include // dynamic linking #include // screen output #include #include #include "libMRML/include/CAccessor.h" #include "libMRML/include/CXMLElement.h" #include "libMRML/include/CAccessorFactory.h" class CAFPlugin:public CAccessorFactory{ protected: /** the handle which enables us to open*/ void* mDlOpenHandle; /** the name of the plugin */ string mName; /** the function for making a CAccessor object */ CAccessor* (*mMakeAccessor)(const CXMLElement&); /** this function gives us the name of the plugin */ char* (*mGetName)(void); /** is this well constructed? */ bool mIsSane; public: /** Add some register function here the rest can stay the same */ /** makes a CAccessor object*/ CAccessor* makeAccessor(const CXMLElement&)const; /** gets the name of the plugin */ char* getName(); /** opens the library and sets the make query etc. functions */ CAFPlugin(string,string); /** copy all the content */ CAFPlugin(CAFPlugin&); /** close the DlOpenHandle of the library*/ ~CAFPlugin(); /** is this well constructed */ bool isSane()const; /** register the factory */ void registerFactory(CAccessorFactoryContainer& outContainer); }; #endif gift-0.1.14/libMRML/include/CIDRelevanceLevelPair.h~0000644000175200001440000000634410153634161016734 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva 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 */ /*************************************** * * CIDRELEVANCELEVELPAIR * **************************************** * * modification history: * *@Author Wolfgang Müller * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CIDRELEVANCELEVELPAIR #define _CIDRELEVANCELEVELPAIR #include "libMRML/include/uses-declarations.h" #include #include "libMRML/include/TID.h" #include #include /** Level of relevance given by the user to an image (URL) */ class CIDRelevanceLevelPair{ /** / */ int mID; /** / */ double mRelevanceLevel; public: /*************************************** * * * ***************************************/ /**@name Constructors*/ /** @{ */ /** / */ CIDRelevanceLevelPair(); /*************************************** * * * ***************************************/ /** / */ CIDRelevanceLevelPair(const TID inID, double inRelevanceLevel); /*************************************** * * * ***************************************/ /** / */ CIDRelevanceLevelPair(const CIDRelevanceLevelPair& inElement); /** @} */ /*************************************** * * * ***************************************/ /**@name Accessors*/ /** @{ */ TID getID()const; /*************************************** * * * ***************************************/ /** / */ double getRelevanceLevel()const; /*************************************** * * * ***************************************/ /** / */ void setRelevanceLevel(const double inRelevanceLevel); /*************************************** * * * ***************************************/ /** / */ void adjustRelevanceLevel(const double inRelevanceLevel); /*************************************** * * * ***************************************/ /** / */ void divideRelevanceLevelBy(const double inDivisor); /** @} */ }; class CSortByID_IRLP: public binary_function{ public: /** */ inline bool operator()(const CIDRelevanceLevelPair& l, const CIDRelevanceLevelPair& t){ return fabs(double(l.getID())) < fabs(double(t.getID())); }; }; /*************************************** * * * ***************************************/ bool operator<(const CIDRelevanceLevelPair& l, const CIDRelevanceLevelPair& t); #endif gift-0.1.14/libMRML/include/CSessionManager.h0000644000175200001440000003577510220502730015530 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CSESSIONMANAGER #define _CSESSIONMANAGER #include "libMRML/include/uses-declarations.h" #include #include #include #include #include "libMRML/include/CXMLElement.h" #include "libMRML/include/CAccessorAdminCollection.h" #include "libMRML/include/CI18nTranslator.h" #include "libMRML/include/CAlgorithm.h" #include "libMRML/include/CPropertySheetList.h" #include "libMRML/include/CAccessorElement.h" #include "libMRML/include/CAlgorithmCollection.h" #include "libMRML/include/CQueryTreeBuilder.h" #include "libMRML/include/CMutex.h" // multithreading class CStaticQueryFactory; class CAlgorithm; class CSessionManager; class CQueryTreeNode; class CStaticQueryFactory; /** A class containing a session. * At present a session is just * a quite rudimentary container * for an algorithm. * * Later we hope to make sessions * persistent (using blobs in * msql, for example). * * * ATTENTION MULTITHREADING: * WHAT TO LOCK AND WHAT TO UNLOCK IS NOT ENTIRELY TRIVIAL * THIS MIGHT BE A SOURCE OF MISTAKES * * @author Wolfgang Müller */ class CSession{ protected: /** the language to be used in this session*/ string mPreferredLanguage; /** the list of languages to be used */ typedef list CLanguageList; /** the list of languages to be used */ CLanguageList mLanguages; /** the mutex for this session */ CMutex mMutexSession; /** */ bool mIsOpen; /** */ string mUser; /** */ string mID; /** * the name of this session */ string mSessionName; /** The algorithm used for the next query * At present this fully describes a session */ CAlgorithm* mActiveAlgorithm; /** The information about the current query tree */ pair mQueryTree; /** */ static CQueryTreeBuilder mQueryTreeBuilder; public: //-------------------------------------------------- /** Constructors */ CSession(); /** */ CSession(string inUser, string inID, string inSessionName, CAlgorithm* inActiveAlgorithm ); /** destroys all members */ ~CSession(); //-------------------------------------------------- /** Read the state */ ostream& write(ostream& outStream)const; /** Write the state */ istream& read(istream& inStream); //-------------------------------------------------- /** get user of this session */ string getUser()const; /** set user of this session */ void setUser(const string& inUser); /** set ID of this session */ string getID()const; /** get ID of this session */ void setID(const string& inID); /** get the displayname of this session */ string getSessionName()const; /** set the displayname of this session */ void setSessionName(const string& inSessionName); /** get the algorithm of this session */ CAlgorithm* getActiveAlgorithm(); /** set the algorithm of this session. in fact this amounts to building a complete query tree. We also would like to do a bit of tree matching to see, how much of the query we can rescue after reconfiguration. */ bool setActiveAlgorithm(CAccessorAdminCollection& inCaller, CAlgorithmCollection& inAlgorithmCollection, CAlgorithm* inActiveAlgorithm, CStaticQueryFactory& inBaseTypeFactory); /** set the collection of this session */ //string getActiveCollection()const; /** get the collection of this session */ // void setActiveCollection(const string& inCollection); //-------------------------------------------------- /** * performing a query * * Gets from the current algorithm the right inSubAlgorithm, * from that the right CQuery and hands parameters through to it. */ CXMLElement* query(CSessionManager& inCaller, const CXMLElement& inQuery); //-------------------------------------------------- /** retrieving random images as seeds */ CXMLElement* getRandomImages(CSessionManager& inCaller, const string& inAlgorithm, int inResultSize); //-------------------------------------------------- /** opening this session. This implements a lock, such that one user can have several open session which do not interfere. The return value tells the use if the open was successful (true) */ bool open(); //-------------------------------------------------- /** Closing this session */ bool close(); //-------------------------------------------------- /** Renaming this session (calls setSessionName, at present) */ bool rename(const string& inName); /** the list of preferred languages of this is cleared */ void CSession::clearLanguages(); /** one language code is added at the back of the list of preferred languages */ void CSession::addLanguage(string inLanguageCode); /** commit the list of languages. That means, here the actual language that will be used throughout the translation is determined */ void CSession::commitLanguages(const CI18nTranslator& inTranslator); /** get the preferred languages of this session */ list CSession::getLanguages()const; /** get the preferred languages of this session */ string CSession::getPreferredLanguage()const; //-------------------------------------------------- /** generating XML output for configuration/shandshake */ string toXML(bool isPrivate)const; }; /** This structure handles the sessions; by this, it encapsulates the current state of the server. Basically, it hands all requests through to the right sessions. It also handles the generation of new sessions etc.. In short, it is the configuration manager. This class is now approaching what I would like it to be, however, cleaning is always wellcome ATTENTION MULTITHREADING: WHAT TO LOCK AND WHAT TO UNLOCK IS NOT ENTIRELY TRIVIAL THIS MIGHT BE A SOURCE OF MISTAKES */ class CSessionManager:public CAlgorithmCollection //,public CAlgorithmIDListList { /** the mutex for this sessionmanager */ CMutex mMutexSessionManager; protected: /** The accessor collection is needed for constructing queries */ CAccessorAdminCollection mAccessorAdminCollection; /** The Translator for this */ CI18nTranslator mI18nTranslator; /** point the user to all the sessions */ typedef map > CUserToSessions; /** */ typedef map CIDToSession; /** */ mutable CUserToSessions mUserToSessions; /** */ mutable CIDToSession mIDToSession; /** These are the building blocks of the property sheets to be generated by *this. */ CPropertySheetList* mPropertySheetList; /** The subtree from which the mPropertySheets will be built */ CXMLElement* mPropertySheetSubtree; /** The base type factory is a factory for query base types */ CStaticQueryFactory* mBaseTypeFactory; public: /** The session manager slurps in two XML files and generates out of this its initial state. */ CSessionManager(string inSessions, string inConfiguration, string inI18nFileName); //---------------------------------------- /** *this CSessionManager has all the information to make a query structure. */ CQuery* makeQuery(const string& inBaseType, CAlgorithm& inAlgorithm); //---------------------------------------- /** Initialization: read from a stream */ istream& read(istream&); /** Write into a stream*/ ostream& write(ostream&); //---------------------------------------- /** to be used by the Interface. Not yet implemented. */ CXMLElement* openSession(string inUserName, string inSessionID, string inSessionName); //---------------------------------------- /** to be used by the Interface. Not yet implemented. */ CXMLElement* renameSession(string inSessionID, string inSessionName); /** to be used by the Interface. Not yet implemented.*/ CXMLElement* deleteSession(string inSessionID); /** Closes the session, but keeps it in memory. FUTURE: put the state of the session into a blob */ CXMLElement* closeSession(string inSessionID); /** VeryImportantFunction: This function looks for a CSession with CSession::mSessionID==inSessionID and hands through the rest of the parameter list to CSession::query. */ CXMLElement* query(const string& inSessionID, const CXMLElement& inRelevanceLevelList); //-------------------------------------------------- /** retrieving random images (as seeds for subsequent searches) *@param inSessionID The ID of the session in which the * request was issued. *@param inAlgorithm One would think this is not needed when * retrieving random images. However, it is * useful to know the collection involved, * and if the random images we are retrieving * will fit the algorithm used later. *@param inCollection The collection from which random images will * be retrieved. */ CXMLElement* getRandomImages(const string& inSessionID, const string& inAlgorithm, int inResultSize); //-------------------------------------------------- /** retrieving the URLs of all images (for generating distance matrices) */ list* getAllAccessorElements(const string& inSessionID, const string& inAlgorithm ); //-------------------------------------------------- /** retrieving the IDs of all images (for generating distance matrices) */ list* getAllIDs(const string& inSessionID, const string& inAlgorithm ); //---------------------------------------- /** set the algorithm used in this session it will also lead to a new construction of the query. We have to perform some comparisons here present version is probably a HACK */ bool setAlgorithm(const string& inSessionID, CAlgorithm* inAlgorithm); /** making a new session and returning its ID */ string newSession(const string& inUser, const string& inSessionName); /** making a new session and for a given ID, returnig the ID */ string newSession(const string& inID, const string& inUser, const string& inSessionName); /** Set the name of the current session. Presently not implemented or tested*/ void setSessionName(const string& inOldSessionName, const string& inNewSessionName); //---------------------------------------- /** turn this into a part of the welcome message in fact, this generates standard property sheets out of the collections and algorithms available It means: 1. Make out of each algorithm in the collection a property sheet. 2. Make out of the algorithm-id-list-list a property sheet with a parent node which does not send messages. 3. Make out of the collection list a choice of collections, each having as a child a property sheet out of 2. If we do things this way we are losing a bit of the flexibility given in the property sheet specification. However, for the moment I (WM) consider this loss nost as big compared to what we earn in terms of configuration of the system. If necessary recode. string convertPropertyToXML(bool isPrivate=false)const; THIS IS DEPRECATED STUFF, SO IT'S DELETED NOW! */ //---------------------------------------- /** turn this into a part of the welcome message THIS CODE IS TO LEAVE SOON */ string toXML(bool isPrivate=false)const; /** The sessions for one user only. * *@param inUser the name of the user for which we want the session names. *@param isPrivate send internal configuration information along? * (distinction between messages for internet and config * files) */ string toXMLSessions(const string& inUser, bool isPrivate=false)const; /** The sessions for everybody known to the system */ string toXMLSessionConfiguration()const; /** this is almost the complete shandshake message */ pair toXMLHandshake(const string& inUser); /** Get the property sheet of the algorithm with ID inAlgorithmID. We look for the attribute cui-property-sheet-id in the algorithm. If this exsists, we look for the right property sheet id in the CPropertySheetList. */ CXMLElement* getPropertySheet(string inSessionID, string inAlgorithmID)const; //---------------------------------------- /** Building a property sheet list I consider building a list on a call by call basis as tedious. So what I do is: I first build a tree, and then I break down this tree into our list. This function makes a new tree */ void startPropertySheetSubtree(); /** This function gets us the current property sheet subtree. */ CXMLElement* getPropertySheetSubtree(); /** This function does the actual breaking down into a CPropertySheetList. */ void endPropertySheetSubtree(); /** This function probably will quite soon be removed from this class, and it will become part of a class containing the CSessionManager*/ CXMLElement* getCollections()const; /** This function probably will quite soon be removed from this class, and it will become part of a class containing the CSessionManager*/ CXMLElement* getAlgorithms()const; /** i18n clear the preferred languages list of a given session */ bool clearSessionLanguages(const string& inSessionID); /** i18n: add one language code to the list of preferred languages */ bool addSessionLanguage(const string& inSessionID, const string& inLanguageCode); /** commit the languages to be used for a session.*/ bool commitSessionLanguages(const string& inSessionID); /** i18n: get the list of preferred languages of this session */ list getSessionLanguages(const string& inSessionID)const; /** i18n: get the list of preferred languages of this session */ void CSessionManager::translate(string inSessionID, CXMLElement& inoutToBeTranslated)const; }; #endif gift-0.1.14/libMRML/include/CI18Translator.h~0000644000175200001440000000000710153634161015410 00000000000000 ...xs gift-0.1.14/libMRML/include/TID.h0000644000175200001440000000212310220502730013104 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _TID #define _TID typedef int TID;// changed, makes the difference between working and not working on 64 bit extern TID gID; #endif gift-0.1.14/libMRML/include/CArraySelfDestroyPointer.h0000644000175200001440000000527110220502730017401 00000000000000#ifndef _CARRAYSELFDESTROYPOINTER #define _CARRAYSELFDESTROYPOINTER /* #include "libMRML/include/uses-declarations.h" destroys the element it points to */ template class CArraySelfDestroyPointer{ /// mutable bool mIsSelfDestroyer; /// protected: T* mPointer; /// public: /// void resetWithoutDeleting(); /// inline bool isSelfDestroyer()const; /// inline void setIsSelfDestroyer(bool inisSelfDestroyer=true)const; /// void unsetIsSelfDestroyer()const; /// T* operator= (T* inPointer); /// T& operator*(); /// T const& operator*()const; /// T* operator -> (); /// T const* operator -> ()const; /// ~CArraySelfDestroyPointer(); /// CArraySelfDestroyPointer(T*, bool = true); /// CArraySelfDestroyPointer(const CArraySelfDestroyPointer& inSelfDestroyPointer); /// CArraySelfDestroyPointer(); /// operator bool()const; /// operator T*()const; }; /// template void CArraySelfDestroyPointer::resetWithoutDeleting(){ mPointer=0; } template T* CArraySelfDestroyPointer::operator=(T* inPointer){ if(mIsSelfDestroyer){ delete[] mPointer; } return mPointer=inPointer; } template T const& CArraySelfDestroyPointer::operator *()const{ return *mPointer; } template T const* CArraySelfDestroyPointer::operator ->()const{ return mPointer; } template T& CArraySelfDestroyPointer::operator *(){ return *mPointer; } template T* CArraySelfDestroyPointer::operator ->(){ return mPointer; } template CArraySelfDestroyPointer::CArraySelfDestroyPointer(T* inPointer, bool inIsSelfDestroyer): mPointer(inPointer), mIsSelfDestroyer(inIsSelfDestroyer) { } /// template CArraySelfDestroyPointer::CArraySelfDestroyPointer(const CArraySelfDestroyPointer& in): mPointer(in.mPointer), mIsSelfDestroyer(in.mIsSelfDestroyer) { }; template CArraySelfDestroyPointer::CArraySelfDestroyPointer(): mPointer(0), mIsSelfDestroyer(true) { } template CArraySelfDestroyPointer::~CArraySelfDestroyPointer() { if(mIsSelfDestroyer){ delete[] mPointer; } } template void CArraySelfDestroyPointer::setIsSelfDestroyer(bool inIsSelfDestroyer)const{ mIsSelfDestroyer= inIsSelfDestroyer; }; template bool CArraySelfDestroyPointer::isSelfDestroyer()const{ return mIsSelfDestroyer; }; template void CArraySelfDestroyPointer::unsetIsSelfDestroyer()const{ mIsSelfDestroyer=0; }; template CArraySelfDestroyPointer::operator bool()const{ return mPointer; }; template CArraySelfDestroyPointer::operator T*()const{ return mPointer; }; #endif gift-0.1.14/libMRML/include/CAccessorFactoryContainer.h~0000644000175200001440000000633210153634161017741 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva 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 */ // -*- mode: c++ -*- #ifndef _CACCESSORFACTORYCONTAINER #define _CACCESSORFACTORYCONTAINER #include "libMRML/include/uses-declarations.h" #include #include #include "libMRML/include/CSelfDestroyPointer.h" class CXMLElement; class CAccessor; class CAccessorFactory; /** * This is destined to hold a number of CAccessorFactories. * The use of this is to have an open-close-counter for * all the factories which have been registered in this * * New elements are only constructed if necessary. * *@author Wolfgang Müller */ class CAccessorFactoryContainer{ /** This tree contains the configuration data for this */ CSelfDestroyPointer mConfigurationData; class CContentElement{ public: /** Contains a pointer to the accessor, if already opened */ CAccessorFactory* mFactory; /** Counts how often the accessor has been opened or closed */ int mOpenCloseCounter; }; /** Typedef: The content is a map of string to content element In this map is noted, which accessors are open for the collection with the given ID. */ public: typedef map CContent; protected: /** the content */ CContent mContent; public: /** construct this. In the case of static linking, this means the construction of factorys for all accessors. */ CAccessorFactoryContainer(); /** configure this In the case of dynamic linking we will scan libdir for plugins */ void configure(CXMLElement* inConfigurationData); /** The destructor destroys the CContentElements properly */ ~CAccessorFactoryContainer(); /** adding a factory to the content */ void registerFactory(CAccessorFactory* inFactory, string inName); /** opening an accessor: if the accessor is already constructed, then simply give the pointer, otherwhise construct a new one using the appropriate factory @param name of the accessor to be created @param inConfigurationData the configuration data of the CXMLElement to be created */ CAccessor* openAccessor(string inName, const CXMLElement& inCollectionElement); /** closing an accessor. If there have been as many openAccessor as closeAccessor calls, the accessor will be delete-d. */ void closeAccessor(string inName); }; #endif gift-0.1.14/libMRML/include/CQueryTreeBuilder.h0000644000175200001440000000265510220502730016035 00000000000000// -*- mode: c++ -*- #ifndef _CQUERYTREEBUILDER #define _CQUERYTREEBUILDER #include "libMRML/include/uses-declarations.h" class CAlgorithm; class CAccessorAdminCollection; #include "libMRML/include/CMagic.h" // checking CQueryTreeNode #include "libMRML/include/CQueryTreeNode.h" #include "libMRML/include/CSelfDestroyPointer.h" class CStaticQueryFactory; /** A type helping in the translation from CAlgorithmID to CQuery* */ class CQueryContainer:public map,public CMagic{ public: /** Translate an CAlgorithmID to the corresponding CQueryTreeNode */ CQueryTreeNode* getQueryByID(const string& inID)const; }; /** This class builds and maintains a query tree. */ class CQueryTreeBuilder{ public: /** */ CQueryTreeBuilder(); /** Building a query tree out of the information we have gathered. true indicates success... We do a post-order traversal of the tree of algorithms: At each level we construct the query of the children taking them as an argument for constructing the query of this. */ pair buildQueryTree(CAlgorithm& inAlgorithm, CAccessorAdminCollection& inBaseConfiguration, CStaticQueryFactory& inBaseTypeFactory, CQueryContainer* inContainer=0)const; /** Getting a node of the tree by its ID */ CQueryTreeNode* getQueryByID(const string& inID)const; }; #endif gift-0.1.14/libMRML/include/CAccessorImplementation.h0000644000175200001440000001002610220502730017240 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _CACCESSORIMPLEMENTATION #define _CACCESSORIMPLEMENTATION #include "libMRML/include/uses-declarations.h" #include "libMRML/include/CMagic.h" #include #include "libMRML/include/TID.h" #include #include #include #ifdef HAS_HASH_MAP #include #else #define hash_map map #endif #include "libMRML/include/CAccessor.h" #include "libMRML/include/CAccessorElement.h" /** * * convenience typedef * */ class string_string_map:public map{ }; /** * * convenience typedef * */ class string_TID_map:public map{ }; /** * * convenience typedef * */ class TID_string_map:public map{ }; /** * * convenience typedef * */ class TID_CAccessorElement_map:public map{ }; /** * * CAccessorImplementation - a base class for everything * accessing a GIFT database. * at present this will be either an inverted file * or a TrackingGIFT accessor. * in the future this might be an SQL database or Monet?? * * * modification history: * * WM 19990804 created file * * * * compiler defines used: */ class CAccessorImplementation:public CAccessor{ protected: /**@name for fast access...*/ //@{ /** map the url of an image to the id of this image */ string_TID_map mURLToID; /** maps the ID of an image to the URL of this image */ TID_CAccessorElement_map mIDToAccessorElement; //@} public: /** * * Is this accessor up and working? * */ virtual operator bool()const=0; /** * * Translate a DocumentID to a URL (for output) * */ virtual string IDToURL(TID inID)const; /** * * Translate a DocumentID to an accessor Element * */ virtual pair IDToAccessorElement(TID inID)const; /** * * Translate an URL to its document ID * */ virtual pair URLToID(const string& inURL)const; /** * * This is useful for making lists of * which images are present in a database * etc. * */ /** List of the IDs of all documents present in the accessor file */ void getAllIDs(list&)const; /** List of triplets (ID,imageURL,thumbnailURL) of all the documents present in the inverted file */ void getAllAccessorElements(list&)const; /** get a given number of random AccessorElement's @param inoutResultList the list which will contain the result @param inSize the desired size of the inoutResultList */ void getRandomIDs(list&, list::size_type)const; /** For drawing random sets. Why is this part of an CAccessorImplementation? The way the accessor is organised might influence the way random sets can be drawn. At present everything happens in RAM, but we do not want to be fixed on that. @param inoutResultList the list which will contain the result @param inSize the desired size of the inoutResultList */ void getRandomAccessorElements(list& outResult, list::size_type inSize)const; /** The number of images in this accessor */ int size()const; //@} }; #endif gift-0.1.14/libMRML/include/safePopen.h0000644000175200001440000000206410220502730014410 00000000000000// -*- mode: c++ -*- #ifndef _SAFEPOPEN #define _SAFEPOPEN /* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ extern int safePopen(char* const* argv); #endif gift-0.1.14/libMRML/include/CAFPlugin.h0000644000175200001440000000463410220502730014245 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CACCESSORPLUGIN #define _CACCESSORPLUGIN #include "libMRML/include/uses-declarations.h" #include // reading a directory #include // reading a directory #include // dynamic linking #include // screen output #include #include #include "libMRML/include/CAccessor.h" #include "libMRML/include/CXMLElement.h" #include "libMRML/include/CAccessorFactory.h" class CAFPlugin:public CAccessorFactory{ protected: /** the handle which enables us to open*/ void* mDlOpenHandle; /** the name of the plugin */ string mName; /** the function for making a CAccessor object */ CAccessor* (*mMakeAccessor)(const CXMLElement&); /** this function gives us the name of the plugin */ char* (*mGetName)(void); /** is this well constructed? */ bool mIsSane; public: /** Add some register function here the rest can stay the same */ /** makes a CAccessor object*/ CAccessor* makeAccessor(const CXMLElement&)const; /** gets the name of the plugin */ char* getName(); /** opens the library and sets the make query etc. functions */ CAFPlugin(string,string,string); /** copy all the content */ CAFPlugin(CAFPlugin&); /** close the DlOpenHandle of the library*/ ~CAFPlugin(); /** is this well constructed */ bool isSane()const; /** register the factory */ void registerFactory(CAccessorFactoryContainer& outContainer); }; #endif gift-0.1.14/libMRML/include/CI18Translator.h0000644000175200001440000000171010220502730015203 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ gift-0.1.14/libMRML/include/CAccessorAdmin.h0000644000175200001440000001055410220502730015311 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _CACCESSORPROXY #define _CACCESSORPROXY #include "libMRML/include/uses-declarations.h" #include "libMRML/include/CSelfDestroyPointer.h" #include #include #include "libMRML/include/CAccessor.h" #include "libMRML/include/CAccessorFactory.h" #include "libMRML/include/CAccessorFactoryContainer.h" /** CAccessorAdmin: The goal of this is to make it possible to have a list containing accessors to all possible collections, without really opening the accessors. The accessor proxy is in fact an open/close counter for accessors. This permits multiple query structures to share just one accessor, and it avoids having to open all kinds of accessors when starting the program. */ class CAccessorAdmin{ protected: /** Factory for making all kinds of accessors */ CAccessorFactoryContainer& mFactoryContainer; /** */ CSelfDestroyPointer mCollectionElement; /** Content is pointer to a factory, a pointer to the actual Accessor (if already made) and the open-close-counter */ class CContentElement{ public: /** Contains a pointer to the accessor, if already opened */ CAccessor* mAccessor; /** The factory to make an accessor, if this is needed */ CAccessorFactory* mFactory; /** Counts how often the accessor has been opened or closed */ int mOpenCloseCounter; }; /** Typedef: The content is a map of string to content element In this map is noted, which accessors are open for the collection with the given ID. */ typedef map CContent; /** The content is a map of string to content element */ CContent mContent; public: //---------------------------------------- /** open an accessor. This is the important part for the outside: Open or close inverted file accessors. Several queries can share one accessor, the accessor will be constructed when the first CQuery needs it, and it will be deleted, when the last one does not need it any more: */ CAccessor* openAccessor(string inType); /** closing an accessor. @see openAccessor*/ void closeAccessor(string inType); //---------------------------------------- /** Once this is working this will replace about every set/get function which follows */ void setCollectionElement(CXMLElement*); /** */ const CXMLElement* getCollectionElement()const; /** */ const CXMLElement* getQueryParadigmList()const; /** */ list* getAvailableIndices()const; //---------------------------------------- /** generate out put for shandshake message */ string toXML(bool isPrivate=false)const; /** pack the content of this into an CXMLElement with elementname "collection" */ CXMLElement* toXMLElement()const; //---------------------------------------- /** Constructor */ CAccessorAdmin(CAccessorFactoryContainer& inFactoryContainer); /** destructor */ ~CAccessorAdmin(); /** */ string CAccessorAdmin::getAlgorithmIDListID()const; /** */ string CAccessorAdmin::getName()const; /** */ string CAccessorAdmin::getID()const; /** for sorting */ friend class CSortByName_pAP; }; /* Sort pointers to Accessor Proxies by the name of what they point to */ class CSortByName_pAP:public binary_function{ public: /** */ bool operator()(const CAccessorAdmin* l, const CAccessorAdmin* t); }; #endif gift-0.1.14/libMRML/include/TID.h~0000644000175200001440000000167210153634161013323 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva 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 */ #ifndef _TID #define _TID typedef long TID; extern TID gID; #endif gift-0.1.14/libMRML/include/CAlgorithm.h0000644000175200001440000001207610220502730014525 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CALGORITHM #define _CALGORITHM #include "libMRML/include/uses-declarations.h" #include "libMRML/include/CXMLElement.h" #include "libMRML/include/CSelfDestroyPointer.h" #include class CQuery; class CAlgorithmCollection; /** An algorithm is a CXMLElement which is linked to a CSessionManager together they are able to build CQuery trees. @Author: Wolfgang Müller */ class CAlgorithm:public CXMLElement{ protected: public: /** Same as in CXMLElement, but making a CAlgorithm instead */ virtual void addChild(const string&, const char* const* const inAttributeList=0); /** Same as in CXMLElement, but making a CAlgorithm instead */ virtual void addChild(CXMLElement* inChild); // /** reading an attribute for strings // here we extend the inheritance mechanism. We do not only look at // parents, but also at the default values provided by the configuration. // this is virtual in order to plug in other methods of inheritance // @see: CXMLElement.h#stringReadAttribute // */ // virtual pair stringReadAttribute(const string& inAttribute)const; /** In the long run, we would like to get of build query tree in this class and move it elsewhere. The first step of this separation is the configure function, which does nothing else but putting the inherited values and the default values into the attribute list of this. After that no inheritance is necessary, and we can get at all the attributes using CXMLElement::createNamedValueList; */ bool configure(CAlgorithmCollection& inBaseConfiguration); /** merging the attributes of two algorithms. This is useful: 1. for the initial configuration 2. for changing the configuration. At present this merges attribute lists givig priority to the values in *this. FIXME: slow way of merging */ void mergeAttributes(const CAlgorithm& inAlgorithm); /** merging the child lists of two algorithms. This is useful: 1. for the initial configuration 2. for changing the configuration. At present this merges attribute lists givig priority to the values in *this. FIXME: slow way of merging */ void mergeChildLists(const CAlgorithm& inAlgorithm); /** get the name of the collection to be treated by this algorithm */ string getCollectionID()const; /** get the name of the algorithm */ double getWeight()const; /** get the name of the algorithm */ string getAlgorithmName()const; /** get the type of the algorithm */ pair getType()const; /** The father inside the configuration */ pair getInheritsFrom()const; /** get the basetype of the algorithm */ string getBaseType()const; /** get the id of the algorithm */ string getID()const; /** puts out a flat algorithm tag with just ID and name */ string toOldMRML()const; /** set the default we do not take any destroy responsability */ void setDefault(CAlgorithm& inDefault); /** clone this */ CAlgorithm* clone()const; /** hand things through to the CXMLElement constructor */ CAlgorithm(const char* , const char* const* const inAttributeList=0); /** hand things through to the CXMLElement constructor */ CAlgorithm(const string& , const list< pair >& inList); /** construct CAlgorithm from XML Element */ CAlgorithm(const CXMLElement& inAlgorithm); /** copy constructor */ CAlgorithm(const CAlgorithm& inAlgorithm); }; //---------------------------------------- //probably obsolete //---------------------------------------- class CSortByID_CA:public binary_function{ public: bool operator()(const CAlgorithm& l, const CAlgorithm& t)const; }; //---------------------------------------- //probably obsolete //---------------------------------------- class CSortByBase_CA:public binary_function{ public: bool operator()(const CAlgorithm& l, const CAlgorithm& t)const; }; #endif gift-0.1.14/libMRML/include/CAccessorElement.h0000644000175200001440000000361610220502730015653 00000000000000// -*- mode: c++ -*- #ifndef _CACCESSORELEMENT #define _CACCESSORELEMENT #include "libMRML/include/uses-declarations.h" #include #include #include #include "libMRML/include/TID.h" /** Quadruplet of Image-ID, image-URL, thumbnail-URL, feature file name and assorted sorting functions */ class CAccessorElement{ /** the ID of the image*/ TID mID; /** the URL (of the image)*/ string mURL; /** the URL (of the thumbnail)*/ string mThumbnailURL; /** the Feature file name (of the image)*/ string mFeatureFileName; public: /** Constructor */ CAccessorElement(const TID inID, const string& inURL, const string& inThumbnailURL, const string& inFeatureFileName); /** get mURL */ TID getID()const; /** get mURL */ string getURL()const; /** */ string getThumbnailURL()const; /** */ string getFeatureFileName()const; /** sorting by ID (less)*/ friend class CSortByID_CAE; /** sorting by the URL (less) */ friend class CSortByURL_CAE; /** sorting by the URL of the thumbnail (less) */ friend class CSortByThumbnailURL_CAE; }; /** sort CAccessorElements by their ID */ class CSortByID_CAE:public binary_function{ public: /** */ bool operator()(const CAccessorElement& l, const CAccessorElement& t)const; }; /** sort CAccessorElements by their URL */ class CSortByURL_CAE:public binary_function{ public: /** */ bool operator()(const CAccessorElement& l, const CAccessorElement& t)const; }; /** sort CAccessorElements by their ThumbnailURL */ class CSortByThumbnailURL_CAE:public binary_function{ public: /** */ bool operator()(const CAccessorElement& l, const CAccessorElement& t)const; }; ostream& operator<<(ostream& outStream, const CAccessorElement& inElement); #endif gift-0.1.14/libMRML/include/CAccessor.h0000644000175200001440000001036510220502730014340 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _CACCESSOR #define _CACCESSOR #include "libMRML/include/uses-declarations.h" #include #include #include "libMRML/include/TID.h" #ifdef GIFT_MULTI_THREAD #include #endif #include "libMRML/include/CMutex.h" #include "libMRML/include/CAccessorElement.h" class CXMLElement; /** * * CAccessor - an abstract base class for everything * accessing a GIFT database. * in the future this might be an SQL database or Monet?? * * * modification history: * * WM 19990804 created file * * * * compiler defines used: */ class CAccessor{ protected: /** without this function things like upcasting etc. won't work (see stroustrup for this) */ virtual void dummy()const; public: /** * * Is this accessor up and working? * */ virtual operator bool()const=0; /** * * Translate a DocumentID to a URL (for output) * */ virtual string IDToURL(TID inID)const=0; /** * * Translate a DocumentID to an accessor Element * */ virtual pair IDToAccessorElement(TID inID)const=0; /** * * Translate an URL to its document ID * */ virtual pair URLToID(const string& inURL)const=0; /** * * This is useful for making lists of * which images are present in a database * etc. * */ /** List of the IDs of all documents present in the inverted file */ virtual void getAllIDs(list&)const=0; /** List of triplets (ID,imageURL,thumbnailURL) of all the documents present in the inverted file */ virtual void getAllAccessorElements(list&)const=0; /** get a given number of random AccessorElement's @param inoutResultList the list which will contain the result @param inSize the desired size of the inoutResultList */ virtual void getRandomIDs(list&, list::size_type)const=0; /** For drawing random sets. Why is this part of an CAccessor? The way the accessor is organised might influence the way random sets can be drawn. At present everything happens in RAM, but we do not want to be fixed on that. @param inoutResultList the list which will contain the result @param inSize the desired size of the inoutResultList */ virtual void getRandomAccessorElements(list& outResult, list::size_type inSize)const=0; /** The number of images in this accessor */ virtual int size()const=0; //@} /** @name Database Construction */ //@{ /** If a new collection is created during runtime, this function prepares the indexing structures such that they are able to accept new objects. The collection id and name must be given when constructing *this. All other data are added to the configuration tag in this. The resulting configuration tag is output as result of prepareDatabase. @returns configuration element that contains new configuration data as result of prepareDatabase */ virtual CXMLElement* prepareDatabase(); /** Is the database accessed by this accessor prepared? In other words: is there an index structure to access? */ virtual bool isPreparedDatabase()const; //@} /** virtual accessor for clean destruction */ virtual ~CAccessor(); }; #endif gift-0.1.14/libMRML/include/CXMLHelper.h0000644000175200001440000000331410220502730014372 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _CXMLHELPER #define _CXMLHELPER #include "libMRML/include/uses-declarations.h" #include #include /** a class which helps with xml output */ class CXMLHelper{ /** */ string mName; /** */ typedef map CContent; /** */ CContent mAttributes; /** */ bool mIsEmpty; /** */ bool mIsEnd; public: /** */ CXMLHelper(); /** */ string toString()const; /** */ void setName(const string& inName); /** */ void setEmpty(); /** */ void setEnd(); /** */ void addAttribute(const string& inAttribute, const string& inValue); /** */ void addAttribute(const string& inAttribute, int inValue); /** */ void addAttribute(const string& inAttribute, double inValue); }; #endif gift-0.1.14/libMRML/include/CXEVI18nTranslator.h0000644000175200001440000000404110220502730015744 00000000000000// -*- mode: c++ -*- #ifndef _CXEVI18NTRANSLATOR #define _CXEVI18NTRANSLATOR /* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/uses-declarations.h" #include #include "libMRML/include/CXMLElementVisitor.h" #include "libMRML/include/CXEVI18nTranslator.h" #include "libMRML/include/CI18nTranslator.h" /** A visitor that visits XML elements in order to translate them */ class CXEVI18nTranslator:public CXMLElementVisitor{ protected: /** the language code used for translating */ string mLanguageCode; /** the translator used for translating */ const CI18nTranslator& mTranslator; public: /** constructor. */ CXEVI18nTranslator(const CI18nTranslator& inTranslator, string inLanguageCode); /** actually carrying out the visit */ virtual bool startVisit(CXMLElement& inVisited); /** actually carrying out the visit */ virtual void endVisit(CXMLElement& inVisited); /** This methods' use is forbidden. Just there to satisfy interface. */ virtual bool startVisit(const CXMLElement& inVisited); /** This methods' use is forbidden. Just there to satisfy interface. */ virtual void endVisit(const CXMLElement& inVisited); }; #endif gift-0.1.14/libMRML/include/CMutex.h0000644000175200001440000000320210220502730013670 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CMUTEX #define _CMUTEX #include "libMRML/include/uses-declarations.h" #ifdef __GIFT_USES_THREADS__ #include #endif /** This class offers an abstraction from the locking method used. The methods are defined as const, although, of course, the mMutex will change state during each method call */ class CMutex{ #ifdef __GIFT_USES_THREADS__ /** the mutex if needed */ mutable pthread_mutex_t mMutex; /** attributes of the mutex */ mutable pthread_mutexattr_t mMutexAttribute; #endif public: /** constructor */ CMutex(); /** lock the mutex */ void lock()const; /** unlock the mutex */ void unlock()const; }; #endif gift-0.1.14/libMRML/include/CI18nTranslator.h~0000644000175200001440000000752110153634161015576 00000000000000// -*- mode: c++ -*- #ifndef _CI18NTRANSLATOR #define _CI18NTRANSLATOR /* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include "libMRML/include/CXMLElement.h" #include "expat/xmlparse/xmlparse.h" /** This class offers runtime translation of strings. In contrast to GNU gettext we can chose during runtime the language without additional overhead. */ class CI18nTranslator{ /** a map that translates strings */ typedef map CTranslatorMap; /** a map that contains the decision if a given string is to be translated */ typedef map CShouldBeTranslatedMap; /** a map that contains translators for a number of languages */ typedef map CLanguageMap; /** This map contains translators for each language given in the gift-i18n file. */ CLanguageMap mLanguageMap; /** This map contains information about which */ CShouldBeTranslatedMap mShouldBeTranslatedAttribute; /** the current language while parsing the config file */ string mCurrentLanguage; protected: public: /** should a given attribute string be translated? */ bool shouldBeTranslatedAttribute(string inAttribute)const; /** should a given attribute string be translated? */ bool shouldBeTranslatedText(string inContainingTag)const; /** set the current language during construction */ void setCurrentLanguage(const string& inLanguage); /** set the current language during construction */ string getCurrentLanguage()const; /** Should the attribute be translated */ void setShouldBeTranslatedAttribute(string inString); /** Add one translation pair */ void addTranslationPair(string inString,string inTranslatedString); /** The constructor */ CI18nTranslator(string inTranslationFileName); /** Get an MRML tag containing all offered languages*/ const CXMLElement* getLanguagesXML()const; /** Get a string list containing all languages */ bool hasLanguage(string inLanguageCode)const; /** Translate an attribute given by its name and its value @returns pair: first, if the string should be translated, second, its value */ const pair translateAttribute(string inLanguageCode, const string& inAttribute, const string& inValue)const; /** Translate an tag containing pdata given by its name and its value @returns pair: first, if the string should be translated, second, its value */ const pair translateText(string inLanguageCode, const string& inContainingTag, const string& inText); /** Translate a complete XML Tree*/ void translateXMLTree(string inLanguageCode, CXMLElement& inoutToBeTranslated)const; /** for parsing the config file */ static void CI18nTranslator::startXMLElement(void *inUserData, const char *inElementName, const char **inAttributes); /** for parsing the config file */ static void CI18nTranslator::endXMLElement(void *inUserData, const char *inElementName); }; #endif gift-0.1.14/libMRML/include/CQueryParadigmMatcher.h0000644000175200001440000000516310220502730016654 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CPROPERTYSHEETMATCHER #define _CPROPERTYSHEETMATCHER #include "libMRML/include/uses-declarations.h" #include #include "libMRML/include/CXMLElement.h" // the type of the operands of the function we are creating /** A class for checking if the content of two query-paradigm tags matches */ class CQueryParadigmMatcher:public binary_function{ protected: /** Two XMLElements of type query-paradigm match, if the intersection of their attribute sets is identical. I.e.: If inQuery contains , inResult with would match, because the intersection {a1,a2} \cap {a1,a2} of the attribute sets is and for both inQuery and inResult. would also match (the intersection of {a1} and {a2} is empty) would not (the intersection of {a1,a3} and {a1} is non-empty, but the values in the two tags are differen) */ bool matches(const CXMLElement& inQuery,const CXMLElement& inResult)const; public: /** This function gives back, if the inQuery matches inResult. Both parameters are elements of type query-paradigm-list inQuery matches inResult, if one of the children (a query paradigm) of inQuery matches one of the children (also a query paradigm) of inResult. */ bool operator()(const CXMLElement& inQuery,const CXMLElement& inResult)const; }; #endif gift-0.1.14/libMRML/include/getLibNameFromFileName.h0000644000175200001440000000225310220502730016724 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _GETLIBNAMEFROMFILENAME #define _GETLIBNAMEFROMFILENAME //#include #include extern std::pair getLibNameFromFileName(std::string inPrefix,std::string inName); #endif gift-0.1.14/libMRML/include/CPropertySheetList.h0000644000175200001440000000511110220502730016240 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CPROPERTYSHEETLIST #define _CPROPERTYSHEETLIST #include "libMRML/include/uses-declarations.h" #include #include #include "libMRML/include/CSelfDestroyPointer.h" class CXMLElement; /** takes the information contained in the list of properties, which is given in the config.mrml file. basically, this is a map from string to CXMLElement. @Author: Wolfgang Müller */ class CPropertySheetList{ /** the content of this NO DESTRUCTION RESPONSIBILITY HERE. */ typedef map CContent; /** */ CContent mContent; /** The unprocessed content. mContent will index into that structure we have destruction responsibility */ CSelfDestroyPointer mUnprocessedContent; public: /** We construct *this from a subtree of the document. @param inUnprocessedContent is a subtree of the document which will be put in mUnprocessedContent. The children of mUnprocessedContent will then be indexed by CContent. */ CPropertySheetList(CXMLElement* inUnprocessedContent); /** presently empty, because the destruction will be done by the structure contained in mUnprocessedContent. */ ~CPropertySheetList(); /** insert an element for this element which is designed by a pointer WE TAKE THE DESTRUCTION RESPONSABILITY */ void insertPropertySheet(const string& inID, CXMLElement* inXMLElement); /** Get a property sheet by its ID*/ CXMLElement& getPropertySheet(const string& inID); /** clone a property sheet by its ID*/ CXMLElement* newPropertySheet(const string& inID); }; #endif gift-0.1.14/libMRML/include/include.dfPackage0000644000175200001440000000036610153634161015545 00000000000000package id1fzjwd39zkzn5d39zyfgh; /** @version 2.0 @physicalPackage @__modelType diagram */ class diagram { }/** @__tags @shapeType ClassDiagram */ class __tags { }/** @__options */ class __options { }/** @__positions */ class __positions { }gift-0.1.14/libMRML/include/CXMLElementVisitor.h0000644000175200001440000000337310220502730016131 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CXMLELEMENTVISITOR #define _CXMLELEMENTVISITOR #include "libMRML/include/uses-declarations.h" #include "libMRML/include/CXMLElement.h" /** This class is designed for visiting XML document trees. It's only */ class CXMLElementVisitor{ public: /** makes this visit inVisted. The return value decides, if the visit recurses further or not */ virtual bool startVisit(const CXMLElement& inVisited)=0; /** visiting on the way back */ virtual void endVisit(const CXMLElement& inVisited)=0; /** makes this visit inVisted. The return value decides, if the visit recurses further or not */ virtual bool startVisit(CXMLElement& inVisited); /** visiting on the way back */ virtual void endVisit(CXMLElement& inVisited); }; #endif gift-0.1.14/libMRML/include/getLibNameFromFileName.h~0000644000175200001440000000203410153634161017130 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva 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 */ // -*- mode: c++ -*- #ifndef _GETLIBNAMEFROMFILENAME #define _GETLIBNAMEFROMFILENAME pair getLibNameFromFileName(string inPrefix,string inName); #endif gift-0.1.14/libMRML/include/gift-config.h.in0000644000175200001440000000315510153634161015304 00000000000000/* libMRML/include/gift-config.h.in. Generated automatically from configure.in by autoheader. */ /* Define if you have the header file. */ #undef HAVE_ALGORITHM /* Define if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define if you have the header file. */ #undef HAVE_DLFCN_H /* Define if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define if you have the `uuid' library (-luuid). */ #undef HAVE_LIBUUID /* Define if you have the header file. */ #undef HAVE_NETINET_TCP_H /* Define if you have the header file. */ #undef HAVE_STDLIB_H /* Define if you have the header file. */ #undef HAVE_STRING /* Define if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define if you have the header file. */ #undef HAVE_TIME_H /* Define if you have the header file. */ #undef HAVE_UNISTD_H /* Name of package */ #undef PACKAGE /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ #undef WORDS_BIGENDIAN /* Define to empty if `const' does not conform to ANSI C. */ #undef const gift-0.1.14/libMRML/include/my_diagnose.h0000644000175200001440000000220410220502730014762 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _MYDIAGNOSE #define _MYDIAGNOSE /** diagnostic output */ #define my_diagnose(x) {cout << __FILE__ << ':' << __LINE__ << ':' << "Diagnostic output " << x << endl << flush;} #endif gift-0.1.14/libMRML/include/CAccessorFactoryContainer.h0000644000175200001440000000676210220502730017541 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CACCESSORFACTORYCONTAINER #define _CACCESSORFACTORYCONTAINER #include "libMRML/include/uses-declarations.h" #include #include #include "libMRML/include/CSelfDestroyPointer.h" class CXMLElement; class CAccessor; class CAccessorFactory; /** * This is destined to hold a number of CAccessorFactories. * The use of this is to have an open-close-counter for * all the factories which have been registered in this * * New elements are only constructed if necessary. * *@author Wolfgang Müller */ class CAccessorFactoryContainer{ /** This tree contains the configuration data for this */ CSelfDestroyPointer mConfigurationData; class CContentElement{ public: /** Contains a pointer to the accessor, if already opened */ CAccessorFactory* mFactory; /** Counts how often the accessor has been opened or closed */ int mOpenCloseCounter; }; /** Typedef: The content is a map of string to content element In this map is noted, which accessors are open for the collection with the given ID. */ public: typedef map CContent; protected: /** the content */ CContent mContent; public: /** construct this. In the case of static linking, this means the construction of factorys for all accessors. */ CAccessorFactoryContainer(); /** configure this In the case of dynamic linking we will scan libdir for plugins */ void configure(CXMLElement* inConfigurationData); /** The destructor destroys the CContentElements properly */ ~CAccessorFactoryContainer(); /** adding a factory to the content */ void registerFactory(CAccessorFactory* inFactory, string inName); /** opening an accessor: if the accessor is already constructed, then simply give the pointer, otherwhise construct a new one using the appropriate factory @param name of the accessor to be created @param inConfigurationData the configuration data of the CXMLElement to be created */ CAccessor* openAccessor(string inName, const CXMLElement& inCollectionElement); /** closing an accessor. If there have been as many openAccessor as closeAccessor calls, the accessor will be delete-d. */ void closeAccessor(string inName); /** Is a given factory present in the factory? Useful for building in order to avoid double registration and double dynamic linking. */ bool isPresentFactory(string inName)const; }; #endif gift-0.1.14/libMRML/include/CRelevanceLevelList.h0000644000175200001440000000312710220502730016324 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CRELEVANCELEVELLIST * **************************************** * * modification history: * * HM 090399 created the documentation * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CRELEVANCELEVELLIST #define _CRELEVANCELEVELLIST #include "libMRML/include/uses-declarations.h" #include #include #include "libMRML/include/CRelevanceLevel.h" class CRelevanceLevelList:public list{ public: /// CRelevanceLevelList(const list&); /// CRelevanceLevelList(); /// string toXML()const; }; #endif gift-0.1.14/libMRML/include/CMagic.h~0000644000175200001440000000166510153634161014030 00000000000000// -*- mode: c++ -*- #ifndef _CMAGIC #define _CMAGIC #include "libMRML/include/uses-declarations.h" #include /** This is a simple class for debugging. It checks if it has been properly initialised or if it has been destroyed twice. The method is simple: On construction of a CMagicObject, its member mMagic is set to int(42). On destruction mMember is set to int(36). */ class CMagic{ /** This should contain the magic number if everything is right */ int mMagic; public: /** This function checks the magic number of this and asserts to zero, if something is wrong, if things are ok, this function keeps quiet. */ void check()const; /** as check(), but it also prints a small message to cout, saying that the check worked. */ void checkNPrint()const; /** sets the magic number to 42 */ CMagic(); /** sets the magic number to another value (36) */ ~CMagic(); }; #endif gift-0.1.14/libMRML/include/GIFTExceptions.h0000644000175200001440000001261510220502730015266 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _GIFTEXCEPTIONS #define _GIFTEXCEPTIONS using namespace std; #include #include /** A base class for exceptions thrown by GIFT WM 211099 created docs WM 0899 created @author Wolfgang Mueller */ class GIFTException{ /** This virtual function has to exsist, in order to enable Runtime Type identification. See Stroustrup about RTTI for this. Exceptions rely on RTTI if I am not mistaken. */ virtual void dummy(); protected: /** The exception message*/ const char* mMessage; /** will the message be killed? */ bool mDestroy; public: /** get the message contained in this */ const char* getMessage()const; /** Constructor */ GIFTException(const char* inMessage); /** Constructor */ GIFTException(char* inMessage); /** Destructor */ virtual ~GIFTException(); /** Output into a stream */ friend ostream& operator<<(ostream& outStream, const GIFTException&); }; /** Output operator sending a proper message */ ostream& operator<<(ostream& outStream, const GIFTException&); /** A file or a hash element was not found*/ class VENotFound:public GIFTException{ public: /** Constructor */ VENotFound(const char* inMessage); /** Output into a stream */ friend ostream& operator<<(ostream& outStream, const VENotFound& inException); }; ostream& operator<<(ostream& outStream, const VENotFound& inException); /** a clear programming mistake in this code has been found*/ class VEProgrammingMistake:public GIFTException{ public: /** Constructor */ VEProgrammingMistake(const char* inMessage); /** Output into a stream */ friend ostream& operator<<(ostream& outStream, const VEProgrammingMistake& inException); }; ostream& operator<<(ostream& outStream, const VENotFound& inException); /** An element which is considered bein only once in a set was inserted another time. Example: trying to create a session with an ID which exsists already*/ class VEDoubleInsert:public GIFTException{ public: /** Constructor */ VEDoubleInsert(const char* inMessage); /** Output into a stream */ friend ostream& operator<<(ostream& outStream, const VEDoubleInsert& inException); }; ostream& operator<<(ostream& outStream, const VEDoubleInsert& inException); /** i dunno (embarrassing), but it is quite late*/ class VEBaseUnknown:public GIFTException{ public: /** */ VEBaseUnknown(const char* inMessage); friend ostream& operator<<(ostream& outStream, const VEBaseUnknown& inException); }; ostream& operator<<(ostream& outStream, const VEBaseUnknown& inException); /** The accessor does not fit the chosen algorithm */ class VEWrongAccessor:public GIFTException{ public: /** Constructor */ VEWrongAccessor(const char* inMessage); /** Output into a stream */ friend ostream& operator<<(ostream& outStream, const VEWrongAccessor& inException); }; ostream& operator<<(ostream& outStream, const VEWrongAccessor& inException); /** The the algorithm cannot be used with the collection chosen */ class VEWrongAlgorithm:public GIFTException{ public: /** Constructor */ VEWrongAlgorithm(const char* inMessage); /** Output into a stream*/ friend ostream& operator<<(ostream& outStream, const VEWrongAlgorithm& inException); }; ostream& operator<<(ostream& outStream, const VEWrongAlgorithm& inException); /** The the algorithm cannot be used with the collection chosen */ class VEWrongBaseType:public GIFTException{ public: /** Constructor */ VEWrongBaseType(const char* inMessage); /** Output into a stream*/ friend ostream& operator<<(ostream& outStream, const VEWrongBaseType& inException); }; ostream& operator<<(ostream& outStream, const VEWrongBaseType& inException); /** The session ID is unknown*/ class VEUnknownSession:public GIFTException{ public: /** Constructor*/ VEUnknownSession(const char* inMessage); /** Output into a stream */ friend ostream& operator<<(ostream& outStream, const VEUnknownSession& inException); }; /** error in configuration, e.g. URL2FTS file */ class VEConfigurationError:public GIFTException{ public: /** Constructor*/ VEConfigurationError(const char* inMessage); /** Output into a stream */ friend ostream& operator<<(ostream& outStream, const VEConfigurationError& inException); }; ostream& operator<<(ostream& outStream, const VEConfigurationError& inException); #endif gift-0.1.14/libMRML/include/CReaperDistributor.h0000644000175200001440000000402710220502730016245 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CREAPERDISTRIBUTOR #define _CREAPERDISTRIBUTOR #include #include #include #include #include #include #include #include #include #include class CReaper; using namespace std; /** This is a structure for administering reapers that come into action on reception of a sigchild. @author: Wolfgang Mueller */ class CReaperDistributor{ /** A type for a map containing reapers */ typedef map CReaperMap; /** A map containing the reapers we want to use */ CReaperMap mReapers; public: /** add Reaper. The inReaper->getPID() will be used for putting the reaper into mReapers. */ bool addReaper(CReaper* inReaper); /** Call the reaper of all processes that happen to terminate during this call of reap */ void reap(); /** set sigchild handler on function reaper */ CReaperDistributor(); /** destroy this and all reapers set sigchild handler to default */ ~CReaperDistributor(); }; #endif gift-0.1.14/libMRML/include/CXMLElementVisitor.h~0000644000175200001440000000265310153634161016340 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva 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 */ // -*- mode: c++ -*- #ifndef _CXMLELEMENTVISITOR #define _CXMLELEMENTVISITOR #include "libMRML/include/uses-declarations.h" #include "libMRML/include/CXMLElement.h" /** This class is designed for visiting XML document trees. It's only */ class CXMLElementVisitor{ public: /** makes this visit inVisted. The return value decides, if the visit recurses further or not */ virtual bool startVisit(const CXMLElement& inVisited)=0; /** visiting on the way back */ virtual void endVisit(const CXMLElement& inVisited)=0; }; #endif gift-0.1.14/libMRML/include/CXMLElementBuilder.h~0000644000175200001440000000267510153634161016273 00000000000000// -*- mode: c++ -*- #ifndef _CXMLELEMENTBUILDER #define _CXMLELEMENTBUILDER #include "libMRML/include/uses-declarations.h" /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include "expat/xmlparse/xmlparse.h" #include "libMRML/include/CXMLElement.h" #include "libMRML/include/CSelfDestroyPointer.h" // #define XEB_PRINTOUT // uncomment this to get debugging printouts /** This class builds an XML element from a string */ class CXMLElementBuilder{ public: /** construction */ CXMLElementBuilder(); /** this converts a string into an CXMLElement */ static CXMLElement* stringToElement(const string& inString); }; #endif gift-0.1.14/libMRML/include/CXEVI18nTranslator.h~0000644000175200001440000000330010153634161016150 00000000000000// -*- mode: c++ -*- #ifndef _CXEVI18NTRANSLATOR #define _CXEVI18NTRANSLATOR /* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/uses-declarations.h" #include #include "libMRML/include/CXMLElementVisitor.h" #include "libMRML/include/CXEVI18nTranslator.h" #include "libMRML/include/CI18nTranslator.h" /** A visitor that visits XML elements in order to translate them */ class CXEVI18nTranslator:public CXMLElementVisitor{ protected: /** the language code used for translating */ string mLanguageCode; /** the translator used for translating */ CI18nTranslator mTranslator; public: /** constructor. */ CXEVI18nTranslator(CI18nTranslator& inTranslator, string inLanguageCode); /** actually carrying out the visit */ virtual bool startVisit(CXMLElement& inVisited); /** actually carrying out the visit */ virtual void endVisit(CXMLElement& inVisited); }; #endif gift-0.1.14/libMRML/include/CNoDelete.h0000644000175200001440000000404610220502730014274 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CNODELETE #define _CNODELETE #include "libMRML/include/uses-declarations.h" #define INLINE /** The use of this class is to control where an element is destroyed. If an instantiation of this class is activated, it will bomb in the moment when the destructor is called. @Author: Wolfgang Müller */ class CNoDelete{ protected: /** is this activated*/ bool mIsActivated; public: /** activate this. This means: destruction of this will bomb the program using an assertion of !mIsActivated */ INLINE void activate(){ mIsActivated=1; } /** activate this. This means: destruction of *this will bomb the program using a zero assertion */ INLINE void deActivate(){ mIsActivated=0; }; /** activate this. This means: destruction of *this will be possible */ INLINE CNoDelete(): mIsActivated(0){ }; /** activate this. This means: destruction of this will bomb the program using a zero assertion */ INLINE ~CNoDelete(){ assert(!mIsActivated); }; }; #endif gift-0.1.14/libMRML/include/Makefile.am0000644000175200001440000000361510153634161014367 00000000000000 directory.h: echo "Making directory.h" @rm -f directory.h; \ echo '#define __LIBDIR__ "@DEBSHAREDIR@"' > directory.h;\ echo '#define __PERL_LOCATION__ "@PERL@"' >> directory.h;\ echo '#define __BINDIR__ "@DEBPERLLIBDIR@"' >> directory.h;\ echo '#define __EXECBINDIR__ "@DEBEXECBINDIR@"' >> directory.h;\ echo '#define __DATADIR__ "@DEBDATADIR@"' >> directory.h all: directory.h dist-hook: rm $(distdir)/directory.h #install-data-local: # echo "ca marche" #install-data-hook: # echo "pas" libMRMLdir=$(includedir)/libMRML/include libMRML_HEADERS= directory.h \ CAFPlugin.h CMRMLStringConstants.h CTimeStampGenerator.h \ CAccessor.h CMagic.h CXEVCommunication.h \ CAccessorAdmin.h CMutex.h CXEVTripletList.h \ CAccessorAdminCollection.h CNoDelete.h CXMLElement.h \ CAccessorElement.h CPropertySheetList.h CXMLElementBuilder.h \ CAccessorFactory.h CQMultiple.h CXMLElementVisitor.h \ CAccessorFactoryContainer.h CQParallel.h CXMLHelper.h \ CAccessorImplementation.h CQuery.h GIFTExceptions.h \ CAlgorithm.h CQueryParadigmMatcher.h TID.h \ CAlgorithmCollection.h CQueryPlugin.h directory.h \ CArraySelfDestroyPointer.h CQueryTreeBuilder.h mrml_const.h \ CAttributeList.h CQueryTreeNode.h myNew.h \ CCommunicationHandler.h CRelevanceLevel.h my_assert.h \ CDebuggingMemoryManager.h CRelevanceLevelList.h my_diagnose.h \ CDynamicQueryFactory.h CSelfDestroyPointer.h my_throw.h \ CIDRelevanceLevelPair.h CSessionManager.h \ CIDRelevanceLevelPairList.h CStaticQueryFactory.h uses-declarations.h \ CRPipe.h CReaper.h CReaperDistributor.h safePopen.h\ createErrorMessage.h CI18nTranslator.h CXEVI18nTranslator.h gift-config.h #install-data-hook: # $(INSTALL_DATA) $(srcdir)/gift-config.h $(includedir)/libMRML/include/gift-config.h CLEANFILES= directory.h gift-0.1.14/libMRML/include/Makefile.in0000644000175200001440000003352110220474100014365 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = libMRML/include DIST_COMMON = $(libMRML_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__installdirs = "$(DESTDIR)$(libMRMLdir)" libMRMLHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(libMRML_HEADERS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ #install-data-local: # echo "ca marche" #install-data-hook: # echo "pas" libMRMLdir = $(includedir)/libMRML/include libMRML_HEADERS = directory.h \ CAFPlugin.h CMRMLStringConstants.h CTimeStampGenerator.h \ CAccessor.h CMagic.h CXEVCommunication.h \ CAccessorAdmin.h CMutex.h CXEVTripletList.h \ CAccessorAdminCollection.h CNoDelete.h CXMLElement.h \ CAccessorElement.h CPropertySheetList.h CXMLElementBuilder.h \ CAccessorFactory.h CQMultiple.h CXMLElementVisitor.h \ CAccessorFactoryContainer.h CQParallel.h CXMLHelper.h \ CAccessorImplementation.h CQuery.h GIFTExceptions.h \ CAlgorithm.h CQueryParadigmMatcher.h TID.h \ CAlgorithmCollection.h CQueryPlugin.h directory.h \ CArraySelfDestroyPointer.h CQueryTreeBuilder.h mrml_const.h \ CAttributeList.h CQueryTreeNode.h myNew.h \ CCommunicationHandler.h CRelevanceLevel.h my_assert.h \ CDebuggingMemoryManager.h CRelevanceLevelList.h my_diagnose.h \ CDynamicQueryFactory.h CSelfDestroyPointer.h my_throw.h \ CIDRelevanceLevelPair.h CSessionManager.h \ CIDRelevanceLevelPairList.h CStaticQueryFactory.h uses-declarations.h \ CRPipe.h CReaper.h CReaperDistributor.h safePopen.h\ createErrorMessage.h CI18nTranslator.h CXEVI18nTranslator.h gift-config.h #install-data-hook: # $(INSTALL_DATA) $(srcdir)/gift-config.h $(includedir)/libMRML/include/gift-config.h CLEANFILES = directory.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(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 libMRML/include/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libMRML/include/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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-libMRMLHEADERS: $(libMRML_HEADERS) @$(NORMAL_INSTALL) test -z "$(libMRMLdir)" || $(mkdir_p) "$(DESTDIR)$(libMRMLdir)" @list='$(libMRML_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(libMRMLHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libMRMLdir)/$$f'"; \ $(libMRMLHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libMRMLdir)/$$f"; \ done uninstall-libMRMLHEADERS: @$(NORMAL_UNINSTALL) @list='$(libMRML_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f '$(DESTDIR)$(libMRMLdir)/$$f'"; \ rm -f "$(DESTDIR)$(libMRMLdir)/$$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 $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libMRMLdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -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 \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-libMRMLHEADERS 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 uninstall-libMRMLHEADERS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-libMRMLHEADERS install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-libMRMLHEADERS directory.h: echo "Making directory.h" @rm -f directory.h; \ echo '#define __LIBDIR__ "@DEBSHAREDIR@"' > directory.h;\ echo '#define __PERL_LOCATION__ "@PERL@"' >> directory.h;\ echo '#define __BINDIR__ "@DEBPERLLIBDIR@"' >> directory.h;\ echo '#define __EXECBINDIR__ "@DEBEXECBINDIR@"' >> directory.h;\ echo '#define __DATADIR__ "@DEBDATADIR@"' >> directory.h all: directory.h dist-hook: rm $(distdir)/directory.h # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gift-0.1.14/libMRML/include/CQueryTreeNode.h0000644000175200001440000000357410220502730015335 00000000000000// -*- mode: c++ -*- #ifndef _CQUERYTREENODE #define _CQUERYTREENODE #include "libMRML/include/uses-declarations.h" #include "libMRML/include/CQuery.h" #ifdef LINK_DYNAMICALLY #include "libMRML/include/CDynamicQueryFactory.h" #else #include "libMRML/include/CStaticQueryFactory.h" #endif #include "libMRML/include/CSelfDestroyPointer.h" #include "libMRML/include/CMagic.h" class CXMLElement; class CAlgorithm; class CStaticQueryFactory; /** This class does nothing but wrap the current query interface in a way, that it can be used with CORBA */ class CQueryTreeNode:public CMagic{ /** type of the children of this */ typedef list > CChildren; /** The children of this */ CChildren mChildren; /** The content of this. It is constructed, when CQueryTreeNode::configure is called */ CQuery* mContent; /** the current Algorithm of this query */ CAlgorithm* mAlgorithm; public: /** Construct this */ CQueryTreeNode(); /** Destruct this: delete all the children of this */ ~CQueryTreeNode(); /** Configure this. This means: create an object of a subclass of CQuery, and set its children*/ void configure(CXMLElement& inAlgorithm, CAccessorAdminCollection& inAccessors, CStaticQueryFactory& inBaseTypeFactory); /** * * do a query * */ virtual CXMLElement* query(const CXMLElement& inQuery); /** * * @short a query which returns ID/RelevanceLevel pairs instead of * instead of URL/RelevanceLevel pairs * */ virtual CIDRelevanceLevelPairList* fastQuery(const CXMLElement& inQuery, int inNumberOfInterestingImages, double inDifferenceToBest); /** * * @short a query which returns ID/RelevanceLevel pairs instead of * instead of URL/RelevanceLevel pairs * */ void addChild(CQueryTreeNode* inChild, double inWeight=1); }; #endif gift-0.1.14/libMRML/include/CCommunicationHandler.h~0000644000175200001440000002507410153634161017113 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva 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 */ //configuration files for sessions and algorithms/collections #ifndef _CCOMMUNICATIONHANDLER #define _CCOMMUNICATIONHANDLER #include "libMRML/include/uses-declarations.h" //the expat xml parser by J.Clark #include //a class for using xpat attributes in a nice way #include "libMRML/include/CAttributeList.h" //This is mrml+gift specific #include "libMRML/include/CSessionManager.h" #include "libMRML/include/CXMLElement.h" #include #include #include #include "libMRML/include/CMutex.h" //---------------------------------------- /** prototypes for use with expat */ extern void startMRMLElement(void *userData, const char *inElementName, const char **inAttributes); extern void endMRMLElement(void *userData, const char *name); /** a helper class for use with expat, which also handles the socket stuff. *@author: Wolfgang Müller */ class CCommunicationHandler{ /** the root of the Document tree which we are making. It is destroyed automatically when overwritten. */ CSelfDestroyPointer mDocumentRoot; /** the xml parser which is used for all this */ XML_Parser mParser; /** */ /** session manager */ CSessionManager& mSessionManager; /** An xml subtree, containing all configured algorithms */ CAlgorithm* mAlgorithmTree; /** A DOM-alike tree built from this text */ CSelfDestroyPointer mCurrentTree; /** The string containing and describing the peer socket. This can be an IP socket, or unix socket peer credentials */ string mPeerAddressString; public: /** A DOM-alike tree which will be built from all the answers given to the requests at the moment this is public, because I need it to slowly hack the negotiation code. */ CSelfDestroyPointer mMultiResponse; protected: /** We have said, that the user can tell, if he wants a query in the normal sense or rather a collection of random images, in which case the inner parts of the query are ignored. The flag used to perform this is this variable. */ int mQueryAtRandomCount; protected: /** The socket, which is used for this communication */ int mSocket; /** The logfile which logs all communication. *this will APPEND NEW DATA to the logfile, as you would expect */ ofstream& mLog; public: //---------------------------------------- /** communications: */ //---------------------------------------- /** setting the communication socket for this session */ void setSocket(int inSocket); //---------------------------------------- /** helpers for creating mrml messages */ //---------------------------------------- /** the preamble for a session */ string preamble(); /** Frame: this is for all messages the same */ string frame(const string& inSession, const string& inString); //---------------------------------------- /** making attributes out of name/value pairs */ string toAttribute(string inName, string inString); string toAttribute(string inName, int inInt); string toAttribute(string inName, double inFloat); // //---------------------------------------- // /** turning a relevance level element into a string */ // /** (obsolete) */ // string stringOfRelevanceLevelElement(const CRelevanceLevel& inRE, // double inUserRelevance=0.5); // string stringOfRelevanceLevelList(const CRelevanceLevelList& inRLL); //---------------------------------------- /** Error message */ int sendError(const string& inSession, const string& inMessage); //---------------------------------------- /** Opening a session */ void openSession(const string& inUserName, const string& inSessionName); /** renaming the current session */ void renameSession(const string& inSessionID, const string& inNewName); /** renaming the current session */ void deleteSession(const string& inName); /** Gets the property sheet contained in the algorithm with inAlgorithmID*/ void getPropertySheet(const string& inSessionID, const string& inAlgorithmID); //---------------------------------------- /** the handshake message (old MRML)*/ int sendHandshake(const string& inUser); /** getting the sessions for one user (new MRML)*/ void getSessions(const string& inUser); /** getting collections available on a system*/ void getCollections(); /** getting algorithms available on a system*/ void getAlgorithms(); //---------------------------------------- /** the result of a query */ int sendResult(const string& inSession, const CXMLElement& inRLL); //---------------------------------------- /** random images */ int sendRandomImages(const string& inSession, const string& inAlgorithm, const string& inCollection, const string& inNumberOfImages) ; ; //---------------------------------------- /** processing a query */ //---------------------------------------- CXMLElement* gQueryImages; string mSessionID; int mResultSize; double mCutoff; string mCollection; string mAlgorithm; //---------------------------------------- /** setting properties of the query */ void setResultSize(int inResultSize); void setResultCutoff(const string& inCutoff); void setResultCutoff(double inCutoff); void setCollectionID(const string& inID); void setAlgorithmID(const string& inID); //---------------------------------------- /** Start building a tree by successive adding of XML elements */ void startTreeBuilding(const char* inElementName, const char*const*const inAttributes); /** Start building a tree by successive adding of XML elements */ void addToCurrentTree(const char* inElementName, const char*const*const inAttributes); /** move up in the tree */ void moveUpCurrentTree(); /** is this building a tree at present? */ bool isBuildingTree()const; //---------------------------------------- /** parse XML using expat */ //---------------------------------------- void parseString(const string& inMessage); //---------------------------------------- /** Clear the algorithm tree element. We do not assume destruction responsability here This responsability is transferred to the containing session. FIXME do something cleaner for the case of failure */ void clearAlgorithmElement(); //---------------------------------------- /** start of an element in the tree of configured algorithms. If mAlgorithm=0 then generate a new XML element with the content given by inName and inAttributes @param inName The name like given by expat @param inAttributes an attributes list like given by expat */ //---------------------------------------- void startAlgorithmElement(const char* inName, const char* const* const inAttributes); //---------------------------------------- /** end of an element in the tree of configured algorithms */ //---------------------------------------- void endAlgorithmElement(); //---------------------------------------- /** clear the pointer to the algorithm tree */ //---------------------------------------- void initAlgorithmElement(); //---------------------------------------- /** read the pointer to the algorithm tree */ //---------------------------------------- CAlgorithm* readAlgorithmElement(); //---------------------------------------- /** End the configuration i.e. make out of the algorithm structure a query processing structure. */ void endConfiguration(); //---------------------------------------- /** parsing from a stream: * read each character * parse it */ bool mParsingFinished; void clearParsingFinished(); void setParsingFinished(); bool isParsingFinished()const; bool readAndParse(); void makeParser(); /** If we process multiple queries which are part of one message, we have to first collect the answers from the requests, and then send the whole message. startMultiRequest and endMultiRequest are the functions which administer this process. startMultiRequest clears the message which is going to be built and sets the language code */ void startMultiRequest(const string& inSessionID, const string& inLanguageCode="en"); /** sends the message which has been built*/ void endMultiRequest(); /** adds an XMLElement to the multi-response which is built */ void addToMultiResponse(CXMLElement* inElement); //---------------------------------------- /** Using the session manager which is a member */ /** of this for other purposes */ //---------------------------------------- CSessionManager& getSessionManager(); /** incrementing the QueryAtRandomCount flag */ void incrementQueryAtRandomCount(); /** reading this flag */ int getQueryAtRandomCount()const; /** set the name of the peer, this is just an informative string, destined for the log. The string can contain either the IP of the connecting computer, or else the peer credentials of the connecting tasks. */ void setPeerAddressString(string); /** get the Peer adress string */ const string& getPeerAddressString()const; //---------------------------------------- /** constructor/destructor */ //---------------------------------------- CCommunicationHandler(CSessionManager& inSessionManager, ofstream& inLogFile); ~CCommunicationHandler(); }; #endif gift-0.1.14/libMRML/include/CAlgorithmCollection.h0000644000175200001440000001116010220502730016532 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CALGORITHMCOLLECTION #define _CALGORITHMCOLLECTION #include "libMRML/include/uses-declarations.h" #include #include #include "libMRML/include/CAlgorithm.h" #ifdef LINK_DYNAMICALLY #include "libMRML/include/CStaticQueryFactory.h" #else #include "libMRML/include/CDynamicQueryFactory.h" #endif #include "libMRML/include/CXMLElement.h" // for toXMLElement class CAccessorAdminCollection; /** The algorithm collection is kind of a factory for CQuery structures: We provide a list of algorithms which correspond to so-called "basetypes". At present there are only two: bayesian and inverted_file. Each algorithm which will be configured in the configuration file will have a basetype. Corresponding to this there is generated a CQuery structure for each algorithm out of the configuration. @Author Wolfgang Mueller */ class CAlgorithmCollection:public CStaticQueryFactory{ protected: /** as the name sais*/ CAlgorithm* mAlgorithmInConstruction; /** The content of an algorithm collection is a map between algorihm type and a pointer to the corresponding CAlgorithm */ protected: typedef map CContent; /** */ CContent mContent; /** for being able to read all the content */ CContent::const_iterator begin()const; /** for being able to read all the content */ CContent::const_iterator end()const; public: //---------------------------------------- /** returns a pointer to the algorithm in construction */ CAlgorithm* getAlgorithmInConstruction(); //---------------------------------------- /** */ void startAlgorithmConstruction(CAlgorithm* inAlgorithm); /** Constructor */ CAlgorithmCollection(string inConfigFileName); /** Destructor destroys all members of CContent */ ~CAlgorithmCollection(); /** adding a completely built algorithm XML document tree*/ void addAlgorithm(CAlgorithm* inAlgorithm); /** Algorithm for TYPE => permits configuring probably only the pointered version is interesting */ CAlgorithm& getAlgorithmByType(const string& inType)const; /** Algorithm for TYPE => permits configuring probably only the pointered version is interesting */ bool containsAlgorithmByType(const string& inType)const; /** Creates a new algorithm for agiven type by cloning what you would get with getAlgorithm. The values made here will be used as default in the subsequent CQuery building process. */ CAlgorithm* makeAlgorithmByType(const string& inType)const; //---------------------------------------- /** A default algorithm for the default session This algorithm will be given by the ONE ALGORITHM which has the type "adefault" */ CAlgorithm* getDefaultAlgorithm()const; //---------------------------------------- /** creates a copy of what you'd get with the above function get...*/ CAlgorithm* makeDefaultAlgorithm()const; //---------------------------------------- /** For handshaking: This makes you a list of all algorithms which work with a given query paradigm. */ CXMLElement* getAlgorithmList(const CXMLElement& inGetAlgorithms)const; //---------------------------------------- /** for shandshake and for state output */ string toXML(bool inIsPrivate=false)const; /** for get-algorithms: the output is an CXMLElement, containing an algorithm-list element. */ CXMLElement* toXMLElement()const; /** handed through to the CStaticQueryFactory */ CQuery* makeQuery(const string & inBaseType, CAccessorAdminCollection & inAccessorAdminCollection, CAlgorithm & inAlgorithm, CStaticQueryFactory& inFactory); }; #endif gift-0.1.14/libMRML/include/CRPipe.h0000644000175200001440000000264510220502730013617 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CRPIPE #define _CRPIPE #include "libMRML/include/CReaper.h" /** A reaper that closes a pipe after the piping child has exited @author: Wolfgang Mueller */ class CRPipe:public CReaper{ protected: /** when receiving a sigchild, this has to close the outgoing pipe */ int mPipeToClose; public: /** get the pipe to close */ CRPipe(int inPID,int inPipeToClose); /** do the real action*/ virtual void reap(); }; #endif gift-0.1.14/libMRML/include/CMRMLStringConstants.h0000644000175200001440000000212610220502730016425 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CMRMLSTRINGCONSTANTS #define _CMRMLSTRINGCONSTANTS #include "libMRML/include/uses-declarations.h" class #endif gift-0.1.14/libMRML/include/CQMultiple.h0000644000175200001440000001231410220502730014506 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CQMULTIPLE #define _CQMULTIPLE #include "libMRML/include/uses-declarations.h" /* -*- mode: c++ -*- */ /** * * CQMultiple.h * A CQuery structure which has several children * queries them one after another, * weights them, and obtains a common result * * * * modification history: * * WM 20000205 creation * * * * compiler defines used: * _CQMULTIPLE avoids double inclusion * */ #include #include #include #include "libMRML/include/CQuery.h" #include "libMRML/include/CSelfDestroyPointer.h" #include "libMRML/include/CIDRelevanceLevelPairList.h" #include "libMRML/include/CRelevanceLevelList.h" //#include "CWeightingFunctionPointerList.h" //#include "CWeightingFunctionPointerHash.h" #include "libMRML/include/CAlgorithm.h" #include "libMRML/include/CAccessor.h" #include "libMRML/include/CAccessorAdminCollection.h" #include "libMRML/include/CAccessorAdmin.h" #ifdef HAS_HASH_MAP #include #else #define hash_map map #endif class CScoreBoard; class CAccessor; /** This is going to be one of our main building blocks. It is a structure which contains a couple of CQuery structures, hands a query through to them, and then unifies the result. In fact this is the center of all this query tree business. Probably we will put another layer into the class tree: The CQTreeNode, but let's first start. Important: The basic assumption here is, that all children operate on the same collections. If this is not the case we have to be more careful, and most of all: we have to operate using URLs. [in the following I am talking about things I WANT to do, so the two modes stuff is not yet implemented] CQMultiple has two minor modes: Merge-by-ID or Merge-by-URL In the first case, we need information on how to translate image IDs to image URLs. We dispatche a fastQuery() to each child node, and then we merge the results (by imageID). The resulting list of ID-relevancelevel pairs is translated back to URLs using an URL2FTS accessor. Please note that I am aware that this needs refactoring: we should have an ULRToID accessor superclass, which provides the necessary translation services, without being fixed on a given data representation. In the second case, we do not need any additional information: we dispatch a query() (as opposed to fastQuery()) to the child nodes, and then we merge the results. This means we have to merge plenty of XML. * @Author: Wolfgang Müller */ class CQMultiple:public CQuery{ protected: /** Do we merge the results by their URL or by their image ID? */ /** */ void init(); /** do we merge result URLs or result IDs? */ bool mUsesResultURLs; public: /** * * default constructor * */ CQMultiple(); /** * * we need to unregister the accessors used * */ ~CQMultiple(); /** * In fact, what we are doing here is to get ourselves * an accessor ACURL2FTS to do a proper fastQuery */ CQMultiple(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm); /** This function processes is in the inner loop of fastQuery. If multithreading is possible on the system on which GIFT was compiled, then this function will run in a thread, and fastQuery will wait for it */ static void* doFastQueryThread(void *); /** * * calls fastQuery for every child, merges the results * */ virtual CIDRelevanceLevelPairList* fastQuery(const CXMLElement& inQuery, int inNumberOfInterestingImages, double inDifferenceToBest); /** This function processes is in the inner loop of query. If multithreading is possible on the system on which GIFT was compiled, then this function will run in a thread, and fastQuery will wait for it */ static void* doQueryThread(void *); /** * * calls query for every child, merges the results by URLs * */ virtual CXMLElement* query(const CXMLElement& inQuery); /** * * set the Algorithm. * same scheme as in setCollection * */ virtual bool setAlgorithm(CAlgorithm& inAlgorithm); }; /* end of class */ #endif gift-0.1.14/libMRML/include/myNew.h0000644000175200001440000000404010220502730013563 00000000000000// -*- mode: c++ -*- #ifndef _MYNEW #define _MYNEW /* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include "libMRML/include/CDebuggingMemoryManager.h" //#define __memdebug void* operator new(size_t s){ if(gMemManager.isValid()){ #ifdef __memdebug cout << "MyAlloc" << s << endl; #endif return gMemManager.getMem(s); } #ifdef __memdebug cout << "NormalAlloc" << flush; #endif return malloc(s); } /* void* operator new[](size_t s){ */ /* return new(s); */ /* } */ void operator delete(void * inToBeDeleted){ if(inToBeDeleted){ if(gMemManager.freeMem(inToBeDeleted)){ #ifdef __memdebug cout << "°my[" << inToBeDeleted << "]" << flush;// a character for which one can grep #endif return; }else{ #ifdef __memdebug cout << "§pre[" << inToBeDeleted << "]" << flush;// a character for which one can grep #endif free(inToBeDeleted); } }else{ cout << "!null" << endl; } } void operator delete[](void* inToBeDeleted){ delete(inToBeDeleted); } #endif gift-0.1.14/libMRML/include/CIDRelevanceLevelPairList.h0000644000175200001440000000324110220502730017352 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CIDRELEVANCELEVELPAIRLIST * * a list of pairs of ID and relevance level * the goal of this is to ship less data when * shipping query results. * **************************************** * * modification history: * * WM 19990930 created file * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CIDRELEVANCELEVELPAIRLIST #define _CIDRELEVANCELEVELPAIRLIST #include "libMRML/include/uses-declarations.h" #include #include #include "libMRML/include/CIDRelevanceLevelPair.h" class CIDRelevanceLevelPairList:public list{ public: /// CIDRelevanceLevelPairList(); }; #endif gift-0.1.14/libMRML/include/my_assert.h0000644000175200001440000000234710220502730014502 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _MYASSERT #define _MYASSERT #include "libMRML/include/GIFTExceptions.h" /** a more verbose assertion */ #define my_assert(x,y) if(!(x)){cout << __FILE__ << ':' << __LINE__ << ": Assertion failed, throwing" << endl << y << endl << flush; throw(VEProgrammingMistake(y));} #endif gift-0.1.14/libMRML/include/CQueryPlugin.h0000644000175200001440000000435710220502730015066 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CQUERYPLUGIN #define _CQUERYPLUGIN #include "libMRML/include/uses-declarations.h" #include // reading a directory #include // reading a directory #include // dynamic linking #include // screen output #include #include class CQuery; class CAlgorithm; class CAccessorAdminCollection; class CQueryPlugin{ protected: /** the handle which enables us to open*/ void* mDlOpenHandle; /** the name of the plugin */ string mName; /** the function for making a query object */ CQuery* (*mMakeQuery)(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm); /** this function gives us the name of the plugin */ char* (*mGetName)(void); /** is this well constructed? */ bool mIsSane; public: /** makes a CQuery object*/ CQuery* makeQuery(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm); /** gets the name of the plugin */ char* getName(); /** opens the library and sets the make query etc. functions */ CQueryPlugin(string,string,string); /** copy all the content */ CQueryPlugin(CQueryPlugin&); /** close the DlOpenHandle of the library*/ ~CQueryPlugin(); /** is this well constructed */ bool isSane()const; }; #endif gift-0.1.14/libMRML/include/CDebuggingMemoryManager.h0000644000175200001440000000713710220502730017160 00000000000000// -*- mode: c++ -*- #ifndef _CDEBUGMEMORYMANAGER #define _CDEBUGMEMORYMANAGER #include "libMRML/include/uses-declarations.h" #include // -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/CMutex.h" typedef long CDebuggingMemoryManagerSize; // we will allocate a chunk of 10 megs #define MEMSIZE 20000000 /** A structure, which is useful to maintain a twice connected list: A list of Chunks and a list of free/occupied chunks. This should normally be a local type, but there was an internal compiler error in GNU C++. */ struct lTChunk{ public: ///Previous Item in List lTChunk* mPrev; ///Following Item in List lTChunk* mNext; ///Previous Item in MEMORY lTChunk* mPreceding; ///Following Item in MEMORY lTChunk* mFollowing; /**Size of this Chunk. The Size could be deduced from mFollowing, but I consider this way as more general and cleaner. */ CDebuggingMemoryManagerSize mSize; /** We will add to this some stuff to check if the end of this has been overwritten */ /** Magic number, to see, if this Pointer was allocated using this->getMem() */ long mMagic; }; /** Class for memory management: This class gives you the full control about 1MByte of Memory. What is above will be allocated using the normal techniques. This is nice, if you are doubtful about the Libraries you use. */ class CDebuggingMemoryManager{ protected: /**Marking a Chunk as free and deleting him from the list whose member it presently is.*/ void FreeChunk(lTChunk* inChunk); /**List of free memory chunks.*/ lTChunk* mFreeList; /** List of used memory chunks. */ lTChunk* mUsedList; /** THE memory used by this memory administrator. */ lTChunk* mBuffer; /** The magic number for valid lTChunk nodes */ const long cMagic; /** The magic number to invalidate lTChunk nodes */ const long cUnMagic; /** */ long cVM; /** for multithreading */ CMutex mMutex; public: /**Constructor. The Parameter is the size of the Buffer administered by the structure */ CDebuggingMemoryManager(const CDebuggingMemoryManagerSize inSize); /** Getting Mem. */ void* getMem(CDebuggingMemoryManagerSize inSize); /** Deleting Mem. */ bool freeMem(void*); /** */ bool isValid()const; /** */ friend ostream& operator <<(ostream& outStream, const CDebuggingMemoryManager& inMem); }; /** Output for diagnosis. */ ostream& operator<<(ostream& o, const CDebuggingMemoryManager& inMem); /** One instance for the whole Program. */ extern CDebuggingMemoryManager gMemManager; #endif gift-0.1.14/libMRML/include/Makefile.am~0000644000175200001440000000347010153634161014564 00000000000000 directory.h: echo "Making directory.h" @rm -f directory.h;echo '#define __LIBDIR__ "@libdir@"' > directory.h ; echo '#define __PERL_LOCATION__ "@PERL@"' >> directory.h; echo '#define __BINDIR__ "@bindir@"' >> directory.h ; echo '#define __DATADIR__ "@datadir@"' >> directory.h; echo '#define __LIBDIR__ "@libdir@"' >> directory.h all: directory.h dist-hook: rm $(distdir)/directory.h #install-data-local: # echo "ca marche" #install-data-hook: # echo "pas" libMRMLdir=$(includedir)/libMRML/include libMRML_HEADERS= directory.h \ CAFPlugin.h CMRMLStringConstants.h CTimeStampGenerator.h \ CAccessor.h CMagic.h CXEVCommunication.h \ CAccessorAdmin.h CMutex.h CXEVTripletList.h \ CAccessorAdminCollection.h CNoDelete.h CXMLElement.h \ CAccessorElement.h CPropertySheetList.h CXMLElementBuilder.h \ CAccessorFactory.h CQMultiple.h CXMLElementVisitor.h \ CAccessorFactoryContainer.h CQParallel.h CXMLHelper.h \ CAccessorImplementation.h CQuery.h GIFTExceptions.h \ CAlgorithm.h CQueryParadigmMatcher.h TID.h \ CAlgorithmCollection.h CQueryPlugin.h directory.h \ CArraySelfDestroyPointer.h CQueryTreeBuilder.h mrml_const.h \ CAttributeList.h CQueryTreeNode.h myNew.h \ CCommunicationHandler.h CRelevanceLevel.h my_assert.h \ CDebuggingMemoryManager.h CRelevanceLevelList.h my_diagnose.h \ CDynamicQueryFactory.h CSelfDestroyPointer.h my_throw.h \ CIDRelevanceLevelPair.h CSessionManager.h \ CIDRelevanceLevelPairList.h CStaticQueryFactory.h uses-declarations.h \ CRPipe.h CReaper.h CReaperDistributor.h safePopen.h\ createErrorMessage.h install-data-hook: $(INSTALL_DATA) $(srcdir)/gift-config.h $(includedir)/libMRML/include/gift-config.h CLEANFILES= directory.h gift-0.1.14/libMRML/include/gift-config.h0000644000175200001440000000614510220502730014670 00000000000000/* gift-config.h. Generated by configure. */ /* gift-config.h.in. Generated from configure.in by autoheader. */ /* Define to 1 if you have the header file. */ #define HAVE_ALGORITHM 1 /* Define to 1 if you have the header file. */ #define HAVE_ARPA_INET_H 1 /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the `expat' library (-lexpat). */ #define HAVE_LIBEXPAT 1 /* Define to 1 if you have the `m' library (-lm). */ #define HAVE_LIBM 1 /* Define to 1 if you have the `pthread' library (-lpthread). */ #define HAVE_LIBPTHREAD 1 /* Define to 1 if you have the `socket' library (-lsocket). */ /* #undef HAVE_LIBSOCKET */ /* Define to 1 if you have the `uuid' library (-luuid). */ #define HAVE_LIBUUID 1 /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the header file. */ #define HAVE_NETINET_TCP_H 1 /* Define if you have POSIX threads libraries and header files. */ /* #undef HAVE_PTHREAD */ /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING 1 /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_SOCKET_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIMES_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIME_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the header file. */ #define HAVE_TIME_H 1 /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 /* Name of package */ #define PACKAGE "gift" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ #define PACKAGE_NAME "" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "" /* Define to the version of this package. */ #define PACKAGE_VERSION "" /* Define to necessary symbol if this constant uses a non-standard name on your system. */ /* #undef PTHREAD_CREATE_JOINABLE */ /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ #define VERSION "0.1.14sebastian" /* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ /* #undef WORDS_BIGENDIAN */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ gift-0.1.14/libMRML/include/CQueryPlugin.h~0000644000175200001440000000423010153634161015263 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva 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 */ // -*- mode: c++ -*- #ifndef _CQUERYPLUGIN #define _CQUERYPLUGIN #include "libMRML/include/uses-declarations.h" #include // reading a directory #include // reading a directory #include // dynamic linking #include // screen output #include #include class CQuery; class CAlgorithm; class CAccessorAdminCollection; class CQueryPlugin{ protected: /** the handle which enables us to open*/ void* mDlOpenHandle; /** the name of the plugin */ string mName; /** the function for making a query object */ CQuery* (*mMakeQuery)(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm); /** this function gives us the name of the plugin */ char* (*mGetName)(void); /** is this well constructed? */ bool mIsSane; public: /** makes a CQuery object*/ CQuery* makeQuery(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm); /** gets the name of the plugin */ char* getName(); /** opens the library and sets the make query etc. functions */ CQueryPlugin(string,string); /** copy all the content */ CQueryPlugin(CQueryPlugin&); /** close the DlOpenHandle of the library*/ ~CQueryPlugin(); /** is this well constructed */ bool isSane()const; }; #endif gift-0.1.14/libMRML/include/CStaticQueryFactory.h0000644000175200001440000000300310220502730016372 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CBASETYPEFACTORY #define _CBASETYPEFACTORY #include "libMRML/include/uses-declarations.h" #include class CQuery; class CAccessorAdminCollection; class CAlgorithm; /** A factory for base types of algorithms */ class CStaticQueryFactory{ public: /** generates a new CQuery for a given basetype. What we do here is quite brutal hardcoding. */ virtual CQuery* makeQuery(const string& inBaseType, CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm); }; #endif gift-0.1.14/libMRML/include/my_throw.h0000644000175200001440000000247110220502730014342 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _MYTHROW #define _MYTHROW /** this is a modification throw which prints where and when, before it actually throws. This is interesting for broken RTTI/exceptions @author: Wolfgang Müller */ #define my_throw(x) {cout << __FILE__ << ':' << __LINE__ << ':' << "throwing " << flush; cout << x << endl << flush; throw(x);} #endif gift-0.1.14/libMRML/include/CCommunicationHandler.h0000644000175200001440000002534010220502730016700 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ //configuration files for sessions and algorithms/collections #ifndef _CCOMMUNICATIONHANDLER #define _CCOMMUNICATIONHANDLER #include "libMRML/include/uses-declarations.h" //the expat xml parser by J.Clark #include //a class for using xpat attributes in a nice way #include "libMRML/include/CAttributeList.h" //This is mrml+gift specific #include "libMRML/include/CSessionManager.h" #include "libMRML/include/CXMLElement.h" #include #include #include #include "libMRML/include/CMutex.h" //---------------------------------------- /** prototypes for use with expat */ extern void startMRMLElement(void *userData, const char *inElementName, const char **inAttributes); extern void endMRMLElement(void *userData, const char *name); /** a helper class for use with expat, which also handles the socket stuff. *@author: Wolfgang Müller */ class CCommunicationHandler{ /** the root of the Document tree which we are making. It is destroyed automatically when overwritten. */ CSelfDestroyPointer mDocumentRoot; /** the xml parser which is used for all this */ XML_Parser mParser; /** */ /** session manager */ CSessionManager& mSessionManager; /** An xml subtree, containing all configured algorithms */ CAlgorithm* mAlgorithmTree; /** A DOM-alike tree built from this text */ CSelfDestroyPointer mCurrentTree; /** The string containing and describing the peer socket. This can be an IP socket, or unix socket peer credentials */ string mPeerAddressString; public: /** A DOM-alike tree which will be built from all the answers given to the requests at the moment this is public, because I need it to slowly hack the negotiation code. */ CSelfDestroyPointer mMultiResponse; protected: /** We have said, that the user can tell, if he wants a query in the normal sense or rather a collection of random images, in which case the inner parts of the query are ignored. The flag used to perform this is this variable. */ int mQueryAtRandomCount; protected: /** The socket, which is used for this communication */ int mSocket; /** The logfile which logs all communication. *this will APPEND NEW DATA to the logfile, as you would expect */ ofstream& mLog; public: //---------------------------------------- /** communications: */ //---------------------------------------- /** setting the communication socket for this session */ void setSocket(int inSocket); //---------------------------------------- /** helpers for creating mrml messages */ //---------------------------------------- /** the preamble for a session */ string preamble(); /** Frame: this is for all messages the same */ string frame(const string& inSession, const string& inString); //---------------------------------------- /** making attributes out of name/value pairs */ string toAttribute(string inName, string inString); string toAttribute(string inName, int inInt); string toAttribute(string inName, double inFloat); // //---------------------------------------- // /** turning a relevance level element into a string */ // /** (obsolete) */ // string stringOfRelevanceLevelElement(const CRelevanceLevel& inRE, // double inUserRelevance=0.5); // string stringOfRelevanceLevelList(const CRelevanceLevelList& inRLL); //---------------------------------------- /** Error message */ int sendError(const string& inSession, const string& inMessage); //---------------------------------------- /** Opening a session */ void openSession(const string& inUserName, const string& inSessionName); /** renaming the current session */ void renameSession(const string& inSessionID, const string& inNewName); /** renaming the current session */ void deleteSession(const string& inName); /** Gets the property sheet contained in the algorithm with inAlgorithmID*/ void getPropertySheet(const string& inSessionID, const string& inAlgorithmID); //---------------------------------------- /** the handshake message (old MRML)*/ int sendHandshake(const string& inUser); /** getting the sessions for one user (new MRML)*/ void getSessions(const string& inUser); /** getting collections available on a system*/ void getCollections(); /** getting algorithms available on a system*/ void getAlgorithms(); //---------------------------------------- /** the result of a query */ int sendResult(const string& inSession, const CXMLElement& inRLL); //---------------------------------------- /** random images */ int sendRandomImages(const string& inSession, const string& inAlgorithm, const string& inCollection, const string& inNumberOfImages) ; ; //---------------------------------------- /** processing a query */ //---------------------------------------- CXMLElement* gQueryImages; string mSessionID; int mResultSize; double mCutoff; string mCollection; string mAlgorithm; //---------------------------------------- /** setting properties of the query */ void setResultSize(int inResultSize); void setResultCutoff(const string& inCutoff); void setResultCutoff(double inCutoff); void setCollectionID(const string& inID); void setAlgorithmID(const string& inID); //---------------------------------------- /** Start building a tree by successive adding of XML elements */ void startTreeBuilding(const char* inElementName, const char*const*const inAttributes); /** Start building a tree by successive adding of XML elements */ void addToCurrentTree(const char* inElementName, const char*const*const inAttributes); /** move up in the tree */ void moveUpCurrentTree(); /** is this building a tree at present? */ bool isBuildingTree()const; //---------------------------------------- /** parse XML using expat */ //---------------------------------------- void parseString(const string& inMessage); //---------------------------------------- /** Clear the algorithm tree element. We do not assume destruction responsability here This responsability is transferred to the containing session. FIXME do something cleaner for the case of failure */ void clearAlgorithmElement(); //---------------------------------------- /** start of an element in the tree of configured algorithms. If mAlgorithm=0 then generate a new XML element with the content given by inName and inAttributes @param inName The name like given by expat @param inAttributes an attributes list like given by expat */ //---------------------------------------- void startAlgorithmElement(const char* inName, const char* const* const inAttributes); //---------------------------------------- /** end of an element in the tree of configured algorithms */ //---------------------------------------- void endAlgorithmElement(); //---------------------------------------- /** clear the pointer to the algorithm tree */ //---------------------------------------- void initAlgorithmElement(); //---------------------------------------- /** read the pointer to the algorithm tree */ //---------------------------------------- CAlgorithm* readAlgorithmElement(); //---------------------------------------- /** End the configuration i.e. make out of the algorithm structure a query processing structure. */ void endConfiguration(); //---------------------------------------- /** parsing from a stream: * read each character * parse it */ bool mParsingFinished; void clearParsingFinished(); void setParsingFinished(); bool isParsingFinished()const; bool readAndParse(); void makeParser(); /** If we process multiple queries which are part of one message, we have to first collect the answers from the requests, and then send the whole message. startMultiRequest and endMultiRequest are the functions which administer this process. startMultiRequest clears the message which is going to be built and sets the language code */ void startMultiRequest(const string& inSessionID, const string& inLanguageCode="en"); /** sends the message which has been built*/ void endMultiRequest(); /** adds an XMLElement to the multi-response which is built */ void addToMultiResponse(CXMLElement* inElement); /** returns the currently valid SessionID */ const string getCurrentSessionID(); //---------------------------------------- /** Using the session manager which is a member */ /** of this for other purposes */ //---------------------------------------- CSessionManager& getSessionManager(); /** incrementing the QueryAtRandomCount flag */ void incrementQueryAtRandomCount(); /** reading this flag */ int getQueryAtRandomCount()const; /** set the name of the peer, this is just an informative string, destined for the log. The string can contain either the IP of the connecting computer, or else the peer credentials of the connecting tasks. */ void setPeerAddressString(string); /** get the Peer adress string */ const string& getPeerAddressString()const; //---------------------------------------- /** constructor/destructor */ //---------------------------------------- CCommunicationHandler(CSessionManager& inSessionManager, ofstream& inLogFile); ~CCommunicationHandler(); }; #endif gift-0.1.14/libMRML/include/stamp-h.in0000644000175200001440000000000010153634161014215 00000000000000gift-0.1.14/libMRML/include/CAccessorImplementation.h~0000644000175200001440000000771210153634161017457 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva 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 */ #ifndef _CACCESSORIMPLEMENTATION #define _CACCESSORIMPLEMENTATION #include "libMRML/include/uses-declarations.h" #include "libMRML/include/CMagic.h" #include #include "libMRML/include/TID.h" #include #include #include #ifdef HAS_HASH_MAP #include #else #define hash_map map #endif #include "libMRML/include/CAccessor.h" #include "libMRML/include/CAccessorElement.h" /** * * convenience typedef * */ class string_string_map:public map{ }; /** * * convenience typedef * */ class string_TID_map:public map{ }; /** * * convenience typedef * */ class TID_string_map:public map{ }; /** * * convenience typedef * */ class TID_CAccessorElement_map:public map{ }; /** * * CAccessorImplementation - a base class for everything * accessing a GIFT database. * at present this will be either an inverted file * or a TrackingGIFT accessor. * in the future this might be an SQL database or Monet?? * * * modification history: * * WM 19990804 created file * * * * compiler defines used: */ class CAccessorImplementation:public CAccessor{ protected: /**@name for fast access...*/ //@{ /** map the url of an image to the id of this image */ string_TID_map mURLToID; /** maps the ID of an image to the URL of this image */ TID_CAccessorElement_map mIDToAccessorElement; //@} public: /** * * Is this accessor up and working? * */ virtual operator bool()const=0; /** * * Translate a DocumentID to a URL (for output) * */ virtual string IDToURL(TID inID)const; /** * * Translate a DocumentID to an accessor Element * */ virtual pair IDToAccessorElement(TID inID)const; /** * * Translate an URL to its document ID * */ virtual pair URLToID(const string& inURL)const; /** * * This is useful for making lists of * which images are present in a database * etc. * */ /** List of the IDs of all documents present in the accessor file */ void getAllIDs(list&)const; /** List of triplets (ID,imageURL,thumbnailURL) of all the documents present in the inverted file */ void getAllAccessorElements(list&)const; /** get a given number of random AccessorElement's @param inoutResultList the list which will contain the result @param inSize the desired size of the inoutResultList */ void getRandomIDs(list&, list::size_type)const; /** For drawing random sets. Why is this part of an CAccessorImplementation? The way the accessor is organised might influence the way random sets can be drawn. At present everything happens in RAM, but we do not want to be fixed on that. @param inoutResultList the list which will contain the result @param inSize the desired size of the inoutResultList */ void getRandomAccessorElements(list& outResult, list::size_type inSize)const; /** The number of images in this accessor */ int size()const; //@} }; #endif gift-0.1.14/libMRML/include/CAttributeList.h0000644000175200001440000000633110220502730015373 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ #ifndef _CATTRIBUTELIST #define _CATTRIBUTELIST #include "libMRML/include/uses-declarations.h" #include #include #include #include "libMRML/include/CMagic.h" //#define _PRINTOUTS_AL /** a simple class destined to contain attribute-value pairs in an easily accessible fashion */ class CAttributeList:public map >,public CMagic{ public: /** */ void check()const; /** Get the keys of all attributes in this list*/ list getKeys()const; /** */ typedef map > CBase; /** from expat */ CAttributeList(const char* const * const inAttributeList); /** from other c++ */ CAttributeList(const list >& inAttributes); /** copy constructor */ CAttributeList(const CAttributeList& inList); /** finding in this*/ const_iterator find(string inString)const; /** adding an attribute */ void add(const string& inFirst, const string& inSecond); /** adding an attribute for integers using the function for strings */ void add(const string& inAttribute,long inValue); /** adding an attribute for doubles using using the function for strings */ void add(const string& inAttribute,double inValue); /** reading an attribute for booleans using stringReadAttribute it supports several pairs: yes/no true/false y/n */ pair boolReadAttribute(const string& inAttribute)const; /** reading an attribute for integers using stringReadAttribute */ pair longReadAttribute(const string& inAttribute)const; /** reading an attribute for doubles using stringReadAttribute */ pair doubleReadAttribute(const string& inAttribute)const; /** reading an attribute for strings All the attribute functions implement a primitive version of inheritance: We look also at the parents of this, if we do not find a given attribute in this. this is virtual in order to plug in other methods of inheritance */ virtual pair stringReadAttribute(const string& inAttribute)const; /** Outputting a string to XML */ void CAttributeList::toXML(string& outString)const; /** the destructor in the case of char* as content it deletes the arrays of char. */ ~CAttributeList(); }; #endif gift-0.1.14/libMRML/include/createErrorMessage.h0000644000175200001440000000240610220502730016252 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CREATEERRORMESSAGE #define _CREATEERRORMESSAGE class CXMLElement; class GIFTException; CXMLElement* createErrorMessage(const char* inErrorMessage); CXMLElement* createErrorMessage(const GIFTException& inException); CXMLElement* createErrorMessage(const GIFTException* inException); #endif gift-0.1.14/libMRML/include/CRelevanceLevel.h0000644000175200001440000000642610220502730015475 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /** * * CRELEVANCELEVEL * * * * modification history: * WM 1099 changed documentation fromat * HM 090399 created the documentation * WM 1098 created the file * * * compiler defines used: * * @author Wolfgang Mueller * */ #ifndef _CRELEVANCELEVEL #define _CRELEVANCELEVEL #include "libMRML/include/uses-declarations.h" #include #include #include "libMRML/include/TID.h" #include /** * Level of relevance given by the user to an image (URL) * This structure is used both for user given relevances as * well as for calculated relevances (scores). * * What do you think, folx? I think, that the relevance level * as it is, is too inflexible. We need to reflect a bit more * what is given by MRML. to be FIXME d * */ class CRelevanceLevel{ /** */ string mURL; /** */ double mRelevanceLevel; public: /** * * just used to be able to construct emtpy elements in * which to copy (STL) * */ CRelevanceLevel(); /** * * The constructor most frequently used. * */ CRelevanceLevel(const string& inURL, double inRelevanceLevel); /** * * copy constructor * */ CRelevanceLevel(const CRelevanceLevel& inElement); /** * * * binary input * */ bool input(istream& inStream); /** * * binary output * */ bool output(ostream& outStream)const; /** * * output as HTML * */ bool outputHTML(ostream& outStream)const; //@} /** * * Accessors * */ string getURL()const; /** * * * */ double getRelevanceLevel()const; /** * * * */ void setRelevanceLevel(const double inRelevanceLevel); /** * * * */ void adjustRelevanceLevel(const double inRelevanceLevel); /** * * * */ void divideRelevanceLevelBy(const double inDivisor); /** */ string toXML()const; }; /** * Default less operator for the CRelevanceLevel class. * Sorts by mRelevancelevel. For sorting in the STL. * */ bool operator<(const CRelevanceLevel& l, const CRelevanceLevel& t); /** sort CAccessorElements by their ID */ class CSortByURL_RL:public binary_function{ public: /** */ bool operator()(const CRelevanceLevel& l, const CRelevanceLevel& t)const; }; #endif gift-0.1.14/libMRML/include/CXMLElementBuilder.h0000644000175200001440000000277310220502730016063 00000000000000// -*- mode: c++ -*- #ifndef _CXMLELEMENTBUILDER #define _CXMLELEMENTBUILDER #include "libMRML/include/uses-declarations.h" /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include "libMRML/include/CXMLElement.h" #include "libMRML/include/CSelfDestroyPointer.h" // #define XEB_PRINTOUT // uncomment this to get debugging printouts /** This class builds an XML element from a string */ class CXMLElementBuilder{ public: /** construction */ CXMLElementBuilder(); /** this converts a string into an CXMLElement */ static CXMLElement* stringToElement(const string& inString); }; #endif gift-0.1.14/libMRML/include/uses-declarations.h0000644000175200001440000000236310220502730016117 00000000000000/* -*- mode: c++ -*- Path: ./libMRML/include/uses-declarations.h */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /* Author: Wolfgang Müller (via perl script) use namespace definitions for libMRML. to be included into all include files of this library */ #ifndef _LIBMRML_USES_DECLARATIONS_ #define _LIBMRML_USES_DECLARATIONS_ using namespace std; #endif gift-0.1.14/libMRML/include/CIDRelevanceLevelPair.h0000644000175200001440000000646210220502730016526 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CIDRELEVANCELEVELPAIR * **************************************** * * modification history: * *@Author Wolfgang Müller * **************************************** * * compiler defines used: * * ****************************************/ #ifndef _CIDRELEVANCELEVELPAIR #define _CIDRELEVANCELEVELPAIR #include "libMRML/include/uses-declarations.h" #include #include "libMRML/include/TID.h" #include #include /** Level of relevance given by the user to an image (URL) */ class CIDRelevanceLevelPair{ /** / */ int mID; /** / */ double mRelevanceLevel; public: /*************************************** * * * ***************************************/ /**@name Constructors*/ /** @{ */ /** / */ CIDRelevanceLevelPair(); /*************************************** * * * ***************************************/ /** / */ CIDRelevanceLevelPair(const TID inID, double inRelevanceLevel); /*************************************** * * * ***************************************/ /** / */ CIDRelevanceLevelPair(const CIDRelevanceLevelPair& inElement); /** @} */ /*************************************** * * * ***************************************/ /**@name Accessors*/ /** @{ */ TID getID()const; /*************************************** * * * ***************************************/ /** / */ double getRelevanceLevel()const; /*************************************** * * * ***************************************/ /** / */ void setRelevanceLevel(const double inRelevanceLevel); /*************************************** * * * ***************************************/ /** / */ void adjustRelevanceLevel(const double inRelevanceLevel); /*************************************** * * * ***************************************/ /** / */ void divideRelevanceLevelBy(const double inDivisor); /** @} */ }; class CSortByID_IRLP: public binary_function{ public: /** */ inline bool operator()(const CIDRelevanceLevelPair& l, const CIDRelevanceLevelPair& t){ return fabs(double(l.getID())) < fabs(double(t.getID())); }; }; /*************************************** * * * ***************************************/ bool operator<(const CIDRelevanceLevelPair& l, const CIDRelevanceLevelPair& t); #endif gift-0.1.14/libMRML/include/CAccessorAdminCollection.h0000644000175200001440000000662010220502730017324 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- Mode: c++ -*- #ifndef _CACCESSORCOLLECTION #define _CACCESSORCOLLECTION #include "libMRML/include/uses-declarations.h" #include #include "libMRML/include/CAccessorAdmin.h" class CXMLElement; /** This is in fact a collection of collections. The accessorcollection contains CAccessorAdmins */ class CAccessorAdminCollection{ /** A helper for building up an CXMLElement which will later serve as configuration for the new CAccessorAdmin */ CXMLElement* mCollectionInConstruction; public: /** this is mainly a map from string to accessor proxy we would like to destroy this in a decent way */ class CContent:public map{ public: /** */ ~CContent(); }; /** */ CContent mIDToProxy; /** */ CAccessorAdmin* mCurrentProxy; public: /** for easier read access from the outside */ typedef CContent::const_iterator const_iterator; protected: /** The accessor factory container: Turn a name into an accessor */ CSelfDestroyPointer mFactory; public: /** for reading all accessors*/ CContent::const_iterator begin()const; /** for reading all accessors*/ CContent::const_iterator end()const; /** The Accessor collection gets its configuration out of the same file as the CSessionManager */ CAccessorAdminCollection(string inFileName); /** add an accessor to a collection to our list of proxies. */ void addCollection(CXMLElement* inCollectionElement); /** get a collection configuration element by its ID */ const CXMLElement* getCollectionElement(string inID)const; /** get a collection configuration element by its ID */ const CXMLElement* getQueryParadimList(string inID)const; /** get the proxy on which is presently worked on */ CAccessorAdmin& getCurrentProxy(); /** get a proxy for a given collectionID if this collection is unknown, give back the first collection in the stack */ CAccessorAdmin& getProxy(const string& inID); /** simply take the first.*/ string getDefaultAccessorID()const; /** some tags plus our content */ string toXML(bool isPrivate=false)const; /** The content of this as an CXMLElement */ CXMLElement* toXMLElement()const; /** get the XMLElement in construction */ CXMLElement* getCollectionInConstruction(); /** set the element */ void startCollectionConstruction(CXMLElement* inRoot); }; #endif gift-0.1.14/libMRML/include/CQuery.h0000644000175200001440000001274510220502730013707 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #include "libMRML/include/CAccessorElement.h" #include "libMRML/include/CXMLElement.h" /** * * CQuery.h * (abstract) parent of query structures. * Goal of this structure is to process a query * and to digest within--session feedback * this tries not to contain anything application * specific * * * * modification history: * * WM 19990805 creation * * * * compiler defines used: * _CQUERY avoids double inclusion * */ #ifndef _CQUERY #define _CQUERY #include "libMRML/include/uses-declarations.h" #include #include #include "libMRML/include/CSelfDestroyPointer.h" #include "libMRML/include/CIDRelevanceLevelPairList.h" #include "libMRML/include/CXMLElement.h" //#include "CWeightingFunctionPointerList.h" //#include "CWeightingFunctionPointerHash.h" #include "libMRML/include/CAlgorithm.h" #include "libMRML/include/CAccessor.h" #include "libMRML/include/CAccessorAdminCollection.h" #include "libMRML/include/CAccessorAdmin.h" #include "libMRML/include/CMagic.h" //public CMagic class CScoreBoard; class CAccessor; /** The Query manager for Queries on inverted Files */ class CQuery:public CMagic{ protected: /** needed to translate URLs to IDs this is a pointer, only because we cannot change references it does not imply any destruction responsability */ CAccessor* mAccessor; /** This is where the the Accessor comes from. Also the AccessorAdmin is not to be deleted by this. */ CAccessorAdmin* mAccessorAdmin; /** Where to get CAccessorAdmins from. */ CAccessorAdminCollection* mAccessorAdminCollection; /** the structure containing everything we know about the algorithm used do not destroy this */ CAlgorithm* mAlgorithm; /** A child of this. We want to store the child together with a weight. */ class lCChild{ public: /** the child itself */ CQuery* mQuery; /** the weight */ double mWeight; }; /** type for children of this */ typedef list lCChildren; /** The children of this. */ lCChildren mChildren; protected: /** * * Initializer, used by both construcors * */ virtual void init()=0; public: /** * * default constructor * */ CQuery(); /** * * destructor * */ virtual ~CQuery(); /** * * this constructor takes all the information ANY CQuery needs * to configure itself. * * inAccessorAdminCollection The CQuery needs to know where to get the right * accessor from. * inAlgorithm This structure contains all the information * about the algorithm, including which accessor * to get. * */ CQuery(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm); /** adding a child to this. We expect children to be nonzero and initialised when they are entered. *this assumes no destruction responsabilities for the entered data. */ void addChild(CQuery* inChild, double inWeight=1); /** * * do a query * */ virtual CXMLElement* query(const CXMLElement& inQuery); /** * * @short a query which returns ID/RelevanceLevel pairs instead of * instead of URL/RelevanceLevel pairs * */ virtual CIDRelevanceLevelPairList* fastQuery(const CXMLElement& inQuery, int inNumberOfInterestingImages, double inDifferenceToBest)=0; /** * * get some random images (handed through to accessor) * */ virtual CXMLElement* getRandomImages(int inNumberOfInterestingImages)const; /** * * get some random images (handed through to accessor) * */ virtual CIDRelevanceLevelPairList* getRandomIDs(int inNumberOfInterestingImages)const; /** * * get the IDs of all images (handed through to accessor) * */ virtual list* getAllIDs()const; /** * * get the IDs of all images (handed through to accessor) * */ virtual list* getAllAccessorElements()const; /** * * set the Algorithm. * set a new algorithm. Build a new query if necessary. * */ virtual bool setAlgorithm(CAlgorithm& inAlgorithm); /** * * get the Algorithm. * same scheme as in setCollection * */ const CAlgorithm& getAlgorithm()const; /** it might be necessary to wait until all the children are added before ending the initialisation phase. This function is called by CAlgorithm. */ virtual void finishInit(); }; /* end of class */ #endif gift-0.1.14/libMRML/include/CQParallel.h0000644000175200001440000001455310220502730014456 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CQPARALLEL #define _CQPARALLEL #include "libMRML/include/uses-declarations.h" #include "libMRML/include/CQuery.h" #include "libMRML/include/CSelfDestroyPointer.h" // -*- mode: c++ -*- /** * * CQParallel.h * A CQuery structure which has several children * and uses them in parallel * PARALLEL THIS IS NOT YET DONE * * * * modification history: * * WM 19991125 creation * * * * compiler defines used: * _CQPARALLEL avoids double inclusion * */ #include #include #include #include "libMRML/include/CSelfDestroyPointer.h" #include "libMRML/include/CIDRelevanceLevelPairList.h" #include "libMRML/include/CRelevanceLevelList.h" //#include "CWeightingFunctionPointerList.h" //#include "CWeightingFunctionPointerHash.h" #include "libMRML/include/CAlgorithm.h" #include "libMRML/include/CAccessor.h" #include "libMRML/include/CAccessorAdminCollection.h" #include "libMRML/include/CAccessorAdmin.h" class CScoreBoard; class CAccessor; /** FIXME: The name WRONGLY suggests that this actually does parallel processing. It should be relatively quick to add, it is intendend, but it is not yet done. This is going to be one of our main building blocks. It is a structure which contains a couple of CQuery structures, hands a query through to them, and then unifies the result. In fact this is the center of all this query tree business. Probably we will put another layer into the class tree: The CQTreeNode, but let's first start. Important: The basic assumption here is, that all children operate on the same collections. If this is not the case we have to be more careful, and most of all: we have to operate using URLs. @Author: Wolfgang Müller */ class CQParallel:public CQuery{ /** We need this because we cannot use this just when constructing, but we have to use it in finishInit */ CAccessorAdminCollection& mAccessorAdminCollection; /** used in CLocalAccessorMap */ class lCLocalAccessor{ public: /** */ CAccessor* mAccessor; /** */ CAccessorAdmin* mAccessorAdmin; /** */ list mUsedBy; /** */ CSelfDestroyPointer > mUnifiedResults; /** */ double mWeightedSum; /** the constructor initialises everything in the simplest possible way */ lCLocalAccessor(); /** the destructor just frees the accessor by calling close on the proxy. */ ~lCLocalAccessor(); }; /** Main idea of this class is to translate URLs from each collection involved into IDs. For this I need an accessor for each collection. Some of these collections might have the same accessors. So I look at the algorithm of each child to find out which accessor to use for which fast query. In the end I can iterate over collections, unify each result, and then have a unification of results based on URLs in the end. */ class lCLocalAccessorMap:public map{ public: }; /** do not confuse with mAccessor. This is the accessor list we talked about before */ lCLocalAccessorMap mAccessors; protected: /** * * Initializer, used by both construcors * */ virtual void init(); public: /** * * we need to unregister the accessors used * */ ~CQParallel(); /** * In fact, what we are doing here is to get ourselves * an accessor ACURL2FTS to do a proper fastQuery */ CQParallel(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm); /** * * calls fastQuery for every child, merges the results * and translates them back into URLs * difficulty: take into account that each child might operate * on a different collection. * */ virtual CXMLElement* query(const CXMLElement& inQuery, int inNumberOfInterestingImages, double inDifferenceToBest); /** * FIXME: useless in current scenario. * * Generally using IDs instead of URLs (for keeping communication * overhead low, when doing things like CORBA). * * in this case we simply hand things through. * this might be some kind of "take it and translate it" thing. * however, at present we save the work. * */ virtual CIDRelevanceLevelPairList* fastQuery(const CXMLElement& inQuery, int inNumberOfInterestingImages, double inDifferenceToBest); /** * * get some random images * */ virtual CXMLElement* getRandomImages(int inNumberOfInterestingImages)const; /** * * get the IDs of all images (handed through to accessor) * */ virtual list* getAllIDs()const; /** * * get the IDs of all images (handed through to accessor) * */ virtual list* getAllURLs()const; /** * * get the IDs of all images (handed through to accessor) * */ virtual list >* getAllIDURLPairs()const; /** * * set the Algorithm. * same scheme as in setCollection * */ virtual bool setAlgorithm(CAlgorithm& inAlgorithm); /** it might be necessary to wait until all the children are added before ending the initialisation phase. This function is called by CAlgorithm. What we are doing here is to find out the necessary accessor information for each child, and construct an accessor for it. */ void finishInit(); }; /* end of class */ #endif gift-0.1.14/libMRML/include/CXMLElement.h0000644000175200001440000001556010220502730014552 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /* -*- Mode: c++ -*- */ /* the tag above is for making xemacs find the right mode for this file (avoids typing M-x c++-mode M-x font-lock-mode M-x font-lock-mode) */ #ifndef _CXMLElement #define _CXMLElement #include "libMRML/include/uses-declarations.h" #include #include #include #include "libMRML/include/CMagic.h" #include "libMRML/include/CAttributeList.h" class CXMLElementVisitor; #include "libMRML/include/CMutex.h" #include "libMRML/include/CNoDelete.h" //debugging /** This class captures the structure of an XML element. An Element has children and attributes. The way a Document tree is built: AddChildToCurrent: Adds a child, AND MAKES THE CHILD THE NEW CURRENT NODE. moveUp: Makes the father the new current node. @author Wolfgang Müller */ class CXMLElement:public CMagic,public CNoDelete{ public: /** a typedef for simple convenience */ typedef list lCChildren; protected: /** the father of this*/ CXMLElement* mFather; /** The child-grandchild-etc. which has just been inserted */ CXMLElement* mCurrentChild; protected: /** a list containing the children of this element*/ lCChildren mChildren; /** the content: attributes */ CAttributeList mAttributes; /** the name of this element */ string mName; /** change the father of this */ void setFather(CXMLElement*); /** The text/CData contained in this element FIXME: look at zero characters */ string mText; /** The kind of this node: Stroustrup would kill me for that, but I think doing some inheritance here is not really what I want, so I do some if-ing */ const int mTypeOfNode; public: /** This constant is destined to be a value of mTypeOfNode */ static int const cTextNode; /** This constant is destined to be a value of mTypeOfNode */ static int const cElementNode; public: /** read the father of this */ CXMLElement* getFather()const; /** adding an attribute for integers using the function for strings */ void addAttribute(const string& inAttribute,long inValue); /** adding an attribute for doubles using using the function for strings */ void addAttribute(const string& inAttribute,double inValue); /** adding an attribute */ void addAttribute(const string& inAttribute,const string& inValue); /** reading an attribute for booleans using stringReadAttribute it supports several pairs: yes/no true/false y/n */ pair boolReadAttribute(const string& inAttribute)const; /** reading an attribute for integers using stringReadAttribute */ pair longReadAttribute(const string& inAttribute)const; /** reading an attribute for doubles using stringReadAttribute */ pair doubleReadAttribute(const string& inAttribute)const; /** reading an attribute for strings All the attribute functions implement a primitive version of inheritance: We look also at the parents of this, if we do not find a given attribute in this. this is virtual in order to plug in other methods of inheritance */ virtual pair stringReadAttribute(const string& inAttribute)const; /** clone this element with all its content @parameter inDeep if true, this function clones deeply, i.e. children will be cloned, instead of just cloning the pointers to the children and the attributes. */ CXMLElement* clone(bool inDeep=true)const; /** Convert this into an XML string */ void toXML(string& outString,const int=0)const; /** Visit the subtree using a visitor */ void traverse(CXMLElementVisitor& inoutVisitor)const; /** Visit the subtree using a visitor (non-const version) */ void traverse(CXMLElementVisitor& inoutVisitor); /** For interoperating with the STL */ list::const_iterator child_list_begin()const; /** For interoperating with the STL */ list::const_iterator child_list_end()const; /** For interoperating with the STL */ list::iterator child_list_begin(); /** For interoperating with the STL */ list::iterator child_list_end(); /** Like above. Hovewer, here we would like to add anything inherited from CXMLElement. */ virtual void addChild(CXMLElement* inChild); /** Add a child with the given attributes to the current node, and MAKE THIS CHILD THE NEW CURRENT NODE. */ virtual void addChild(const string&, const char* const* const inAttributeList=0); /** make the father of the current node the new current node. */ void moveUp(); /** A subtree is finished if the current child is identical with itself */ bool isSubtreeFinished()const; /** Constructing this from a list which is built from what we get from expat */ CXMLElement(const string&, const char* const* const inAttributeList=0); /** delete this by first deleting the children */ virtual ~CXMLElement(); /** Constructing a text node from what expat gives us */ CXMLElement(const int inType, const string&); /** Constructing this from more c++-like structures */ CXMLElement(const string& inString, const list< pair >& inList); /** Constructing this from more c++-like structures */ CXMLElement(const string& inString, const CAttributeList& inList); /** Make this a deep copy of the input */ CXMLElement(const CXMLElement& in); /** For doing flat configuration, we need to find out all attributes which are visible in this algorithm */ list >* createNamedValueList()const; /** get the text of this */ string getText()const; /** get the name of this */ string getName()const; /** get the name of this */ int getTypeOfNode()const; /** get the number of attributes in this */ int getNumberOfAttributes()const; /** checks consistency of attributes */ void check()const; }; #endif gift-0.1.14/libMRML/include/mrml_const.h0000644000175200001440000001260410220502730014646 00000000000000 #ifndef _MRML_CONST #define _MRML_CONST //Automatically generated from the dtd by gift-dtd-to-keywords #include using namespace std; class mrml_const { public: static const string coords; static const string acknowledge_session_op; static const string algorithm; static const string algorithm_id; static const string algorithm_list; static const string algorithm_name; static const string algorithm_type; static const string allows_children; static const string auto_id; static const string auto_id_name; static const string box; static const string calculated_similarity; static const string calendar_time; static const string caption; static const string close_session; static const string collectiom_id; static const string collection; static const string collection_id; static const string collection_list; static const string collection_name; static const string command; static const string configuration_description; static const string configure_session; static const string cui_algorithm_id; static const string cui_algorithm_id_list; static const string cui_algorithm_id_list_id; static const string cui_algorithm_id_list_list; static const string cui_base_dir; static const string cui_base_type; static const string cui_block_color_blocks; static const string cui_block_color_histogram; static const string cui_block_texture_blocks; static const string cui_block_texture_histogram; static const string cui_configuration; static const string cui_distance_matrix_location; static const string cui_feature_description_location; static const string cui_feature_file_location; static const string cui_generate_inverted_file; static const string cui_hierarchy_file_location; static const string cui_hierarchy_up; static const string cui_ihandshake; static const string cui_in_memory; static const string cui_inverted_file_location; static const string cui_offset_file_location; static const string cui_pr_modulo; static const string cui_pr_modulo_class; static const string cui_pr_percentage_of_features; static const string cui_pr_score_board_reduced_at; static const string cui_pr_score_board_reduced_to; static const string cui_pr_time_cutoff_point; static const string cui_property_item; static const string cui_property_item_id; static const string cui_property_list; static const string cui_property_sheet_id; static const string cui_random_images; static const string cui_shandshake; static const string cui_sql_database_name; static const string cui_sql_host; static const string cui_sql_password; static const string cui_sql_username; static const string cui_text_query; static const string cui_time_stamp; static const string cui_weight; static const string cui_weighting_function; static const string defaultstate; static const string delete_session; static const string dim; static const string error; static const string from; static const string get_algorithms; static const string get_collections; static const string get_configuration; static const string get_property_sheet; static const string get_segment_by_url; static const string get_segment_by_url_list; static const string get_sessions; static const string image_location; static const string max_subset_size; static const string message; static const string min_subset_size; static const string mrml; static const string open_session; static const string password; static const string poly; static const string property_sheet; static const string property_sheet_id; static const string property_sheet_type; static const string query_paradigm; static const string query_paradigm_id; static const string query_paradigm_list; static const string query_result; static const string query_result_element; static const string query_result_element_list; static const string query_result_element_segment; static const string query_result_element_segment_list; static const string query_step; static const string query_step_id; static const string query_string; static const string query_type; static const string rename_session; static const string result_cutoff; static const string result_size; static const string segmenet_id; static const string segment_id; static const string send_name; static const string send_type; static const string send_value; static const string session; static const string session_id; static const string session_list; static const string session_name; static const string step; static const string steps; static const string thumbnail_location; static const string to; static const string transaction_id; static const string user_data; static const string user_name; static const string user_relevance; static const string user_relevance_element; static const string user_relevance_element_list; static const string user_relevence; static const string user_segmented_element; static const string user_segmented_element_list; static const string visibility; }; #endif gift-0.1.14/libMRML/include/CDynamicQueryFactory.h0000644000175200001440000000343210220502730016535 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CDYNAMICBASETYPEFACTORY #define _CDYNAMICBASETYPEFACTORY #include "libMRML/include/uses-declarations.h" #include // reading a directory #include // reading a directory #include // dynamic linking #include // screen output #include #include #include "libMRML/include/CStaticQueryFactory.h" #include "libMRML/include/CQueryPlugin.h" class CDynamicQueryFactory:public CStaticQueryFactory,protected map{ public: /** makes a query of a given BaseType (i.e. name) */ CQuery* makeQuery(const string & inBaseType, CAccessorAdminCollection & inAccessorAdminCollection, CAlgorithm & inAlgorithm); /** constructor: scans a given directory for plugins*/ CDynamicQueryFactory(string inDirectoryName); }; #endif gift-0.1.14/libMRML/include/CSessionManager.h~0000644000175200001440000003422710153634161015726 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva 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 */ // -*- mode: c++ -*- #ifndef _CSESSIONMANAGER #define _CSESSIONMANAGER #include "libMRML/include/uses-declarations.h" #include #include #include #include #include "libMRML/include/CXMLElement.h" #include "libMRML/include/CAccessorAdminCollection.h" #include "libMRML/include/CI18nTranslator.h" #include "libMRML/include/CAlgorithm.h" #include "libMRML/include/CPropertySheetList.h" #include "libMRML/include/CAccessorElement.h" #include "libMRML/include/CAlgorithmCollection.h" #include "libMRML/include/CQueryTreeBuilder.h" #include "libMRML/include/CMutex.h" // multithreading class CStaticQueryFactory; class CAlgorithm; class CSessionManager; class CQueryTreeNode; class CStaticQueryFactory; /** A class containing a session. * At present a session is just * a quite rudimentary container * for an algorithm. * * Later we hope to make sessions * persistent (using blobs in * msql, for example). * * * ATTENTION MULTITHREADING: * WHAT TO LOCK AND WHAT TO UNLOCK IS NOT ENTIRELY TRIVIAL * THIS MIGHT BE A SOURCE OF MISTAKES * * @author Wolfgang Müller */ class CSession{ protected: /** the mutex for this session */ CMutex mMutexSession; /** */ list mLanguages; /** */ bool mIsOpen; /** */ string mUser; /** */ string mID; /** * the name of this session */ string mSessionName; /** The algorithm used for the next query * At present this fully describes a session */ CAlgorithm* mActiveAlgorithm; /** The information about the current query tree */ pair mQueryTree; /** */ static CQueryTreeBuilder mQueryTreeBuilder; public: //-------------------------------------------------- /** Constructors */ CSession(); /** */ CSession(string inUser, string inID, string inSessionName, CAlgorithm* inActiveAlgorithm ); /** destroys all members */ ~CSession(); //-------------------------------------------------- /** Read the state */ ostream& write(ostream& outStream)const; /** Write the state */ istream& read(istream& inStream); //-------------------------------------------------- /** get user of this session */ string getUser()const; /** set user of this session */ void setUser(const string& inUser); /** set ID of this session */ string getID()const; /** get ID of this session */ void setID(const string& inID); /** get the displayname of this session */ string getSessionName()const; /** set the displayname of this session */ void setSessionName(const string& inSessionName); /** get the algorithm of this session */ CAlgorithm* getActiveAlgorithm(); /** set the algorithm of this session. in fact this amounts to building a complete query tree. We also would like to do a bit of tree matching to see, how much of the query we can rescue after reconfiguration. */ bool setActiveAlgorithm(CAccessorAdminCollection& inCaller, CAlgorithmCollection& inAlgorithmCollection, CAlgorithm* inActiveAlgorithm, CStaticQueryFactory& inBaseTypeFactory); /** set the collection of this session */ //string getActiveCollection()const; /** get the collection of this session */ // void setActiveCollection(const string& inCollection); //-------------------------------------------------- /** * performing a query * * Gets from the current algorithm the right inSubAlgorithm, * from that the right CQuery and hands parameters through to it. */ CXMLElement* query(CSessionManager& inCaller, const CXMLElement& inQuery); //-------------------------------------------------- /** retrieving random images as seeds */ CXMLElement* getRandomImages(CSessionManager& inCaller, const string& inAlgorithm, int inResultSize); //-------------------------------------------------- /** opening this session. This implements a lock, such that one user can have several open session which do not interfere. The return value tells the use if the open was successful (true) */ bool open(); //-------------------------------------------------- /** Closing this session */ bool close(); //-------------------------------------------------- /** Renaming this session (calls setSessionName, at present) */ bool rename(const string& inName); /** the list of preferred languages of this is cleared */ void CSession::clearLanguages(); /** one language code is added at the back of the list of preferred languages */ void CSession::addLanguage(string inLanguageCode); /** get the preferred languages of this session */ list CSession::getLanguages()const; //-------------------------------------------------- /** generating XML output for configuration/shandshake */ string toXML(bool isPrivate)const; }; /** This structure handles the sessions; by this, it encapsulates the current state of the server. Basically, it hands all requests through to the right sessions. It also handles the generation of new sessions etc.. In short, it is the configuration manager. This class is now approaching what I would like it to be, however, cleaning is always wellcome ATTENTION MULTITHREADING: WHAT TO LOCK AND WHAT TO UNLOCK IS NOT ENTIRELY TRIVIAL THIS MIGHT BE A SOURCE OF MISTAKES */ class CSessionManager:public CAlgorithmCollection //,public CAlgorithmIDListList { /** the mutex for this sessionmanager */ CMutex mMutexSessionManager; protected: /** The accessor collection is needed for constructing queries */ CAccessorAdminCollection mAccessorAdminCollection; /** The Translator for this */ CI18nTranslator mI18nTranslator; /** point the user to all the sessions */ typedef map > CUserToSessions; /** */ typedef map CIDToSession; /** */ mutable CUserToSessions mUserToSessions; /** */ mutable CIDToSession mIDToSession; /** These are the building blocks of the property sheets to be generated by *this. */ CPropertySheetList* mPropertySheetList; /** The subtree from which the mPropertySheets will be built */ CXMLElement* mPropertySheetSubtree; /** The base type factory is a factory for query base types */ CStaticQueryFactory* mBaseTypeFactory; public: /** The session manager slurps in two XML files and generates out of this its initial state. */ CSessionManager(string inSessions, string inConfiguration, string inI18nFileName); //---------------------------------------- /** *this CSessionManager has all the information to make a query structure. */ CQuery* makeQuery(const string& inBaseType, CAlgorithm& inAlgorithm); //---------------------------------------- /** Initialization: read from a stream */ istream& read(istream&); /** Write into a stream*/ ostream& write(ostream&); //---------------------------------------- /** to be used by the Interface. Not yet implemented. */ CXMLElement* openSession(string inUserName, string inSessionID, string inSessionName); //---------------------------------------- /** to be used by the Interface. Not yet implemented. */ CXMLElement* renameSession(string inSessionID, string inSessionName); /** to be used by the Interface. Not yet implemented.*/ CXMLElement* deleteSession(string inSessionID); /** Closes the session, but keeps it in memory. FUTURE: put the state of the session into a blob */ CXMLElement* closeSession(string inSessionID); /** VeryImportantFunction: This function looks for a CSession with CSession::mSessionID==inSessionID and hands through the rest of the parameter list to CSession::query. */ CXMLElement* query(const string& inSessionID, const CXMLElement& inRelevanceLevelList); //-------------------------------------------------- /** retrieving random images (as seeds for subsequent searches) *@param inSessionID The ID of the session in which the * request was issued. *@param inAlgorithm One would think this is not needed when * retrieving random images. However, it is * useful to know the collection involved, * and if the random images we are retrieving * will fit the algorithm used later. *@param inCollection The collection from which random images will * be retrieved. */ CXMLElement* getRandomImages(const string& inSessionID, const string& inAlgorithm, int inResultSize); //-------------------------------------------------- /** retrieving the URLs of all images (for generating distance matrices) */ list* getAllAccessorElements(const string& inSessionID, const string& inAlgorithm ); //-------------------------------------------------- /** retrieving the IDs of all images (for generating distance matrices) */ list* getAllIDs(const string& inSessionID, const string& inAlgorithm ); //---------------------------------------- /** set the algorithm used in this session it will also lead to a new construction of the query. We have to perform some comparisons here present version is probably a HACK */ bool setAlgorithm(const string& inSessionID, CAlgorithm* inAlgorithm); /** making a new session and returning its ID */ string newSession(const string& inUser, const string& inSessionName); /** making a new session and for a given ID, returnig the ID */ string newSession(const string& inID, const string& inUser, const string& inSessionName); /** Set the name of the current session. Presently not implemented or tested*/ void setSessionName(const string& inOldSessionName, const string& inNewSessionName); //---------------------------------------- /** turn this into a part of the welcome message in fact, this generates standard property sheets out of the collections and algorithms available It means: 1. Make out of each algorithm in the collection a property sheet. 2. Make out of the algorithm-id-list-list a property sheet with a parent node which does not send messages. 3. Make out of the collection list a choice of collections, each having as a child a property sheet out of 2. If we do things this way we are losing a bit of the flexibility given in the property sheet specification. However, for the moment I (WM) consider this loss nost as big compared to what we earn in terms of configuration of the system. If necessary recode. string convertPropertyToXML(bool isPrivate=false)const; THIS IS DEPRECATED STUFF, SO IT'S DELETED NOW! */ //---------------------------------------- /** turn this into a part of the welcome message THIS CODE IS TO LEAVE SOON */ string toXML(bool isPrivate=false)const; /** The sessions for one user only. * *@param inUser the name of the user for which we want the session names. *@param isPrivate send internal configuration information along? * (distinction between messages for internet and config * files) */ string toXMLSessions(const string& inUser, bool isPrivate=false)const; /** The sessions for everybody known to the system */ string toXMLSessionConfiguration()const; /** this is almost the complete shandshake message */ pair toXMLHandshake(const string& inUser); /** Get the property sheet of the algorithm with ID inAlgorithmID. We look for the attribute cui-property-sheet-id in the algorithm. If this exsists, we look for the right property sheet id in the CPropertySheetList. */ CXMLElement* getPropertySheet(string inSessionID, string inAlgorithmID)const; //---------------------------------------- /** Building a property sheet list I consider building a list on a call by call basis as tedious. So what I do is: I first build a tree, and then I break down this tree into our list. This function makes a new tree */ void startPropertySheetSubtree(); /** This function gets us the current property sheet subtree. */ CXMLElement* getPropertySheetSubtree(); /** This function does the actual breaking down into a CPropertySheetList. */ void endPropertySheetSubtree(); /** This function probably will quite soon be removed from this class, and it will become part of a class containing the CSessionManager*/ CXMLElement* getCollections()const; /** This function probably will quite soon be removed from this class, and it will become part of a class containing the CSessionManager*/ CXMLElement* getAlgorithms()const; /** i18n clear the preferred languages list of a given session */ bool clearSessionLanguages(const string& inSessionID); /** i18n: add one language code to the list of preferred languages */ bool addSessionLanguage(const string& inSessionID, const string& inLanguageCode); /** i18n: get the list of preferred languages of this session */ list getSessionLanguages(const string& inSessionID)const; }; #endif gift-0.1.14/libMRML/include/CXMLElement.h~0000644000175200001440000001525010153634161014755 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva 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 */ /* -*- Mode: c++ -*- */ /* the tag above is for making xemacs find the right mode for this file (avoids typing M-x c++-mode M-x font-lock-mode M-x font-lock-mode) */ #ifndef _CXMLElement #define _CXMLElement #include "libMRML/include/uses-declarations.h" #include #include #include #include "libMRML/include/CMagic.h" #include "libMRML/include/CAttributeList.h" class CXMLElementVisitor; #include "libMRML/include/CMutex.h" #include "libMRML/include/CNoDelete.h" //debugging /** This class captures the structure of an XML element. An Element has children and attributes. The way a Document tree is built: AddChildToCurrent: Adds a child, AND MAKES THE CHILD THE NEW CURRENT NODE. moveUp: Makes the father the new current node. @author Wolfgang Müller */ class CXMLElement:public CMagic,public CNoDelete{ public: /** a typedef for simple convenience */ typedef list lCChildren; protected: /** the father of this*/ CXMLElement* mFather; /** The child-grandchild-etc. which has just been inserted */ CXMLElement* mCurrentChild; protected: /** a list containing the children of this element*/ lCChildren mChildren; /** the content: attributes */ CAttributeList mAttributes; /** the name of this element */ string mName; /** change the father of this */ void setFather(CXMLElement*); /** The text/CData contained in this element FIXME: look at zero characters */ string mText; /** The kind of this node: Stroustrup would kill me for that, but I think doing some inheritance here is not really what I want, so I do some if-ing */ const int mTypeOfNode; public: /** This constant is destined to be a value of mTypeOfNode */ static int const cTextNode; /** This constant is destined to be a value of mTypeOfNode */ static int const cElementNode; public: /** read the father of this */ CXMLElement* getFather()const; /** adding an attribute for integers using the function for strings */ void addAttribute(const string& inAttribute,long inValue); /** adding an attribute for doubles using using the function for strings */ void addAttribute(const string& inAttribute,double inValue); /** adding an attribute */ void addAttribute(const string& inAttribute,const string& inValue); /** reading an attribute for booleans using stringReadAttribute it supports several pairs: yes/no true/false y/n */ pair boolReadAttribute(const string& inAttribute)const; /** reading an attribute for integers using stringReadAttribute */ pair longReadAttribute(const string& inAttribute)const; /** reading an attribute for doubles using stringReadAttribute */ pair doubleReadAttribute(const string& inAttribute)const; /** reading an attribute for strings All the attribute functions implement a primitive version of inheritance: We look also at the parents of this, if we do not find a given attribute in this. this is virtual in order to plug in other methods of inheritance */ virtual pair stringReadAttribute(const string& inAttribute)const; /** clone this element with all its content @parameter inDeep if true, this function clones deeply, i.e. children will be cloned, instead of just cloning the pointers to the children and the attributes. */ CXMLElement* clone(bool inDeep=true)const; /** Convert this into an XML string */ void toXML(string& outString,const int=0)const; /** Visit the subtree using a visitor */ void traverse(CXMLElementVisitor& inoutVisitor)const; /** For interoperating with the STL */ list::const_iterator child_list_begin()const; /** For interoperating with the STL */ list::const_iterator child_list_end()const; /** For interoperating with the STL */ list::iterator child_list_begin(); /** For interoperating with the STL */ list::iterator child_list_end(); /** Like above. Hovewer, here we would like to add anything inherited from CXMLElement. */ virtual void addChild(CXMLElement* inChild); /** Add a child with the given attributes to the current node, and MAKE THIS CHILD THE NEW CURRENT NODE. */ virtual void addChild(const string&, const char* const* const inAttributeList=0); /** make the father of the current node the new current node. */ void moveUp(); /** A subtree is finished if the current child is identical with itself */ bool isSubtreeFinished()const; /** Constructing this from a list which is built from what we get from expat */ CXMLElement(const string&, const char* const* const inAttributeList=0); /** delete this by first deleting the children */ virtual ~CXMLElement(); /** Constructing a text node from what expat gives us */ CXMLElement(const int inType, const string&); /** Constructing this from more c++-like structures */ CXMLElement(const string& inString, const list< pair >& inList); /** Constructing this from more c++-like structures */ CXMLElement(const string& inString, const CAttributeList& inList); /** Make this a deep copy of the input */ CXMLElement(const CXMLElement& in); /** For doing flat configuration, we need to find out all attributes which are visible in this algorithm */ list >* createNamedValueList()const; /** get the text of this */ string getText()const; /** get the name of this */ string getName()const; /** get the name of this */ int getTypeOfNode()const; /** get the number of attributes in this */ int getNumberOfAttributes()const; /** checks consistency of attributes */ void check()const; }; #endif gift-0.1.14/notice.pre-pl0000644000175200001440000000163110153634162012051 00000000000000#!/usr/bin/perl -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 gift-0.1.14/notice.pre-pm0000644000175200001440000000163110153634162012052 00000000000000#!/usr/bin/perl -w # -*- mode: perl -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 gift-0.1.14/configure.in0000644000175200001440000003522010217500317011754 00000000000000dnl -*- mode: autoconf -*- dnl GIFT, a flexible content based image retrieval system. dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl dnl automake configuration for dnl the GIFT system dnl dnl Author: Wolfgang Müller dnl dnl Process this file with autoconf to produce a configure script. dnl dnl FROM_CODE=UTF-8 dnl AC_SUBST(FROM_CODE) dnl TO_CODE=`perl gift-heuristic-get-encoding-used.pl` dnl AC_SUBST(TO_CODE) AC_INIT(libMRML/cc/CAccessorFactory.cc) dnl old position of AC_ARG_ENABLE(interactive) AM_INIT_AUTOMAKE(gift,0.1.14) dnl this version seems to work for sebastian AM_CONFIG_HEADER(gift-config.h) AC_ISC_POSIX dnl Checks for programs. AC_C_CONST AC_EXEEXT AC_LANG_CPLUSPLUS AC_PROG_CC AC_PROG_CXX AC_PROG_RANLIB AC_LIBTOOL_DLOPEN AC_LIBLTDL_CONVENIENCE AC_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) AC_CHECK_LIB(expat,XML_ParserCreate) dnl ,[EXPAT=yes] #check if image magick is there by checking if the convert tool is there AC_PATH_PROG(MAGICK,convert) #check if there is perl on this system AC_PATH_PROG(PERL,perl) if perl gift-check-perl-config.pl "XML::DOM" "XML::XQL" "XML::XQL::DOM" "Text::Iconv" "HTTP::Request" "XML::Parser"; then echo "Your perl setup seems to be OK for running the GIFT" ; else AC_MSG_ERROR([There are some modules missing from your perl configuration. Please see the output above.]) fi AC_ARG_WITH(mysql, [ --with-mysql=directory DEFAULT: ${HOME}/gift-mysql ++ note, this feature is not yet used ++ gift will install a mysql database using the command mysql_install_db. The database will reside in the directory given in the option. The database will be used for purposes like user authentification. NOTE: in contrast to normal mysql databases, this database will be readable only by the user who compiled the gift. ],[ GIFT_MYSQL_DIR=[${HOME}/gift-mysql] ],[ GIFT_MYSQL_DIR=[${with_MYSQL:-${HOME}/gift-mysql}] ]) AC_SUBST(GIFT_MYSQL_DIR) AC_ARG_ENABLE(interactive, [ --enable-interactive: GET AUTOMATICALLY THE PREREQUISITES FOR THIS PACKAGE. NEEDS ANSWERING QUESTIONS INTERACTIVLY.], [ AC_MSG_WARN([INSTALLING PREREQUISITES DUE TO TECHNICAL REASONS WE WILL HAVE TO IGNORE THE --prefix PARAMETERS HERE IF YOU NEED THEM FOR YOUR APPLICATION/INSTALLATION, CALL echo "perl gift-install-prerequisites.pl /binary/directory /lib/directory" BY HAND ]) ${PERL:-perl} gift-install-prerequisites.pl ], [ echo "------------------------------" echo echo "Do you know, that you could get" echo "the prerequisites to the gift automatically??" echo echo "call" echo "perl gift-install-prerequisites.pl /binary/directory /lib/directory" echo echo "------------------------------" ] ) dnl dnl add the right lib versions: dnl GIFT_LIB_VERSION_INFO="-version-info 0:1:5" AC_SUBST(GIFT_LIB_VERSION_INFO) dnl debugging CXXFLAGS="$CXXFLAGS -DEF_PROTECT_BELOW=1 -DEF_PROTECT_FREE -DEF_PROTECT_ALIGNMENT=8 -DEF_FILL=42 " AC_ARG_ENABLE(foreign-urls, [ --disable-foreign-urls allows user to query for images unknown to the system.], [ CXXFLAGS="$CXXFLAGS -D IGNORE_UNKNOWN_URLS" echo "Foreign urls disabled" ], [ echo "Foreign urls enabled"]) CXXFLAGS="$CXXFLAGS" dnl MySQL checking if it's there AC_CHECK_FILE([/usr/include/mysql++/sqlplus.hh], [ CXXFLAGS="$CXXFLAGS -I /usr/include/mysql++" ]) AC_CHECK_FILE( [/usr/local/include/mysql++/sqlplus.hh], [ CXXFLAGS="$CXXFLAGS -I /usr/local/include/mysql++" ]) AC_CHECK_FILE([/usr/include/mysql/mysql.h], [ CXXFLAGS="$CXXFLAGS -I /usr/include/mysql" ]) AC_CHECK_FILE( [/usr/local/include/mysql/mysql.h], [ CXXFLAGS="$CXXFLAGS -I /usr/local/include/mysql" ]) AC_MSG_CHECKING(['new SQLQuery()' in -lsqlplus]) RESCUE_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -lsqlplus" AC_TRY_LINK([#include ],[new SQLQuery();],[ CXXFLAGS="$CXXFLAGS -D__GIFT_WITH_MYSQL__ " AC_MSG_RESULT([yes])], [ AC_MSG_RESULT([no! \nThe flags used in the unsuccessful compile were $CFLAGS $CXXFLAGS $LDFLAGS]) LDFLAGS=$RESCUE_LDFLAGS ]) LDFLAGS="$LDFLAGS " dnl an option for suppressing parts of gift which have not yet been dnl subject to scientific publication dnl AM_CONDITIONAL(DEBUG, test x$debug = xtrue) dnl this is quite a bit of circus, which has to be dnl FIXED. Gotta write a mail to the automake maintainer. AC_ARG_ENABLE(gift, [ --enable-gift To be used by the GIFT group for things which are not yet published], [echo "hier"; case "${enableval}" in yes) VIF='-D__GIFT_UNPUBLISHED_WORK__'; IP='gift-browser-benchmark.pl gift-extract-text-features.pl gift-annotation-to-html.pl gift-ranking-comparison.pl CFCRankingComparison.pm CGraphCollection.pm'; UNPUBLISHED='-lUnpublished';UNPUBLISHED_DIR='-L$(top_srcdir)/libUnpublished/cc';echo "gift-internals" AC_SUBST(UNPUBLISHED);AC_SUBST(UNPUBLISHED_DIR); no) VIF=''; IP = ''; echo "no gift-internals";; *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; esac; GIFT_INTERNAL_FLAG=${VIF} AC_SUBST(GIFT_INTERNAL_FLAG) GIFT_INTERNAL_PERLS=${IP} AC_SUBST(GIFT_INTERNAL_PERLS) ], [GIFT_INTERNAL=false] ) dnl dnl gift-add-collection supposes the personal web directory dnl directory to be at dnl dnl ~/public_html dnl dnl you can change this. dnl AC_ARG_ENABLE(set-web-publishing-directory, [ --enable-set-web-publishing-directory setting the directory of the web publishing directory http://your.domain.here/~$USER by default], [ WEB_PUBLISHING_DIRECTORY=${enableval}/ AC_SUBST(WEB_PUBLISHING_DIRECTORY) ], [ WEB_PUBLISHING_DIRECTORY=~/public_html/ AC_SUBST(WEB_PUBLISHING_DIRECTORY) ] ) dnl dnl gift-add-collection supposes the personal web directory dnl directory to be accessible by dnl http://your.domain.here/~your_username dnl dnl you can change this. dnl AC_ARG_ENABLE(set-web-publishing-location, [ --enable-set-web-publishing-location setting the location of the web publishing location http://your.domain.here/~$USER by default], [ WEB_PUBLISHING_LOCATION=`echo "${enableval}/" |sed "s:/+^:/:" ` AC_SUBST(WEB_PUBLISHING_LOCATION) ], [ WEB_PUBLISHING_LOCATION="http://localhost/~${USER}" AC_SUBST(WEB_PUBLISHING_LOCATION) ] ) dnl dnl Check if we can embed a perl interpreter dnl we cannot used AC_TRY_LINK, because perl defines dnl int main(int,char**,char**) dnl AC_CHECK_LINK defines dnl int main() dnl this yields us a conflict dnl solution: we compile a test program in an external file dnl AC_CHECK_FILE($PERL,[ AC_MSG_CHECKING([if we can embed a Perl interpreter into GIFT]) #RESCUE_LDFLAGS=$LDFLAGS #LDFLAGS=`echo $LDFLAGS \`perl -MExtUtils::Embed -e ldopts \`|sed 's:-Dbool=char::'` RESCUE_CXXFLAGS=$CXXFLAGS CXXFLAGS=`echo $CXXFLAGS -D__GIFT_WITH_PERL__ \`perl -MExtUtils::Embed -e ccopts \`|sed 's:-Dbool=char::'` if $CXX perl-compile-test-program.cc $CXXFLAGS -o perl-compile-test-program $LDFLAGS `echo \`perl -MExtUtils::Embed -e ldopts \`|sed 's:-Dbool=char::'` ; then AC_MSG_RESULT([yes]) rm perl-compile-test-program PERL_LD_ADD=`perl -MExtUtils::Embed -e ldopts` AC_SUBST(PERL_LD_ADD) else dnl -ldl was added on pruets request CXXFLAGS=$RESCUE_CXXFLAGS LDFLAGS="$RESCUE_LDFLAGS -ldl" AC_MSG_RESULT([no]) fi ]) dnl note that there are space added to each line of the argument dnl thanks to BRUNO JANVIER for the patch AC_ARG_ENABLE(multi-threading, [ --enable-multi-threading enable multithreading], [ dnl dnl we need recursive locking, and this seems to be the way to test it dnl ACX_PTHREAD([ CXXFLAGS="$CXXFLAGS -DHAVE_LIBPTHREAD -D__GIFT_NEW_IS_MALLOC -D__GIFT_USES_THREADS__ $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" CC="$PTHREAD_CC" ],[]) dnl AC_MSG_CHECKING([if we can use POSIX threads the way we want]) dnl RESCUE_CXXFLAGS=$CXXFLAGS dnl CXXFLAGS="$CXXFLAGS -DHAVE_LIBPTHREAD -D_PHTREADS -D__GIFT_NEW_IS_MALLOC -D__GIFT_USES_THREADS__ " dnl#-D__GIFT_FREE_UNUSED_ACCESSORS dnl# dnl# -D__NO_GIFT_SERVER_THREADS__ dnl# -D__NO_GIFT_CQMULTIPLE_THREADS__ dnl# -D__USE_MALLOC dnl# dnl dnl echo $CXXFLAGS dnl dnl echo "$CC pthread-compile-test-program.cc $CXXFLAGS -o pthread-compile-test-program $LDFLAGS -lpthread" dnl if($CXX $CXXFLAGS pthread-compile-test-program.cc -o pthread-compile-test-program $LDFLAGS -lpthread) ; then dnl if ./pthread-compile-test-program ; then dnl AC_MSG_RESULT([yes (will use pthread)]) dnl LDFLAGS="$LDFLAGS -lpthread" dnl else dnl AC_MSG_RESULT([no: testprogram compiled but failed to run]); dnl CXXFLAGS=$RESCUE_CXXFLAGS dnl fi dnl rm pthread-compile-test-program dnlelse dnl CXXFLAGS=$RESCUE_CXXFLAGS dnl LDFLAGS=$RESCUE_LDFLAGS dnl AC_MSG_RESULT([no: failed: $CXX CXXFLAGS:($CXXFLAGS) pthread-compile-test-program.cc -o pthread-compile-test-program LDFLAGS:($LDFLAGS -lpthread)]); dnl fi ], [ AC_MSG_WARN([Use --enable-multi-threading for enabling multi threading]) ] ) dnl libmysql++.la -L/usr/lib/mysql -lmysqlclient -lnsl dnl PERL_LD_ADDITIONS=`echo \`perl -MExtUtils::Embed -e ldopts \`|sed 's:-Dbool=char::'` dnl AC_SUBST(PERL_LD_ADDITIONS) dnl PERL_CC_ADDITIONS=`echo \`perl -MExtUtils::Embed -e ccopts \`|sed 's:-Dbool=char::'` dnl AC_SUBST(PERL_CC_ADDITIONS) AC_ARG_ENABLE(debian-config, [ --enable-debian-config the service tag for debian package builders], [ AC_MSG_WARN([Using debian packagers config. Don't use this unless you want to prepare a Debian package for use in the Debian project]) DEBEXECBINDIR=/usr/bin DEBPERLLIBDIR=/usr/share/perl5/GIFT DEBSHAREDIR=/usr/lib DEBDATADIR=/usr/share/libmrml0 ], [ dnl normal config DEBEXECBINDIR=$bindir DEBPERLLIBDIR=$bindir DEBSHAREDIR=$libdir DEBDATADIR=$datadir ] ) AC_SUBST(DEBEXECBINDIR) AC_SUBST(DEBPERLLIBDIR) AC_SUBST(DEBSHAREDIR) AC_SUBST(DEBDATADIR) AC_ARG_ENABLE(tracking, [ --enable-bayesian TrackingGIFT Bayesian extensions], [echo "hier"; case "${enableval}" in yes) TVF='-D__GIFT_BAYESIAN__';BAYESIAN='-lBayesian';AC_SUBST(BAYESIAN)GIFT_BAYESIAN_DIR='libGIFTQuBayesian libGIFTAcDistanceMatrix';AC_SUBST(GIFT_BAYESIAN_DIR)CA_X_DISTANCEMATRIX='CAcDistanceMatrix.cc CAFDistanceMatrix.cc';AC_SUBST(CA_X_DISTANCEMATRIX); no) GIFT_BAYESIAN_DIR='';; *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; esac; GIFT_BAYESIAN_FLAG=${TVF} AC_SUBST(GIFT_BAYESIAN_FLAG) ], [GIFT_BAYESIAN=false] ) BAYESIAN_LD_ADD='' AC_SUBST(BAYESIAN_LD_ADD) dnl try to find the installer program AC_PROG_INSTALL AM_PATH_LISPDIR AC_SUBST(EMACS) dnl ugh, beats me (phenomenological programming) AC_PROG_MAKE_SET dnl ugh, beats me. #check if there is image magick convert on this system AC_PATH_PROG(CONVERT,convert) #check if there is kdoc on the system AC_PATH_PROG(DOXYGEN,doxygen) #at present we do not draw any consequences out of these checks. AC_PATH_PROG(SGML2INFO,sgml2info) AC_PATH_PROG(SGML2TXT,sgml2txt) AC_PATH_PROG(SGML2LATEX,sgml2latex) PRE_INSTALL_LIBDIRS="-L${PWD}/libMRML/cc/ -L${PWD}/libGIFTAcPerl/cc/ -L${PWD}/libGIFTQuPerl/cc/ -L${PWD}/libGIFTAcInvertedFile/cc/ -L${PWD}/libGIFTAcHierarchy/cc/ -L${PWD}/libGIFTAcDistanceMatrix/cc/ -L${PWD}/libGIFTQuInvertedFile/cc/ -L${PWD}/libGIFTQuBayesian/cc/ -L${PWD}/libGIFTQuHierarchy/cc/ -L${PWD}/libGIFTAcURL2FTS/cc/" PRE_INSTALL_LINKDIRS="--rpath${PWD}/libMRML/cc/ -L${PWD}/libGIFTAcPerl/cc/ -L${PWD}/libGIFTQuPerl/cc/ --rpath${PWD}/libGIFTAcInvertedFile/cc/ --rpath${PWD}/libGIFTAcHierarchy/cc/ --rpath${PWD}/libGIFTAcDistanceMatrix/cc/ --rpath${PWD}/libGIFTQuInvertedFile/cc/ --rpath${PWD}/libGIFTQuBayesian/cc/ --rpath${PWD}/libGIFTQuHierarchy/cc/ --rpath${PWD}/libGIFTAcURL2FTS/cc/" AC_SUBST(PRE_INSTALL_LIBDIRS) AC_SUBST(PRE_INSTALL_LINKDIRS) dnl FIXME perl is missing here for full functionality dnl Checks for libraries. dnl probably we will need lib xml, at present we use expat... dnl Checks for header files. AC_STDC_HEADERS AC_HAVE_HEADERS(string algorithm) AC_HAVE_HEADERS(unistd.h) dnl Checks for system dependent include files AC_HAVE_HEADERS( stdlib.h unistd.h sys/types.h time.h sys/time.h sys/socket.h arpa/inet.h netinet/tcp.h sys/times.h) dnl this is just to check that I have understood how things work AC_CHECK_LIB(m,sin) dnl do we have an expat parser installed? dnl THIS IS PRESENTLY UNUSED. dnl AC_CHECK_LIB(expat,XML_ParserCreate) dnl SUNs need to link the -lsocket to programs using sockets. AC_CHECK_LIB(socket,socket) #dnl check if we have posix threads AC_CHECK_LIB(pthread,pthread_mutexattr_destroy) # check if we can have uuids AC_CHECK_LIB(uuid,uuid_generate) dnl checks if this is big-endian or not AC_C_BIGENDIAN dnl the output dnl libGIFTQuBayesian/Makefile dnl libGIFTQuBayesian/cc/Makefile RESCUE_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAG -ldl" #AC_CHECK_LIB(wdbi,dbi_version,[DBI=yes]) CXXFLAGS=$RESCUE_CXXFLAGS #adl_FUNC_GETOPT_LONG LDFLAGS="$LDFLAGS " AC_OUTPUT([Makefile libMRML/Makefile libMRML/cc/Makefile libMRML/include/Makefile libGIFTQuPerl/Makefile libGIFTQuPerl/cc/Makefile libGIFTQuPerl/include/Makefile libGIFTAcPerl/Makefile libGIFTAcPerl/cc/Makefile libGIFTAcPerl/include/Makefile libGIFTAcURL2FTS/Makefile libGIFTAcURL2FTS/cc/Makefile libGIFTAcURL2FTS/include/Makefile libGIFTAcInvertedFile/Makefile libGIFTAcInvertedFile/cc/Makefile libGIFTAcInvertedFile/include/Makefile libGIFTQuInvertedFile/Makefile libGIFTQuInvertedFile/cc/Makefile libGIFTQuInvertedFile/include/Makefile libGIFTAcHierarchy/Makefile libGIFTAcHierarchy/cc/Makefile libGIFTAcHierarchy/include/Makefile libGIFTQuHierarchy/Makefile libGIFTQuHierarchy/cc/Makefile libGIFTQuHierarchy/include/Makefile libGIFTAcDistanceMatrix/Makefile libGIFTAcDistanceMatrix/cc/Makefile libGIFTAcDistanceMatrix/include/Makefile FeatureExtraction/Makefile libSquirePPM/Makefile scripts/Makefile scripts/emacs-lisp/Makefile scripts/perl/Makefile dtd/Makefile Doc/Makefile Doc/Doxyfile GIFTServer/Makefile GIFTServer/gift-mrml-messages/Makefile GIFTServer/gift-config/Makefile]) cp gift-config.h libMRML/include dnl the expat related make files are not generated any more dnl expat/Makefile dnl expat/gennmtab/Makefile dnl expat/xmlparse/Makefile dnl expat/xmltok/Makefile dnl expat/xmlwf/Makefile gift-0.1.14/config.guess0000755000175200001440000012513110202343026011760 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2004-03-12' # 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., 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. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 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 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # 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 -q "$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 ;' # 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 ;; *) 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 0 ;; amd64:OpenBSD:*:*) echo x86_64-unknown-openbsd${UNAME_RELEASE} exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; cats:OpenBSD:*:*) echo arm-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pegasos:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mipseb-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit 0 ;; macppc:MirBSD:*:*) echo powerppc-unknown-mirbsd${UNAME_RELEASE} exit 0 ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit 0 ;; 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 0 ;; Alpha*:OpenVMS:*:*) echo alpha-hp-vms exit 0 ;; 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 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; *:OS400:*:*) echo powerpc-ibm-os400 exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; 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 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit 0 ;; DRS?6000:UNIX_SV:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; 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 0 ;; 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 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; 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 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # 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 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; 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 \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; 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 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????: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 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; 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 0 ;; *: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 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 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 0 ;; *: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 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 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 # avoid double evaluation of $set_cc_for_build test -n "$CC_FOR_BUILD" || eval $set_cc_for_build if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 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 && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; 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 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; *:UNICOS/mp:*:*) echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; 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 0 ;; 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 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) # Determine whether the default compiler uses glibc. eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #if __GLIBC__ >= 2 LIBC=gnu #else LIBC= #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` # GNU/KFreeBSD systems have a "k" prefix to indicate we are using # FreeBSD's kernel, but not the complete OS. case ${LIBC} in gnu) kernel_only='k' ;; esac echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit 0 ;; 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 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *: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 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; 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 | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; 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 | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; 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 0 ;; 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 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; 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 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # 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 0 ;; 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 #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; 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 0 ;; 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 0 ;; 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 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; 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 0 ;; i*86:*:5:[78]*) 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 0 ;; 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 0 ;; 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 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; 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 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 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) 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 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *: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 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; 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 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) case `uname -p` in *86) UNAME_PROCESSOR=i686 ;; powerpc) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *: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 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *: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 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; 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"); 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 && $dummy && exit 0 # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # 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 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; 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: gift-0.1.14/libGIFTAcHierarchy/0000777000175200001440000000000010220511624013045 500000000000000gift-0.1.14/libGIFTAcHierarchy/cc/0000777000175200001440000000000010220511624013432 500000000000000gift-0.1.14/libGIFTAcHierarchy/cc/CAFHierarchy.cc0000644000175200001440000000035610220502730016107 00000000000000#include "libGIFTAcHierarchy/include/CAFHierarchy.h" CAccessor* CAFHierarchy::makeAccessor(const CXMLElement& inConfiguration)const{ return new CAcHierarchy(inConfiguration); }; CAFHierarchy::CAFHierarchy(){ mName="hierarchy"; }; gift-0.1.14/libGIFTAcHierarchy/cc/CAcHierarchy.cc0000644000175200001440000001423210220502730016142 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/mrml_const.h" #include "libMRML/include/my_throw.h" #include "libGIFTAcHierarchy/include/CAcHierarchy.h" #include #include "libMRML/include/GIFTExceptions.h" //#include "expat/xmlparse/xmlparse.h" #include #include #include "libMRML/include/CXMLElement.h" #include "libMRML/include/CAttributeList.h" #include "libMRML/include/my_throw.h" #include "libMRML/include/GIFTExceptions.h" void startHierarchyElement(void *userData, const char *inElementName, const char **inAttributes) { bool lSuccessful=true; //the calling CSessionManager CAcHierarchy* lCaller((CAcHierarchy*)userData); cout << "<" << inElementName << " WhileReading=\"true\" _" << flush; CAttributeList lAttributes(inAttributes); cout << "--" << flush; cout << lAttributes.size() << "." << flush; if(string(inElementName) == string("element")){ { pair lID(lAttributes.longReadAttribute("image-id")); pair lLocation(lAttributes.stringReadAttribute("image-location")); if(lID.first && lLocation.first){ lCaller->addElement(lID.second, lLocation.second, lLocation.second); } } } if(string(inElementName) == string("reference-tree")){ { pair lID(lAttributes.longReadAttribute("image-id")); if(lID.first){ lCaller->push(lID.second); } } } } void endHierarchyElement(void *userData, const char *inElementName){ CAcHierarchy* lCaller((CAcHierarchy*)userData); if(string(inElementName) == string("reference-tree")){ { lCaller->popNodeAndRegisterEdge(); } } if(string(inElementName) == string("hierarchy-browser")){ { } } cout << "" << endl; } CAcHierarchy::CAcHierarchy(const CXMLElement& inCollectionElement){ mMutexHierarchy.lock(); init(inCollectionElement .stringReadAttribute(mrml_const::cui_base_dir).second +inCollectionElement .stringReadAttribute(mrml_const::cui_hierarchy_file_location).second); mMutexHierarchy.unlock(); } void CAcHierarchy::init(string inFileName){ mMutexHierarchy.lock(); ifstream lHierarchyFile(inFileName.c_str()); if(lHierarchyFile){ lHierarchyFile.seekg(0,ios::end); int lSize=lHierarchyFile.tellg(); char lHierarchyFileContent[lSize+1]; lHierarchyFile.seekg(0,ios::beg); lHierarchyFile.read(lHierarchyFileContent, lSize); lHierarchyFileContent[lSize]=0; cout << "I did it: I read the HIERARCHY file " << inFileName << ": " << lHierarchyFileContent << endl << flush; XML_Parser lParser = XML_ParserCreate(NULL);//default encoding XML_SetUserData(lParser, this); XML_SetElementHandler(lParser, startHierarchyElement, endHierarchyElement); int lDone=true; do { if (!XML_Parse(lParser, lHierarchyFileContent, lSize, lDone)) { cerr << "XML ERROR: " << XML_ErrorString(XML_GetErrorCode(lParser)) << " at line " << XML_GetCurrentLineNumber(lParser) << endl; my_throw(VEConfigurationError("could not find requested tree")); } } while (!lDone); XML_ParserFree(lParser); mMutexHierarchy.unlock(); }else{ mMutexHierarchy.unlock(); my_throw(string(string("could not open config file_")+inFileName+string("_")).c_str()); } }; void CAcHierarchy::addElement(TID inID, string inLocation, string inThumbnail){ mMutexHierarchy.lock(); mIDToAccessorElement.insert(make_pair(inID, CAccessorElement(inID, inLocation, inThumbnail, string("")))); mURLToID[inLocation]=inID; mMutexHierarchy.unlock(); } /** pushes the node onto the stack */ void CAcHierarchy::push(TID inNode){ mMutexHierarchy.lock(); mNodeStack.push_back(inNode); mMutexHierarchy.unlock(); }; /** pops the node and registers the edge from new top to old top and back */ void CAcHierarchy::popNodeAndRegisterEdge(){ mMutexHierarchy.lock(); if(mNodeStack.size()){ TID lExTop=mNodeStack.back(); mNodeStack.pop_back(); addEdge(mNodeStack,lExTop); } mMutexHierarchy.unlock(); }; void CAcHierarchy::addEdge(const CPath& inPath, TID inSon){ mMutexHierarchy.lock(); mEdges[inPath].push_back(inSon); cout << "SIZE addBackForthEdge: (" << inSon << ") " << mEdges[inPath].size() << " " << inPath.size() << " " << mEdges.size() << endl; mMutexHierarchy.unlock(); } CIDRelevanceLevelPairList* CAcHierarchy::getChildren(const CPath& inPath)const{ mMutexHierarchy.lock(); CGraph::const_iterator lFound(mEdges.find(inPath)); if(lFound!=mEdges.end()){ CIDRelevanceLevelPairList* lList(new CIDRelevanceLevelPairList()); for(list::const_iterator i=lFound->second.begin(); i!=lFound->second.end(); i++){ lList->push_back(CIDRelevanceLevelPair(*i,1.0)); } return lList; } cout << "NOTFOUND" << endl; mMutexHierarchy.unlock(); return 0; } CAcHierarchy::operator bool()const{ return true; } gift-0.1.14/libGIFTAcHierarchy/cc/Makefile.am0000644000175200001440000000320110153634163015407 00000000000000# -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # #Makefile for the inverted File library # CCCONFIG=sed "s:__EXECBINDIR__:@DEBEXECBINDIR@:g;s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@DEBPERLLIBDIR@:g;s:__DATADIR__:@DEBDATADIR@:g;s:__LIBDIR__:@DEBSHAREDIR@:g;s:__HOME__:${HOME}:g;s:__WEB_PUBLISHING_DIRECTORY__:@WEB_PUBLISHING_DIRECTORY@:g;s=__WEB_PUBLISHING_LOCATION__=@WEB_PUBLISHING_LOCATION@=g;" < $< > $@ # noinst_LIBRARIES= libGIFTInvertedFile.a lib_LTLIBRARIES = libGIFTAcHierarchy.la libGIFTAcHierarchy_la_LDFLAGS="@PRE_INSTALL_LIBDIRS@" -lMRML INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcHierarchy/include -I$(top_srcdir)/expat/xmlparse -I$(top_srcdir)/expat/xmltok libGIFTAcHierarchy_la_SOURCES= \ CAFHierarchy.cc\ CAcHierarchy.cc\ plug_in_fo.cc gift-0.1.14/libGIFTAcHierarchy/cc/Makefile.in0000644000175200001440000004210410220474074015423 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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@ # -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # #Makefile for the inverted File library # SOURCES = $(libGIFTAcHierarchy_la_SOURCES) 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 = : host_triplet = @host@ subdir = libGIFTAcHierarchy/cc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libGIFTAcHierarchy_la_LIBADD = am_libGIFTAcHierarchy_la_OBJECTS = CAFHierarchy.lo CAcHierarchy.lo \ plug_in_fo.lo libGIFTAcHierarchy_la_OBJECTS = $(am_libGIFTAcHierarchy_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/CAFHierarchy.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CAcHierarchy.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/plug_in_fo.Plo CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libGIFTAcHierarchy_la_SOURCES) DIST_SOURCES = $(libGIFTAcHierarchy_la_SOURCES) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ CCCONFIG = sed "s:__EXECBINDIR__:@DEBEXECBINDIR@:g;s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@DEBPERLLIBDIR@:g;s:__DATADIR__:@DEBDATADIR@:g;s:__LIBDIR__:@DEBSHAREDIR@:g;s:__HOME__:${HOME}:g;s:__WEB_PUBLISHING_DIRECTORY__:@WEB_PUBLISHING_DIRECTORY@:g;s=__WEB_PUBLISHING_LOCATION__=@WEB_PUBLISHING_LOCATION@=g;" < $< > $@ # noinst_LIBRARIES= libGIFTInvertedFile.a lib_LTLIBRARIES = libGIFTAcHierarchy.la libGIFTAcHierarchy_la_LDFLAGS = "@PRE_INSTALL_LIBDIRS@" -lMRML INCLUDES = -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcHierarchy/include -I$(top_srcdir)/expat/xmlparse -I$(top_srcdir)/expat/xmltok libGIFTAcHierarchy_la_SOURCES = \ CAFHierarchy.cc\ CAcHierarchy.cc\ plug_in_fo.cc all: all-am .SUFFIXES: .SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: $(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 libGIFTAcHierarchy/cc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTAcHierarchy/cc/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libGIFTAcHierarchy.la: $(libGIFTAcHierarchy_la_OBJECTS) $(libGIFTAcHierarchy_la_DEPENDENCIES) $(CXXLINK) -rpath $(libdir) $(libGIFTAcHierarchy_la_LDFLAGS) $(libGIFTAcHierarchy_la_OBJECTS) $(libGIFTAcHierarchy_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAFHierarchy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAcHierarchy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plug_in_fo.Plo@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: 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) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES 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-info-am \ uninstall-libLTLIBRARIES # 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: gift-0.1.14/libGIFTAcHierarchy/cc/plug_in_fo.cc0000644000175200001440000000047010220502730015775 00000000000000#include "libGIFTAcHierarchy/include/CAcHierarchy.h" #include "libMRML/include/CAccessorAdminCollection.h" extern "C" char* libGIFTAcHierarchy_getClassName(){ return "hierarchy"; } extern "C" CAcHierarchy* libGIFTAcHierarchy_makeAccessor(const CXMLElement& inElement){ return new CAcHierarchy(inElement); } gift-0.1.14/libGIFTAcHierarchy/Makefile.am0000644000175200001440000000002410153634163015022 00000000000000SUBDIRS= cc include gift-0.1.14/libGIFTAcHierarchy/Makefile.in0000644000175200001440000003455510220474074015051 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = libGIFTAcHierarchy DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = 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 ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = cc include all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(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 libGIFTAcHierarchy/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTAcHierarchy/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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: # 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): @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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: @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; 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='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="../$(top_distdir)" \ distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive 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-info \ install-info-am install-man 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-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: gift-0.1.14/libGIFTAcHierarchy/include/0000777000175200001440000000000010220511624014470 500000000000000gift-0.1.14/libGIFTAcHierarchy/include/CAFHierarchy.h0000644000175200001440000000273110220502730017006 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CAFHIERARCHY #define _CAFHIERARCHY #include "libGIFTAcHierarchy/include/uses-declarations.h" #include "libMRML/include/CAccessorFactory.h" #include "libGIFTAcHierarchy/include/CAcHierarchy.h" /** * A factory to make inverted Files *@author Wolfgang Müller * */ class CAFHierarchy:public CAccessorFactory{ public: /** Constructs this, means, sets mName */ CAFHierarchy(); /** makes an inverte file accessor */ CAccessor* makeAccessor(const CXMLElement& inConfiguration)const; }; #endif gift-0.1.14/libGIFTAcHierarchy/include/CAcHierarchy.h0000644000175200001440000001123110220502730017036 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CACHIERARCHY #define _CACHIERARCHY #include "libGIFTAcHierarchy/include/uses-declarations.h" #include #include #include "libMRML/include/CAccessorImplementation.h" class CXMLElement; #include "libMRML/include/CIDRelevanceLevelPairList.h" #include "libMRML/include/CMutex.h" // multithreading /** A very simple accessor for hierarchies of images Stored in an XML file. This was intended as the ultra simple example system for the browser benchmarking paper. It performed too bad in our benchmark to be taken seriously. Currently I see the use of this as the base for systems, where the author knows how to generate a hierarchy of images, but the author fears the overhead needed for including his/her system into the gift. Please note that IDs must start at 1 (ONE!!!). @author Wolfgang Müller */ class CAcHierarchy:public CAccessorImplementation{ protected: /** mutual exclude for multithreading*/ CMutex mMutexHierarchy; /** is this well constructed ?*/ bool isOK; /** In fact, because images can arise multiple times in the hierarchy, it is necessary to store the full path for each time the image arises in the tree. We base this on the idea that in each selection, each image will arise at most once. As a consequence, lists of selected images must be sufficient to define the path from the hierarchy's root to a given node or leaf of the hierarchy. */ typedef list CPath; /** This class is there for mnemonic reasons only. Evidently it has the same type as CPath, however it designates a list of children. */ typedef list CChildren; /** A stack of the nodes visited when building the hierarchy */ CPath mNodeStack; /** The graph is represented as a map from path to children. @see CPath for an explanation */ typedef map CGraph; /** Edges: The edges from father to son. The edges from son to father are not needed, because it means simply popping from the path. */ CGraph mEdges; /** called immediately by the constructor, this function does the main construction work. Starts the xml parser for reading the hierarchy file etc. */ void init(string inFileName); /** adds an edge from father to son and an edge from son to father */ void addEdge(const CPath& inFather, TID inSon); public: /** constructor opens a hierarchy file and reads it. Like every accessor, this accessor takes a MRML element as input (@see CXMLElement for how to access the attributes of this element). Currently this accessor understands the following attributes: cui-base-dir: the base directory containing the following file: cui-hierarchy-file-location: an xml file containing the hierarchy that you can browse using this accessor. */ CAcHierarchy(const CXMLElement& inConfiguration); /** Gets a list of all children of an element. As it was said before, an element of the hierarchy is well described by a path in the tree, from the root to this element. */ CIDRelevanceLevelPairList* getChildren(const CPath& inID)const; /** Adds an element to the collection */ void addElement(TID inID, string inLocation, string inThumbnail); /** pushes the node onto the stack */ void push(TID inNode); /** pops the node and registers the edge from new top to old top and back */ void popNodeAndRegisterEdge(); /** has this been successfully read? */ operator bool()const; }; #endif gift-0.1.14/libGIFTAcHierarchy/include/Makefile.am0000644000175200001440000000021310153634163016445 00000000000000libGIFTAcHierarchydir=$(includedir)/libGIFTAcHierarchy/include libGIFTAcHierarchy_HEADERS=CAFHierarchy.h CAcHierarchy.h uses-declarations.hgift-0.1.14/libGIFTAcHierarchy/include/Makefile.in0000644000175200001440000003032610220474074016464 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = libGIFTAcHierarchy/include DIST_COMMON = $(libGIFTAcHierarchy_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__installdirs = "$(DESTDIR)$(libGIFTAcHierarchydir)" libGIFTAcHierarchyHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(libGIFTAcHierarchy_HEADERS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ libGIFTAcHierarchydir = $(includedir)/libGIFTAcHierarchy/include libGIFTAcHierarchy_HEADERS = CAFHierarchy.h CAcHierarchy.h uses-declarations.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(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 libGIFTAcHierarchy/include/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTAcHierarchy/include/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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-libGIFTAcHierarchyHEADERS: $(libGIFTAcHierarchy_HEADERS) @$(NORMAL_INSTALL) test -z "$(libGIFTAcHierarchydir)" || $(mkdir_p) "$(DESTDIR)$(libGIFTAcHierarchydir)" @list='$(libGIFTAcHierarchy_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(libGIFTAcHierarchyHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libGIFTAcHierarchydir)/$$f'"; \ $(libGIFTAcHierarchyHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libGIFTAcHierarchydir)/$$f"; \ done uninstall-libGIFTAcHierarchyHEADERS: @$(NORMAL_UNINSTALL) @list='$(libGIFTAcHierarchy_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f '$(DESTDIR)$(libGIFTAcHierarchydir)/$$f'"; \ rm -f "$(DESTDIR)$(libGIFTAcHierarchydir)/$$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 $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libGIFTAcHierarchydir)"; 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: -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 \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-libGIFTAcHierarchyHEADERS 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 uninstall-libGIFTAcHierarchyHEADERS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-libGIFTAcHierarchyHEADERS install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-libGIFTAcHierarchyHEADERS # 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: gift-0.1.14/libGIFTAcHierarchy/include/uses-declarations.h0000644000175200001440000000243710220502730020206 00000000000000/* -*- mode: c++ -*- Path: ./libGIFTAcHierarchy/include/uses-declarations.h */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /* Author: Wolfgang Müller (via perl script) use namespace definitions for libGIFTAcHierarchy. to be included into all include files of this library */ #ifndef _LIBGIFTACHIERARCHY_USES_DECLARATIONS_ #define _LIBGIFTACHIERARCHY_USES_DECLARATIONS_ using namespace std; #endif gift-0.1.14/perl-compile-test-program.cc0000644000175200001440000000554310220502730014764 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /** This program should compile using a decently installed Perl 5. see the perlembed manpage for details. The program is directly snipped from the perl 5 perlembed manpage. See the perlembed manpage for author details. */ #if defined(__cplusplus) && !defined(PERL_OBJECT) #define is_cplusplus #endif #ifdef is_cplusplus extern "C" { #endif #include #include #ifdef PERL_OBJECT #define NO_XSLOCKS #include #include "win32iop.h" #include #include #endif #ifdef is_cplusplus } # ifndef EXTERN_C # define EXTERN_C extern "C" # endif #else # ifndef EXTERN_C # define EXTERN_C extern # endif #endif EXTERN_C void xs_init _((void)); EXTERN_C void boot_DynaLoader _((CV* cv)); EXTERN_C void xs_init(void) { char *file = __FILE__; dXSUB_SYS; /* DynaLoader is a special case */ newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file); } void test(void){ dSP ; int count; ENTER; SAVETMPS; PUSHMARK(SP) ; XPUSHs(sv_2mortal(newSViv(10))); XPUSHs(sv_2mortal(newSVpv("hii", 3))); XPUSHs(sv_2mortal(newSVpv("hoo", 3))); int lResultSize(perl_call_pv((char*)("huhu"), G_ARRAY)); SPAGAIN; for(int i=0; inew; my $request = HTTP::Request->new(GET => $inURL); print $request->as_string(); my $response = $ua->request($request); if($response->{_content}){ # # get ans write the item # my $lFile="/tmp/$inVersion$inExtension"; { unlinkAndWrite($lFile); open RETRIEVED,">$lFile" or die "could not open temporary file"; print RETRIEVED $response->{_content}; close RETRIEVED; } # # gunzip the file # my $lTar=$lFile; $lTar=~s/(tar.gz)|(tgz)/tar/; unlinkAndWrite($lTar); system("gunzip $lFile"); # # untar # my $lDir=$lTar; $lDir=~s/\.tar$//; unlinkAndWrite($lDir); unless(system("cd /tmp && tar xvf $lTar")==0){ print STDERR "FAILED: $inVersion\n"; return ""; } # # if the program is gnu compliant, the tar # results will be in the directory given by $lDir # return "/tmp/$inUnpackedVersion"; }else{ print STDERR "FAILED: $inVersion\n"; return ""; } } # # get a file from an URL and compile it # sub getAndCompile( $$$$$ ){ my $inFlags=shift; my $inURL=shift; my $inVersion=shift; my $inUnpackedVersion=shift; my $inExtension=shift; # # get the file # my $lFile=getAndUntar($inURL,$inVersion,$inUnpackedVersion,$inExtension); if($lFile){ my $lOptions=""; my($lKey,$lValue); # # build an option list for configure # while (($lKey,$lValue) = each %{$inFlags}) { if($lKey){ if($lValue){ $lOptions.=" $lKey $lValue " }else{ $lOptions.=" $lKey " } } } # # file is now unpacked # go into the corresponding directory # configure, and install # $ENV{PWD}=$lFile; system("cd $ENV{PWD}; ./configure $lOptions ; make all install"); unlink $lFile; } } sub getGNUInstallationCompliantPackage( $@ ){ my $inFlags=shift; my $inURLBase=shift; my $inVersion=shift; my $inUnpackedVersion=shift; my $inExtension=shift; getAndCompile($inFlags, "$inURLBase$inVersion$inExtension", $inVersion, $inUnpackedVersion, $inExtension); } sub getCharmer( $$ ){ my $inVersion=shift; my $inUnpackedVersion=shift; my $inExtension=shift; my $lDirectory=getAndUntar("http://www.mrml.net/download/packages/", $inVersion, $inUnpackedVersion, $inExtension); if($lDirectory){ my $lInstallationLocation=$lDirectory; if($lDirectory){ $lInstallationLocation=$ENV{bindir}.$inVersion; move($lDirectory,$lInstallationLocation); } $ENV{PWD}=$lInstallationLocation; #print join("\n",%ENV); print "Writing applet frame $ENV{PWD}/Charmer.html"; system("cd $ENV{PWD};perl write-applet-frame.pl"); } } # # install a list of perl modules # sub installPerlModules{ my $lPrefix=shift; my $lModuleName; while($lModuleName=shift){ my$mod=CPAN::Shell->expand("Module",$lModuleName); if($lPrefix->{LIB}){ CPAN::Shell->o('conf','makepl_arg',qq[ LIB=$lPrefix->{LIB} ]); } $mod->install; CPAN::Shell->o('conf','makepl_arg'); } } # # get the current SnakeCharmer version # print "Downloading the current Charmer version\n"; getCharmer("Charmer-0.2b",".tgz"); print "\nInstalled Charmer\n "; my $lBinDir=shift; my $lLibDir=shift; $lBinDir=`echo $lBinDir` if $lBinDir=~m/\$/; $lLibDir=`echo $lBinDir` if $lLibDir=~m/\$/; my $lPrefixHash={}; $lPrefixHash={"--libdir"=>$lLibDir, "--bindir"=>$lBinDir} if $lBinDir; my $lPerlPrefixHash={}; $lPerlPrefixHash={"LIB"=>$lBinDir} if $lBinDir; installPerlModules($lPerlPrefixHash,'HTTP::Request'); if(1==1){ # among the packages to be found is # expat # this is needed by XML::Parser my $lToBeInstalled={'EXPAT'=>["http://download.sourceforge.net/expat/", 'expat-1.95.7', 'expat-1.95.7', ".tar.gz"], 'MAGICK'=>["http://belnet.dl.sourceforge.net/sourceforge/imagemagick/", "ImageMagick-6.0.2-1", "ImageMagick-6.0.2", ".tar.gz"], # 'DBI'=>["http://belnet.dl.sourceforge.net/sourceforge/libdbi/", # "libdbi-0.6.5", # ".tar.gz"] }; my $i; foreach $i (sort {$a cmp $b} keys(%{$lToBeInstalled})){ unless($ENV{$i}){ #if package associated to key $i is there, #then the variable $ENV{$i} has been set by #./configure getGNUInstallationCompliantPackage($lPrefixHash, @{$lToBeInstalled->{$i}}); } } } installPerlModules($lPerlPrefixHash, 'XML::Parser', 'XML::Writer', 'XML::Parser::EasyTree', 'Text::Iconv', 'Parse::Yapp', 'XML::XQL'); gift-0.1.14/gift-install-prerequisites.sh0000644000175200001440000000211310153634163015277 00000000000000# GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 #install HTTP::Request PREFIX_EXPRESSION="\$CPAN::Shell{makepl_arg}.='LIB=$bindir'" ${PERL:-perl} -MCPAN -e $PREFIX_EXPRESSION -e "install 'HTTP::Request'"; ${PERL:-perl} gift-install-prerequisites.pl $libdir $bindir gift-0.1.14/config.sub0000755000175200001440000007467010202343026011436 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2004-03-12' # 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., 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. # 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 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 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # 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 0;; * ) 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-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) 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 ;; -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/'` ;; -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 \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32r | m32rle | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | 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) ;; # 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-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | msp430-* \ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | 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 ;; cr16c) basic_machine=cr16c-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; 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 ;; 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 ;; 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 ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; 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 ;; nv1) basic_machine=nv1-cray os=-unicosmp ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; 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 ;; 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 ;; 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 ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; 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 ;; 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 ;; 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 ;; sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b) 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* \ | -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-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*) # 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* \ | -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 ;; -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 *-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 ;; 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 ;; *-ibm) os=-aix ;; *-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 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gift-0.1.14/missing0000755000175200001440000001452010153634163011050 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 2001, 2002 Free Software Foundation, Inc. # Franc,ois 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.in; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in -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 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 lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing - GNU libit 0.0" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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 missing on your system. 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 missing on your system. 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 missing on your system. 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 ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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 missing on your system. 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 ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. 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 prerequirements 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 gift-0.1.14/gift-config.h.in0000644000175200001440000000564410220474122012422 00000000000000/* gift-config.h.in. Generated from configure.in by autoheader. */ /* Define to 1 if you have the header file. */ #undef HAVE_ALGORITHM /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `expat' library (-lexpat). */ #undef HAVE_LIBEXPAT /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define to 1 if you have the `uuid' library (-luuid). */ #undef HAVE_LIBUUID /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_TCP_H /* Define if you have POSIX threads libraries and header files. */ #undef HAVE_PTHREAD /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIMES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_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_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to necessary symbol if this constant uses a non-standard name on your system. */ #undef PTHREAD_CREATE_JOINABLE /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ #undef WORDS_BIGENDIAN /* Define to empty if `const' does not conform to ANSI C. */ #undef const gift-0.1.14/mkinstalldirs0000755000175200001440000000132210153634164012254 00000000000000#! /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 gift-0.1.14/Makefile.am0000644000175200001440000000366510153634164011516 00000000000000# -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 #gift-config.cc: gift-config.cc.in make-gift-config.pl # perl make-gift-config.pl CXXFLAGS "$(CXXFLAGS)" LDFLAGS "$(LDFLAGS)" libdir "-l $(libdir)" < $< > $@ SUBDIRS= Doc scripts dtd \ @UNPUBLISHED_DIR@ \ libMRML \ libGIFTAcURL2FTS\ libGIFTAcHierarchy libGIFTQuHierarchy\ libGIFTAcInvertedFile libGIFTQuInvertedFile\ libGIFTAcPerl libGIFTQuPerl \ libGIFTAcDistanceMatrix\ @GIFT_BAYESIAN_DIR@ libSquirePPM GIFTServer FeatureExtraction # doc should be the choice of the user... # libGIFTAcDistanceMatrix needs some unpublished class # where I (WM) have to look on to do accessor/query engine # separation # EXTRA_SUBDIRS= Doc EXTRA_DIST=PluginMaker \ bootstrap-cvs.sh \ notice.am \ notice.c\ notice.cc\ notice.el\ notice.h\ notice.in\ notice.java\ notice.pre-pl\ notice.pre-pm\ perl-compile-test-program.cc\ pthread-compile-test-program.cc\ renamer.pl\ gift-file-to-gift-file.pl \ gift-install-prerequisites.pl \ teco.sh\ gift-install-prerequisites.sh\ gift-check-perl-config.pl \ aclocal-add.m4 gift-0.1.14/Makefile.in0000644000175200001440000005237110220474073011521 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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@ # -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 #gift-config.cc: gift-config.cc.in make-gift-config.pl # perl make-gift-config.pl CXXFLAGS "$(CXXFLAGS)" LDFLAGS "$(LDFLAGS)" libdir "-l $(libdir)" < $< > $@ 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 = : host_triplet = @host@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/gift-config.h.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ THANKS config.guess config.sub depcomp install-sh ltmain.sh \ missing mkinstalldirs subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in 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 = gift-config.h CONFIG_CLEAN_FILES = 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 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = Doc scripts dtd \ @UNPUBLISHED_DIR@ \ libMRML \ libGIFTAcURL2FTS\ libGIFTAcHierarchy libGIFTQuHierarchy\ libGIFTAcInvertedFile libGIFTQuInvertedFile\ libGIFTAcPerl libGIFTQuPerl \ libGIFTAcDistanceMatrix\ @GIFT_BAYESIAN_DIR@ libSquirePPM GIFTServer FeatureExtraction # doc should be the choice of the user... # libGIFTAcDistanceMatrix needs some unpublished class # where I (WM) have to look on to do accessor/query engine # separation # EXTRA_SUBDIRS= Doc EXTRA_DIST = PluginMaker \ bootstrap-cvs.sh \ notice.am \ notice.c\ notice.cc\ notice.el\ notice.h\ notice.in\ notice.java\ notice.pre-pl\ notice.pre-pm\ perl-compile-test-program.cc\ pthread-compile-test-program.cc\ renamer.pl\ gift-file-to-gift-file.pl \ gift-install-prerequisites.pl \ teco.sh\ gift-install-prerequisites.sh\ gift-check-perl-config.pl \ aclocal-add.m4 all: gift-config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(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: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) gift-config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/gift-config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status gift-config.h $(srcdir)/gift-config.h.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f gift-config.h stamp-h1 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # 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): @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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: @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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) gift-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) gift-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) gift-config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) gift-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)/Doc @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='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (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 $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir $(AMTAR) chof - $(distdir) | 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 $(AMTAR) chof - $(distdir) | 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 | $(AMTAR) xf - ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ *.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 gift-config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -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-exec-am: install-info: install-info-recursive install-man: 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-info-am uninstall-info: uninstall-info-recursive .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-info install-info-am install-man \ 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-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: gift-0.1.14/GIFTServer/0000777000175200001440000000000010220511633011442 500000000000000gift-0.1.14/GIFTServer/processMessage.cc0000644000175200001440000000556410220502730014660 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "CCommunicationHandler.h" #include "CProcessMessageParameters.h" #include #include #include #include #include //waiting that everything has arrived extern void waitWriteStream(int inWritingSocket); extern void waitReadStream(int inReadingSocket); extern void waitExceptionStream(int inExceptioningSocket); /** This function takes a socket and uses it for one message */ void* processMessage(void* inProcessMessageParameters){ //gMutex->lock();//for debugging only CProcessMessageParameters* lParameters((CProcessMessageParameters*) inProcessMessageParameters); assert(lParameters); CCommunicationHandler* lCommunicationHandler(new CCommunicationHandler(lParameters->mSessionManager, lParameters->mLogFile)); lCommunicationHandler->setPeerAddressString(lParameters->mPeerAddress); lCommunicationHandler->setSocket(lParameters->mSocket); // this is the line which processes if (!lCommunicationHandler->readAndParse()) { printf("can't read from socket %s\n",strerror(errno)) ; } // and now comes the long and painful process of closing the socket // here we need something else! cout << "flushing everything!" << endl; fflush(0); cout << "shutting down the socket!" << endl; //this is really embarassing if(shutdown(lParameters->mSocket,1)){ cerr << "Shutdown 1 failed: " << strerror(errno) << endl; } //new for better tear down?? cout << "waitreadstream (I)" << endl; waitReadStream(lParameters->mSocket); { char lBuf; while(recv(lParameters->mSocket,&lBuf,1,MSG_WAITALL)>0){ cout << "." << flush; } } cout << "waitreadstream (II)" << endl; //sleep(1); close(lParameters->mSocket); cout << "Deleting thread parameters" << endl; delete lParameters; delete lCommunicationHandler; cout << "DONE" << endl; //gMutex->unlock();//for debugging only return((void*)0); } gift-0.1.14/GIFTServer/modifyDistanceMatrix.cc0000644000175200001440000000670610220502730016023 00000000000000/** here there is something to do: i would like to have a small program, which takes ALL the scores and calculates their average as well as their standard deviation. Using these two numbers, scores are then transformed into pseudo distances. */ #include #include #include #include #include #include #include #include using namespace std; int gCount=0; double gSum=0; double gSumOfSquares=0; void calculateSums(float inFloat){ gCount ++; gSum += inFloat; gSumOfSquares+= inFloat * inFloat; } typedef map CMap; void vectorToMap(float* inBegin, float* inEnd, CMap& outMap){ int lCount=0; for(float* i=inBegin; i!=inEnd; i++){ outMap.insert(make_pair(*i,lCount++)); // cout << "-" << flush; } } double rankifyMatrix(float* inMatrix, int inSize){ /// Take the matrix /// make pairs of score and ID for(int lLine=0; lLine1) l=1; if(l<0) l=0; inMatrix[(lLine*inSize)+i->second]=1-l; } } } double rescale(float inFloat){ double lAverage=(gSum/gCount); double lAverageSquare= gSumOfSquares/gCount; double lSDev= sqrt(lAverageSquare - lAverage*lAverage); //...so from score to pseudo distance double lReturnValue=0.5-((inFloat-lAverage)/lSDev/3); if(lReturnValue>.9999) lReturnValue=1; if(lReturnValue<0.0001) lReturnValue=0; // cout << "[" << lReturnValue << "]" <=0)); return lReturnValue; } //changes sign of matrix void changeSign(float* inMatrix, int inSize){ inSize=inSize*inSize; for(float* p=inMatrix;p!=inMatrix+inSize;p++){ *p = 1 - *p; } } //symmetrifies the matrix given by an array void symmetrify(float* inMatrix, int inSize){ for(int i=0; i " << endl; exit(1); } string lInName=argv[1]; string lOutName=argv[2]; int lSize=atoi(argv[3]); float* lMatrix=new float[lSize*lSize]; assert(lMatrix); { ifstream lIn(lInName.c_str()); while(lIn){ float lBuffer; lIn.read((char*)&lBuffer,sizeof(lBuffer)); calculateSums(lBuffer); } } cout << "until here " << flush << endl; { ifstream lIn(lInName.c_str()); ofstream lOut(lOutName.c_str()); assert(lOut); int lCount=0; while(lIn){ float lBuffer; lIn.read((char*)&lBuffer, sizeof(lBuffer)); lMatrix[lCount++]=lBuffer; } #ifdef VISTEX rankifyMatrix(lMatrix, lSize); #endif //symmetrify the matrix symmetrify(lMatrix, lSize); //get from score to distance changeSign(lMatrix, lSize); lOut.write((char*)lMatrix, sizeof(float) *(lSize*lSize)); } } gift-0.1.14/GIFTServer/endianize.cc0000644000175200001440000000102410220502730013626 00000000000000#include #include #include #include using namespace std; main(){ ostream_iterator lOut(cout); cerr << "This takes characters from stdin," << endl << "reshuffles them in order to" << endl << "change 'endianicity' and gives them to" << endl << "stdout" << endl; while(cin){ char gBuffer[4]; cin.read(gBuffer,4); if(cin){ reverse(gBuffer,gBuffer+4); copy(gBuffer, gBuffer+4, lOut); } } } gift-0.1.14/GIFTServer/oneMinus.cc0000644000175200001440000000060510220502730013461 00000000000000#include using namespace std; main(){ cerr << "This programm reads from stdin binary floats" << endl << "subtracts them from 1" << "and writes them to stdout"; while(cin){ float lBuffer; cin.read((char*)&lBuffer, sizeof(lBuffer)); lBuffer= 1-lBuffer; if(cin){ cout.write((char*)&lBuffer, sizeof(lBuffer)); } } } gift-0.1.14/GIFTServer/CSocket.h0000644000175200001440000000443510220502730013066 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CSOCKET #define _CSOCKET #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //fchmod #include #include #include #include #include using namespace std; /** This class takes a unary function @see: CMultiServer */ class CSocket{ public: /** this is the function that's called when serving */ class CServeFunction:public unary_function{ public: virtual bool operator()(int inStream)=0; }; protected: /** has this been initialized ?*/ bool mIsInitialized; /** int */ int mSocketDescriptor; /** */ CServeFunction* mServeFunction; public: /** constructor */ CSocket(); /** destroy this: close the socket */ ~CSocket(); /** get the descriptor of the socket */ int getSocketDescriptor()const; /** Serve from the socket that accepted */ void setServeFunction(CServeFunction* inServeFunction); /** accept this socket and serve */ virtual bool acceptAndServe()=0; /** serve to this socket */ virtual void serveStream(int); /** */ virtual operator bool()const; }; #endif gift-0.1.14/GIFTServer/CDomainSocket.cc0000644000175200001440000000560210220502730014351 00000000000000#include "CDomainSocket.h" CDomainSocket::CDomainSocket(): mIsInitialized(false){ }; /** constructor: copy the path, otherwise do nothing */ CDomainSocket::CDomainSocket(const string& inPath): mIsInitialized(false){ this->listenToPath(inPath); }; /** destroy this: close the socket */ CDomainSocket::~CDomainSocket(){ if(mIsInitialized){ close(mSocketDescriptor); } }; /** set the path of the domain socket */ bool CDomainSocket::listenToPath(const string& inPath){ mPath=inPath; if (( mSocketDescriptor= socket(AF_UNIX, SOCK_STREAM, 0)) == -1) { perror("socket"); return false;//no exit } mSocketStructure.sun_family = AF_UNIX; cout << "Making socket for path " << mPath << endl; strcpy(mSocketStructure.sun_path, mPath.c_str()); unlink(mSocketStructure.sun_path); int len = strlen(mSocketStructure.sun_path) + sizeof(mSocketStructure.sun_family); if (bind(mSocketDescriptor, (struct sockaddr *)&mSocketStructure, len) == -1) { perror("bind"); return 0; } if (listen(mSocketDescriptor, 5) == -1) { perror("listen"); return 0; } if(chmod(mPath.c_str(), S_IRUSR|S_IWUSR)){ perror("chmod"); return 0; } mIsInitialized=1; return 1; }; /** get the path of the socket */ CDomainSocket::operator bool()const{ return mIsInitialized; } /** get the path of the socket */ string CDomainSocket::getPath()const{ return mPath; } /** Serve from the socket that accepted */ void CDomainSocket::serveStream(int inSocket){ int done = 0; char str[2]; string lMessage; int lRead(0); do { lRead = recv(inSocket, str, 1, 0); if (lRead <= 0) { cerr << "here?" << endl; if (lRead < 0) perror("recv"); done = 1; }else{ str[lRead]=char(0); lMessage+=str; } } while (!done); cout << " after while" << endl; if (send(inSocket, lMessage.c_str(), lMessage.size(), 0) < 0) { perror("send"); } } bool CDomainSocket::acceptAndServe(){ struct sockaddr_un lAcceptedSocket; /** if we are here, this means there is data for one socket */ unsigned int t = sizeof(lAcceptedSocket); int s2(0); if ((s2 = accept(this->getSocketDescriptor(), (struct sockaddr *)&lAcceptedSocket, &t)) == -1) { perror("accept"); return false; } { struct ucred lCredentials; socklen_t lSize = sizeof(lCredentials); if (getsockopt(s2, SOL_SOCKET, SO_PEERCRED, &lCredentials, &lSize) == 0){ // cred.uid now contains UID of the connecting process. cout << "Socket credentials:" << endl << "Process ID: " << lCredentials.pid << endl << "User ID: " << lCredentials.uid << endl << "Group ID: " << lCredentials.gid << endl; } } cout << "connected: " << this->getPath() << endl; this->serveStream(s2); //close(s2); I cannot close sockets here, otherwise multithreading goes down the drain. return true; } gift-0.1.14/GIFTServer/gift-config/0000777000175200001440000000000010220511633013636 500000000000000gift-0.1.14/GIFTServer/gift-config/gift-config.pre-mrml0000644000175200001440000001771410153634164017447 00000000000000 gift-0.1.14/GIFTServer/gift-config/Makefile.am0000644000175200001440000000112410153634164015616 00000000000000#MRMLCONFIG=sed "s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@bindir@:g;s:__DATADIR__:@datadir@:g;s:__HOME__:${HOME}:g" < $< > $@ MRMLCONFIG=sed "s:__EXECBINDIR__:@DEBEXECBINDIR@:g;s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@DEBPERLLIBDIR@:g;s:__DATADIR__:@DEBDATADIR@:g;s:__LIBDIR__:@DEBSHAREDIR@:g;s:__HOME__:${HOME}:g;s:__WEB_PUBLISHING_DIRECTORY__:@WEB_PUBLISHING_DIRECTORY@:g;s=__WEB_PUBLISHING_LOCATION__=@WEB_PUBLISHING_LOCATION@=g;" < $< > $@ EXTRA_DIST=gift-config.pre-mrml data_DATA= gift-config.mrml gift-config.mrml: gift-config.pre-mrml $(MRMLCONFIG) CLEANFILES= gift-config.mrmlgift-0.1.14/GIFTServer/gift-config/Makefile.in0000644000175200001440000002542010220474073015630 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = GIFTServer/gift-config DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__installdirs = "$(DESTDIR)$(datadir)" dataDATA_INSTALL = $(INSTALL_DATA) DATA = $(data_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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ #MRMLCONFIG=sed "s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@bindir@:g;s:__DATADIR__:@datadir@:g;s:__HOME__:${HOME}:g" < $< > $@ MRMLCONFIG = sed "s:__EXECBINDIR__:@DEBEXECBINDIR@:g;s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@DEBPERLLIBDIR@:g;s:__DATADIR__:@DEBDATADIR@:g;s:__LIBDIR__:@DEBSHAREDIR@:g;s:__HOME__:${HOME}:g;s:__WEB_PUBLISHING_DIRECTORY__:@WEB_PUBLISHING_DIRECTORY@:g;s=__WEB_PUBLISHING_LOCATION__=@WEB_PUBLISHING_LOCATION@=g;" < $< > $@ EXTRA_DIST = gift-config.pre-mrml data_DATA = gift-config.mrml CLEANFILES = gift-config.mrml all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(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 GIFTServer/gift-config/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu GIFTServer/gift-config/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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-dataDATA: $(data_DATA) @$(NORMAL_INSTALL) test -z "$(datadir)" || $(mkdir_p) "$(DESTDIR)$(datadir)" @list='$(data_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(datadir)/$$f'"; \ $(dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/$$f"; \ done uninstall-dataDATA: @$(NORMAL_UNINSTALL) @list='$(data_DATA)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f '$(DESTDIR)$(datadir)/$$f'"; \ rm -f "$(DESTDIR)$(datadir)/$$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)$(datadir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -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-dataDATA 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-dataDATA 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-dataDATA 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-dataDATA uninstall-info-am gift-config.mrml: gift-config.pre-mrml $(MRMLCONFIG) # 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: gift-0.1.14/GIFTServer/CTCPSocket.h0000644000175200001440000000500710220502730013431 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CTCPSOCKET #define _CTCPSOCKET #include "CSocket.h" #include #include #include #include #include #include #include #include //fchmod #include #include //to be more specific: internet sockets #include #include #include #include using namespace std; /** A structure that opens/closes a TCP socket for a given path and sets the file permissions to 0600. This class will be used with select to be the entry to the local search engine. @see: CMultiServer */ class CTCPSocket:public CSocket{ protected: /** has this been initialized ?*/ bool mIsInitialized; /** the path to the socket (visible in the file system)*/ string mHost; /** the path to the socket (visible in the file system)*/ int mPort; /** the socket structure of the local socket */ struct sockaddr_in mSocketAddress; public: /** constructor */ CTCPSocket(); /** constructor: copy the path, otherwise do nothing */ CTCPSocket(const string& inHost, int inPort); /** destroy this: close the socket */ ~CTCPSocket(); /** set the path of the TCP socket and listen to it */ bool listenAtHostPort(const string& inHost,int inSocket); /** get the hostname it's listening to of the socket */ string getHost()const; /** get the hostname it's listening to of the socket */ int getPort()const; /** */ bool acceptAndServe(); /** */ operator bool()const; }; #endif gift-0.1.14/GIFTServer/processMessage.h0000644000175200001440000000223410220502730014511 00000000000000// -*- mode: c++ -*- #ifndef _CPROCESSMESSAGE #define _CPROCESSMESSAGE /* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /** This function takes a socket and uses it for one message */ extern void* processMessage(void* inProcessMessageParameters); #endif gift-0.1.14/GIFTServer/CMultiServer.cc0000644000175200001440000000257110220502730014254 00000000000000#include "CSocket.h" #include "CMultiServer.h" /** a Server that serves multiple sockets at the same time */ bool CMultiServer::addSocket(CSocket* inSocket){ if(inSocket && bool(*inSocket)){ mSockets.push_back(inSocket); mDescriptorToSocket[mSockets.back()->getSocketDescriptor()]= mSockets.back(); return 1; }else{ return 0; } }; /** start serving these sockets */ void CMultiServer::serve(){ for(;;) { fd_set lReadFileDescriptors; FD_ZERO(&lReadFileDescriptors); int lMax(0); for(list::iterator i=mSockets.begin(); i!=mSockets.end(); i++){ FD_SET(((*i)->getSocketDescriptor()),&lReadFileDescriptors); if((*i)->getSocketDescriptor()>lMax){ lMax=(*i)->getSocketDescriptor(); } } int done, n; cout << "Waiting for connection..." << endl; int lReturnValue = select(lMax+1, &lReadFileDescriptors, NULL, NULL, NULL); cout << "...select" << endl; for(list::iterator i=mSockets.begin(); i!=mSockets.end(); i++){ if(FD_ISSET(((*i)->getSocketDescriptor()), &lReadFileDescriptors)){ try{ cerr << "trying to accept " << (*i)->getSocketDescriptor() << " " << bool(**i) << endl; if(**i){ (*i)->acceptAndServe(); } }catch(const char*){ cerr << "Accept failed, exception caught" << endl; } } } cout << "endfor " << endl; } } gift-0.1.14/GIFTServer/generateInvertedFile.cc0000644000175200001440000000405010220502730015755 00000000000000/*************************************** * * generateInvertedFile * * creates an inverted file at the using the * files * **************************************** * * modification history: * * WM 991213 created the file * **************************************** * * compiler defines used: * * QUERY * ****************************************/ #include "libMRML/include/mrml_const.h" #include "libMRML/include/CXMLElement.h" #include "libGIFTAcInvertedFile/include/CAcIFFileSystem.h" /*************************************** * * main - main program, that reads the parameters and * executes the creation of the inverted file * **************************************** * * modification history * * * ****************************************/ CMutex* gMutex(new CMutex()); main(int argc, char** argv){ if(argc==2){ /* reading the parameters */ string lPrefix(argv[1]); string lURL2FTS(lPrefix+"/url2fts.xml"); string lFeatureDescription(lPrefix+"/InvertedFileFeatureDescription.db"); cout << "Creating an inverted file using the files" << lPrefix << endl << lURL2FTS << endl << lFeatureDescription << endl << endl << flush; CXMLElement lElement(mrml_const::collection, 0); lElement.addAttribute(mrml_const::cui_base_dir, lPrefix); lElement.addAttribute(mrml_const::cui_feature_file_location, "url2fts.xml"); lElement.addAttribute(mrml_const::cui_feature_description_location, "InvertedFileFeatureDescription.db"); lElement.addAttribute(mrml_const::cui_inverted_file_location, "InvertedFile.db"); lElement.addAttribute(mrml_const::cui_offset_file_location, "InvertedFileOffset.db"); lElement.addAttribute(mrml_const::cui_generate_inverted_file, "yes"); CAcIFFileSystem lAccessor(lElement); if(lAccessor){ cout << "GENERATED inverted file" << endl << flush; }else{ cout << "ERROR in generating inverted file"; } }else{ cout << "USAGE: " << argv[0] << " " << "[inverted file directory]"; } } gift-0.1.14/GIFTServer/CDomainSocket.h0000644000175200001440000000454310220502730014216 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CDOMAINSOCKET #define _CDOMAINSOCKET #include #include #include #include #include #include #include #include //fchmod #include #include #include #include #include #include "CSocket.h" using namespace std; /** A structure that opens/closes a domain socket for a given path and sets the file permissions to 0600. This class will be used with select to be the entry to the local search engine. @see: CMultiServer */ class CDomainSocket:public CSocket{ protected: /** has this been initialized ?*/ bool mIsInitialized; /** the path to the socket (visible in the file system)*/ string mPath; /** the socket structure of the local socket */ struct sockaddr_un mSocketStructure; public: /** constructor */ CDomainSocket(); /** constructor: copy the path, otherwise do nothing */ CDomainSocket(const string& inPath); /** destroy this: close the socket */ ~CDomainSocket(); /** set the path of the domain socket and listen to it */ bool listenToPath(const string& inPath); /** get the path of the socket */ string getPath()const; /** Serve from the socket that accepted */ virtual void serveStream(int); /** */ virtual bool acceptAndServe(); /** */ operator bool()const; }; #endif gift-0.1.14/GIFTServer/CSocket.cc0000644000175200001440000000136110220502730013217 00000000000000#include "CSocket.h" using namespace std; /** constructor */ CSocket::CSocket(): mSocketDescriptor(0), mIsInitialized(0){ }; /** destroy this: close the socket */ CSocket::~CSocket(){ if(mIsInitialized && mSocketDescriptor){ close(mSocketDescriptor); } }; /** get the descriptor of the socket */ int CSocket::getSocketDescriptor()const{ return mSocketDescriptor; }; /** Serve from the socket that accepted */ void CSocket::setServeFunction(CSocket::CServeFunction* inServeFunction){ mServeFunction=inServeFunction; }; /** Serve from the socket that accepted */ void CSocket::serveStream(int inAcceptedSocket){ mServeFunction->operator()(inAcceptedSocket); }; /** */ CSocket::operator bool()const{ return mIsInitialized; }; gift-0.1.14/GIFTServer/Makefile.am0000644000175200001440000000651010153634164013426 00000000000000 # the bin programs to be made in this directory SUBDIRS = gift-config gift-mrml-messages # data_DATA= gift-config gift-mrml-messages bin_PROGRAMS = gift gift-endianize gift-generate-inverted-file gift-modify-distance-matrix gift-one-minus #gift-debug-test # generateDistanceMatrix # should be generated, too, but # at present this file is not maintained. # it is not necessary for running the basic version of gift # include directories for all programs in this dir INCLUDES = -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcInvertedFile/include -I$(top_srcdir)/libGIFTAcURL2FTS/include -I$(srcdir) -I. #------------------------------------------------- # the gift server # # remark: The perl accessor has to be linked at compile time, # as it is unlikely that the user has a shared perl library # installed. # # The -L lines will be gone when libtool 1.4 is shipping # 1.3.5 does needs them # # # removed ../expat/xmlparse/*.o ../expat/xmltok/*.o gift_LDADD = @PRE_INSTALL_LIBDIRS@ @PRE_INSTALL_LIBDIRS@ \ @UNPUBLISHED_DIR@ @UNPUBLISHED@ @BAYESIAN@ \ -lGIFTQuPerl -lGIFTAcPerl -lMRML\ @BAYESIAN_LD_ADD@\ @PERL_LD_ADD@ -L$(libdir) #-lwdbi # -lefence \ # -lGIFTAcURL2FTS -lGIFTAcInvertedFile \ # -lGIFTAcHierarchy \ # -lGIFTQuInvertedFile -lGIFTQuHierarchy #@PERL_LD_ADD@ #`echo $LDFLAGS \`perl -MExtUtils::Embed -e ldopts \`|sed 's:-Dbool=char::'` gift_SOURCES = Server.cc CSocket.cc CDomainSocket.cc CTCPSocket.cc processMessage.cc CProcessMessageParameters.cc CMultiServer.cc #------------------------------------------------- # generate inverted file gift_generate_inverted_file_LDADD = @PRE_INSTALL_LIBDIRS@ -lMRML -lGIFTAcInvertedFile -lGIFTAcPerl -lGIFTQuPerl @PERL_LD_ADD@ # -lGIFTAcURL2FTS -lGIFTAcInvertedFile -lGIFTQuInvertedFile\ # # -lGIFTAcHierarchy -lGIFTQuHierarchy\ #@PRE_INSTALL_LIBDIRS@ @UNPUBLISHED_DIR@ @BAYESIAN@ @UNPUBLISHED@ -lMRML\ # @BAYESIAN_LD_ADD@\ # gift_generate_inverted_file_LDFLAGS = # removed ../expat/xmlparse/*.o ../expat/xmltok/*.o gift_generate_inverted_file_SOURCES=generateInvertedFile.cc # change the "endianicity" # (useful when exchanging files across a heterogeneous network) # relies on files consisting of 4-byte-variables only gift_endianize_SOURCES = endianize.cc # Generate a distance matrix from a given database # (this is needed for the scheme in libBayesian. # we suggest this for research only. it was mainly # for having a reasonably fast experimental platform # that I (WM) did this. # generateDistanceMatrix_SOURCES = generateDistanceMatrix.cc # generateDistanceMatrix_LDADD = -L../libGIFTInvertedFile/cc -L../libBayesian/cc -lInvertedFile @BAYESIAN@ # symmetrify raw distance matrix (or things like that) gift_modify_distance_matrix_SOURCES = modifyDistanceMatrix.cc # for curing sign (+-) errors in the distance matrix. # it reads a sequence of floats and puts out # (1-x) for each float x read # YESSIR, this is a HACK. gift_one_minus_SOURCES = oneMinus.cc #gift_debug_test_SOURCES = gift-debug-test.cc #gift_debug_test_LDADD = ../expat/xmlparse/*.o ../expat/xmltok/*.o \ # -lefence \ # @PRE_INSTALL_LIBDIRS@ @PRE_INSTALL_LIBDIRS@\ # @UNPUBLISHED_DIR@ @UNPUBLISHED@ @BAYESIAN@ \ # -lGIFTQuPerl -lGIFTAcPerl -lMRML\ # @PERL_LD_ADD@ noinst_HEADERS = CSocket.h CDomainSocket.h CTCPSocket.h CMultiServer.h processMessage.h CProcessMessageParameters.h gift-0.1.14/GIFTServer/Makefile.in0000644000175200001440000006216610220474073013444 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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@ # the bin programs to be made in this directory SOURCES = $(gift_SOURCES) $(gift_endianize_SOURCES) $(gift_generate_inverted_file_SOURCES) $(gift_modify_distance_matrix_SOURCES) $(gift_one_minus_SOURCES) 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 = : host_triplet = @host@ bin_PROGRAMS = gift$(EXEEXT) gift-endianize$(EXEEXT) \ gift-generate-inverted-file$(EXEEXT) \ gift-modify-distance-matrix$(EXEEXT) gift-one-minus$(EXEEXT) subdir = GIFTServer DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_gift_OBJECTS = Server.$(OBJEXT) CSocket.$(OBJEXT) \ CDomainSocket.$(OBJEXT) CTCPSocket.$(OBJEXT) \ processMessage.$(OBJEXT) CProcessMessageParameters.$(OBJEXT) \ CMultiServer.$(OBJEXT) gift_OBJECTS = $(am_gift_OBJECTS) gift_DEPENDENCIES = am_gift_endianize_OBJECTS = endianize.$(OBJEXT) gift_endianize_OBJECTS = $(am_gift_endianize_OBJECTS) gift_endianize_LDADD = $(LDADD) am_gift_generate_inverted_file_OBJECTS = \ generateInvertedFile.$(OBJEXT) gift_generate_inverted_file_OBJECTS = \ $(am_gift_generate_inverted_file_OBJECTS) gift_generate_inverted_file_DEPENDENCIES = am_gift_modify_distance_matrix_OBJECTS = \ modifyDistanceMatrix.$(OBJEXT) gift_modify_distance_matrix_OBJECTS = \ $(am_gift_modify_distance_matrix_OBJECTS) gift_modify_distance_matrix_LDADD = $(LDADD) am_gift_one_minus_OBJECTS = oneMinus.$(OBJEXT) gift_one_minus_OBJECTS = $(am_gift_one_minus_OBJECTS) gift_one_minus_LDADD = $(LDADD) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/CDomainSocket.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/CMultiServer.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/CProcessMessageParameters.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/CSocket.Po ./$(DEPDIR)/CTCPSocket.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/Server.Po ./$(DEPDIR)/endianize.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/generateInvertedFile.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/modifyDistanceMatrix.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/oneMinus.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/processMessage.Po CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(gift_SOURCES) $(gift_endianize_SOURCES) \ $(gift_generate_inverted_file_SOURCES) \ $(gift_modify_distance_matrix_SOURCES) \ $(gift_one_minus_SOURCES) DIST_SOURCES = $(gift_SOURCES) $(gift_endianize_SOURCES) \ $(gift_generate_inverted_file_SOURCES) \ $(gift_modify_distance_matrix_SOURCES) \ $(gift_one_minus_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 HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = gift-config gift-mrml-messages #gift-debug-test # generateDistanceMatrix # should be generated, too, but # at present this file is not maintained. # it is not necessary for running the basic version of gift # include directories for all programs in this dir INCLUDES = -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcInvertedFile/include -I$(top_srcdir)/libGIFTAcURL2FTS/include -I$(srcdir) -I. #------------------------------------------------- # the gift server # # remark: The perl accessor has to be linked at compile time, # as it is unlikely that the user has a shared perl library # installed. # # The -L lines will be gone when libtool 1.4 is shipping # 1.3.5 does needs them # # # removed ../expat/xmlparse/*.o ../expat/xmltok/*.o gift_LDADD = @PRE_INSTALL_LIBDIRS@ @PRE_INSTALL_LIBDIRS@ \ @UNPUBLISHED_DIR@ @UNPUBLISHED@ @BAYESIAN@ \ -lGIFTQuPerl -lGIFTAcPerl -lMRML\ @BAYESIAN_LD_ADD@\ @PERL_LD_ADD@ -L$(libdir) #-lwdbi # -lefence \ # -lGIFTAcURL2FTS -lGIFTAcInvertedFile \ # -lGIFTAcHierarchy \ # -lGIFTQuInvertedFile -lGIFTQuHierarchy #@PERL_LD_ADD@ #`echo $LDFLAGS \`perl -MExtUtils::Embed -e ldopts \`|sed 's:-Dbool=char::'` gift_SOURCES = Server.cc CSocket.cc CDomainSocket.cc CTCPSocket.cc processMessage.cc CProcessMessageParameters.cc CMultiServer.cc #------------------------------------------------- # generate inverted file gift_generate_inverted_file_LDADD = @PRE_INSTALL_LIBDIRS@ -lMRML -lGIFTAcInvertedFile -lGIFTAcPerl -lGIFTQuPerl @PERL_LD_ADD@ # -lGIFTAcURL2FTS -lGIFTAcInvertedFile -lGIFTQuInvertedFile\ # # -lGIFTAcHierarchy -lGIFTQuHierarchy\ #@PRE_INSTALL_LIBDIRS@ @UNPUBLISHED_DIR@ @BAYESIAN@ @UNPUBLISHED@ -lMRML\ # @BAYESIAN_LD_ADD@\ # gift_generate_inverted_file_LDFLAGS = # removed ../expat/xmlparse/*.o ../expat/xmltok/*.o gift_generate_inverted_file_SOURCES = generateInvertedFile.cc # change the "endianicity" # (useful when exchanging files across a heterogeneous network) # relies on files consisting of 4-byte-variables only gift_endianize_SOURCES = endianize.cc # Generate a distance matrix from a given database # (this is needed for the scheme in libBayesian. # we suggest this for research only. it was mainly # for having a reasonably fast experimental platform # that I (WM) did this. # generateDistanceMatrix_SOURCES = generateDistanceMatrix.cc # generateDistanceMatrix_LDADD = -L../libGIFTInvertedFile/cc -L../libBayesian/cc -lInvertedFile @BAYESIAN@ # symmetrify raw distance matrix (or things like that) gift_modify_distance_matrix_SOURCES = modifyDistanceMatrix.cc # for curing sign (+-) errors in the distance matrix. # it reads a sequence of floats and puts out # (1-x) for each float x read # YESSIR, this is a HACK. gift_one_minus_SOURCES = oneMinus.cc #gift_debug_test_SOURCES = gift-debug-test.cc #gift_debug_test_LDADD = ../expat/xmlparse/*.o ../expat/xmltok/*.o \ # -lefence \ # @PRE_INSTALL_LIBDIRS@ @PRE_INSTALL_LIBDIRS@\ # @UNPUBLISHED_DIR@ @UNPUBLISHED@ @BAYESIAN@ \ # -lGIFTQuPerl -lGIFTAcPerl -lMRML\ # @PERL_LD_ADD@ noinst_HEADERS = CSocket.h CDomainSocket.h CTCPSocket.h CMultiServer.h processMessage.h CProcessMessageParameters.h all: all-recursive .SUFFIXES: .SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: $(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 GIFTServer/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu GIFTServer/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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 gift$(EXEEXT): $(gift_OBJECTS) $(gift_DEPENDENCIES) @rm -f gift$(EXEEXT) $(CXXLINK) $(gift_LDFLAGS) $(gift_OBJECTS) $(gift_LDADD) $(LIBS) gift-endianize$(EXEEXT): $(gift_endianize_OBJECTS) $(gift_endianize_DEPENDENCIES) @rm -f gift-endianize$(EXEEXT) $(CXXLINK) $(gift_endianize_LDFLAGS) $(gift_endianize_OBJECTS) $(gift_endianize_LDADD) $(LIBS) gift-generate-inverted-file$(EXEEXT): $(gift_generate_inverted_file_OBJECTS) $(gift_generate_inverted_file_DEPENDENCIES) @rm -f gift-generate-inverted-file$(EXEEXT) $(CXXLINK) $(gift_generate_inverted_file_LDFLAGS) $(gift_generate_inverted_file_OBJECTS) $(gift_generate_inverted_file_LDADD) $(LIBS) gift-modify-distance-matrix$(EXEEXT): $(gift_modify_distance_matrix_OBJECTS) $(gift_modify_distance_matrix_DEPENDENCIES) @rm -f gift-modify-distance-matrix$(EXEEXT) $(CXXLINK) $(gift_modify_distance_matrix_LDFLAGS) $(gift_modify_distance_matrix_OBJECTS) $(gift_modify_distance_matrix_LDADD) $(LIBS) gift-one-minus$(EXEEXT): $(gift_one_minus_OBJECTS) $(gift_one_minus_DEPENDENCIES) @rm -f gift-one-minus$(EXEEXT) $(CXXLINK) $(gift_one_minus_LDFLAGS) $(gift_one_minus_OBJECTS) $(gift_one_minus_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDomainSocket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CMultiServer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CProcessMessageParameters.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CSocket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CTCPSocket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Server.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/endianize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generateInvertedFile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modifyDistanceMatrix.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oneMinus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/processMessage.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # 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): @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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: @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; 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='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="../$(top_distdir)" \ distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-binPROGRAMS clean-generic clean-libtool \ clean-recursive ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-recursive 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-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS 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: gift-0.1.14/GIFTServer/gift-mrml-messages/0000777000175200001440000000000010220511633015145 500000000000000gift-0.1.14/GIFTServer/gift-mrml-messages/Makefile.am0000644000175200001440000000115310153634164017127 00000000000000data_DATA= gift-ihandshake.mrml gift-iconfigure.mrml #MRMLCONFIG=sed "s:__DATADIR__:@datadir@:g" < $< > $@ MRMLCONFIG=sed "s:__EXECBINDIR__:@DEBEXECBINDIR@:g;s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@DEBPERLLIBDIR@:g;s:__DATADIR__:@DEBDATADIR@:g;s:__LIBDIR__:@DEBSHAREDIR@:g;s:__HOME__:${HOME}:g;s:__WEB_PUBLISHING_DIRECTORY__:@WEB_PUBLISHING_DIRECTORY@:g;s=__WEB_PUBLISHING_LOCATION__=@WEB_PUBLISHING_LOCATION@=g;" < $< > $@ EXTRA_DIST= gift-ihandshake.pre-mrml gift-iconfigure.pre-mrml gift-ihandshake.mrml:gift-ihandshake.pre-mrml $(MRMLCONFIG) gift-iconfigure.mrml:gift-iconfigure.pre-mrml $(MRMLCONFIG) gift-0.1.14/GIFTServer/gift-mrml-messages/Makefile.in0000644000175200001440000002541010220474073017136 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = GIFTServer/gift-mrml-messages DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__installdirs = "$(DESTDIR)$(datadir)" dataDATA_INSTALL = $(INSTALL_DATA) DATA = $(data_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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ data_DATA = gift-ihandshake.mrml gift-iconfigure.mrml #MRMLCONFIG=sed "s:__DATADIR__:@datadir@:g" < $< > $@ MRMLCONFIG = sed "s:__EXECBINDIR__:@DEBEXECBINDIR@:g;s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@DEBPERLLIBDIR@:g;s:__DATADIR__:@DEBDATADIR@:g;s:__LIBDIR__:@DEBSHAREDIR@:g;s:__HOME__:${HOME}:g;s:__WEB_PUBLISHING_DIRECTORY__:@WEB_PUBLISHING_DIRECTORY@:g;s=__WEB_PUBLISHING_LOCATION__=@WEB_PUBLISHING_LOCATION@=g;" < $< > $@ EXTRA_DIST = gift-ihandshake.pre-mrml gift-iconfigure.pre-mrml all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(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 GIFTServer/gift-mrml-messages/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu GIFTServer/gift-mrml-messages/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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-dataDATA: $(data_DATA) @$(NORMAL_INSTALL) test -z "$(datadir)" || $(mkdir_p) "$(DESTDIR)$(datadir)" @list='$(data_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(datadir)/$$f'"; \ $(dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/$$f"; \ done uninstall-dataDATA: @$(NORMAL_UNINSTALL) @list='$(data_DATA)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f '$(DESTDIR)$(datadir)/$$f'"; \ rm -f "$(DESTDIR)$(datadir)/$$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)$(datadir)"; 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: -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-dataDATA 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-dataDATA 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-dataDATA 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-dataDATA uninstall-info-am gift-ihandshake.mrml:gift-ihandshake.pre-mrml $(MRMLCONFIG) gift-iconfigure.mrml:gift-iconfigure.pre-mrml $(MRMLCONFIG) # 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: gift-0.1.14/GIFTServer/gift-mrml-messages/gift-iconfigure.pre-mrml0000644000175200001440000000057010153634164021633 00000000000000 gift-0.1.14/GIFTServer/gift-mrml-messages/gift-ihandshake.pre-mrml0000644000175200001440000000025110153634164021574 00000000000000 gift-0.1.14/GIFTServer/CProcessMessageParameters.cc0000644000175200001440000000267110220502730016743 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "CProcessMessageParameters.h" /** the function started by a new thread does not take any parameters except a pointer to void. We want to make that point to something richer. */ CProcessMessageParameters::CProcessMessageParameters(CSessionManager& inSessionManager, string& inPeerAddress, ofstream& inLogFile, int inSocket): mLogFile(inLogFile), mPeerAddress(inPeerAddress), mSessionManager(inSessionManager), mSocket(inSocket){ }; gift-0.1.14/GIFTServer/CTCPSocket.cc0000644000175200001440000000516410220502730013573 00000000000000#include #include "CTCPSocket.h" CTCPSocket::CTCPSocket(): mIsInitialized(false){ }; /** constructor: copy the path, otherwise do nothing */ CTCPSocket::CTCPSocket(const string& inPath, int inPort): mIsInitialized(false){ this->listenAtHostPort(inPath, inPort); }; /** destroy this: close the socket */ CTCPSocket::~CTCPSocket(){ if(mIsInitialized){ close(mSocketDescriptor); } }; /** set the path of the domain socket */ bool CTCPSocket::listenAtHostPort(const string& inHost, int inPort){ if(inHost.size()){ cerr << __FILE__ << ":" << __LINE__<< ":Warning:" << "Hostname currently unused" << endl; } mSocketAddress.sin_family = AF_INET ; /* get the port number */ mSocketAddress.sin_port = htons(inPort); mSocketAddress.sin_addr.s_addr = INADDR_ANY ; if((mSocketDescriptor = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP))<0){ cerr << "could not create socket" << endl; throw("socket"); } int lOptionOn; if(0 > setsockopt(mSocketDescriptor, SOL_SOCKET, SO_REUSEADDR, (char*)&lOptionOn, sizeof(lOptionOn))){ cerr << "could not set REUSEADDR: " << strerror(errno) << flush << endl; throw("setsockopt"); }; /* assigns a name to the socket */ if(bind(mSocketDescriptor, (struct sockaddr *) &mSocketAddress , sizeof(mSocketAddress) ) == -1 ) { printf("bind error: %s\n",strerror(errno)) ; throw("bind"); } /*listen to incoming connections */ /* backlog = 5 */ if(listen(mSocketDescriptor, 5)==-1){ printf("listen error: %s\n",strerror(errno)) ; throw("listen"); } cerr << "TCP socket successfully initialized:" << mSocketDescriptor<< endl; return mIsInitialized=1; }; /** get the path of the socket */ CTCPSocket::operator bool()const{ return mIsInitialized; } /** get the path of the socket */ string CTCPSocket::getHost()const{ return mHost; } /** get the path of the socket */ int CTCPSocket::getPort()const{ return mPort; } bool CTCPSocket::acceptAndServe(){ struct sockaddr_in lAcceptedSocket; /** if we are here, this means there is data for one socket */ cerr << "Accept and serve: " << this->getSocketDescriptor() << endl; unsigned int lSize = sizeof(lAcceptedSocket); int s2(0); if(-1 == (s2 = accept(this->getSocketDescriptor(), (struct sockaddr *)&lAcceptedSocket, &lSize))) { perror("accept"); return false; } cout << "connected: " << (this)->getSocketDescriptor() << "->" << s2 << endl; (this)->serveStream(s2); // close(s2); I cannot close sockets here, otherwise multithreading goes down the drain return true; } gift-0.1.14/GIFTServer/Server.cc0000644000175200001440000004400210220502730013131 00000000000000/*--------------------------------------------------------------------------- Program name : Server.cc Function : An example MRML server Creation Date : July 1999 Author : Wolfgang Müller (some very small parts (< 200 lines) of this code still stem from Jilali Raki's MREP based server) Last modification: December 2001 (don't count on this date) defines: _NON_BLOCKING: if !=0 then the socket will be used as a non-blocking one __GIFT_NEW_OPERATOR_NEW use my own memory management ---------------------------------------------------------------------------*/ //use stuff by Wolfgang which has not yet been "released" to the group #define WOLFGANG_DEVELOPER #include // standard exceptions using namespace std; #ifdef __GIFT_NEW_OPERATOR_NEW // this is a self-made memory manager #include "libMRML/include/CDebuggingMemoryManager.h" // this is for replacing the new() operator #include "libMRML/include/myNew.h" CDebuggingMemoryManager gMemManager(MEMSIZE); #endif #define _GNU_SOURCE #include #include #include #include #include // mutual excludes for // multithreading #include "libMRML/include/CMutex.h" extern CMutex* gMutex; #ifdef __GIFT_NEW_IS_MALLOC void* operator new(size_t s){ // assert(s<10000000); // if(s>10000000){ // cout << ">" << flush; // }else{ // if(s>100000){ // cout << "!" << flush; // }else{ // if(s>1000){ // cout << "£" << flush; // }else{ // cout << "." << flush; // } // } // } if(gMutex){ gMutex->lock(); } void *lResult(malloc(s)); if(gMutex){ gMutex->unlock(); } return lResult; } void* operator new[](size_t s){ return operator new(s); } void operator delete(void * inToBeDeleted){ if(gMutex){ gMutex->lock(); } free(inToBeDeleted); if(gMutex){ gMutex->unlock(); } } void operator delete[](void* inToBeDeleted){ delete(inToBeDeleted); } #endif // the gift exceptions #include "../gift-config.h" #include "libMRML/include/GIFTExceptions.h" // c++ standard library stuff #include #include #include #include //c standard functions #include #include #include //Sockets #include #include #include #include #include #include #include //to be more specific: internet sockets #include #include //will we need the line below? //#include //the expat xml parser by J.Clark //#include "expat/xmlparse/xmlparse.h" #include //a class for using xpat attributes in a nice way #include "libMRML/include/CAttributeList.h" //for making distance matrices #include "libGIFTAcURL2FTS/include/CAcURL2FTS.h" //This is mrml+gift specific #include "libMRML/include/mrml_const.h" //important constants for parsing #include "libMRML/include/CAccessorAdminCollection.h" #include "libMRML/include/CSessionManager.h" #include "libMRML/include/CAccessor.h" // distance matrix //for debugging #define _DEBUG #define _NON_BLOCKING 0 #include "libMRML/include/CCommunicationHandler.h" #ifdef __GIFT_SERVER_TREADS__ #define __GIFT_USES_THREADS__ #endif #ifdef __NO_GIFT_SERVER_THREADS__ #undef __GIFT_USES_THREADS__ #endif #include "processMessage.h" #include "CProcessMessageParameters.h" //#undef __GIFT_USES_THREADS__ // for debugging long PORT = 12789; /* port number: this line, for example, is by J. Raki ;-)*/ /*********************************************************************** itoa Function : Converts integer to String using sprintf Input : Integer Return : String ***********************************************************************/ extern string itoa (int val,int length) ; extern string dtoa (double val) ;//..maybe this line is also by J. Raki ;-) extern string gGIFTHome; //waiting that everything has arrived extern void waitWriteStream(int inWritingSocket); extern void waitReadStream(int inReadingSocket); extern void waitExceptionStream(int inExceptioningSocket); /*********************************************************************** sendMessage Function : Send a message through the stream s Input : Socket stream s, number of objects to send Return : 0 if no error else -1 ***********************************************************************/ #undef _DEBUG bool sendMessage(int inSocket, string inString, ostream& outLogFile); /*********************************************************************** ReadMessage Function : read the message coming from the Java Applet using the communication protocol Input : Socket stream s Return : 0 if no error else -1 ***********************************************************************/ bool asyncReadChar(int inSocket,char* outChar); int readMessage(int inSocket, string& outMessage); #define WITH_GENERATE_DISTANCE_MATRIX #ifdef WITH_GENERATE_DISTANCE_MATRIX void generateDistanceMatrix(const string& inBaseDir, const string& inOutputName, const string& inAlgorithm, const string& inCollection, int inSkip, int inTo){ cout << "Starting generateDistanceMatrix " << inAlgorithm << inCollection << inSkip << inTo << endl; map lURLToPosition; string lOutputName=inOutputName +string(".Algorithm") +inAlgorithm +string(".Collection") +inCollection +".bin"; CSessionManager lSessionManager(inBaseDir+"/gift-sessions.mrml", inBaseDir+"/gift-config.mrml", inBaseDir+"/gift-i18n.xml" ); cout << "hier 0" << endl; // open a session string lSessionID(lSessionManager.newSession("DistanceMatrixMaker","")); cout << "hier 1" << endl; // configure the session CAlgorithm* lConfig(new CAlgorithm("adefault", 0)); assert(lConfig); lConfig->addAttribute(mrml_const::algorithm_id, inAlgorithm); lConfig->addAttribute(mrml_const::algorithm_type, inAlgorithm); lConfig->addAttribute(mrml_const::collection_id, inCollection); cout << "hier 1" << endl; lSessionManager.setAlgorithm(lSessionID, lConfig); cout << "hier 2" << endl; // fstream::in+fstream::out would cast to int IMPLICITLY fstream lMatrix(lOutputName.c_str(), fstream::in|fstream::out); cout << "----------------------------------------" << endl << "I am generating a distance matrix" << endl << "Using the algorithm: " << inAlgorithm << endl << "Using the collection: " << inCollection << "," << endl << "I am skipping the first " << inSkip << " lines." << endl << "I am ending before the " << inTo << "th line" << endl << "----------------------------------------" << endl; cout << "----------------------------------------" << endl << "Getting a list of all IDs in the collection" << endl << "SessionID: " << lSessionID << endl << "AlgorithmID: " << inAlgorithm << endl << "CollectionID: " << inCollection << endl; /* Get an accessor. We need this for getting at a list of all the images. Mabe we do this later using a meta data query and coming from the outside. */ CAccessorAdminCollection lAccessorAdminCollection(inBaseDir+"/gift-config.mrml"); CAccessorAdmin& lProxy(lAccessorAdminCollection.getProxy(inCollection)); assert(&lProxy); CAcURL2FTS* lAccessor=(CAcURL2FTS*)lProxy.openAccessor("url2fts"); assert(lAccessor); list lAccessorElements; lAccessor->getAllAccessorElements(lAccessorElements); if(lAccessorElements.size()){ //for guaranteeing a sequence of rising IDs (probably obsolete) lAccessorElements.sort(CSortByID_CAE()); int lSize=lAccessorElements.size(); //write the translator if nothing to be skipped { ofstream lTranslator(string(lOutputName+".trans").c_str()); int lLine=0; for(list::const_iterator i=lAccessorElements.begin(); i!=lAccessorElements.end(); i++){ lTranslator << i->getID() << " " << lLine << endl; lURLToPosition[i->getURL()]=lLine; lLine++; } inTo-=inSkip; } //skip the beginning { for(int i=0; i::const_iterator i=lAccessorElements.begin(); i!=lAccessorElements.end() && lCountgetID() << ": " << i->getURL() << endl; CXMLElement lQuery(mrml_const::query_step,0); lQuery.addAttribute(mrml_const::algorithm_id, inAlgorithm); lQuery.addAttribute(mrml_const::result_size, long(0x7fffffff));//simply get everything lQuery.addAttribute(mrml_const::result_cutoff, 0.0);//and do not cut anything off CXMLElement* lUserRelevanceList=new CXMLElement(mrml_const::user_relevance_element_list, 0); assert(lUserRelevanceList); CXMLElement* lUserRelevanceElement=new CXMLElement(mrml_const::user_relevance_element, 0); lUserRelevanceElement->addAttribute(mrml_const::user_relevance, 1.0); lUserRelevanceElement->addAttribute(mrml_const::image_location, i->getURL()); lQuery.addChild(lUserRelevanceList); lQuery.addChild(lUserRelevanceElement); lQuery.moveUp(); lQuery.moveUp(); string lXML; lQuery.toXML(lXML); cout << "XML:" << lXML << endl << "----------------------------------------" << endl; CXMLElement* lResult=lSessionManager .query(lSessionID, lQuery); { string lString; lResult->toXML(lString); cout << lString << endl; } float lOutVector[lSize]; {//fill lOutVecor with zeroes for(float* p=lOutVector; p!=lOutVector+lSize; *(p++)=0){} } float lZero=0.0; int lLastPosition=0; for(CXMLElement::lCChildren::iterator k=lResult->child_list_begin(); k!=lResult->child_list_end(); k++){ for(CXMLElement::lCChildren::iterator j=(*k)->child_list_begin(); j!=(*k)->child_list_end(); j++){ string lURL=(*j)->stringReadAttribute(mrml_const::image_location).second; double lRelevanceLevel=(*j)->doubleReadAttribute(mrml_const::calculated_similarity).second; lOutVector[lURLToPosition[lURL]]=lRelevanceLevel; cout << endl << "[" << lURLToPosition[lURL] << "__" << lRelevanceLevel << "]" << flush; } } lMatrix.write((char*)lOutVector,sizeof(float)*lSize); lMatrix << flush; delete lResult; cout << endl << "----------------------------------------" << "Writing " << sizeof(float)*lSize << " Bytes" << endl << "Still to go:" << inTo-lCount-1 << " lines." << endl << "----------------------------------------" << endl; } lMatrix.close(); }else{ } } #endif #include "CMultiServer.h" #include "CTCPSocket.h" class CSFGift:public CSocket::CServeFunction{ /** */ ofstream& mLogFile; /** */ CSessionManager& mSessionManager; public: /** */ CSFGift(CSessionManager& inSessionManager, ofstream& inLogFile): mSessionManager(inSessionManager), mLogFile(inLogFile){ }; /** */ bool operator()(int inSocketDescriptor){ cout << "Accepted Connection!" << endl << flush; string lAddress; { struct sockaddr lName; socklen_t lNameLen(sizeof(lName)); if(!getpeername(inSocketDescriptor, &lName, &lNameLen)){ lAddress="Peer INET Address: " + string(inet_ntoa(((sockaddr_in*)(&lName))->sin_addr)); cout << "Accepted from adress [" << lAddress << "]" << endl; } } CProcessMessageParameters* lProcessMessageParameters(new CProcessMessageParameters(mSessionManager, lAddress, mLogFile, inSocketDescriptor)); #ifdef __GIFT_USES_THREADS__ #warning "threading used" pthread_t lThread; int lErrorNumber(0); if(lErrorNumber=pthread_create(&lThread, NULL, &processMessage,lProcessMessageParameters)){ cerr << "Error in creating new thread: " << strerror(lErrorNumber) << endl << "Doing normal function call instead" << endl; processMessage(lProcessMessageParameters); }else{ cout << "Successfully created new message processing thread" << endl; if(lErrorNumber=pthread_detach(lThread)){ cerr << "Error in detaching thread: " << strerror(lErrorNumber) << endl; }else{ cout << "Successfully detached thread" << endl; } } #else #warning "threading blocked" cout << "calling processMessage (no thread)" << endl; processMessage(lProcessMessageParameters); cout << "returned processMessage (no thread)" << endl; #endif } }; static void displayHelp() { cout << PACKAGE << "-" << VERSION << endl << "Usage (server): gift [--port ] [--datadir ] [--no-random-seed]" << endl; #ifdef WITH_GENERATE_DISTANCE_MATRIX cout << "making distance matrices: gift --generate-matrix [--datadir ] " << endl; #endif cout << endl << endl; } /*********************************************************************** main Function : waits for and accepts a connection from a Java Applet. Receives the request from the client and according the request, sends the answer to the client. Socket opening code snipped from J.Raki ***********************************************************************/ int main(int argc, char **argv){ gMutex=0; gMutex=new CMutex(); gGIFTHome=string(getenv("GIFT_HOME")?getenv("GIFT_HOME"):getenv("HOME")?getenv("HOME"):"."); static struct option long_options[] = { {"port", required_argument, 0, 'p'}, {"datadir", required_argument, 0, 'd'}, {"help", no_argument, 0, 'h'}, {"no-random-seed", no_argument, 0, 'r'}, #ifdef WITH_GENERATE_DISTANCE_MATRIX {"generate-matrix",no_argument, 0, 'g'}, #endif { 0, 0, 0, 0 } }; bool doRandom = true; bool generateMatrix = false; while ( 1 ) { int c = getopt_long( argc, argv, "p:d:rgh", long_options, NULL ); if ( c == -1 ) break; switch ( c ) { case 'd': gGIFTHome = string(optarg) + string("/"); break; case 'p': PORT=atoi(optarg); break; case 'r': doRandom = false; break; case 'g': generateMatrix = true; break; case 'h': displayHelp(); ::exit(0); case '?': default: break; } } if(!generateMatrix){ cout << "GIFT:Starting Server" << endl; }else{ cout << "GIFT:Generating distance matrix" << endl; } int idx = optind; if ( !generateMatrix ) { if ( idx < argc ) // more arguments -> backwards compat PORT = atoi(argv[idx++]); if ( idx < argc ) gGIFTHome = string(argv[idx++]) + string("/"); } if ( doRandom ) { cerr << "Random number generator has been seeded with " << getpid() << endl; srand(getpid()); } else { cerr << "Warning: the random generator stays unseeded" << endl; } ofstream lPortFile; { string lPortFileName=gGIFTHome+"/gift-port.txt"; lPortFile.open(lPortFileName.c_str()); assert(lPortFile); } // the communication handler for this application // class definition is just above in this file CSessionManager gSessionManager(gGIFTHome+"/gift-sessions.mrml", gGIFTHome+"/gift-config.mrml", gGIFTHome+"/gift-i18n.xml" ); ofstream gLogFile(string(gGIFTHome+"/gift-log.mrml").c_str(), ios::app); { time_t lNow(time(0)); gLogFile << endl << "" << endl << "" << endl << "" << endl << endl; } #ifdef WITH_GENERATE_DISTANCE_MATRIX if( generateMatrix ){ if ( idx + 4 != argc ) { cerr << endl << "Wrong number of parameters for generating the distance matrix." << endl; displayHelp(); ::exit(1); } //exit(0); generateDistanceMatrix(gGIFTHome, string("DistanceMatrix"), string(argv[idx]), string(argv[idx + 1]), atoi(argv[idx + 2]), atoi(argv[idx + 3])); exit(0); } #endif cout << "----------------------------------------" << endl << "The current configuration directory is: " << gGIFTHome << endl; cout << "----------------------------------------" << endl << "Opening port " << PORT << endl << "----------------------------------------" << endl; try{ CMultiServer lServer; CTCPSocket lSocket1("",PORT); CTCPSocket lSocket2("",PORT+1); // write out the ports lPortFile << PORT << endl; lPortFile << PORT+1 << endl; lPortFile.close(); // close that file CSFGift lServeFunction(gSessionManager,gLogFile); lSocket1.setServeFunction((&lServeFunction)); lSocket2.setServeFunction((&lServeFunction)); lServer.addSocket(&lSocket1); lServer.addSocket(&lSocket2); lServer.serve(); } catch(GIFTException& inCaught){ cout << "Caught inServer Main:" << inCaught << endl << flush; } catch(GIFTException* inCaught){ cout << "Caught inServer Main:" << *inCaught << endl << flush; } catch(exception& inCaught){ cout << "Caught inServer Main:" << inCaught.what() << endl << flush; } catch(...){ cout << "there was an unknown exception" < #include /** a Server that serves multiple sockets at the same time */ class CMultiServer{ protected: /** a list containing domain sockets */ list mSockets; /** find for a given file descriptor the socket */ map mDescriptorToSocket; public: bool addSocket(CSocket* inSocket); /** start serving these sockets */ void serve(); }; #endif gift-0.1.14/GIFTServer/CProcessMessageParameters.h0000644000175200001440000000360510220502730016603 00000000000000// -*- mode: c++ -*- #ifndef _CPROCESSMESSAGEPARAMETERS #define _CPROCESSMESSAGEPARAMETERS /* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include "libMRML/include/CSessionManager.h" using namespace std; /** the function started by a new thread does not take any parameters except a pointer to void. We want to make that point to something richer. */ class CProcessMessageParameters{ public: /** the file descriptor of the socket */ int mSocket; /** The log file for the communication */ ofstream& mLogFile; /** The sessionManager of the communication */ CSessionManager& mSessionManager; /** The socket address of the peer */ string mPeerAddress; /** makes this structure (needed because of the use of references [ofstream& mLogFile]). */ CProcessMessageParameters(CSessionManager& inSessionManager, string& inPeerAddress, ofstream& inLogFile, int inSocket); }; #endif gift-0.1.14/aclocal-add.m40000644000175200001440000001704010175464140012037 00000000000000AC_DEFUN([ACX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_LANG_SAVE AC_LANG_C acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) AC_MSG_RESULT($acx_pthread_ok) if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case "${host_cpu}-${host_os}" in *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthread or # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" ;; esac if test x"$acx_pthread_ok" = xno; then for flag in $acx_pthread_flags; do case $flag in none) AC_MSG_CHECKING([whether pthreads work without any flags]) ;; -*) AC_MSG_CHECKING([whether pthreads work with $flag]) PTHREAD_CFLAGS="$flag" ;; pthread-config) AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) if test x"$acx_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) AC_MSG_CHECKING([for the pthreads library -l$flag]) PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. AC_TRY_LINK([#include ], [pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], [acx_pthread_ok=yes]) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" AC_MSG_RESULT($acx_pthread_ok) if test "x$acx_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$acx_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. AC_MSG_CHECKING([for joinable pthread attribute]) attr_name=unknown for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do AC_TRY_LINK([#include ], [int attr=$attr;], [attr_name=$attr; break]) done AC_MSG_RESULT($attr_name) if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, [Define to necessary symbol if this constant uses a non-standard name on your system.]) fi AC_MSG_CHECKING([if more special flags are required for pthreads]) flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; esac AC_MSG_RESULT(${flag}) if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with cc_r AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC}) else PTHREAD_CC="$CC" fi AC_SUBST(PTHREAD_LIBS) AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_CC) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) : else acx_pthread_ok=no $2 fi AC_LANG_RESTORE ])dnl ACX_PTHREAD AC_PREREQ(2.49) AC_DEFUN([adl_FUNC_GETOPT_LONG], [# clean out junk possibly left behind by a previous configuration rm -f lib/getopt.h # Check for getopt_long support AC_CHECK_HEADER([getopt.h]) AC_CHECK_FUNCS([getopt_long],, [# FreeBSD has a gnugetopt library for this AC_CHECK_LIB([gnugetopt],[getopt_long],[AC_DEFINE([HAVE_GETOPT_LONG])], [# use the GNU replacement AC_LIBOBJ(getopt) AC_LIBOBJ(getopt1) AC_CONFIG_LINKS([lib/getopt.h:lib/gnugetopt.h])])])]) gift-0.1.14/libGIFTAcPerl/0000777000175200001440000000000010220511627012034 500000000000000gift-0.1.14/libGIFTAcPerl/cc/0000777000175200001440000000000010220511627012421 500000000000000gift-0.1.14/libGIFTAcPerl/cc/CAcPerl.cc0000644000175200001440000000457010220502730014116 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /** * * Do we print the initialisation? * */ #ifdef __GIFT_WITH_PERL__ #define _NO_PRINT_INIT #include "libMRML/include/mrml_const.h" #include "libGIFTAcPerl/include/CAcPerl.h" #include "libMRML/include/CXMLElement.h" // constructor /** */ CAcPerl::CAcPerl(const CXMLElement& inCollectionElement): mCollectionElement(inCollectionElement.clone(true)){ }; /** */ CAcPerl::~CAcPerl(){ cerr << "deleting perl accessor" << endl; }; /** */ CXMLElement* CAcPerl::cloneCollectionElement()const{ return mCollectionElement->clone(true); }; /** */ CAcPerl::operator bool()const{ return mCollectionElement; } /** * */ string CAcPerl::IDToURL(long int) const{ assert(0); return "this function should never be called"; }; /** * */ struct pair CAcPerl::IDToAccessorElement(long int) const{ return(make_pair(bool(0),CAccessorElement(0,"null","null","null"))); }; /** * */ struct pair CAcPerl::URLToID(const string &) const{ return(make_pair(bool(0),0)); }; /** * */ void CAcPerl::getAllIDs(list &) const{ assert(0); }; /** * */ void CAcPerl::getAllAccessorElements(list &) const{ assert(0); }; /** * */ void CAcPerl::getRandomIDs(list &, unsigned int) const{ assert(0); }; /** * */ void CAcPerl::getRandomAccessorElements(list &, unsigned int) const{ assert(0); }; /** * */ int CAcPerl::size() const{ return 0; } #endif gift-0.1.14/libGIFTAcPerl/cc/Makefile.am0000644000175200001440000000233510153634165014404 00000000000000# -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # #Makefile for the AcPerl library # lib_LTLIBRARIES = libGIFTAcPerl.la libGIFTAcPerl_la_LDFLAGS=@PRE_INSTALL_LIBDIRS@ --rpath../../libMRML/cc/.libs/ -lMRML INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcPerl/include # libGIFTAcPerl_a_SOURCES= libGIFTAcPerl_la_SOURCES= \ CAcPerl.cc\ CAFPerl.cc gift-0.1.14/libGIFTAcPerl/cc/Makefile.in0000644000175200001440000004065610220474075014422 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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@ # -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # #Makefile for the AcPerl library # SOURCES = $(libGIFTAcPerl_la_SOURCES) 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 = : host_triplet = @host@ subdir = libGIFTAcPerl/cc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libGIFTAcPerl_la_LIBADD = am_libGIFTAcPerl_la_OBJECTS = CAcPerl.lo CAFPerl.lo libGIFTAcPerl_la_OBJECTS = $(am_libGIFTAcPerl_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/CAFPerl.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CAcPerl.Plo CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libGIFTAcPerl_la_SOURCES) DIST_SOURCES = $(libGIFTAcPerl_la_SOURCES) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libGIFTAcPerl.la libGIFTAcPerl_la_LDFLAGS = @PRE_INSTALL_LIBDIRS@ --rpath../../libMRML/cc/.libs/ -lMRML INCLUDES = -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcPerl/include # libGIFTAcPerl_a_SOURCES= libGIFTAcPerl_la_SOURCES = \ CAcPerl.cc\ CAFPerl.cc all: all-am .SUFFIXES: .SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: $(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 libGIFTAcPerl/cc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTAcPerl/cc/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libGIFTAcPerl.la: $(libGIFTAcPerl_la_OBJECTS) $(libGIFTAcPerl_la_DEPENDENCIES) $(CXXLINK) -rpath $(libdir) $(libGIFTAcPerl_la_LDFLAGS) $(libGIFTAcPerl_la_OBJECTS) $(libGIFTAcPerl_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAFPerl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAcPerl.Plo@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: 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) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES 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-info-am \ uninstall-libLTLIBRARIES # 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: gift-0.1.14/libGIFTAcPerl/cc/CAFPerl.cc0000644000175200001440000000037410220502730014057 00000000000000#include "libGIFTAcPerl/include/CAFPerl.h" #ifdef __GIFT_WITH_PERL__ /** */ CAccessor* CAFPerl::makeAccessor(const CXMLElement& inConfiguration)const{ return new CAcPerl(inConfiguration); }; /** */ CAFPerl::CAFPerl(){ mName="perl"; }; #endif gift-0.1.14/libGIFTAcPerl/Makefile.am0000644000175200001440000000002410153634165014010 00000000000000SUBDIRS= cc include gift-0.1.14/libGIFTAcPerl/Makefile.in0000644000175200001440000003453610220474075014035 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = libGIFTAcPerl DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = 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 ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = cc include all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(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 libGIFTAcPerl/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTAcPerl/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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: # 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): @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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: @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; 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='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="../$(top_distdir)" \ distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive 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-info \ install-info-am install-man 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-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: gift-0.1.14/libGIFTAcPerl/include/0000777000175200001440000000000010220511627013457 500000000000000gift-0.1.14/libGIFTAcPerl/include/CAFPerl.h0000644000175200001440000000272110220502730014755 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifdef __GIFT_WITH_PERL__ #ifndef _CAFPERL #define _CAFPERL #include "libGIFTAcPerl/include/uses-declarations.h" #include "libMRML/include/CAccessorFactory.h" #include "libGIFTAcPerl/include/CAcPerl.h" /** * A factory to make perl links *@author Wolfgang Müller * */ class CAFPerl:public CAccessorFactory{ public: /** Constructs this: i.e. sets mName */ CAFPerl(); /** makes an inverte file accessor */ CAccessor* makeAccessor(const CXMLElement& inConfiguration)const; }; #endif #endif gift-0.1.14/libGIFTAcPerl/include/CAcPerl.h0000644000175200001440000000701610220502730015014 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "../../gift-config.h" #ifdef __GIFT_WITH_PERL__ // -*- mode: c++ -*- #ifndef _CACPERL #define _CACPERL #include "libGIFTAcPerl/include/uses-declarations.h" /** * * CAcPerl * a class which makes the configuration of a collection * accessible to some perl linked to gift * * modification history: * * WM 20000626 created file * * * * compiler defines used: * */ #include #include "libMRML/include/TID.h" #include #include #include #include #ifdef HAS_HASH_MAP #include #else #define hash_map map #endif #include "libMRML/include/CAccessor.h" #include "libMRML/include/CSelfDestroyPointer.h" class CXMLElement;//constructor /** This accessor is a base class for accessors which use an Perl file to implement the interface of the CAccessor base class. If we do not want to get very deeply into perl, we have to make this accessor some kind of pseudo accessor */ class CAcPerl:public CAccessor{ private: /** An XMLElement containing an "collection" element from the configuration file */ CSelfDestroyPointer mCollectionElement; public: /** * Unlike the other accessors, this accessor does not treat any * data. Its only reason of existence is to pass through the input * parameter inContentElement when needed. This means, it * enables perl scripts to configure themselves * in the same way as other query processors do, * pertaining the usual structure for configuration files. * * As a consequence which parts of the element * that is given as inContentElement, is entirely in the * responsibility of the query processor using this accessor. */ CAcPerl(const CXMLElement& inContentElement); /** * Destructor: Write amessage and return */ ~CAcPerl(); /** * * Is this accessor up and working? * */ virtual operator bool()const; /** * * Get the mCollectionElement * */ CXMLElement* cloneCollectionElement()const; /** * */ string IDToURL(long int) const; /** * */ struct pair IDToAccessorElement(long int) const; /** * */ struct pair URLToID(const string &) const; /** * */ void getAllIDs(list &) const; /** * */ void getAllAccessorElements(list &) const; /** * */ void getRandomIDs(list &, unsigned int) const; /** * */ void getRandomAccessorElements(list &, unsigned int) const; /** * */ int size() const; }; #endif #endif gift-0.1.14/libGIFTAcPerl/include/Makefile.am0000644000175200001440000000016510153634165015441 00000000000000libGIFTAcPerldir=$(includedir)/libGIFTAcPerl/include libGIFTAcPerl_HEADERS=CAFPerl.h CAcPerl.h uses-declarations.h gift-0.1.14/libGIFTAcPerl/include/Makefile.in0000644000175200001440000003010110220474075015440 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = libGIFTAcPerl/include DIST_COMMON = $(libGIFTAcPerl_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__installdirs = "$(DESTDIR)$(libGIFTAcPerldir)" libGIFTAcPerlHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(libGIFTAcPerl_HEADERS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ libGIFTAcPerldir = $(includedir)/libGIFTAcPerl/include libGIFTAcPerl_HEADERS = CAFPerl.h CAcPerl.h uses-declarations.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(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 libGIFTAcPerl/include/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTAcPerl/include/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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-libGIFTAcPerlHEADERS: $(libGIFTAcPerl_HEADERS) @$(NORMAL_INSTALL) test -z "$(libGIFTAcPerldir)" || $(mkdir_p) "$(DESTDIR)$(libGIFTAcPerldir)" @list='$(libGIFTAcPerl_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(libGIFTAcPerlHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libGIFTAcPerldir)/$$f'"; \ $(libGIFTAcPerlHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libGIFTAcPerldir)/$$f"; \ done uninstall-libGIFTAcPerlHEADERS: @$(NORMAL_UNINSTALL) @list='$(libGIFTAcPerl_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f '$(DESTDIR)$(libGIFTAcPerldir)/$$f'"; \ rm -f "$(DESTDIR)$(libGIFTAcPerldir)/$$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 $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libGIFTAcPerldir)"; 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: -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 \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-libGIFTAcPerlHEADERS 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 uninstall-libGIFTAcPerlHEADERS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-libGIFTAcPerlHEADERS install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-libGIFTAcPerlHEADERS # 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: gift-0.1.14/libGIFTAcPerl/include/uses-declarations.h0000644000175200001440000000241310220502730017164 00000000000000/* -*- mode: c++ -*- Path: ./libGIFTAcPerl/include/uses-declarations.h */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /* Author: Wolfgang Müller (via perl script) use namespace definitions for libGIFTAcPerl. to be included into all include files of this library */ #ifndef _LIBGIFTACPERL_USES_DECLARATIONS_ #define _LIBGIFTACPERL_USES_DECLARATIONS_ using namespace std; #endif gift-0.1.14/libGIFTQuHierarchy/0000777000175200001440000000000010220511625013110 500000000000000gift-0.1.14/libGIFTQuHierarchy/cc/0000777000175200001440000000000010220511625013475 500000000000000gift-0.1.14/libGIFTQuHierarchy/cc/Makefile.am0000644000175200001440000000324310153634165015461 00000000000000# -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # #Makefile for the QuHierarchy library # CCCONFIG=sed -e "s:__EXECBINDIR__:@DEBEXECBINDIR@:g;s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@DEBPERLLIBDIR@:g;s:__DATADIR__:@DEBDATADIR@:g;s:__LIBDIR__:@DEBSHAREDIR@:g;s:__HOME__:${HOME}:g;s:__WEB_PUBLISHING_DIRECTORY__:@WEB_PUBLISHING_DIRECTORY@:g;s=__WEB_PUBLISHING_LOCATION__=@WEB_PUBLISHING_LOCATION@=g;" < $< > $@ #CCCONFIG=sed "s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@bindir@:g;s:__DATADIR__:@datadir@:g" < $< > $@ lib_LTLIBRARIES = libGIFTQuHierarchy.la libGIFTQuHierarchy_la_LDFLAGS=@PRE_INSTALL_LIBDIRS@ -lMRML -lGIFTAcHierarchy INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcHierarchy/include -I$(top_srcdir)/libGIFTQuHierarchy/include libGIFTQuHierarchy_la_SOURCES= CQHierarchy.cc plug_in_fo.cc gift-0.1.14/libGIFTQuHierarchy/cc/Makefile.in0000644000175200001440000004173010220474076015473 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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@ # -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # #Makefile for the QuHierarchy library # SOURCES = $(libGIFTQuHierarchy_la_SOURCES) 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 = : host_triplet = @host@ subdir = libGIFTQuHierarchy/cc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libGIFTQuHierarchy_la_LIBADD = am_libGIFTQuHierarchy_la_OBJECTS = CQHierarchy.lo plug_in_fo.lo libGIFTQuHierarchy_la_OBJECTS = $(am_libGIFTQuHierarchy_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/CQHierarchy.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/plug_in_fo.Plo CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libGIFTQuHierarchy_la_SOURCES) DIST_SOURCES = $(libGIFTQuHierarchy_la_SOURCES) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ CCCONFIG = sed -e "s:__EXECBINDIR__:@DEBEXECBINDIR@:g;s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@DEBPERLLIBDIR@:g;s:__DATADIR__:@DEBDATADIR@:g;s:__LIBDIR__:@DEBSHAREDIR@:g;s:__HOME__:${HOME}:g;s:__WEB_PUBLISHING_DIRECTORY__:@WEB_PUBLISHING_DIRECTORY@:g;s=__WEB_PUBLISHING_LOCATION__=@WEB_PUBLISHING_LOCATION@=g;" < $< > $@ #CCCONFIG=sed "s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@bindir@:g;s:__DATADIR__:@datadir@:g" < $< > $@ lib_LTLIBRARIES = libGIFTQuHierarchy.la libGIFTQuHierarchy_la_LDFLAGS = @PRE_INSTALL_LIBDIRS@ -lMRML -lGIFTAcHierarchy INCLUDES = -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcHierarchy/include -I$(top_srcdir)/libGIFTQuHierarchy/include libGIFTQuHierarchy_la_SOURCES = CQHierarchy.cc plug_in_fo.cc all: all-am .SUFFIXES: .SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: $(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 libGIFTQuHierarchy/cc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTQuHierarchy/cc/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libGIFTQuHierarchy.la: $(libGIFTQuHierarchy_la_OBJECTS) $(libGIFTQuHierarchy_la_DEPENDENCIES) $(CXXLINK) -rpath $(libdir) $(libGIFTQuHierarchy_la_LDFLAGS) $(libGIFTQuHierarchy_la_OBJECTS) $(libGIFTQuHierarchy_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CQHierarchy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plug_in_fo.Plo@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: 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) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES 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-info-am \ uninstall-libLTLIBRARIES # 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: gift-0.1.14/libGIFTQuHierarchy/cc/plug_in_fo.cc0000644000175200001440000000061610220502730016041 00000000000000#include "libGIFTQuHierarchy/include/CQHierarchy.h" #include "libMRML/include/CAccessorAdminCollection.h" extern "C" char* libGIFTQuHierarchy_getClassName(){ return "hierarchy"; } extern "C" CQuery* libGIFTQuHierarchy_makeQuery(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm ){ return new CQHierarchy(inAccessorAdminCollection, inAlgorithm ); } gift-0.1.14/libGIFTQuHierarchy/cc/CQHierarchy.cc0000644000175200001440000001342310220502730016062 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/mrml_const.h" // for parsing #include "libGIFTQuHierarchy/include/CQHierarchy.h" #include "libGIFTAcHierarchy/include/CAcHierarchy.h" #include /** There is no special initialisation to do, so this function is empty */ void CQHierarchy::init(){ mCurrentPath.clear(); }; /** * * default constructor SHOULD NOT BE CALLED * */ CQHierarchy::CQHierarchy(){ assert(0); }; /** * constructor * see CQuery */ CQHierarchy::CQHierarchy(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm): CQuery(inAccessorAdminCollection, inAlgorithm){ { // mproxy has been filled in a reasonable way // by CQuery::CQuery mAccessor=mAccessorAdmin->openAccessor("hierarchy"); init(); assert(mAccessor); } }; /** * * destructor: at present empty * */ CQHierarchy::~CQHierarchy(){ cout << "destroying this " << __FILE__ << __LINE__ << flush << endl; //i thought i will need this, but at present I do not have this impression //it does not hurt, so we leave it in }; /** */ bool CQHierarchy::setAlgorithm(CAlgorithm & inAlgorithm){ if(mAlgorithm && mAlgorithm->getCollectionID()==inAlgorithm.getCollectionID()){ return true; }else{ //close the old collection, if exsisting if(mAccessorAdmin) mAccessorAdmin->closeAccessor("hierarchy"); // mAccessorAdmin=&mAccessorAdminCollection->getProxy(inAlgorithm.getCollectionID()); mAccessor=mAccessorAdmin->openAccessor("hierarchy"); assert(mAccessor); // return (CQuery::setAlgorithm(inAlgorithm) && mAccessor); } }; /** * * */ CIDRelevanceLevelPairList* CQHierarchy::fastQuery(const CXMLElement& inQuery, int inNumberOfInterestingImages, double inDifferenceToBest){ CIDRelevanceLevelPairList* lReturnValue(0); /* AS FOR ANY CALL TO FASTQUERY the inQuery parameter contains a "query-step" element. we are interested in children that contain a "relevance-level-element-list" or a "cui-hierarchy-up" element. */ for(list::const_iterator i=inQuery.child_list_begin(); i!=inQuery.child_list_end(); i++){// iterating over all the children of the inQuery element. cout << "I:The name of this tree element: " << endl << (*i)->getName() << endl; if((*i)->getName()==mrml_const::cui_hierarchy_up){ // this is when a cui-hierarchy-up element was found if(mCurrentPath.size()){ cout << "MOVING UP "; copy(mCurrentPath.begin(), mCurrentPath.end(), ostream_iterator(cout,",")); cout << endl; mCurrentPath.pop_back(); copy(mCurrentPath.begin(), mCurrentPath.end(), ostream_iterator(cout,",")); return ((CAcHierarchy*)mAccessor)->getChildren(mCurrentPath); } return new CIDRelevanceLevelPairList(); } if((*i)->getName()==mrml_const::user_relevance_element_list){ // if an user-relevance-element-list was found for(list::const_iterator j=(*i)->child_list_begin(); j!=(*i)->child_list_end(); j++){//iterate over all the children cout << "J:The name of this tree element: " << endl << (*j)->getName() << endl; if((*j)->getName()==mrml_const::user_relevance_element){ // if the current child is a user-relevance-element if(((*j)->stringReadAttribute(mrml_const::image_location).first) && ((*j)->stringReadAttribute(mrml_const::user_relevance).first)){ // get the image-location and the user-relevance attributes if((*j)->doubleReadAttribute(mrml_const::user_relevance).second){ //the relevance of this element != 0 if(!lReturnValue){ // if the return value is still undefined // (i.e. there was no previous element with (user-relevance != 0) list lOldCurrentPath=mCurrentPath; // add this element to the path mCurrentPath.push_back(mAccessor->URLToID((*j)->stringReadAttribute(mrml_const::image_location).second).second); cout << "The new mCurrentPath: "; copy(mCurrentPath.begin(), mCurrentPath.end(), ostream_iterator(cout,",")); cout << endl; // get the children of this node from the accessor lReturnValue=((CAcHierarchy*)mAccessor)->getChildren(mCurrentPath); if(lReturnValue){// if there are children: // return them return lReturnValue; }else{ // if not: // take the old path, get it's children, and return them mCurrentPath=lOldCurrentPath; lReturnValue=((CAcHierarchy*)mAccessor)->getChildren(mCurrentPath); return lReturnValue; } } } } } } } } // if nothing else was found, // display the first selection: mCurrentPath.clear();// clear the path return ((CAcHierarchy*)mAccessor)->getChildren(mCurrentPath);//children of root node }; gift-0.1.14/libGIFTQuHierarchy/Makefile.am0000644000175200001440000000002410153634165015066 00000000000000SUBDIRS= include cc gift-0.1.14/libGIFTQuHierarchy/Makefile.in0000644000175200001440000003455510220474076015115 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = libGIFTQuHierarchy DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = 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 ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = include cc all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(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 libGIFTQuHierarchy/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTQuHierarchy/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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: # 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): @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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: @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; 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='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="../$(top_distdir)" \ distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive 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-info \ install-info-am install-man 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-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: gift-0.1.14/libGIFTQuHierarchy/include/0000777000175200001440000000000010220511625014533 500000000000000gift-0.1.14/libGIFTQuHierarchy/include/CQHierarchy.h0000644000175200001440000000644210220502730016765 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CQHIERARCHY #define _CQHIERARCHY #include "libGIFTQuHierarchy/include/uses-declarations.h" /* -*- mode: c++ -*- */ /** * * CQHierarchy.h * A CQuery structure which has several children * queries them one after another, * weights them, and obtains a common result * * * * modification history: * * WM 20000205 creation * * * * compiler defines used: * _CQHIERARCHY avoids double inclusion * */ #include #include #include #include "libMRML/include/CQuery.h" #include "libMRML/include/CSelfDestroyPointer.h" #include "libMRML/include/CIDRelevanceLevelPairList.h" #include "libMRML/include/CRelevanceLevelList.h" //#include "CWeightingFunctionPointerList.h" //#include "CWeightingFunctionPointerHash.h" #include "libMRML/include/CAlgorithm.h" #include "libMRML/include/CAccessor.h" #include "libMRML/include/CAccessorAdminCollection.h" #include "libMRML/include/CAccessorAdmin.h" class CScoreBoard; class CAccessor; /** This is a simple hierarchy based browser. @Author: Wolfgang Müller */ class CQHierarchy:public CQuery{ protected: /** The current position in the hierarchy */ list mCurrentPath; /** sets mCurrentPosition to 0*/ void init(); public: /** * * default constructor * */ CQHierarchy(); /** * * we need to unregister the accessors used * */ ~CQHierarchy(); /** * In fact, what we are doing here is to get ourselves * an accessor ACURL2FTS to do a proper fastQuery */ CQHierarchy(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm); /** * * enables moving in the hierarchy. You can either move down * (i.e. you select an image) or up in the hierarchy (by getting * a cui-hierarchy-move-up signal as query). * RICHLY COMMENTED IN THE *.cc FILE. * *@param inQuery an CXMLElement containing a query-step element *@param inNumberOfInterestingImages preferred number of result images (ignored) *@param inDifferenceToBest preferred relevance cutoff (ignored) */ virtual CIDRelevanceLevelPairList* fastQuery(const CXMLElement& inQuery, int inNumberOfInterestingImages, double inDifferenceToBest); /** * * set the Algorithm. * */ virtual bool setAlgorithm(CAlgorithm& inAlgorithm); }; /* end of class */ #endif gift-0.1.14/libGIFTQuHierarchy/include/Makefile.am0000644000175200001440000000017510153634165016520 00000000000000libGIFTQuHierarchydir=$(includedir)/libGIFTQuHierarchy/include libGIFTQuHierarchy_HEADERS=CQHierarchy.h uses-declarations.h gift-0.1.14/libGIFTQuHierarchy/include/Makefile.in0000644000175200001440000003030610220474076016526 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = libGIFTQuHierarchy/include DIST_COMMON = $(libGIFTQuHierarchy_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__installdirs = "$(DESTDIR)$(libGIFTQuHierarchydir)" libGIFTQuHierarchyHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(libGIFTQuHierarchy_HEADERS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ libGIFTQuHierarchydir = $(includedir)/libGIFTQuHierarchy/include libGIFTQuHierarchy_HEADERS = CQHierarchy.h uses-declarations.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(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 libGIFTQuHierarchy/include/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTQuHierarchy/include/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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-libGIFTQuHierarchyHEADERS: $(libGIFTQuHierarchy_HEADERS) @$(NORMAL_INSTALL) test -z "$(libGIFTQuHierarchydir)" || $(mkdir_p) "$(DESTDIR)$(libGIFTQuHierarchydir)" @list='$(libGIFTQuHierarchy_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(libGIFTQuHierarchyHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libGIFTQuHierarchydir)/$$f'"; \ $(libGIFTQuHierarchyHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libGIFTQuHierarchydir)/$$f"; \ done uninstall-libGIFTQuHierarchyHEADERS: @$(NORMAL_UNINSTALL) @list='$(libGIFTQuHierarchy_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f '$(DESTDIR)$(libGIFTQuHierarchydir)/$$f'"; \ rm -f "$(DESTDIR)$(libGIFTQuHierarchydir)/$$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 $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libGIFTQuHierarchydir)"; 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: -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 \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-libGIFTQuHierarchyHEADERS 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 uninstall-libGIFTQuHierarchyHEADERS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-libGIFTQuHierarchyHEADERS install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-libGIFTQuHierarchyHEADERS # 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: gift-0.1.14/libGIFTQuHierarchy/include/uses-declarations.h0000644000175200001440000000243710220502730020250 00000000000000/* -*- mode: c++ -*- Path: ./libGIFTQuHierarchy/include/uses-declarations.h */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /* Author: Wolfgang Müller (via perl script) use namespace definitions for libGIFTQuHierarchy. to be included into all include files of this library */ #ifndef _LIBGIFTQUHIERARCHY_USES_DECLARATIONS_ #define _LIBGIFTQUHIERARCHY_USES_DECLARATIONS_ using namespace std; #endif gift-0.1.14/acinclude.m40000644000175200001440000001704010175473346011652 00000000000000AC_DEFUN([ACX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_LANG_SAVE AC_LANG_C acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) AC_MSG_RESULT($acx_pthread_ok) if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case "${host_cpu}-${host_os}" in *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthread or # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" ;; esac if test x"$acx_pthread_ok" = xno; then for flag in $acx_pthread_flags; do case $flag in none) AC_MSG_CHECKING([whether pthreads work without any flags]) ;; -*) AC_MSG_CHECKING([whether pthreads work with $flag]) PTHREAD_CFLAGS="$flag" ;; pthread-config) AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) if test x"$acx_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) AC_MSG_CHECKING([for the pthreads library -l$flag]) PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. AC_TRY_LINK([#include ], [pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], [acx_pthread_ok=yes]) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" AC_MSG_RESULT($acx_pthread_ok) if test "x$acx_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$acx_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. AC_MSG_CHECKING([for joinable pthread attribute]) attr_name=unknown for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do AC_TRY_LINK([#include ], [int attr=$attr;], [attr_name=$attr; break]) done AC_MSG_RESULT($attr_name) if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, [Define to necessary symbol if this constant uses a non-standard name on your system.]) fi AC_MSG_CHECKING([if more special flags are required for pthreads]) flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; esac AC_MSG_RESULT(${flag}) if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with cc_r AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC}) else PTHREAD_CC="$CC" fi AC_SUBST(PTHREAD_LIBS) AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_CC) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) : else acx_pthread_ok=no $2 fi AC_LANG_RESTORE ])dnl ACX_PTHREAD AC_PREREQ(2.49) AC_DEFUN([adl_FUNC_GETOPT_LONG], [# clean out junk possibly left behind by a previous configuration rm -f lib/getopt.h # Check for getopt_long support AC_CHECK_HEADER([getopt.h]) AC_CHECK_FUNCS([getopt_long],, [# FreeBSD has a gnugetopt library for this AC_CHECK_LIB([gnugetopt],[getopt_long],[AC_DEFINE([HAVE_GETOPT_LONG])], [# use the GNU replacement AC_LIBOBJ(getopt) AC_LIBOBJ(getopt1) AC_CONFIG_LINKS([lib/getopt.h:lib/gnugetopt.h])])])]) gift-0.1.14/bootstrap-cvs.sh0000755000175200001440000000346510153634165012626 00000000000000#! /bin/sh # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # # bootstrap for compile process # echo "This script generates a configure script for the GIFT" echo "Use this if you have checked out the GIFT from CVS" echo "This script will be using the following GNU tools:" echo "---------------------------------------" echo `automake --version` echo `autoconf --version` echo `libtool --version` echo "---------------------------------------" echo "running libtoolize" libtoolize --ltdl || { echo "Libtoolize failed. THIS MIGHT CAUSE PROBLEMS LATER, continuing " ; } echo "running aclocal" aclocal -I . || { echo "bootstrap failed, because aclocal failed. exiting. " , exit 100; } echo "...done" echo "running automake -a" automake -a || { echo "bootstrap failed, because automake failed. exiting." , exit 101; } echo "...done" echo "running autoconf" autoconf || { echo "bootstrap failed, because autoconf failed. exiting." , exit 102; } echo "...done" echo "Now you should be able to run ./configure" gift-0.1.14/AUTHORS0000644000175200001440000000346610220503365010522 00000000000000Since: 2002 Robert Jordens: patches for making it easier to make Debian packages of the GIFT. -- The Viper query engine: Thierry Pun: supervision Thierry.Pun@cui.unige.ch David McG. Squire: idea to use many text-like features David.Squire@cui.unige.ch in inverted files + all feature extraction code + testing + supervision Stephane Marchand-Maillet: successor of David Squire. Stephane.Marchand-Maillet@cui.unige.ch Henning Mueller: pruning ideas and pruning code for inverted files Henning.Mueller@cui.unige.ch + experiments (finding good values for the config files) + testing + many important bugfixes Arjen P. de Vries helped improve the MRML DTD, patches for arjen@cwi.nl perl<->gift integration Christoph Giess helped improve the MRML DTD Ch.Giess@DKFZ-Heidelberg.de Cornelia Luoni Most of CAcIFMySQL (not fully functional, yet). Wolfgang Mueller: (all the rest, all the bugs, most fixes) Wolfgang.Mueller@cui.unige.ch == maintainer All: Computer Vision Group Centre Universitaire d'Informatique Universite de Geneve 24, rue du General Dufour 1211 Geneve 4 ---------------------------------------- The SnakeCharmer interface: Martin Vetterli supervision Pearl Pu-Faltings Zoran Pecenovic maintainer & everything but... Zoran.Pecenovic@epfl.ch Wolfgang Mueller ...some of the MRML parsing code Wolfgang.Mueller@cui.unige.ch ---------------------------------------- Please note, that this directory tree includes a complete expat distribution. Expat is (c) 1998 James Clark. Please read the html files in ./expat. gift-0.1.14/gift-file-to-gift-file.pl0000644000175200001440000000036610153634165014145 00000000000000use File::Find; find(\&wanted,'/home/wolfgang/Viper'); sub wanted{ s/CVL/CGL/g; s/Viper/GIFT/g; s/viper/gift/g; s/^v\-/gift\-/g; my $dostring="mv $File::Find::name $File::Find::dir/$_\n"; print $dostring; system($dostring); } gift-0.1.14/PluginMaker/0000777000175200001440000000000010153634165011753 500000000000000gift-0.1.14/PluginMaker/CVS/0000777000175200001440000000000010153634165012406 500000000000000gift-0.1.14/PluginMaker/CVS/Root0000644000175200001440000000005410153634165013167 00000000000000muellerw@subversions.gnu.org:/cvsroot/gift/ gift-0.1.14/PluginMaker/CVS/Repository0000644000175200001440000000002110153634165014415 00000000000000gift/PluginMaker gift-0.1.14/PluginMaker/CVS/Entries0000644000175200001440000000047310153634165013662 00000000000000D/libGIFTAc@PLUGIN_NAME@//// D/libGIFTQu@PLUGIN_NAME@//// /configure.in.in/1.5/Tue May 6 07:26:06 2003// /Makefile.am.in/1.3/Mon Jul 22 07:09:30 2002// /bootstrap.sh.in/1.3/Mon Jul 22 07:09:30 2002// /config-@PLUGIN_NAME@.h.in.in/1.1/Mon Jul 22 07:09:30 2002// /gift-plugin-maker.pl/1.2/Mon Jul 22 07:09:30 2002// gift-0.1.14/PluginMaker/gift-plugin-maker.pl0000644000175200001440000000513210153634165015547 00000000000000use strict; use vars qw($g_destination_directory); use File::Find; use File::Copy; use File::Path; use Getopt::Long; my $l_plugin_name; my $l_plugin_type; print qq(gift-plugin-maker.pl: Plugin frame generator for GIFT plugins. Usage: $0 --plugin-name=NAME [--prefix DIR] [--plugin-type=TYPE] This program is part of the GNU Image Finding Tool package. ); my $g_destination_prefix; GetOptions("plugin-name=s" => \$l_plugin_name, "plugin-type=s" => \$l_plugin_type, "prefix=s" => \$g_destination_prefix, ); die "$0: ERROR: You have to specify a plugin name!" unless $l_plugin_name; $l_plugin_type=lc($l_plugin_name) unless $l_plugin_type; $g_destination_prefix="$ENV{HOME}" unless $g_destination_prefix; $g_destination_directory=$g_destination_prefix."/GIFTPlugin-".$l_plugin_name."/"; sub replace_list( $ $ ){ my $in_string=shift; my $l_patterns=shift or die; my($l_pattern,$l_replacement); while(($l_pattern,$l_replacement)=each (%$l_patterns)){ $in_string =~ s/$l_pattern/$l_replacement/gx; } return $in_string; } sub wanted { my $l_file=$_; my $l_dir=$File::Find::dir; if(( -f "$l_file") && (!($l_dir =~ m/CVS/))){ my $l_destination_file=replace_list("$g_destination_directory$l_dir/$l_file", { "\@PLUGIN_NAME\@" => $l_plugin_name, "\@PLUGIN_TYPE\@" => $l_plugin_type, ' \.in$ ' => "" }); mkpath(replace_list("$g_destination_directory$l_dir", { "\@PLUGIN_NAME\@" => $l_plugin_name, "\@PLUGIN_TYPE\@" => $l_plugin_type, ' \.in$ ' => "" })); print "Treating file: $l_dir/$l_file --> $l_destination_file "; open SOURCE_FILE,"$l_file" or die "Could not open $_\n"; open DESTINATION_FILE,">$l_destination_file" or die "could not open $_ for writing\n"; my $l_count=0; print "|"; while(){ print DESTINATION_FILE replace_list($_,{"\@PLUGIN_MAKER_PWD\@" => "$ENV{PWD}/../", "\@PLUGIN_NAME\@" => $l_plugin_name, "\@PLUGIN_TYPE\@" => $l_plugin_type}); $l_count++; # print "/" if($l_count % 40 == 10);# turning line print "-" if($l_count % 40 == 20);# for showing print "\\" if($l_count % 40 == 30);# progress print "|" if($l_count % 40 == 00);# } print " \n"; close DESTINATION_FILE; if(($l_destination_file=~m/ \.sh$ /x) ||($l_destination_file=~m/ \.pl$ /x)){ chmod 0744,$l_destination_file; } } } print "I am now preparing the GIFT Plugins libGIFTAc$l_plugin_name and libGIFTQu$l_plugin_name\n"; finddepth(\&wanted, '.'); print "done"; gift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/0000777000175200001440000000000010153634165015420 500000000000000gift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/cc/0000777000175200001440000000000010153634165016005 500000000000000gift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/cc/CVS/0000777000175200001440000000000010154072021016424 500000000000000gift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/cc/CVS/Root0000644000175200001440000000005410153634165017221 00000000000000muellerw@subversions.gnu.org:/cvsroot/gift/ gift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/cc/CVS/Repository0000644000175200001440000000005310153634165020454 00000000000000gift/PluginMaker/libGIFTQu@PLUGIN_NAME@/cc gift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/cc/CVS/Entries0000644000175200001440000000023010154072021017667 00000000000000/CQ@PLUGIN_NAME@.cc.in/1.4/Mon Jul 22 07:09:30 2002// /plug_in_fo.cc.in/1.2/Mon Jul 22 07:09:30 2002// /Makefile.am.in/1.5/Thu Dec 2 15:44:53 2004// D gift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/cc/CQ@PLUGIN_NAME@.cc.in0000644000175200001440000000631610153634165021065 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/mrml_const.h" // for parsing #include "libGIFTQu@PLUGIN_NAME@/include/CQ@PLUGIN_NAME@.h" // the header for this class #include "libGIFTAc@PLUGIN_NAME@/include/CAc@PLUGIN_NAME@.h" // the header for its accessor #include "libMRML/include/CXMLElementBuilder.h" //building XML elements from a string // for pipes #include // error number (man errno) #include // error string #include // c standard i/o (enspricht stdio.h) #include // /** There is no special initialisation to do, so this function is empty */ void CQ@PLUGIN_NAME@::init(){ }; /** * * default constructor SHOULD NOT BE CALLED * */ CQ@PLUGIN_NAME@::CQ@PLUGIN_NAME@(){ assert(0); }; /** * constructor * see CQuery */ CQ@PLUGIN_NAME@::CQ@PLUGIN_NAME@(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm): CQuery(inAccessorAdminCollection, inAlgorithm){ { // mproxy has been filled in a reasonable way // by CQuery::CQuery mAccessor=mAccessorAdmin->openAccessor("@PLUGIN_TYPE@"); init(); assert(mAccessor); } }; /** * * destructor: at present empty * */ CQ@PLUGIN_NAME@::~CQ@PLUGIN_NAME@(){ cout << "destroying this " << __FILE__ << __LINE__ << flush << endl; //i thought i will need this, but at present I do not have this impression //it does not hurt, so we leave it in }; /** */ bool CQ@PLUGIN_NAME@::setAlgorithm(CAlgorithm & inAlgorithm){ if(mAlgorithm && mAlgorithm->getCollectionID()==inAlgorithm.getCollectionID()){ return true; }else{ //close the old collection, if exsisting if(mAccessorAdmin) mAccessorAdmin->closeAccessor("@PLUGIN_NAME@"); // mAccessorAdmin=&mAccessorAdminCollection->getProxy(inAlgorithm.getCollectionID()); mAccessor=mAccessorAdmin->openAccessor("@PLUGIN_NAME@"); assert(mAccessor); // return (CQuery::setAlgorithm(inAlgorithm) && mAccessor); } }; /** * * */ CIDRelevanceLevelPairList* CQ@PLUGIN_NAME@::fastQuery(const CXMLElement& , int , double){ assert(!"@PLUGIN_NAME@: METHOD fastQuery not implemented"); } /** * * */ CXMLElement* CQ@PLUGIN_NAME@::query(const CXMLElement& inQuery){ CXMLElement* lReturnValue=new CXMLElement(mrml_const::query_result); return lReturnValue; }; gift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/cc/plug_in_fo.cc.in0000644000175200001440000000066410153634165020764 00000000000000#include "libGIFTQu@PLUGIN_NAME@/include/CQ@PLUGIN_NAME@.h" #include "libMRML/include/CAccessorAdminCollection.h" extern "C" char* libGIFTQu@PLUGIN_NAME@_getClassName(){ return "@PLUGIN_TYPE@"; } extern "C" CQuery* libGIFTQu@PLUGIN_NAME@_makeQuery(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm ){ return new CQ@PLUGIN_NAME@(inAccessorAdminCollection, inAlgorithm ); } gift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/cc/Makefile.am.in0000644000175200001440000000320710153634165020364 00000000000000# -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # #Makefile for the QuHierarchy library # #CCCONFIG=sed "s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@bindir@:g;s:__DATADIR__:@datadir@:g" < $< > $@ CCCONFIG=sed "s:__EXECBINDIR__:@DEBEXECBINDIR@:g;s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@DEBPERLLIBDIR@:g;s:__DATADIR__:@DEBDATADIR@:g;s:__LIBDIR__:@DEBSHAREDIR@:g;s:__HOME__:${HOME}:g;s:__WEB_PUBLISHING_DIRECTORY__:@WEB_PUBLISHING_DIRECTORY@:g;s=__WEB_PUBLISHING_LOCATION__=@WEB_PUBLISHING_LOCATION@=g;" < $< > $@ lib_LTLIBRARIES = libGIFTQu@PLUGIN_NAME@.la libGIFTQu@PLUGIN_NAME@_la_LDFLAGS=@PRE_INSTALL_LIBDIRS@ -L../../libGIFTAc@PLUGIN_NAME@/cc -lMRML -lGIFTAc@PLUGIN_NAME@ @MRMLLIBS@ INCLUDES= -DHAS_BOOL -I../../ @MRMLINCLUDES@ libGIFTQu@PLUGIN_NAME@_la_SOURCES= CQ@PLUGIN_NAME@.cc plug_in_fo.cc gift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/CVS/0000777000175200001440000000000010153634165016053 500000000000000gift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/CVS/Root0000644000175200001440000000005410153634165016634 00000000000000muellerw@subversions.gnu.org:/cvsroot/gift/ gift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/CVS/Repository0000644000175200001440000000005010153634165020064 00000000000000gift/PluginMaker/libGIFTQu@PLUGIN_NAME@ gift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/CVS/Entries0000644000175200001440000000010610153634165017320 00000000000000D/cc//// D/include//// /Makefile.am.in/1.2/Mon Jul 22 07:09:30 2002// gift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/include/0000777000175200001440000000000010153634165017043 500000000000000gift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/include/CVS/0000777000175200001440000000000010153634165017476 500000000000000gift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/include/CVS/Root0000644000175200001440000000005410153634165020257 00000000000000muellerw@subversions.gnu.org:/cvsroot/gift/ gift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/include/CVS/Repository0000644000175200001440000000006010153634165021510 00000000000000gift/PluginMaker/libGIFTQu@PLUGIN_NAME@/include gift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/include/CVS/Entries0000644000175200001440000000014610153634165020747 00000000000000/CQ@PLUGIN_NAME@.h.in/1.4/Mon Jul 22 07:09:30 2002// /Makefile.am.in/1.2/Mon Jul 22 07:09:30 2002// D gift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/include/CQ@PLUGIN_NAME@.h.in0000644000175200001440000000554510153634165021770 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva 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 */ // -*- mode: c++ -*- #ifndef _CQ@PLUGIN_NAME@ #define _CQ@PLUGIN_NAME@ /* -*- mode: c++ -*- */ /** * * CQ@PLUGIN_NAME@.h * An empty CQuery subclass * * * modification history: * * WM 20000205 creation * * * * compiler defines used: * _CQ@PLUGIN_NAME@.h avoids double inclusion * */ #include #include #include #include "libMRML/include/CQuery.h" #include "libMRML/include/CSelfDestroyPointer.h" #include "libMRML/include/CIDRelevanceLevelPairList.h" #include "libMRML/include/CRelevanceLevelList.h" //#include "CWeightingFunctionPointerList.h" //#include "CWeightingFunctionPointerHash.h" #include "libMRML/include/CAlgorithm.h" #include "libMRML/include/CAccessor.h" #include "libMRML/include/CAccessorAdminCollection.h" #include "libMRML/include/CAccessorAdmin.h" class CScoreBoard; class CAccessor; /** This is a simple @PLUGIN_NAME@ based browser. @Author: Wolfgang Müller */ class CQ@PLUGIN_NAME@:public CQuery{ protected: /** sets mCurrentPosition to 0*/ void init(); public: /** * * default constructor * */ CQ@PLUGIN_NAME@(); /** * * we need to unregister the accessors used * */ ~CQ@PLUGIN_NAME@(); /** */ CQ@PLUGIN_NAME@(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm); /** * Processing a query * *@param inQuery an CXMLElement containing a query-step element */ virtual CXMLElement* query(const CXMLElement& inQuery); /** This function is useless in the context of this plugin. Please see CQuery and its documentation for more instructions The reason why this function is here, is to bail out on misconfiguration, and to keep the compiler happy. @see CQuery */ virtual CIDRelevanceLevelPairList* fastQuery(const CXMLElement& , int , double); /** * * set the Algorithm. DEPRECATED * */ virtual bool setAlgorithm(CAlgorithm& inAlgorithm); }; /* end of class */ #endif gift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/include/Makefile.am.in0000644000175200001440000000201010153634165021411 00000000000000# -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 libGIFTQu@PLUGIN_NAME@dir=$(includedir)/libGIFTQu@PLUGIN_NAME@/include libGIFTQu@PLUGIN_NAME@_HEADERS= CQ@PLUGIN_NAME@.hgift-0.1.14/PluginMaker/libGIFTQu@PLUGIN_NAME@/Makefile.am.in0000644000175200001440000000002410153634165017771 00000000000000SUBDIRS= include cc gift-0.1.14/PluginMaker/configure.in.in0000644000175200001440000001110010153634165014576 00000000000000dnl -*- mode: autoconf -*- dnl GIFT, a flexible content based image retrieval system. dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl dnl automake configuration for a htdig plugin for the GIFT system dnl dnl dnl Author: Wolfgang Müller dnl dnl Process this file with autoconf to produce a configure script. dnl ## ----------------------------- ## ## Set an environment variable ## ## ----------------------------- ## AC_INIT(libGIFTAc@PLUGIN_NAME@/cc/CAc@PLUGIN_NAME@.cc) AM_INIT_AUTOMAKE(GIFTPlugin-@PLUGIN_NAME@,0.1) #check if there is perl on this system AC_PATH_PROG(PERL,perl) AM_CONFIG_HEADER(config-@PLUGIN_NAME@.h) AC_ISC_POSIX dnl Checks for programs. dnl AC_LIBTOOL_DLOPEN AC_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) AC_PROG_CC AC_PROG_CXX AC_PROG_RANLIB dnl dnl add the right lib versions: dnl GIFT_LIB_VERSION_INFO="-version-info 0:1:5" AC_SUBST(GIFT_LIB_VERSION_INFO) AC_C_CONST AC_EXEEXT AC_LANG_CPLUSPLUS dnl debugging CXXFLAGS="$CXXFLAGS -DEF_PROTECT_BELOW=1 -DEF_PROTECT_FREE -DEF_PROTECT_ALIGNMENT=8 -DEF_FILL=42 " dnl BEGIN --enable-multi-threading AC_ARG_ENABLE(multi-threading, [ --enable-multi-threading enable multithreading], [ dnl dnl we need recursive locking, and this seems to be the way to test it dnl AC_MSG_CHECKING([if we can use POSIX threads the way we want]) RESCUE_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS -DHAVE_LIBPTHREAD -D_PHTREADS -D__GIFT_NEW_IS_MALLOC -D__GIFT_USES_THREADS__ " #-D__GIFT_FREE_UNUSED_ACCESSORS # # -D__NO_GIFT_SERVER_THREADS__ # -D__NO_GIFT_CQMULTIPLE_THREADS__ # -D__USE_MALLOC # dnl echo $CXXFLAGS dnl echo "$CC pthread-compile-test-program.cc $CXXFLAGS -o pthread-compile-test-program $LDFLAGS -lpthread" if($CXX $CXXFLAGS pthread-compile-test-program.cc -o pthread-compile-test-program $LDFLAGS -lpthread) ; then if ./pthread-compile-test-program ; then AC_MSG_RESULT([yes (will use pthread)]) LDFLAGS="$LDFLAGS -lpthread" else AC_MSG_RESULT([no: testprogram compiled but failed to run]); CXXFLAGS=$RESCUE_CXXFLAGS fi rm pthread-compile-test-program else CXXFLAGS=$RESCUE_CXXFLAGS LDFLAGS=$RESCUE_LDFLAGS AC_MSG_RESULT([no: failed: $CXX CXXFLAGS:($CXXFLAGS) pthread-compile-test-program.cc -o pthread-compile-test-program LDFLAGS:($LDFLAGS -lpthread)]); fi ], [ AC_MSG_WARN([Use --enable-multi-threading for enabling multi threading]) ] ) dnl END --enable-multithreading handling dnl try to find the installer program AC_PROG_INSTALL AM_PATH_LISPDIR AC_SUBST(EMACS) dnl ugh, beats me (phenomenological programming) AC_PROG_MAKE_SET dnl ugh, beats me. PRE_INSTALL_LIBDIRS="" PRE_INSTALL_LINKDIRS="" AC_SUBST(PRE_INSTALL_LIBDIRS) AC_SUBST(PRE_INSTALL_LINKDIRS) dnl FIXME perl is missing here for full functionality dnl Checks for libraries. dnl Checks for header files. AC_STDC_HEADERS AC_HAVE_HEADERS(string algorithm) AC_HAVE_HEADERS(unistd.h) dnl Checks for system dependent include files AC_HAVE_HEADERS( stdlib.h unistd.h sys/types.h time.h sys/time.h sys/socket.h arpa/inet.h netinet/tcp.h ) dnl this is just to check that I have understood how things work AC_CHECK_LIB(m,sin) dnl do we have an expat parser installed? dnl THIS IS PRESENTLY UNUSED. dnl AC_CHECK_LIB(expat,XML_ParserCreate) dnl SUNs need to link the -lsocket to programs using sockets. AC_CHECK_LIB(socket,socket) dnl check if we have posix threads AC_CHECK_LIB(pthread,pthread_mutexattr_destroy) dnl checks if this is big-endian or not AC_C_BIGENDIAN dnl find out what flags to add for libmrml MRMLLIBS=[`libMRML-config -l -L`] AC_SUBST(MRMLLIBS) MRMLINCLUDES=`libMRML-config -i -c` AC_SUBST(MRMLINCLUDES) AC_OUTPUT([Makefile libGIFTAc@PLUGIN_NAME@/Makefile libGIFTAc@PLUGIN_NAME@/include/Makefile libGIFTAc@PLUGIN_NAME@/cc/Makefile libGIFTQu@PLUGIN_NAME@/Makefile libGIFTQu@PLUGIN_NAME@/include/Makefile libGIFTQu@PLUGIN_NAME@/cc/Makefile ])gift-0.1.14/PluginMaker/config-@PLUGIN_NAME@.h.in.in0000644000175200001440000000316010153634165016313 00000000000000/* gift-config.h.in. Generated automatically from configure.in by autoheader. */ /* Define if you have the header file. */ #undef HAVE_ALGORITHM /* Define if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define if you have the header file. */ #undef HAVE_DLFCN_H /* Define if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define if you have the header file. */ #undef HAVE_NETINET_TCP_H /* Define if you have the header file. */ #undef HAVE_STDLIB_H /* Define if you have the header file. */ #undef HAVE_STRING /* Define if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define if you have the header file. */ #undef HAVE_TIME_H /* Define if you have the header file. */ #undef HAVE_UNISTD_H /* Name of package */ #undef PACKAGE /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ #undef WORDS_BIGENDIAN /* Define if you need to in order for stat and other things to work. */ #undef _POSIX_SOURCE /* Define to empty if `const' does not conform to ANSI C. */ #undef const gift-0.1.14/PluginMaker/bootstrap.sh.in0000644000175200001440000000250610153634165014650 00000000000000#!/bin/sh # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # # plugin maker bootstrap # echo "This script initalises your automatically " echo "generated @PLUGIN_NAME@ plugin for configuration" touch AUTHORS NEWS README THANKS ChangeLog echo on aclocal || (echo "bootstrap failed, because aclocal failed. exiting. " ; exit 100; ) automake --add-missing || (echo "bootstrap failed, because automake failed. exiting." ; exit 101; ) autoconf || (echo "bootstrap failed, because autoconf failed. exiting." ; exit 102; )gift-0.1.14/PluginMaker/Makefile.am.in0000644000175200001440000000170510153634165014333 00000000000000# -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 SUBDIRS= libGIFTAc@PLUGIN_NAME@ libGIFTQu@PLUGIN_NAME@ gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/0000777000175200001440000000000010153634165015356 500000000000000gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/cc/0000777000175200001440000000000010153634165015743 500000000000000gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/cc/CVS/0000777000175200001440000000000010154072021016362 500000000000000gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/cc/CVS/Root0000644000175200001440000000005410153634165017157 00000000000000muellerw@subversions.gnu.org:/cvsroot/gift/ gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/cc/CVS/Repository0000644000175200001440000000005310153634165020412 00000000000000gift/PluginMaker/libGIFTAc@PLUGIN_NAME@/cc gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/cc/CVS/Entries0000644000175200001440000000032010154072021017625 00000000000000/CAc@PLUGIN_NAME@.cc.in/1.5/Sun Jul 28 19:05:12 2002// /CAF@PLUGIN_NAME@.cc.in/1.2/Mon Jul 22 07:09:30 2002// /plug_in_fo.cc.in/1.2/Mon Jul 22 07:09:30 2002// /Makefile.am.in/1.5/Thu Dec 2 15:44:53 2004// D gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/cc/CAF@PLUGIN_NAME@.cc.in0000644000175200001440000000041210153634165021100 00000000000000#include "libGIFTAc@PLUGIN_NAME@/include/CAF@PLUGIN_NAME@.h" CAccessor* CAF@PLUGIN_NAME@::makeAccessor(const CXMLElement& inConfiguration)const{ return new CAc@PLUGIN_NAME@(inConfiguration); }; CAF@PLUGIN_NAME@::CAF@PLUGIN_NAME@(){ mName="@PLUGIN_TYPE@"; }; gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/cc/CAc@PLUGIN_NAME@.cc.in0000644000175200001440000000255610153634165021150 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libMRML/include/mrml_const.h" #include "libMRML/include/my_throw.h" #include "libGIFTAc@PLUGIN_NAME@/include/CAc@PLUGIN_NAME@.h" #include #include "libMRML/include/GIFTExceptions.h" #include #include "libMRML/include/CXMLElement.h" #include "libMRML/include/CAttributeList.h" CAc@PLUGIN_NAME@::CAc@PLUGIN_NAME@(const CXMLElement& inCollectionElement){ mMutex@PLUGIN_NAME@.lock(); mMutex@PLUGIN_NAME@.unlock(); } CAc@PLUGIN_NAME@::operator bool()const{ return true; } gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/cc/plug_in_fo.cc.in0000644000175200001440000000052410153634165020715 00000000000000#include "libGIFTAc@PLUGIN_NAME@/include/CAc@PLUGIN_NAME@.h" #include "libMRML/include/CAccessorAdminCollection.h" extern "C" char* libGIFTAc@PLUGIN_NAME@_getClassName(){ return "@PLUGIN_TYPE@"; } extern "C" CAc@PLUGIN_NAME@* libGIFTAc@PLUGIN_NAME@_makeAccessor(const CXMLElement& inElement){ return new CAc@PLUGIN_NAME@(inElement); } gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/cc/Makefile.am.in0000644000175200001440000000322210153634165020317 00000000000000# -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # #Makefile for the inverted File library # # CCCONFIG=sed "s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@bindir@:g;s:__DATADIR__:@datadir@:g" < $< > $@ CCCONFIG=sed -e "s:__EXECBINDIR__:@DEBEXECBINDIR@:g;s:__PERL_LOCATION__:@PERL@:g;s:__BINDIR__:@DEBPERLLIBDIR@:g;s:__DATADIR__:@DEBDATADIR@:g;s:__LIBDIR__:@DEBSHAREDIR@:g;s:__HOME__:${HOME}:g;s:__WEB_PUBLISHING_DIRECTORY__:@WEB_PUBLISHING_DIRECTORY@:g;s=__WEB_PUBLISHING_LOCATION__=@WEB_PUBLISHING_LOCATION@=g;" < $< > $@ # noinst_LIBRARIES= libGIFTInvertedFile.a lib_LTLIBRARIES = libGIFTAc@PLUGIN_NAME@.la libGIFTAc@PLUGIN_NAME@_la_LDFLAGS="@PRE_INSTALL_LIBDIRS@" -lMRML @MRMLLIBS@ INCLUDES= -DHAS_BOOL @MRMLINCLUDES@ libGIFTAc@PLUGIN_NAME@_la_SOURCES= \ CAF@PLUGIN_NAME@.cc\ CAc@PLUGIN_NAME@.cc\ plug_in_fo.ccgift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/CVS/0000777000175200001440000000000010153634165016011 500000000000000gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/CVS/Root0000644000175200001440000000005410153634165016572 00000000000000muellerw@subversions.gnu.org:/cvsroot/gift/ gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/CVS/Repository0000644000175200001440000000005010153634165020022 00000000000000gift/PluginMaker/libGIFTAc@PLUGIN_NAME@ gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/CVS/Entries0000644000175200001440000000010610153634165017256 00000000000000D/cc//// D/include//// /Makefile.am.in/1.3/Mon Jul 22 07:09:30 2002// gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/include/0000777000175200001440000000000010153634165017001 500000000000000gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/include/CVS/0000777000175200001440000000000010153634165017434 500000000000000gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/include/CVS/Root0000644000175200001440000000005410153634165020215 00000000000000muellerw@subversions.gnu.org:/cvsroot/gift/ gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/include/CVS/Repository0000644000175200001440000000006010153634165021446 00000000000000gift/PluginMaker/libGIFTAc@PLUGIN_NAME@/include gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/include/CVS/Entries0000644000175200001440000000023510153634165020704 00000000000000/CAF@PLUGIN_NAME@.h.in/1.4/Mon Jul 22 07:09:30 2002// /CAc@PLUGIN_NAME@.h.in/1.4/Mon Jul 22 07:09:30 2002// /Makefile.am.in/1.2/Mon Jul 22 07:09:30 2002// D gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/include/CAF@PLUGIN_NAME@.h.in0000644000175200001440000000255010153634165022005 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva 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 */ // -*- mode: c++ -*- #ifndef _CAF@PLUGIN_NAME@ #define _CAF@PLUGIN_NAME@ #include "libMRML/include/CAccessorFactory.h" #include "libGIFTAc@PLUGIN_NAME@/include/CAc@PLUGIN_NAME@.h" /** * A factory to make inverted Files *@author Wolfgang Müller * */ class CAF@PLUGIN_NAME@:public CAccessorFactory{ public: /** Constructs this, means, sets mName */ CAF@PLUGIN_NAME@(); /** makes an inverte file accessor */ CAccessor* makeAccessor(const CXMLElement& inConfiguration)const; }; #endif gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/include/CAc@PLUGIN_NAME@.h.in0000644000175200001440000000363010153634165022042 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva 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 */ // -*- mode: c++ -*- #ifndef _CAC@PLUGIN_NAME@ #define _CAC@PLUGIN_NAME@ #include #include #include "libMRML/include/CAccessorImplementation.h" class CXMLElement; #include "libMRML/include/CIDRelevanceLevelPairList.h" #include "libMRML/include/CMutex.h" // multithreading /** ACCESSOR FOR THE @PLUGIN_NAME@ PLUGIN FOR THE GIFT This Accessor will make configuration data accessible. @author Wolfgang Müller */ class CAc@PLUGIN_NAME@:public CAccessorImplementation{ protected: /** mutual exclude for multithreading*/ CMutex mMutex@PLUGIN_NAME@; public: /** constructor opens a hierarchy file and reads it. Like every accessor, this accessor takes a MRML element as input (@see CXMLElement for how to access the attributes of this element). Currently this accessor understands the following attributes: NOTHING YET */ CAc@PLUGIN_NAME@(const CXMLElement& inConfiguration); /** has this been successfully read? */ operator bool()const; }; #endif gift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/include/Makefile.am.in0000644000175200001440000000203310153634165021354 00000000000000# -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 libGIFTAc@PLUGIN_NAME@dir=$(includedir)/libGIFTAc@PLUGIN_NAME@/include libGIFTAc@PLUGIN_NAME@_HEADERS=CAF@PLUGIN_NAME@.h CAc@PLUGIN_NAME@.hgift-0.1.14/PluginMaker/libGIFTAc@PLUGIN_NAME@/Makefile.am.in0000644000175200001440000000164310153634165017737 00000000000000# -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 SUBDIRS= include cc gift-0.1.14/INSTALL0000644000175200001440000001722710153634166010514 00000000000000Basic 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. gift-0.1.14/libSquirePPM/0000777000175200001440000000000010220511632012035 500000000000000gift-0.1.14/libSquirePPM/ppm.h0000644000175200001440000000442310220502730012720 00000000000000/* constants and structures for PPM and PGM utilities */ /* David Squire 980922 */ #include #ifndef dprint #define dprint(expr) fprintf(stderr, #expr " = %f\n", (float)expr) #endif #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif typedef unsigned char byte; #define MAX_BYTE 255 #define MIN_BYTE 0 #define PGM_ASC_MAGIC '2' #define PGM_RAW_MAGIC '5' #define PPM_ASC_MAGIC '3' #define PPM_RAW_MAGIC '6' enum file_types { PGM_ASC, PGM_RAW, PPM_ASC, PPM_RAW, NOT_PPM }; enum ppm_error { PPM_OK, UNKNOWN_TYPE, EARLY_EOF, READ_ERROR, COL_TOO_LARGE, ONE_PLANE_IN, ONE_PLANE_OUT, THREE_PLANES_NEEDED, ONE_PLANE_NEEDED, TOO_MANY_BINS, FILE_OPEN_ERROR, FILE_READ_ERROR, FILE_WRITE_ERROR, FILE_CLOSE_ERROR }; /* planes of a colour image */ #define RED 0 #define GREEN 1 #define BLUE 2 #define HUE 0 #define SATURATION 1 #define VALUE 2 typedef struct _PPM { enum file_types type; int width, height; byte max_col_comp; byte bytes_per_pixel; char *comments; int comment_length; byte *pixel; } PPM; #ifdef __STDC__ # define P(s) s #else # define P(s) () #endif /* ppm_comment.c */ void add_comment P((PPM *the_ppm , char *the_comment )); /* ppm_error.c */ void ppm_handle_error P((enum ppm_error the_error )); /* ppm_io.c */ void read_non_whitespace P((FILE *f , byte *buff )); enum file_types read_magic_no P((FILE *f )); enum ppm_error read_ppm P((FILE *ppm_file , PPM **ppm_data , enum file_types ppm_type )); void write_header P((FILE *outfile , PPM *im1 )); enum ppm_error write_ppm P((FILE *outfile , PPM *im1 , enum file_types ppm_type )); enum ppm_error write_ppm_plane P((FILE *outfile , PPM *im1 , enum file_types ppm_type , int plane )); /* ppm_memory.c */ PPM *new_ppm P((void )); void destroy_ppm P((PPM **the_ppm )); /* ppm_normalize.c */ double *ppm_local_normalize P((PPM *im_input , int window_size , double (*variance_transformer )(double ))); PPM *ppm_double_to_byte P((double *dbl_image , int width , int height )); PPM *ppm_norm_contrast P((PPM *im_input )); PPM *ppm_local_norm_contrast P((PPM *im_input , int window_size )); /* ppm_plane.c */ PPM *ppm_plane P((PPM *im_input , int plane_wanted )); /* ppm_subimage.c */ PPM *ppm_subimage P((PPM *source_image , int top_left_x , int top_left_y , int width , int height )); #undef P gift-0.1.14/libSquirePPM/ppm_error.c0000644000175200001440000000213410153634166014137 00000000000000#include #include #include #include #include #include #include "ppm.h" /* PPM and PGM utilities */ /* David Squire 980924 */ void ppm_handle_error(enum ppm_error the_error) { switch(the_error) { case UNKNOWN_TYPE: fprintf(stderr, "This is not a PPM/PGM file.\n"); break; case EARLY_EOF: fprintf(stderr, "Unexpected end of file.\n"); break; case READ_ERROR: fprintf(stderr, "Error reading file.\n"); break; case COL_TOO_LARGE: fprintf(stderr, "Maximum colour value too large for raw format.\n"); break; case ONE_PLANE_IN: fprintf(stderr, "Cannot save a plane of a greyscale image.\n"); break; case ONE_PLANE_OUT: fprintf(stderr, "Cannot save a plane as a colour image.\n"); break; case THREE_PLANES_NEEDED: fprintf(stderr, "Input image must have three planes.\n"); break; case ONE_PLANE_NEEDED: fprintf(stderr, "Input image must have one plane.\n"); break; case TOO_MANY_BINS: fprintf(stderr, "Quantisation can result in at most 256 bins.\n"); break; default: break; } } gift-0.1.14/libSquirePPM/ppm_io.c0000644000175200001440000001404010153634166013414 00000000000000#include #include #include #include #include #include #include "ppm.h" /* PPM and PGM utilities */ /* David Squire 980924 */ void read_non_whitespace(FILE *f, byte *buff) { int i, good_char; byte c; good_char = 0; while (!good_char) { while (isspace(c = (char)fgetc(f))) ; if (c == '#') /* skip any comment lines */ while ((c = (char)fgetc(f)) != '\n') ; else good_char = 1; } i = 0; buff[i++] = c; while (!isspace(buff[i++] = (char)fgetc(f))) ; buff[--i] = 0; } enum file_types read_magic_no(FILE *f) { char magic[2]; magic[0] = (char)fgetc(f); magic[1] = (char)fgetc(f); if (magic[0] != 'P') return(NOT_PPM); switch(magic[1]) { case PGM_ASC_MAGIC: return(PGM_ASC); break; case PGM_RAW_MAGIC: return(PGM_RAW); break; case PPM_ASC_MAGIC: return(PPM_ASC); break; case PPM_RAW_MAGIC: return(PPM_RAW); break; default: return(NOT_PPM); break; } } enum ppm_error read_ppm(FILE* ppm_file, PPM **ppm_data, enum file_types ppm_type) { byte c, buffer[256]; int d; long i, num_pixel_bytes, num_read; /* allocate space for the ppm data structure */ *ppm_data = new_ppm(); (*ppm_data)->type = ppm_type; /* get width from file, skipping whitespace and comments */ read_non_whitespace(ppm_file, buffer); (*ppm_data)->width = atoi((const char *)buffer); /* get height from file, skipping whitespace and comments */ read_non_whitespace(ppm_file, buffer); (*ppm_data)->height = atoi((const char *)buffer); /* get max. colour value from file, skipping whitespace and comments */ read_non_whitespace(ppm_file, buffer); (*ppm_data)->max_col_comp = (byte)atoi((const char *)buffer); if ((*ppm_data)->max_col_comp > 255) { fprintf(stderr, "maxval > 255. Too large for RAWBITS format.\n"); return(COL_TOO_LARGE); } switch(ppm_type) { case PGM_RAW: case PPM_RAW: if (ppm_type == PGM_RAW) (*ppm_data)->bytes_per_pixel = 1; else (*ppm_data)->bytes_per_pixel = 3; num_pixel_bytes = (*ppm_data)->bytes_per_pixel*(*ppm_data)->width*(*ppm_data)->height; (*ppm_data)->pixel = (byte *)malloc(num_pixel_bytes*sizeof(byte)); if ((num_read = fread((*ppm_data)->pixel, sizeof(byte), num_pixel_bytes, ppm_file)) < num_pixel_bytes) { fprintf(stderr, "Read %d bytes. Expected %d.\n", num_read, num_pixel_bytes); if (feof(ppm_file)) return(EARLY_EOF); else return(READ_ERROR); } break; case PGM_ASC: case PPM_ASC: if (ppm_type == PGM_ASC) (*ppm_data)->bytes_per_pixel = 1; else (*ppm_data)->bytes_per_pixel = 3; num_pixel_bytes = (*ppm_data)->bytes_per_pixel*(*ppm_data)->width*(*ppm_data)->height; (*ppm_data)->pixel = (byte *)malloc(num_pixel_bytes*sizeof(byte)); num_read = 0; for (i = 0; i < (*ppm_data)->width*(*ppm_data)->height; i++) { if (ppm_type == PGM_ASC) { fscanf(ppm_file, "%d", &d); (*ppm_data)->pixel[i] = (byte)d; num_read++; } else { fscanf(ppm_file, "%d", &d); (*ppm_data)->pixel[3*i] = (byte)d; fscanf(ppm_file, "%d", &d); (*ppm_data)->pixel[3*i + 1] = (byte)d; fscanf(ppm_file, "%d", &d); (*ppm_data)->pixel[3*i + 2] = (byte)d; num_read += 3; } if(ferror(ppm_file)) { fprintf(stderr, "Read %d bytes. Expected %d.\n", num_read, num_pixel_bytes); if (feof(ppm_file)) return(EARLY_EOF); else return(READ_ERROR); } } break; default: fprintf(stderr, "read_ppm: This should never be reached!\n"); return(UNKNOWN_TYPE); break; } return(PPM_OK); } void write_header(FILE *outfile, PPM *im1) { fprintf(outfile, "# Written by Squizz's PPM/PGM utilities\n"); if (im1->comment_length != 0) fprintf(outfile, "%s", im1->comments); fprintf(outfile, "%d %d\n", im1->width, im1->height); fprintf(outfile, "%d\n", (int)(im1->max_col_comp)); } enum ppm_error write_ppm(FILE *outfile, PPM *im1, enum file_types ppm_type) { long i; switch(ppm_type) { case PGM_ASC: case PPM_ASC: if (im1->bytes_per_pixel == 1) fprintf(outfile, "P%c\n", PGM_ASC_MAGIC); else fprintf(outfile, "P%c\n", PPM_ASC_MAGIC); write_header(outfile, im1); if (im1->bytes_per_pixel == 1) { for (i = 0; i < im1->width*im1->height; i++) { fprintf(outfile, "%d ", im1->pixel[i]); if (!(i%18)) fprintf(outfile, "\n"); } } else { for (i = 0; i < 3*im1->width*im1->height; i += 3) { fprintf(outfile, "%d ", im1->pixel[i]); fprintf(outfile, "%d ", im1->pixel[i+1]); fprintf(outfile, "%d\t", im1->pixel[i+2]); if (!(i%12)) fprintf(outfile, "\n"); } } break; case PGM_RAW: case PPM_RAW: if (im1->bytes_per_pixel == 1) fprintf(outfile, "P%c\n", PGM_RAW_MAGIC); else fprintf(outfile, "P%c\n", PPM_RAW_MAGIC); write_header(outfile, im1); i = im1->bytes_per_pixel*im1->width*im1->height; fwrite(im1->pixel, sizeof(byte), i, outfile); break; default: fprintf(stderr, "write_ppm: This should never be reached!\n"); return(UNKNOWN_TYPE); } return(PPM_OK); } enum ppm_error write_ppm_plane(FILE *outfile, PPM *im1, enum file_types ppm_type, int plane) { long base, i; if (im1->bytes_per_pixel == 1) return(ONE_PLANE_IN); switch(ppm_type) { case PPM_ASC: case PPM_RAW: return(ONE_PLANE_OUT); break; case PGM_ASC: case PGM_RAW: if (ppm_type == PPM_ASC) fprintf(outfile, "P%c\n", PGM_ASC_MAGIC); else fprintf(outfile, "P%c\n", PGM_RAW_MAGIC); fprintf(outfile, "# Written by Squizz's PPM/PGM utilities\n"); fprintf(outfile, "%d %d\n", im1->width, im1->height); fprintf(outfile, "%d\n", (int)(im1->max_col_comp)); for (i = 0; i < 3*im1->width*im1->height; i += 3) { if (ppm_type == PPM_ASC) { fprintf(outfile, "%d ", im1->pixel[plane + i]); if (!(i%18)) fprintf(outfile, "\n"); } else fwrite(&(im1->pixel[plane + i]), sizeof(byte), 1, outfile); } break; default: fprintf(stderr, "write_ppm_plane: This should never be reached!\n"); return(UNKNOWN_TYPE); } return(PPM_OK); } gift-0.1.14/libSquirePPM/normaliseContrast.c0000644000175200001440000000335410153634166015646 00000000000000/* -*- mode: c -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include #include "typedefs.h" int normaliseContrast(float *inoutImage, int NumPixels){ float lMinimalPixel, lMaximalPixel, lNormalisingFactor; int i; lMaximalPixel = inoutImage[0]; lMinimalPixel = inoutImage[0]; for (i = 1; i < NumPixels; i++) { if (inoutImage[i] > lMaximalPixel) lMaximalPixel = inoutImage[i]; else if (inoutImage[i] < lMinimalPixel) lMinimalPixel = inoutImage[i]; } if (fabs(lMinimalPixel - lMaximalPixel) < 1e-10) { fprintf(stderr, "Can't normalise this Image\n"); return 1; } lNormalisingFactor = (float) (MAX_BYTE - MIN_BYTE) /(lMaximalPixel - lMinimalPixel); for (i = 0; i < NumPixels; i++) { inoutImage[i] -= lMinimalPixel * lNormalisingFactor; inoutImage[i] += MIN_BYTE; } return 0; } gift-0.1.14/libSquirePPM/normaliseContrast.h0000644000175200001440000000201610220502730015627 00000000000000/* -*- mode: c -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ extern int normaliseContrast(float *inoutImage, int NumPixels); gift-0.1.14/libSquirePPM/ppm_memory.c0000644000175200001440000000106510153634166014320 00000000000000#include #include #include #include #include #include #include "ppm.h" /* PPM and PGM utilities */ /* David Squire 980924 */ PPM *new_ppm() { PPM *the_ppm; the_ppm = (PPM *)malloc(sizeof(PPM)); the_ppm->comments = NULL; the_ppm->comment_length = 0; the_ppm->pixel = NULL; return(the_ppm); } void destroy_ppm(PPM **the_ppm) { if ((*the_ppm)->comments != NULL) free((*the_ppm)->comments); if ((*the_ppm)->pixel != NULL) free((*the_ppm)->pixel); free(*the_ppm); *the_ppm = NULL; } gift-0.1.14/libSquirePPM/ppm_noproto.h0000644000175200001440000000202210220502730014471 00000000000000/* constants and structures for PPM and PGM utilities */ /* David Squire 980922 */ #ifndef dprint #define dprint(expr) fprintf(stderr, #expr " = %f\n", (float)expr) #endif #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif typedef unsigned char byte; #define MAX_BYTE 255 #define MIN_BYTE 0 #define PGM_ASC_MAGIC '2' #define PGM_RAW_MAGIC '5' #define PPM_ASC_MAGIC '3' #define PPM_RAW_MAGIC '6' enum file_types { PGM_ASC, PGM_RAW, PPM_ASC, PPM_RAW, NOT_PPM }; enum ppm_error { PPM_OK, UNKNOWN_TYPE, EARLY_EOF, READ_ERROR, COL_TOO_LARGE, ONE_PLANE_IN, ONE_PLANE_OUT, THREE_PLANES_NEEDED, ONE_PLANE_NEEDED, TOO_MANY_BINS, FILE_OPEN_ERROR, FILE_READ_ERROR, FILE_WRITE_ERROR, FILE_CLOSE_ERROR }; /* planes of a colour image */ #define RED 0 #define GREEN 1 #define BLUE 2 #define HUE 0 #define SATURATION 1 #define VALUE 2 typedef struct _PPM { enum file_types type; int width, height; byte max_col_comp; byte bytes_per_pixel; char *comments; int comment_length; byte *pixel; } PPM; gift-0.1.14/libSquirePPM/Makefile.am0000644000175200001440000000061110153634166014020 00000000000000noinst_LIBRARIES= libSquirePPM.a noinst_HEADERS=normaliseContrast.h ppm.h ppm_noproto.h typedefs.h libSquirePPM_a_SOURCES= ppm_comment.c\ ppm_error.c\ ppm_io.c\ ppm_memory.c\ ppm_normalize.c\ ppm_plane.c\ ppm_subimage.c\ normaliseContrast.c noinst_PROGRAMS= ppm-new-executable ppm_new_executable_LDADD= -L. -lSquirePPM -lm ppm_new_executable_SOURCES= new_executable.c gift-0.1.14/libSquirePPM/Makefile.in0000644000175200001440000004005310220474100014016 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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@ SOURCES = $(libSquirePPM_a_SOURCES) $(ppm_new_executable_SOURCES) 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 = : host_triplet = @host@ noinst_PROGRAMS = ppm-new-executable$(EXEEXT) subdir = libSquirePPM DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libSquirePPM_a_AR = $(AR) $(ARFLAGS) libSquirePPM_a_LIBADD = am_libSquirePPM_a_OBJECTS = ppm_comment.$(OBJEXT) ppm_error.$(OBJEXT) \ ppm_io.$(OBJEXT) ppm_memory.$(OBJEXT) ppm_normalize.$(OBJEXT) \ ppm_plane.$(OBJEXT) ppm_subimage.$(OBJEXT) \ normaliseContrast.$(OBJEXT) libSquirePPM_a_OBJECTS = $(am_libSquirePPM_a_OBJECTS) PROGRAMS = $(noinst_PROGRAMS) am_ppm_new_executable_OBJECTS = new_executable.$(OBJEXT) ppm_new_executable_OBJECTS = $(am_ppm_new_executable_OBJECTS) ppm_new_executable_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/new_executable.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/normaliseContrast.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/ppm_comment.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/ppm_error.Po ./$(DEPDIR)/ppm_io.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/ppm_memory.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/ppm_normalize.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/ppm_plane.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/ppm_subimage.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libSquirePPM_a_SOURCES) $(ppm_new_executable_SOURCES) DIST_SOURCES = $(libSquirePPM_a_SOURCES) $(ppm_new_executable_SOURCES) HEADERS = $(noinst_HEADERS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ noinst_LIBRARIES = libSquirePPM.a noinst_HEADERS = normaliseContrast.h ppm.h ppm_noproto.h typedefs.h libSquirePPM_a_SOURCES = ppm_comment.c\ ppm_error.c\ ppm_io.c\ ppm_memory.c\ ppm_normalize.c\ ppm_plane.c\ ppm_subimage.c\ normaliseContrast.c ppm_new_executable_LDADD = -L. -lSquirePPM -lm ppm_new_executable_SOURCES = new_executable.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(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 libSquirePPM/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libSquirePPM/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libSquirePPM.a: $(libSquirePPM_a_OBJECTS) $(libSquirePPM_a_DEPENDENCIES) -rm -f libSquirePPM.a $(libSquirePPM_a_AR) libSquirePPM.a $(libSquirePPM_a_OBJECTS) $(libSquirePPM_a_LIBADD) $(RANLIB) libSquirePPM.a clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done ppm-new-executable$(EXEEXT): $(ppm_new_executable_OBJECTS) $(ppm_new_executable_DEPENDENCIES) @rm -f ppm-new-executable$(EXEEXT) $(LINK) $(ppm_new_executable_LDFLAGS) $(ppm_new_executable_OBJECTS) $(ppm_new_executable_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/new_executable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/normaliseContrast.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppm_comment.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppm_error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppm_io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppm_memory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppm_normalize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppm_plane.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppm_subimage.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@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(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@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(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@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(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: 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 $(LIBRARIES) $(PROGRAMS) $(HEADERS) 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: -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-noinstLIBRARIES \ clean-noinstPROGRAMS 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-exec-am: 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-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLIBRARIES clean-noinstPROGRAMS ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am 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-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: gift-0.1.14/libSquirePPM/ppm_subimage.c0000644000175200001440000000251110153634166014601 00000000000000#include #include #include #include #include #include #include "ppm.h" /* PPM and PGM utilities */ /* David Squire 990423 */ PPM *ppm_subimage(PPM *source_image, int top_left_x, int top_left_y, int width, int height) { /* grab a widthxheight subimage from source_image, with top left corner * at top_left_x, top_left_y. Use periodic extension of source_image, so * subimage could in fact be bigger than source_image if wanted. */ PPM *subimage; int x, y; int source_x, source_y; long sub_offset, source_offset; int bpp, p; subimage = new_ppm(); subimage->type = source_image->type; subimage->width = width; subimage->height = height; subimage->max_col_comp = source_image->max_col_comp; bpp = subimage->bytes_per_pixel = source_image->bytes_per_pixel; subimage->pixel = (byte *)malloc(subimage->bytes_per_pixel*width*height*sizeof(byte)); for (y = 0; y < height; y++) { source_y = (top_left_y + y) % source_image->height; for (x = 0; x < width; x++) { source_x = (top_left_x + x) % source_image->width; sub_offset = (y*width + x)*bpp; source_offset = (source_y*source_image->width + source_x)*bpp; for (p = 0; p < bpp; p++) { subimage->pixel[sub_offset + p] = source_image->pixel[source_offset + p]; } } } return(subimage); } gift-0.1.14/libSquirePPM/typedefs.h0000644000175200001440000000213110220502730013741 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /* some typedefs */ /* ======================= */ #define MAX_BYTE 255 #define MIN_BYTE 0 typedef unsigned char byte; enum bool { False, True }; gift-0.1.14/libSquirePPM/ppm_normalize.c0000644000175200001440000001246410153634166015015 00000000000000#include #include #include #include #include #include #include #include /* PPM and PGM utilities */ /* David Squire 990520 */ double *ppm_local_normalize(PPM *im_input, int window_size, double (*variance_transformer)(double)) { int width, height; int i, j, x, y, n; double *dbl_image; double pixel, sum, sum_squares, mean, variance, normalized_pixel; char comment[80]; if ((im_input->type == PPM_ASC) || (im_input->type == PPM_RAW)) { fprintf(stderr, "Can't normalize a PPM image!\n"); return (NULL); } /* allocate space for the normalized image */ width = im_input->width; height = im_input->height; dbl_image = (double *)malloc(width*height*sizeof(double)); /* move across the image, normalizing each pizel based on the * statistics of the surrounding (square) window */ for (x = 0; x < width; x++) { for (y = 0; y < height; y++) { /* calculate the statistics for the window */ n = 0; sum = sum_squares = 0; for (i = -window_size/2; i < window_size/2; i++) { for (j = -window_size/2; j < window_size/2; j++) { if (((x + i) >= 0) && ((x + i) < width) && ((y + j) >= 0) && ((y + j) < height)) { n++; pixel = (double)(im_input->pixel[(y + j)*width + (x + i)])/255.0; sum += pixel; sum_squares += pixel*pixel; } } } mean = sum/(double)n; variance = sum_squares/(double)n - mean*mean; dbl_image[y*width + x] = (((double)im_input->pixel[y*width + x])/255 - mean)/sqrt(variance_transformer(variance)); /* HACK: The mean should now be zero, and the variance 1, for each * region (approximately). Clip any thing more than 4 std. devs. * away from the mean, just to see if this improves visual * appearance */ /* if (dbl_image[y*width + x] > 4) dbl_image[y*width + x] = 4; if (dbl_image[y*width + x] < -4) dbl_image[y*width + x] = -4; */ } } return (dbl_image); } PPM *ppm_double_to_byte(double *dbl_image, int width, int height) { PPM *im_output; int x, y; double min = MAXFLOAT, max = -MAXFLOAT; /* set up the output PGM image */ im_output = new_ppm(); im_output->type = PGM_RAW; im_output->width = width; im_output->height = height; im_output->max_col_comp = 255; /* this is max. possible */ im_output->bytes_per_pixel = 1; im_output->pixel = (byte *)malloc(im_output->width*im_output->height*sizeof(byte)); /* find the minimum and maximum values of the input image */ for (x = 0; x < width; x++) { for (y = 0; y < height; y++) { if (dbl_image[y*width + x] > max) { max = dbl_image[y*width + x]; } else { if (dbl_image[y*width + x] < min) min = dbl_image[y*width + x]; } } } /* now copy the input image to the output image, normalizing to the * range [0,255] */ for (x = 0; x < width; x++) { for (y = 0; y < height; y++) { im_output->pixel[y*width + x] = (byte)rint(255*(dbl_image[y*width + x] - min)/(max - min)); } } return(im_output); } PPM *ppm_norm_contrast(PPM *im_input) { PPM *im_output; int width, height; int x, y; double min = MAXFLOAT, max = -MAXFLOAT; /* set up the output PGM image */ im_output = new_ppm(); im_output->type = PGM_RAW; width = im_output->width = im_input->width; height = im_output->height = im_input->height; im_output->max_col_comp = 255; /* this is max. possible */ im_output->bytes_per_pixel = 1; im_output->pixel = (byte *)malloc(im_output->width*im_output->height*sizeof(byte)); /* find the minimum and maximum values of the input image */ for (x = 0; x < width; x++) { for (y = 0; y < height; y++) { if (im_input->pixel[y*width + x] > max) { max = im_input->pixel[y*width + x]; } else { if (im_input->pixel[y*width + x] < min) min = im_input->pixel[y*width + x]; } } } /* now copy the input image to the output image, normalizing to the * range [0,255] */ for (x = 0; x < width; x++) { for (y = 0; y < height; y++) { im_output->pixel[y*width + x] = (byte)rint(255*(im_input->pixel[y*width + x] - min)/(max - min)); } } return(im_output); } PPM *ppm_local_norm_contrast(PPM *im_input, int window_size) { PPM *im_output; int width, height; int i, j, x, y; byte pixel; double max, min, sum, n; char comment[80]; if ((im_input->type == PPM_ASC) || (im_input->type == PPM_RAW)) { fprintf(stderr, "Can't normalize a PPM image!\n"); return (NULL); } /* set up the output PGM image */ im_output = new_ppm(); im_output->type = PGM_RAW; width = im_output->width = im_input->width; height = im_output->height = im_input->height; im_output->max_col_comp = 255; /* this is max. possible */ im_output->bytes_per_pixel = 1; im_output->pixel = (byte *)malloc(im_output->width*im_output->height*sizeof(byte)); for (x = 0; x < width; x++) { for (y = 0; y < height; y++) { /* calculate the max and min pixel the window */ min = 255; max = 0; sum = n = 0; for (i = -window_size/2; i < window_size/2; i++) { for (j = -window_size/2; j < window_size/2; j++) { if (((x + i) >= 0) && ((x + i) < width) && ((y + j) >= 0) && ((y + j) < height)) { pixel = im_input->pixel[(y + j)*width + (x + i)]; sum += pixel; n++; if (pixel > max) max = pixel; if (pixel < min) min = pixel; } } } im_output->pixel[y*width + x] = 128 + (byte)rint(127*((double)(im_input->pixel[y*width + x]) - sum/n)/(max - min)); } } return (im_output); } gift-0.1.14/libSquirePPM/ppm_plane.c0000644000175200001440000000222110153634166014102 00000000000000#include #include #include #include #include #include #include /* PPM and PGM utilities */ /* David Squire 990518 */ PPM *ppm_plane(PPM *im_input, int plane_wanted) { PPM *im_output; int i, bytes_per_pixel; char comment[80]; if ((im_input->type == PGM_ASC) || (im_input->type == PGM_RAW)) { fprintf(stderr, "Can't extract a plane from a PGM image!\n"); return (NULL); } /* set up the output PGM image */ im_output = new_ppm(); /* this was causing problems for "convert" sprintf(comment, "# Plane %d of image\n", plane_wanted); add_comment(im_output, comment); */ im_output->type = PGM_RAW; im_output->width = im_input->width; im_output->height = im_input->height; im_output->max_col_comp = im_input->max_col_comp; im_output->bytes_per_pixel = 1; im_output->pixel = (byte *)malloc(im_output->width*im_output->height*sizeof(byte)); /* extract the desired plane */ bytes_per_pixel = im_input->bytes_per_pixel; for (i = 0; i < im_output->width*im_output->height; i++) im_output->pixel[i] = im_input->pixel[bytes_per_pixel*i + plane_wanted]; return(im_output); } gift-0.1.14/libSquirePPM/ppm_comment.c0000644000175200001440000000242310153634166014451 00000000000000#include #include #include #include #include #include #include "ppm.h" /* PPM and PGM utilities */ /* David Squire 980924 */ void add_comment(PPM *the_ppm, char *the_comment) { char *original_comments = NULL, *c; char *new_comment; int i = 0, j; if (the_comment[0] != '#') { new_comment = (char *)malloc((strlen(the_comment) + 3)*sizeof(char)); new_comment[0] = '#'; new_comment[1] = ' '; strcpy(&(new_comment[2]), the_comment); } else { new_comment = (char *)malloc((strlen(the_comment) + 1)*sizeof(char)); strcpy(new_comment, the_comment); } if (the_ppm->comment_length != 0) { original_comments = malloc(the_ppm->comment_length*sizeof(char)); c = the_ppm->comments; while (*c != '\0') original_comments[i++] = *c++; original_comments[i] = '\0'; } if (the_ppm->comments != NULL) free(the_ppm->comments); the_ppm->comment_length = i + strlen(new_comment); the_ppm->comments = malloc(the_ppm->comment_length*sizeof(char)); i = 0; if (original_comments != NULL) { c = original_comments; while (*c != '\0') the_ppm->comments[i++] = *c++; } for (j = 0; j < strlen(new_comment); j++, i++) the_ppm->comments[i] = new_comment[j]; the_ppm->comments[i] = '\0'; free(new_comment); } gift-0.1.14/libSquirePPM/new_executable.c0000644000175200001440000000324510153634166015130 00000000000000#include #include #include #include #include #include #include double linear(double x) { return(x); } double sigmoid(double x) { double gain = 0.5e4; double threshold = 0.0005; double default_val = 0.05; double ret_val; ret_val = default_val + (x - default_val)/(1 + exp(-gain*(x - threshold))); return(ret_val); } double threshold(double x) { double t = 0.0005; double ret_val; if (x > t) ret_val = x; else ret_val = 1; return(ret_val); } int main(int argc, char *argv[]) { FILE *source_file, *normalized_image_file; PPM *source_image, *normalized_image; double *dbl_normalized_image; enum file_types ppm_type; enum ppm_error the_error; int window_size; switch(argc) { case 2: window_size = atoi(argv[1]); break; default: fprintf(stderr, "Usage: ppm_normalize window_size < file1.ppm > file2.ppm\n\n"); exit(1); break; } /* act as a pipe */ source_file = stdin; normalized_image_file = stdout; switch(ppm_type = read_magic_no(source_file)) { case PGM_ASC: case PPM_ASC: case PGM_RAW: case PPM_RAW: if ((the_error = read_ppm(source_file, &source_image, ppm_type)) != PPM_OK) { ppm_handle_error(the_error); exit(1); } break; default: fprintf(stderr, "Unrecognized file type.\n"); exit(1); break; } dbl_normalized_image = ppm_local_normalize(source_image, window_size, sigmoid); normalized_image = ppm_double_to_byte(dbl_normalized_image, source_image->width, source_image->height); if ((the_error = write_ppm(normalized_image_file, normalized_image, normalized_image->type)) != PPM_OK) { ppm_handle_error(the_error); exit(1); } exit(0); } gift-0.1.14/libGIFTQuPerl/0000777000175200001440000000000010220511630012070 500000000000000gift-0.1.14/libGIFTQuPerl/cc/0000777000175200001440000000000010220511630012455 500000000000000gift-0.1.14/libGIFTQuPerl/cc/CXMLTriplet.cc0000644000175200001440000000027210220502730015011 00000000000000#include "libGIFTQuPerl/include/CXMLTriplet.h" const int CXMLTriplet::element(1); const int CXMLTriplet::up(2); const int CXMLTriplet::attribute(3); const int CXMLTriplet::text(4); gift-0.1.14/libGIFTQuPerl/cc/CQPerl.cc0000644000175200001440000003010010220502730014021 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /*************************************** * * CQPerl.h * * * **************************************** * * modification history: * * WM 08 99 creation * **************************************** * * compiler defines used: * * ****************************************/ #ifdef __GIFT_WITH_PERL__ #ifdef bool #undef bool #define _bool char #endif #include "libMRML/include/GIFTExceptions.h" #include "libMRML/include/my_throw.h" #include "libMRML/include/mrml_const.h" // for parsing #include #include #include #include "libMRML/include/GIFTExceptions.h" #include #include "libMRML/include/CAlgorithm.h" #include "libMRML/include/CAccessorAdminCollection.h" #include "libGIFTQuPerl/include/CQPerl.h" #include "libGIFTAcPerl/include/CAcPerl.h" #include "libMRML/include/CXEVTripletList.h" extern "C" void xs_init(void); PerlInterpreter* CQPerl::mPerl(0); map gLoadedModules; /** Transforms a CXMLElement to an CXMLTripletList, and finally pushes this list onto the Perl stack. */ CXMLElement* CQPerl::callPerl(const CXMLElement* inElement,string inFunction){ dSP ; int count; ENTER; SAVETMPS; PUSHMARK(SP) ; cout << endl << "inElement:" << inElement << endl; //the object reference of our perl query processor //i.e. $self XPUSHs(sv_2mortal(newSVsv(mPerlQueryProcessor))); if(inElement){ cout << "I making the triplet list:" << endl << flush; CXEVTripletList lVisitor; inElement->traverse(lVisitor); cout << "I am here in pushXMLtoPerl:" << endl << flush; for(CXMLTripletList::const_iterator i=lVisitor.getTripletList().begin(); i!=lVisitor.getTripletList().end(); i++){ char* lName= new char[i->mName .size()+1]; char* lValue=new char[i->mValue.size()+1]; lName= strcpy(lName ,i->mName .c_str()); lValue=strcpy(lValue,i->mValue.c_str()); XPUSHs(sv_2mortal(newSViv(i->mInstruction))); XPUSHs(sv_2mortal(newSVpv(lName, (i->mName).size()))); XPUSHs(sv_2mortal(newSVpv(lValue, (i->mValue).size()))); } } PUTBACK; cout << "I am going to call the perl function " << inFunction << endl; int lResultSize(perl_call_pv((char*)(inFunction.c_str()), G_ARRAY)); SPAGAIN; cout << "ready" << endl; CXMLElement* lReturnValue(0); CXMLElement* lNewest(0); lResultSize -= lResultSize % 3; for(int i=0; iaddChild(lNewest); } } //FIXME text is missing here if(lInstruction==CXMLTriplet::attribute){ if(lNewest){ #ifdef __PRINTOUT cout << "adding attribute: " << lName << "," << lValue << endl; #endif lNewest->addAttribute(lName, lValue); } } if(lInstruction==CXMLTriplet::up){ if(lReturnValue){ lReturnValue->moveUp(); } } } PUTBACK; FREETMPS; LEAVE; #ifdef __PRINTOUT cout << "Before return " << endl; #endif return lReturnValue; }; /** Transforms a CXMLElement to an CXMLTripletList, and finally pushes this list onto the Perl stack. */ void CQPerl::callConstruct(){ char lBuffer[200]; dSP ; int count; ENTER; SAVETMPS; PUSHMARK(SP) ; strncpy(lBuffer,mPackage.c_str(),200); XPUSHs(sv_2mortal(newSVpv(lBuffer, strlen(lBuffer)))); strncpy(lBuffer,qualifyFunctionName("new").c_str(),200); PUTBACK; int lResultSize(perl_call_pv(lBuffer, G_ARRAY)); SPAGAIN; cout << "ready" << endl; cout << "Getting the newly constructed element" << endl; mPerlQueryProcessor=(newSVsv(POPs)); for(int i=1; iopenAccessor("perl"); pair lScriptFile=inAlgorithm.stringReadAttribute("cui-perl-script-file"); pair lPackage=inAlgorithm.stringReadAttribute("cui-perl-package"); assert(lPackage.first); mPackage=lPackage.second; if(lScriptFile.first){ char *lARGV[] = { "", (char*)(lScriptFile.second.c_str())}; map::iterator lFound=gLoadedModules.find(lScriptFile.second); if(lFound==gLoadedModules.end()){ cerr << "Loading new perl source code" << lScriptFile.second << endl; perl_parse(mPerl, xs_init, 1, lARGV, NULL); gLoadedModules[lScriptFile.second]="loaded"; }else{ cerr << "Found old perl script" << lScriptFile.second << endl; } CSelfDestroyPointer lCollectionElement; if(mAccessor){ // make this survive also with an // empty mAccessor lCollectionElement=((CAcPerl*)mAccessor)->cloneCollectionElement(); } callConstruct(); char lBuffer[200]; strncpy(lBuffer,qualifyFunctionName("setAlgorithm").c_str(),200); callPerl(&inAlgorithm, lBuffer); //FIXME here we have to construct // a CPerlAccessor if(mAccessor){ cout << "perl accessor exsists!" << endl; strncpy(lBuffer,qualifyFunctionName("setCollection").c_str(),200); callPerl(lCollectionElement, lBuffer); }else{ cout << "perl accessor does NOT exsist!" << endl; strncpy(lBuffer,qualifyFunctionName("setCollection").c_str(),200); callPerl(0, lBuffer); } // now use this configuration data strncpy(lBuffer,qualifyFunctionName("configure").c_str(),200); callPerl(0, lBuffer); }else{ my_throw(VEProgrammingMistake("no Perl scriptfile")); mAccessorAdmin->closeAccessor("perl"); } } /*************************************** * * Destructor * **************************************** * * modification history * WM 20000509 created * * ****************************************/ CQPerl::~CQPerl() { assert(mPerlQueryProcessor); //this leads to immediate destruction SvREFCNT_dec(mPerlQueryProcessor); //perl_destruct(mPerl); //perl_free(mPerl); cout << "perl destroyed üüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüü" << endl; } /*************************************** * * Constructor * **************************************** * * modification history * WM created * * ****************************************/ CQPerl::CQPerl():CQuery() // ,mPerl(0) { if(!mPerl){ cerr << "Construct perl for keeps (2)" << endl; mPerl=perl_alloc(); perl_construct(mPerl); } } /*************************************** * * Getting random images as a seed * **************************************** * * modification history * * ****************************************/ CXMLElement* CQPerl::getRandomImages(int inNumberOfInterestingImages)const{ // call some perl here that does as promised return 0; }; /*************************************** * * Getting random images as a seed * **************************************** * * modification history * WM 19990824 created * * ****************************************/ CIDRelevanceLevelPairList* CQPerl::getRandomIDs(int inNumberOfInterestingImages)const{ return 0; }; /*************************************** * * Getting all images for making distance matrices * or similar stuff * **************************************** * * modification history * WM 19990824 created * * ****************************************/ list* CQPerl::getAllIDs()const{ return 0; }; /*************************************** * * Getting all images for making distance matrices * or similar stuff * **************************************** * * modification history * WM 19990824 created * * ****************************************/ list* CQPerl::getAllAccessorElements()const{ return 0; }; /*************************************** * * Setting the current algorithm * **************************************** * * modification history * WM 19990824 created * * ****************************************/ bool CQPerl::setAlgorithm(CAlgorithm& inAlgorithm){ mAlgorithm=&inAlgorithm; }; /** Calls a specified perl function */ CXMLElement* CQPerl::query(const CXMLElement& inQuery){ pair lQueryFunction=mAlgorithm->stringReadAttribute("cui-perl-query-function"); pair lRandomQueryFunction=mAlgorithm->stringReadAttribute("cui-perl-random-function"); if(!lQueryFunction.first){ my_throw(VEProgrammingMistake("no Perl query function specified")); } pair lNumberOfInterestingImages= inQuery.longReadAttribute(mrml_const::result_size); int inNumberOfInterestingImages= lNumberOfInterestingImages.second; pair lCutoff= inQuery.longReadAttribute(mrml_const::result_cutoff); int inCutoff= lCutoff.second; if(inQuery.child_list_begin()!=inQuery.child_list_end()){ /** 1. turn the query into a triplet list 2. push the triplet list on the stack 3. pop the result triplet list from the stack 4. generate an XML tree from it. */ CXMLElement* lReturnValue(callPerl(&inQuery,"CGIFTLink::processGIFTQueryCall" //qualifyFunctionName(lQueryFunction.second.c_str()) ) ); return lReturnValue; }else{ CXMLElement* lReturnValue(0); if(&inQuery){ string lOutElement; inQuery.toXML(lOutElement); cout << "Calling perl with " << &inQuery << endl << lOutElement << endl; lReturnValue=callPerl(&inQuery, "CGIFTLink::processGIFTRandomQueryCall" //qualifyFunctionName(lRandomQueryFunction.second.c_str()) ); } cout << "finished calling perl" << endl; return lReturnValue; } cout << "RETURNING" << endl << flush; return 0; } CIDRelevanceLevelPairList* CQPerl::fastQuery(const CXMLElement& inQuery, int inNumberOfInterestingImages, double inThreshold){ return 0; } void CQPerl::init(){}; #endif gift-0.1.14/libGIFTQuPerl/cc/CXEVTripletList.cc0000644000175200001440000000301210220502730015642 00000000000000 #include "libMRML/include/CSelfDestroyPointer.h" #include "libMRML/include/CXEVTripletList.h" /** Constructor */ CXEVTripletList::CXEVTripletList(){ }; /** actually carrying out the visit */ bool CXEVTripletList::startVisit(const CXMLElement& inVisited){ if(inVisited.getTypeOfNode()==CXMLElement::cElementNode){ mTripletList.push_back(CXMLTriplet()); mTripletList.back().mInstruction=CXMLTriplet::element; mTripletList.back().mName=inVisited.getName(); }else if(inVisited.getTypeOfNode()==CXMLElement::cTextNode){ mTripletList.push_back(CXMLTriplet()); mTripletList.back().mInstruction=CXMLTriplet::text; mTripletList.back().mName=inVisited.getText(); } /** now insert all attributes */ CSelfDestroyPointer > > lAttributeValuePairs(inVisited.createNamedValueList()); /** FIXME: slow */ if(lAttributeValuePairs){ for(list >::const_iterator i=lAttributeValuePairs->begin(); i!=lAttributeValuePairs->end(); i++){ mTripletList.push_back(CXMLTriplet()); mTripletList.back().mInstruction=CXMLTriplet::attribute; mTripletList.back().mName=i->first; mTripletList.back().mValue=i->second; } } }; /** actually carrying out the visit */ void CXEVTripletList::endVisit(const CXMLElement& inVisited){ mTripletList.push_back(CXMLTriplet()); mTripletList.back().mInstruction=CXMLTriplet::up; }; /** getting the list which was built */ const CXMLTripletList& CXEVTripletList::getTripletList(){ return mTripletList; }; gift-0.1.14/libGIFTQuPerl/cc/Makefile.am0000644000175200001440000000260010153634166014442 00000000000000# -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # #Makefile for the perl query library # lib_LTLIBRARIES = libGIFTQuPerl.la libGIFTQuPerl_la_LDFLAGS=@PRE_INSTALL_LIBDIRS@ --rpath../../libMRML/cc/.libs/ -lMRML # # The trick here is: do not compile c code with the -D bool=char define. #-rdynamic INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcPerl/include -I$(top_srcdir)/libGIFTQuPerl/include libGIFTQuPerl_la_SOURCES= \ CQPerl.cc\ \ CXEVTripletList.cc\ \ CXMLTriplet.cc\ \ plug_in_fo.cc\ xs_init.cc gift-0.1.14/libGIFTQuPerl/cc/Makefile.in0000644000175200001440000004173410220474077014464 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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@ # -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 SOURCES = $(libGIFTQuPerl_la_SOURCES) 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 = : host_triplet = @host@ subdir = libGIFTQuPerl/cc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libGIFTQuPerl_la_LIBADD = am_libGIFTQuPerl_la_OBJECTS = CQPerl.lo CXEVTripletList.lo \ CXMLTriplet.lo plug_in_fo.lo xs_init.lo libGIFTQuPerl_la_OBJECTS = $(am_libGIFTQuPerl_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/CQPerl.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CXEVTripletList.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CXMLTriplet.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/plug_in_fo.Plo ./$(DEPDIR)/xs_init.Plo CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libGIFTQuPerl_la_SOURCES) DIST_SOURCES = $(libGIFTQuPerl_la_SOURCES) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ # #Makefile for the perl query library # lib_LTLIBRARIES = libGIFTQuPerl.la libGIFTQuPerl_la_LDFLAGS = @PRE_INSTALL_LIBDIRS@ --rpath../../libMRML/cc/.libs/ -lMRML # # The trick here is: do not compile c code with the -D bool=char define. #-rdynamic INCLUDES = -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcPerl/include -I$(top_srcdir)/libGIFTQuPerl/include libGIFTQuPerl_la_SOURCES = \ CQPerl.cc\ \ CXEVTripletList.cc\ \ CXMLTriplet.cc\ \ plug_in_fo.cc\ xs_init.cc all: all-am .SUFFIXES: .SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: $(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 libGIFTQuPerl/cc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTQuPerl/cc/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libGIFTQuPerl.la: $(libGIFTQuPerl_la_OBJECTS) $(libGIFTQuPerl_la_DEPENDENCIES) $(CXXLINK) -rpath $(libdir) $(libGIFTQuPerl_la_LDFLAGS) $(libGIFTQuPerl_la_OBJECTS) $(libGIFTQuPerl_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CQPerl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CXEVTripletList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CXMLTriplet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plug_in_fo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xs_init.Plo@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: 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) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES 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-info-am \ uninstall-libLTLIBRARIES # 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: gift-0.1.14/libGIFTQuPerl/cc/xs_init.cc0000644000175200001440000000133510220502730014360 00000000000000#ifdef __GIFT_WITH_PERL__ #define bool char #if defined(__cplusplus) && !defined(PERL_OBJECT) #define is_cplusplus #endif #ifdef is_cplusplus extern "C" { #endif #include #include #ifdef PERL_OBJECT #define NO_XSLOCKS #include #include "win32iop.h" #include #include #endif #ifdef is_cplusplus } # ifndef EXTERN_C # define EXTERN_C extern "C" # endif #else # ifndef EXTERN_C # define EXTERN_C extern # endif #endif EXTERN_C void xs_init _((void)); EXTERN_C void boot_DynaLoader _((CV* cv)); EXTERN_C void xs_init(void) { char *file = __FILE__; dXSUB_SYS; /* DynaLoader is a special case */ newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file); } #endif gift-0.1.14/libGIFTQuPerl/cc/plug_in_fo.cc0000644000175200001440000000062710220502730015027 00000000000000#ifdef __GIFT_WITH_PERL__ #include "libGIFTQuPerl/include/CQPerl.h" #include "libMRML/include/CAccessorAdminCollection.h" extern "C" char* libGIFTQuPerl_getClassName(){ return "perl"; } extern "C" CQuery* libGIFTQuPerl_makeQuery(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm ){ return new CQPerl(inAccessorAdminCollection, inAlgorithm ); } #endif gift-0.1.14/libGIFTQuPerl/Makefile.am0000644000175200001440000000002410153634166014053 00000000000000SUBDIRS= cc include gift-0.1.14/libGIFTQuPerl/Makefile.in0000644000175200001440000003453610220474077014101 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = libGIFTQuPerl DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = 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 ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = cc include all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(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 libGIFTQuPerl/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTQuPerl/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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: # 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): @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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: @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; 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='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="../$(top_distdir)" \ distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive 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-info \ install-info-am install-man 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-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: gift-0.1.14/libGIFTQuPerl/include/0000777000175200001440000000000010220511630013513 500000000000000gift-0.1.14/libGIFTQuPerl/include/CXMLTripletList.h0000644000175200001440000000227710220502730016554 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CXMLTRIPLETLIST #define _CXMLTRIPLETLIST #include "libGIFTQuPerl/include/uses-declarations.h" #include #include "libGIFTQuPerl/include/CXMLTriplet.h" class CXMLTripletList:public list{}; #endif gift-0.1.14/libGIFTQuPerl/include/CQPerl.h0000644000175200001440000000710410220502730014731 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CQPERL #define _CQPERL #include "libGIFTQuPerl/include/uses-declarations.h" #ifdef __GIFT_WITH_PERL__ #ifdef bool #undef bool #define _bool char #endif #include #include #undef list // perl lists #include #include "libMRML/include/CQuery.h" /** Linking GIFT to Perl. The goal is to hand through about all necessary communication and configuration data to Perl. */ class CQPerl:public CQuery{ protected: /** The package containing the script */ string mPackage; /** The scalar value which is going to hold the object reference of the perl object contained by this */ SV* mPerlQueryProcessor; /** qualify a function name by the package in which the function resides */ string qualifyFunctionName(const char* inName); /** The perl interpreter used by *this */ static PerlInterpreter* mPerl; /** Transforms a CXMLElement to an CXMLTripletList, and finally pushes this list onto the Perl stack. cleans up behind itself */ CXMLElement* callPerl(const CXMLElement* inElement, string inFunction); /** calls "new" on the cui-perl-package */ void callConstruct(); public: /** * * * */ CQPerl(CAccessorAdminCollection& inAccessorAdminCollection, CAlgorithm& inAlgorithm); /** * * * */ CQPerl(); /** * * destroying the perl * */ ~CQPerl(); /** * * do a query * */ virtual CXMLElement* query(const CXMLElement& inQuery); /** * * @short a query which returns ID/RelevanceLevel pairs instead of * instead of URL/RelevanceLevel pairs * */ virtual CIDRelevanceLevelPairList* fastQuery(const CXMLElement& inQuery, int inNumberOfInterestingImages, double inDifferenceToBest); /** * * get some random images (handed through to accessor) * */ virtual CXMLElement* getRandomImages(int inNumberOfInterestingImages)const; /** * * get some random images (handed through to accessor) * */ virtual CIDRelevanceLevelPairList* getRandomIDs(int inNumberOfInterestingImages)const; /** * * get the IDs of all images (handed through to accessor) * */ virtual list* getAllIDs()const; /** * * get the IDs of all images (handed through to accessor) * */ virtual list* getAllAccessorElements()const; /** * * set the algorithm and configure this * */ bool setAlgorithm(CAlgorithm& inAlgorithm); /** * * an initialising function called by the constructors. * will we ever need it? * */ void init(); }; #endif #endif gift-0.1.14/libGIFTQuPerl/include/Makefile.am0000644000175200001440000000021210153634166015475 00000000000000libGIFTQuPerldir=$(includedir)/libGIFTQuPerl/include libGIFTQuPerl_HEADERS=CQPerl.h CXMLTriplet.h CXMLTripletList.h uses-declarations.h gift-0.1.14/libGIFTQuPerl/include/Makefile.in0000644000175200001440000003012710220474077015514 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = libGIFTQuPerl/include DIST_COMMON = $(libGIFTQuPerl_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__installdirs = "$(DESTDIR)$(libGIFTQuPerldir)" libGIFTQuPerlHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(libGIFTQuPerl_HEADERS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ libGIFTQuPerldir = $(includedir)/libGIFTQuPerl/include libGIFTQuPerl_HEADERS = CQPerl.h CXMLTriplet.h CXMLTripletList.h uses-declarations.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(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 libGIFTQuPerl/include/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTQuPerl/include/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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-libGIFTQuPerlHEADERS: $(libGIFTQuPerl_HEADERS) @$(NORMAL_INSTALL) test -z "$(libGIFTQuPerldir)" || $(mkdir_p) "$(DESTDIR)$(libGIFTQuPerldir)" @list='$(libGIFTQuPerl_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(libGIFTQuPerlHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libGIFTQuPerldir)/$$f'"; \ $(libGIFTQuPerlHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libGIFTQuPerldir)/$$f"; \ done uninstall-libGIFTQuPerlHEADERS: @$(NORMAL_UNINSTALL) @list='$(libGIFTQuPerl_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f '$(DESTDIR)$(libGIFTQuPerldir)/$$f'"; \ rm -f "$(DESTDIR)$(libGIFTQuPerldir)/$$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 $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libGIFTQuPerldir)"; 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: -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 \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-libGIFTQuPerlHEADERS 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 uninstall-libGIFTQuPerlHEADERS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-libGIFTQuPerlHEADERS install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-libGIFTQuPerlHEADERS # 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: gift-0.1.14/libGIFTQuPerl/include/uses-declarations.h0000644000175200001440000000241310220502730017226 00000000000000/* -*- mode: c++ -*- Path: ./libGIFTQuPerl/include/uses-declarations.h */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /* Author: Wolfgang Müller (via perl script) use namespace definitions for libGIFTQuPerl. to be included into all include files of this library */ #ifndef _LIBGIFTQUPERL_USES_DECLARATIONS_ #define _LIBGIFTQUPERL_USES_DECLARATIONS_ using namespace std; #endif gift-0.1.14/libGIFTQuPerl/include/CXMLTriplet.h0000644000175200001440000000321410220502730015710 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CXMLTRIPLET #define _CXMLTRIPLET #include "libGIFTQuPerl/include/uses-declarations.h" #include /** This structure contains a triplet of (instruction,name,value). It is designed to help build an XML tree from a flat structure. */ class CXMLTriplet{ public: /** the instruction */ int mInstruction; /** the name */ string mName; /** the value */ string mValue; /** a list of the possible instructions beginning of an element */ static const int element; /** end of an element, up in the tree */ static const int up; /** an attribute */ static const int attribute; /** a text node */ static const int text; }; #endif gift-0.1.14/libGIFTAcURL2FTS/0000777000175200001440000000000010220511623012227 500000000000000gift-0.1.14/libGIFTAcURL2FTS/cc/0000777000175200001440000000000010220511623012614 500000000000000gift-0.1.14/libGIFTAcURL2FTS/cc/CAFURL2FTS.cc0000644000175200001440000000042010220502730014445 00000000000000#include "libGIFTAcURL2FTS/include/CAFURL2FTS.h" #include "libGIFTAcURL2FTS/include/CAcURL2FTS.h" CAccessor* CAFURL2FTS::makeAccessor(const CXMLElement& inConfiguration)const{ return new CAcURL2FTS(inConfiguration); }; CAFURL2FTS::CAFURL2FTS(){ mName="url2fts"; }; gift-0.1.14/libGIFTAcURL2FTS/cc/CAcURL2FTS.cc0000644000175200001440000001722010220502730014510 00000000000000// -*- mode: c++ -*- /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /** * * Do we print the initialisation? * */ #define _NO_PRINT_INIT #include #include #include "libMRML/include/my_throw.h" #include "libMRML/include/GIFTExceptions.h" #include "libMRML/include/mrml_const.h" #include "libGIFTAcURL2FTS/include/CAcURL2FTS.h" #include "libMRML/include/CXMLElement.h" // constructor //the expat xml parser by J.Clark //#include "expat/xmlparse/xmlparse.h" #include extern CMutex* gMutex; #define USE_FLATFILE 0 void newStartURL2FTSElement(void *inUserData, const char *inElementName, const char **inAttributes){ CAcURL2FTS* lAccessor=(CAcURL2FTS*)inUserData; //cout << inElementName << endl; string lElementName(inElementName); CAttributeList lAttributes(inAttributes); if(lElementName=="image-list"){ lAccessor->mID=0; lAccessor->mURLPrefix=string(""); lAccessor->mThumbnailURLPrefix=string(""); if(lAttributes.stringReadAttribute("url-prefix").first){ lAccessor->mURLPrefix=lAttributes.stringReadAttribute("url-prefix").second; } if(lAttributes.stringReadAttribute("thumbnail-url-prefix").first){ lAccessor->mThumbnailURLPrefix=lAttributes.stringReadAttribute("thumbnail-url-prefix").second; } } if(lElementName=="image"){ string lURL=lAccessor->mURLPrefix+lAttributes.stringReadAttribute("url-postfix").second; string lThumbnailURL=lAccessor->mThumbnailURLPrefix+lAttributes.stringReadAttribute("thumbnail-url-postfix").second; string lFeatureFileName=lAttributes.stringReadAttribute("feature-file-name").second; lAccessor->mURLToFFN.insert(make_pair(lURL,lFeatureFileName)); lAccessor->mIDToFFN.insert(make_pair(lAccessor->mID,lFeatureFileName)); lAccessor->mURLToID.insert(make_pair(lURL,lAccessor->mID)); lAccessor->mIDToAccessorElement.insert(make_pair(lAccessor->mID,CAccessorElement(lAccessor->mID, lURL, lThumbnailURL, lFeatureFileName))); lAccessor->mID++; //cout << lURL << endl; //cout << lThumbnailURL << endl; //cout << lFeatureFileName << endl; } } void newEndURL2FTSElement(void *inUserData, const char *inElementName){ } CAcURL2FTS::CAcURL2FTS(const CXMLElement& inCollectionElement): mURLToFeatureFileName(inCollectionElement.stringReadAttribute(mrml_const::cui_base_dir).second +inCollectionElement.stringReadAttribute(mrml_const::cui_feature_file_location).second), mURLToFeatureFile((inCollectionElement.stringReadAttribute(mrml_const::cui_base_dir).second +inCollectionElement.stringReadAttribute(mrml_const::cui_feature_file_location).second).c_str()) { gMutex->lock(); cout << endl << "Opening " << mURLToFeatureFileName; if(!mURLToFeatureFile) cout <<" ...FAILED!"; else cout << " ...success." << endl; mWellConstructed=mURLToFeatureFile; mURLToFFN.clear(); mURLToID.clear(); mIDToFFN.clear(); mIDToAccessorElement.clear(); int lID=0; if(USE_FLATFILE){ /* as long as there is no end of file */ while(mURLToFeatureFile){ string lURL; string lThumbnailURL; string lFeatureFileName; /* read in the URLs of all the images with the corresponding feature file */ mURLToFeatureFile >> lURL >> lThumbnailURL >> lFeatureFileName; if(lURL.size()>4){ #ifndef _NO_PRINT_INIT cout << lID << ": URL " << lURL << flush << endl << " Thumbnail " << lThumbnailURL << flush << endl << " FeatureFileName " << lThumbnailURL << flush << endl; #endif mURLToFFN.insert(make_pair(lURL,lFeatureFileName)); mIDToFFN.insert(make_pair(lID,lFeatureFileName)); mURLToID.insert(make_pair(lURL,lID)); mIDToAccessorElement.insert(make_pair(lID,CAccessorElement(lID, lURL, lThumbnailURL, lFeatureFileName))); lID++; } } }else{// use an XML parser cout << "constructing parser" << endl; XML_Parser lParser = XML_ParserCreate(NULL);//default encoding XML_SetUserData(lParser, this); XML_SetElementHandler(lParser, newStartURL2FTSElement, newEndURL2FTSElement); bool lParseError=false; string lURL2FTS; cout << "Reading " << endl; mURLToFeatureFile.seekg(0,ios::end); int lFileSize(mURLToFeatureFile.tellg()); mURLToFeatureFile.seekg(0,ios::beg); cout << lFileSize << " characters" << endl; char* lBuffer=new char[lFileSize+1]; mURLToFeatureFile.read(lBuffer,lFileSize); lBuffer[lFileSize]=char(0); cout << "Read url2fts.xml" << endl; bool lDone=false; for(int i=0; i<=lFileSize/10000; i++){ if (!XML_Parse(lParser, lBuffer+i*10000, (lFileSize-i*10000<10000) ?lFileSize-i*10000:10000, lDone) ) { cerr << "libGIFTAcURL2FTS/cc/CAcURL2FTS.cc:" << __LINE__ << ": XML ERROR: " << XML_ErrorString(XML_GetErrorCode(lParser)) << " at line " << XML_GetCurrentLineNumber(lParser) << endl; char lLine[10]; sprintf(lLine,"%d",__LINE__); my_throw(new VEConfigurationError(string(string("libGIFTAcURL2FTS/cc/CAcURL2FTS.cc:") + string(lLine) + string("Could not read file ") + string(mURLToFeatureFileName)) .c_str())); } } cout << "Successfully processed" << endl; delete lBuffer; XML_ParserFree(lParser); } cout << "URLFile " << mURLToFeatureFileName << " processed." << endl; mURLToFeatureFile.close(); gMutex->unlock(); }; CAcURL2FTS::operator bool()const{ return mWellConstructed; } /** gives back the content of mURLToFeatureFileName */ const string& CAcURL2FTS::getURLToFeatureFileName()const{ return mURLToFeatureFileName; }; int CAcURL2FTS::size()const{ mMutexURL2FTS.lock(); int lReturnValue(mIDToFFN.size()); mMutexURL2FTS.unlock(); return lReturnValue; }; pair CAcURL2FTS::URLToFFN(const string& inURL)const{ mMutexURL2FTS.lock(); string_string_map::const_iterator lFound=mURLToFFN.find(inURL); if(lFound != mURLToFFN.end()){ pair lReturnValue(make_pair(true,lFound->second)); mMutexURL2FTS.unlock(); return lReturnValue; }else{ // should be false here?? pair lReturnValue(make_pair(true,string(inURL+"does not exsist"))); mMutexURL2FTS.unlock(); return lReturnValue; } }; pair CAcURL2FTS::IDToFFN(TID inID)const{ mMutexURL2FTS.lock(); TID_string_map::const_iterator lFound=mIDToFFN.find(inID); if(lFound != mIDToFFN.end()){ pair lReturnValue(make_pair(true,lFound->second)); mMutexURL2FTS.unlock(); return lReturnValue; }else{ pair lReturnValue(make_pair(true,string("the requested id does not exsist"))); mMutexURL2FTS.unlock(); return lReturnValue; } }; gift-0.1.14/libGIFTAcURL2FTS/cc/Makefile.am0000644000175200001440000000240710153634166014604 00000000000000# -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # #Makefile for the AcURL2FTS library # lib_LTLIBRARIES = libGIFTAcURL2FTS.la libGIFTAcURL2FTS_la_LDFLAGS="@PRE_INSTALL_LIBDIRS@" -lMRML INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcURL2FTS/include \ -I$(top_srcdir)/expat/xmlparse -I$(top_srcdir)/expat/xmltok libGIFTAcURL2FTS_la_SOURCES= \ CAcURL2FTS.cc\ CAFURL2FTS.cc\ plug_in_fo.cc gift-0.1.14/libGIFTAcURL2FTS/cc/Makefile.in0000644000175200001440000004124110220474076014611 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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@ # -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 # #Makefile for the AcURL2FTS library # SOURCES = $(libGIFTAcURL2FTS_la_SOURCES) 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 = : host_triplet = @host@ subdir = libGIFTAcURL2FTS/cc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libGIFTAcURL2FTS_la_LIBADD = am_libGIFTAcURL2FTS_la_OBJECTS = CAcURL2FTS.lo CAFURL2FTS.lo \ plug_in_fo.lo libGIFTAcURL2FTS_la_OBJECTS = $(am_libGIFTAcURL2FTS_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/CAFURL2FTS.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/CAcURL2FTS.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/plug_in_fo.Plo CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libGIFTAcURL2FTS_la_SOURCES) DIST_SOURCES = $(libGIFTAcURL2FTS_la_SOURCES) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libGIFTAcURL2FTS.la libGIFTAcURL2FTS_la_LDFLAGS = "@PRE_INSTALL_LIBDIRS@" -lMRML INCLUDES = -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcURL2FTS/include \ -I$(top_srcdir)/expat/xmlparse -I$(top_srcdir)/expat/xmltok libGIFTAcURL2FTS_la_SOURCES = \ CAcURL2FTS.cc\ CAFURL2FTS.cc\ plug_in_fo.cc all: all-am .SUFFIXES: .SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: $(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 libGIFTAcURL2FTS/cc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTAcURL2FTS/cc/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libGIFTAcURL2FTS.la: $(libGIFTAcURL2FTS_la_OBJECTS) $(libGIFTAcURL2FTS_la_DEPENDENCIES) $(CXXLINK) -rpath $(libdir) $(libGIFTAcURL2FTS_la_LDFLAGS) $(libGIFTAcURL2FTS_la_OBJECTS) $(libGIFTAcURL2FTS_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAFURL2FTS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAcURL2FTS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plug_in_fo.Plo@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: 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) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES 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-info-am \ uninstall-libLTLIBRARIES # 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: gift-0.1.14/libGIFTAcURL2FTS/cc/plug_in_fo.cc0000644000175200001440000000045210220502730015160 00000000000000#include "libGIFTAcURL2FTS/include/CAcURL2FTS.h" #include "libMRML/include/CAccessorAdminCollection.h" extern "C" char* libGIFTAcURL2FTS_getClassName(){ return "url2fts"; } extern "C" CAcURL2FTS* libGIFTAcURL2FTS_makeAccessor(const CXMLElement& inElement){ return new CAcURL2FTS(inElement); } gift-0.1.14/libGIFTAcURL2FTS/Makefile.am0000644000175200001440000000002410153634166014210 00000000000000SUBDIRS= cc include gift-0.1.14/libGIFTAcURL2FTS/Makefile.in0000644000175200001440000003454710220474075014236 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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 = : host_triplet = @host@ subdir = libGIFTAcURL2FTS DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = 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 ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = cc include all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(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 libGIFTAcURL2FTS/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTAcURL2FTS/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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: # 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): @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 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: @set fnord $$MAKEFLAGS; amf=$$2; \ 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) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; 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='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="../$(top_distdir)" \ distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive 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-info \ install-info-am install-man 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-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: gift-0.1.14/libGIFTAcURL2FTS/include/0000777000175200001440000000000010220511624013653 500000000000000gift-0.1.14/libGIFTAcURL2FTS/include/Makefile.am0000644000175200001440000000202310153634166015634 00000000000000# -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 libGIFTAcURL2FTSdir=$(includedir)/libGIFTAcURL2FTS/include libGIFTAcURL2FTS_HEADERS= CAFURL2FTS.h CAcURL2FTS.h uses-declarations.h gift-0.1.14/libGIFTAcURL2FTS/include/Makefile.in0000644000175200001440000003205110220474076015646 00000000000000# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 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@ # -*- mode: makefile -*- # GIFT, a flexible content based image retrieval system. # Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva # 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 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 = : host_triplet = @host@ subdir = libGIFTAcURL2FTS/include DIST_COMMON = $(libGIFTAcURL2FTS_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gift-config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__installdirs = "$(DESTDIR)$(libGIFTAcURL2FTSdir)" libGIFTAcURL2FTSHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(libGIFTAcURL2FTS_HEADERS) 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@ BAYESIAN = @BAYESIAN@ BAYESIAN_LD_ADD = @BAYESIAN_LD_ADD@ CA_X_DISTANCEMATRIX = @CA_X_DISTANCEMATRIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBDATADIR = @DEBDATADIR@ DEBEXECBINDIR = @DEBEXECBINDIR@ DEBPERLLIBDIR = @DEBPERLLIBDIR@ DEBSHAREDIR = @DEBSHAREDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN = @DOXYGEN@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GIFT_BAYESIAN_DIR = @GIFT_BAYESIAN_DIR@ GIFT_BAYESIAN_FLAG = @GIFT_BAYESIAN_FLAG@ GIFT_INTERNAL_FLAG = @GIFT_INTERNAL_FLAG@ GIFT_INTERNAL_PERLS = @GIFT_INTERNAL_PERLS@ GIFT_LIB_VERSION_INFO = @GIFT_LIB_VERSION_INFO@ GIFT_MYSQL_DIR = @GIFT_MYSQL_DIR@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK = @MAGICK@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_LD_ADD = @PERL_LD_ADD@ PRE_INSTALL_LIBDIRS = @PRE_INSTALL_LIBDIRS@ PRE_INSTALL_LINKDIRS = @PRE_INSTALL_LINKDIRS@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SGML2INFO = @SGML2INFO@ SGML2LATEX = @SGML2LATEX@ SGML2TXT = @SGML2TXT@ SHELL = @SHELL@ STRIP = @STRIP@ UNPUBLISHED = @UNPUBLISHED@ UNPUBLISHED_DIR = @UNPUBLISHED_DIR@ VERSION = @VERSION@ WEB_PUBLISHING_DIRECTORY = @WEB_PUBLISHING_DIRECTORY@ WEB_PUBLISHING_LOCATION = @WEB_PUBLISHING_LOCATION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ acx_pthread_config = @acx_pthread_config@ 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@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ libGIFTAcURL2FTSdir = $(includedir)/libGIFTAcURL2FTS/include libGIFTAcURL2FTS_HEADERS = CAFURL2FTS.h CAcURL2FTS.h uses-declarations.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(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 libGIFTAcURL2FTS/include/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libGIFTAcURL2FTS/include/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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-libGIFTAcURL2FTSHEADERS: $(libGIFTAcURL2FTS_HEADERS) @$(NORMAL_INSTALL) test -z "$(libGIFTAcURL2FTSdir)" || $(mkdir_p) "$(DESTDIR)$(libGIFTAcURL2FTSdir)" @list='$(libGIFTAcURL2FTS_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(libGIFTAcURL2FTSHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libGIFTAcURL2FTSdir)/$$f'"; \ $(libGIFTAcURL2FTSHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libGIFTAcURL2FTSdir)/$$f"; \ done uninstall-libGIFTAcURL2FTSHEADERS: @$(NORMAL_UNINSTALL) @list='$(libGIFTAcURL2FTS_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f '$(DESTDIR)$(libGIFTAcURL2FTSdir)/$$f'"; \ rm -f "$(DESTDIR)$(libGIFTAcURL2FTSdir)/$$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 $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libGIFTAcURL2FTSdir)"; 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: -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 \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-libGIFTAcURL2FTSHEADERS 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 uninstall-libGIFTAcURL2FTSHEADERS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-libGIFTAcURL2FTSHEADERS install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-libGIFTAcURL2FTSHEADERS # 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: gift-0.1.14/libGIFTAcURL2FTS/include/CAFURL2FTS.h0000644000175200001440000000263510220502730015357 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ // -*- mode: c++ -*- #ifndef _CAFURL2FTS #define _CAFURL2FTS #include "libGIFTAcURL2FTS/include/uses-declarations.h" #include "libMRML/include/CAccessorFactory.h" /** * A factory to make URL2FTS accessors *@author Wolfgang Müller * */ class CAFURL2FTS:public CAccessorFactory{ public: /** Constructs this, means, sets mName */ CAFURL2FTS(); /** makes an inverte file accessor */ CAccessor* makeAccessor(const CXMLElement& inConfiguration)const; }; #endif gift-0.1.14/libGIFTAcURL2FTS/include/uses-declarations.h0000644000175200001440000000242710220502730017370 00000000000000/* -*- mode: c++ -*- Path: ./libGIFTAcURL2FTS/include/uses-declarations.h */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /* Author: Wolfgang Müller (via perl script) use namespace definitions for libGIFTAcURL2FTS. to be included into all include files of this library */ #ifndef _LIBGIFTACURL2FTS_USES_DECLARATIONS_ #define _LIBGIFTACURL2FTS_USES_DECLARATIONS_ using namespace std; #endif gift-0.1.14/libGIFTAcURL2FTS/include/CAcURL2FTS.h0000644000175200001440000001123110220502730015404 00000000000000/* -*- mode: c++ -*- */ /* GIFT, a flexible content based image retrieval system. Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva Copyright (C) 2003, 2004 Bayreuth University 2005 Bamberg University 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 */ /** * * CAccessor - a base class for everything * accessing a GIFT database. * at present this will be either an inverted file * or a TrackingGIFT accessor. * in the future this might be an SQL database or Monet?? * * * * modification history: * * WM 19990804 created file * * * * compiler defines used: * _NO_PRINT_INIT print info about initialisation * USE_FLAT_FILE use a flat url2fts file (instead of an XML file) */ #ifndef _CACURL2FTS #define _CACURL2FTS #include "libGIFTAcURL2FTS/include/uses-declarations.h" #include #include "libMRML/include/TID.h" #include #include #include #ifdef HAS_HASH_MAP #include #else #define hash_map map #endif #include "libMRML/include/CAccessorImplementation.h" #include "libMRML/include/CMutex.h" // multithreading class CXMLElement; // parameter of constructor /** This accessor is a base class for accessors which use an URL2FTS file to implement the interface of the CAccessor base class. */ class CAcURL2FTS:public CAccessorImplementation{ private: /** is this well constructed */ bool mWellConstructed; protected: /** the ID of the next element */ TID mID; /** the url-prefix for the image list */ string mURLPrefix; /** the thumbnail-url-prefix for the image list */ string mThumbnailURLPrefix; /** the mutex for multithreading the name is intended to be unique and immune against inheritance... */ CMutex mMutexURL2FTS; /** map from the url of an image to the name of the feature file for this image */ string_string_map mURLToFFN; /** map from the id of an image to the name of the feature file for this image */ TID_string_map mIDToFFN; /** URL -> FeatureFileName */ mutable ifstream mURLToFeatureFile; /** Name of the file that contains pairs of URL and the Feature file that belongs to the URL */ string mURLToFeatureFileName; // this seems to be necessary friend class CAcIFFileSystem; public: /** gives back the content of mURLToFeatureFileName */ const string& getURLToFeatureFileName()const; /** * * Constructor: slurp in an url2fts file * and fill the maps. * Like every accessor, this accessor takes a MRML element as input (@see CXMLElement for how to access the attributes of this element). Currently this accessor understands the following attributes cui-base-dir: the directory containing the following files cui-feature-file-location: the location of the "url2fts" file which translates urls to feature file names. */ CAcURL2FTS(const CXMLElement& inContentElement); /** * * Is this accessor up and working? * */ virtual operator bool()const; /** * * Give the number of elements stored in this accessor * */ virtual int size()const; /** * * gives the feature file name which corresponds to a given URL * return value: pair of bool (does the feature file exsist) string (the feature file name) */ pair URLToFFN(const string& inURL)const; /** * * gives the feature file name which corresponds to a given URL * return value: pair of bool (does the feature file exsist) string (the feature file name) */ pair IDToFFN(TID inID)const; /** we construct this with a little help from this friend */ friend void newStartURL2FTSElement(void *inUserData, const char *inElementName, const char **inAttributes); /** we construct this with a little help from this friend */ friend void newEndURL2FTSElement(void *inUserData, const char *inElementName); }; #endif gift-0.1.14/renamer.pl0000755000175200001440000000040210153634214011431 00000000000000#!/usr/bin/perl -pi.bak s/AccessorProxy/AccessorAdmin/g; s/AccessorCollection/AccessorAdminCollection/g; s/AccessorProxy/AccessorAdmin/g; s/mProxy/mAccessorAdmin/g; s/CBaseTypeFactory/CStaticQueryFactory/g; s/CDynamicBaseTypeFactory/CDynamicQueryFactory/g; gift-0.1.14/ChangeLog0000644000175200001440000032335210220475117011226 000000000000002005-03-24 * libMRML/cc/CAccessorAdminCollection.cc: * libMRML/cc/CAccessorAdminCollection.pre-cc: Proper error message for mIDToProxy. NOTE LIBMRML/CC/CACCESSORADMINCOLLECTION.PRE-CC IS NOT USED ANY MORE. 2005-03-21 * libMRML/include/TID.h: int -> long. makes it work on AMD 64 2005-01-25 * FeatureExtraction/Makefile.am (AM_CPPFLAGS): FIXED: should not override CPPFLAGS. 2005-01-11 * scripts/perl/gift-add-collection.pre-pl (removeCollection): return lReturnValue; 2005-01-10 * libMRML/include/CCommunicationHandler.h: * libMRML/cc/CCommunicationHandler.cc(getCurrentSessionID): new method. Gets the session ID of the currently built response * libMRML/cc/CXEVCommunication.cc(startVisit): use getCurrentSessionID. * libMRML/cc/Makefile.am (libMRML_la_LDFLAGS): new version for libMRML 2004-12-15 * configure.in: Changed version number to 0.1.14 2004-12-03 * configure.in: fixing hardcoded bits in Robert Jordens' patch. Use --enable-debian-config in order to use Robert's stuff. 2004-08-05 for * libGIFTAcDistanceMatrix/include/CPersistentVector.h: * libMRML/include/CSelfDestroyPointer.h: this-> before method calls for keeping gcc 3.4 happy. Patch supplied by Robert Jordens * ./configure.in: * ./libGIFTAcInvertedFile/cc/CAcIFFileSystem.cc: * ./scripts/perl/gift-add-collection.pre-pl: * ./scripts/perl/gift-remove-collection.pre-pl: * ./scripts/perl/gift-start.pre-pl: * ./scripts/perl/gift-url-to-fts.pre-pl: * ./libGIFTAcInvertedFile/cc/Makefile.am: * ./scripts/perl/Makefile.am: * ./libMRML/cc/Makefile.am: * ./libMRML/include/Makefile.am: * ./libGIFTAcHierarchy/cc/Makefile.am: * ./Doc/Makefile.am: * ./GIFTServer/gift-config/Makefile.am: * ./GIFTServer/gift-mrml-messages/Makefile.am: * ./libGIFTQuHierarchy/cc/Makefile.am: * ./PluginMaker/libGIFTQu@PLUGIN_NAME@/cc/Makefile.am.in: * ./PluginMaker/libGIFTAc@PLUGIN_NAME@/cc/Makefile.am.in: fixed improper (debian incompatible) use of BINDIR. Patch supplied by Robert Jordens * Doc/HTML/DoxygenFooter.html: * Doc/HTML/DoxygenHeader.html: Contact information Patch supplied by Robert Jordens * Doc/configuring-and-hacking-the-gift.sgml: dtd Patch supplied by Robert Jordens * Doc/gift-guide.sgml: dtd export statement Patch supplied by Robert Jordens 2004-06-18 * scripts/perl/gift-add-collection.pre-pl (setDefaultCollection): correctly set default collection on initial install __COLLECTION__ --> unique collection ID 2004-06-16 * libMRML/include/Makefile.am (libMRML_HEADERS): making libMRML gentoo-installable 2004-06-11 * gift-install-prerequisites.pl: changed to accomodate archive name different from unpack directory (i.e. ImageMagick). * README: changed readme * libGIFTAcInvertedFile/cc/CAcIFFileSystem.cc(operator()): check if mInvertedFile is null. Fixes segmentation fault at end of gift-generate-inverted-file. (init): check if the file is valid before using the just-read ID/offset tuple. 2004-06-10 * libGIFTAcInvertedFile/cc/CAcIFFileSystem.cc (init): more debugging printouts 2004-06-10 * libGIFTAcInvertedFile/cc/CAcIFFileSystem.cc (init): changed debugging output for offset file read 2004-04-16 Wolfgang Müller * configure.in: changed version number. * Doc/gift-guide.sgml: Added remarks about java rights problems, the gift-prerequisites package etc. 2004-03-24 Wolfgang Müller * scripts/perl/gift-add-collection.pre-pl: Changed to react correctly to failing convert calls. Mainly putting evals around system calls. Writing out url2fts.xml tags only if the conversion and feature extraction were successful. [Too?] Verbose error messages. * libMRML/cc/CQueryPlugin.cc: don't exit if file not linkable * libMRML/include/CAccessorFactoryContainer.h(isPresentFactory): New method * libMRML/cc/CAccessorFactoryContainer.cc(configure): Changes to make finding libraries independent of shared library extensions using getLibNameFromFileName * libMRML/cc/CDynamicQueryFactory.cc: * libMRML/include/CDynamicQueryFactory.cc: Changes to make finding libraries independent of shared library extensions using getLibNameFromFileName * libMRML/include/getLibNameFromFileName.h: * libMRML/cc/getLibNameFromFileName.cc (getLibNameFromFileName): New function, new file * libMRML/cc/CQueryPlugin.cc: * libMRML/include/CQueryPlugin.h: * libMRML/include/CAFPlugin.h: * libMRML/cc/CAFPlugin.cc: Changed constructor to accommodate pre-extracted library name Softer reaction on failure. 2004-03-23 Wolfgang Müller * libMRML/cc/CAccessorFactoryContainer.cc(configure): * libMRML/cc/CAFPlugin.cc(CAFPlugin): In constructor, add more verbose error messages 2004-02-24 Knoppix User * FeatureExtraction/extract_features.c (main): * FeatureExtraction/float_histogram.c (main): * FeatureExtraction/fts2blocks.c (main): * FeatureExtraction/gabor981029.c (main): * FeatureExtraction/gabor_old.c (main): * FeatureExtraction/hsv2rgb.c (main): * FeatureExtraction/hsv_quantize.c (main): * FeatureExtraction/hsv_quantize_median_filter.c (main): * FeatureExtraction/hsv_test.c (main): * FeatureExtraction/print_float_histogram.c (main): * FeatureExtraction/quantize_mean.c (main): * FeatureExtraction/quantize_median.c (main): * FeatureExtraction/quantize_mode.c (main): * FeatureExtraction/rgb2hsv.c (main): * FeatureExtraction/write_feature_descs.c (main): changed return type to int * GIFTServer/modifyDistanceMatrix.cc: * libGIFTAcInvertedFile/cc/CInvertedFileChunk.cc: #include 2003-11-12 Wolfgang Müller * libGIFTAcInvertedFile/cc/CAcIFFileSystem.cc: changed UF to Unknown Feature in debug printout 2003-09-15 Wolfgang Müller * Doc/gift-guide.sgml: removed non GPL compliant license statement. Removed some cruft from the to-do-list. Updated the part about hacking the url2fts file. Updated perl prerequisites. 2003-09-02 Wolfgang Müller * libMRML/cc/CAccessorAdminCollection.cc(getProxy): throwing exception on unknown collection 2003-05-06 Wolfgang Müller * PluginMaker/configure.in.in: fixed wrong options in call to libMRML-config 2003-04-24 Wolfgang Müller * scripts/perl/gift-add-collection.pre-pl: adding collection element to config file has problem on recent perl, apparently. Added safeConvertString (necessary, but does not solve this problem), and write out stuff into a temporary file, then use parsefile. 2003-04-22 Wolfgang Müller * PluginMaker/libGIFTAc@PLUGIN_NAME@/include/packages/GIFTPlugin-FEFTest/libGIFTAcFEFTest/include/CAcFEFTest.h: * PluginMaker/libGIFTAc@PLUGIN_NAME@/include/packages/GIFTPlugin-FEFTest/libGIFTAcFEFTest/include/CAFFEFTest.h: using namespace std * configure.in: cleaned up stray files in PluginMaker 2002-11-12 Wolfgang Müller * Doc/configuring-and-hacking-the-gift.sgml (perform): changing date 2002-11-05 Wolfgang Müller * libGIFTAcInvertedFile/include/merge_sort_streams.h: removed cast when shifting << by one * libGIFTAcInvertedFile/include/merge_sort_streams.h: * libGIFTAcInvertedFile/cc/CAcIFFileSystem.cc: note which file is the last one touched by merge_sort_streams.h. Seems to be an old and bad bug in indexing. * configure.in(ACX_PTHREAD): added spaces at end of the line for each line of the parameter. 2002-10-23 Wolfgang Müller * libMRML/cc/CQuery.cc (query): embarrassing bug: the output mrml was wrong. query-result-elements were not part of a query-result-element-list 2002-10-20 Wolfgang Müller * libMRML/cc/CSessionManager.cc(translate): removed throw * configure.in: check for sys/times.h * libMRML/cc/CQuery.cc (query): pipe out some statistics about the raw fastQuery duration. 2002-10-01 Wolfgang Müller * libMRML/cc/CXMLElementBuilder.cc: I just got a sligthly misterious bug in a realloc in expat. I try to solve this by copying c_str() to char* using a strdup() 2002-09-22 Wolfgang Müller * scripts/perl/gift-dtd-to-keywords.pre-pl (translateToH): add #ifdef to generated c++ headers 2002-09-16 Wolfgang Müller * libGIFTAcInvertedFile/include/merge_sort_streams.h: Instead of doing mergesort all the time, the lowest levels of recursion is sorted using quicksort in memory. * configure.in: removed check for -ldbi, as this provokes weird problems if using dbi in plugins 2002-09-14 Wolfgang Müller * GIFTServer/Makefile.am (gift_LDADD): adding -ldbi (tentaitive) 2002-09-13 Wolfgang Müller * libMRML/cc/Makefile.am (libMRML-config.cc): added destination directory to includepath 2002-09-09 Wolfgang Müller * libSquirePPM/normaliseContrast.c: removed old copyright notice from rewritten code (apparently when rewriting, I forgot the notice in the file within which I changed the procedure) * libSquirePPM/ppm.h (MIN_BYTE): * libSquirePPM/ppm_noproto.h (MIN_BYTE): * libSquirePPM/typedefs.h (bool): renamed maxbyte and minbyte for (c) sake * libMRML/cc/libMRML-config.pre-cc: should compile now with systems that don't have getopt_long * bootstrap-cvs.sh: aclocal -I * aclocal-add.m4: new file. for pthreads and getopt_long * FeatureExtraction/extract_block_features.c(extract_gabor_features): * FeatureExtraction/extract_block_features.c(extract_mode_features): Patch by Tim TimeWaster 2002-09-04 Wolfgang Müller * gift-install-prerequisites.pl: Current packages. * libMRML/cc/CAccessorAdmin.cc (CAccessorAdmin): added default constructor for mContent. Changed: build accessor before changing open/close counter => throwing an exception when building the accessor will keep the open/close counter at the old value 2002-09-03 Wolfgang Müller * scripts/perl/gift-add-collection.pre-pl (removeCollection): unlinking also the *.ADI files * scripts/perl/gift-remove-collection.pre-pl: * scripts/perl/Makefile.am: added gift-remove-collection.pre-pl as well as gift-remove-collection.pl targets * GIFTServer/Server.cc: applied patch by Carsten Pfeiffer adding getopt support to GIFT 2002-08-28 Wolfgang Müller * GIFTServer/Server.cc (main): got rid of #ifdef single The code inside the if-branch is clearly obsolete. The only code we keep is in the #else branch. Furthermore, gift now creates a file gift-port.txt in GIFT_HOME, which contains the port numbers of the ports used. 2002-08-22 Wolfgang Müller * scripts/perl/gift-add-collection.pre-pl: fix for case where no encoding is found 2002-07-28 Wolfgang Müller * PluginMaker/libGIFTAc@PLUGIN_NAME@/cc/CAc@PLUGIN_NAME@.cc.in: removed unnecessary expat include 2002-07-27 Wolfgang Müller * GIFTServer/HomeMadeServer.cc: i18n * GIFTServer/Makefile.am: remove references to package-included expat * libMRML/cc/CAlgorithmCollection.cc: * libMRML/cc/CAccessorAdminCollection.cc: expat includes changed * Makefile.am (EXTRA_DIST): gift-check-perl-config.pl 2002-07-26 Wolfgang Müller * libMRML/cc/CAttributeList.cc: include algorithm 2002-07-24 Wolfgang Müller * libMRML/cc/CXMLElement.cc(traverse): * libMRML/include/CXMLElement.h(traverse): added non-const version of this function. Needed for i18n 2002-07-23 Wolfgang Müller * libMRML/cc/CXMLElementBuilder.cc: * libMRML/include/CCommunicationHandler.h: * libMRML/include/CI18nTranslator.h: * libGIFTAcURL2FTS/cc/CAcURL2FTS.cc: * GIFTServer/HomeMadeServer.cc: * libGIFTAcHierarchy/cc/CAcHierarchy.cc: * libMRML/cc/CSessionManager.cc: using pre-intalled expat instead of GIFT-provided one. changing includes. 2002-07-22 Wolfgang Müller * libMRML/cc/CXMLElementVisitor.h: * libMRML/cc/CXMLElementVisitor.cc: adding non-const member functions to CXMLElementVisitor. By default all they do is call the const members * libMRML/cc/CAttributeList.cc (getKeys): * libMRML/include/CAttributeList.h(getKeys): New function: get keys of all attributes 2002-07-21 Wolfgang Müller * libMRML/include/CSessionManager.h: * libMRML/cc/CSessionManager.cc(clearLanguages): * libMRML/cc/CSessionManager.cc(addLanguage): * libMRML/cc/CSessionManager.cc(getLanguages): * libMRML/cc/CSessionManager.cc(clearSessionLanguages): * libMRML/cc/CSessionManager.cc(addSessionLanguage): * libMRML/cc/CSessionManager.cc(getSessionLanguages): Three new procedures for maintaining the languages preferred by a given session 2002-07-19 Wolfgang Müller * scripts/perl/gift-add-collection.pre-pl: files with special characters now get correctly encoded. Little problem: the client has to offer these encodings. The php does not do so, currently. * libGIFTAcInvertedFile/cc/CAcIFFileSystem.cc: fixed: opening wrong file after indexing * libMRML/include/Makefile.am (install-data-local): Fixed strange intstallation problems seem to have to make the path before doing intall-local (install-data-hook): this target was an install-data-local before. That crashed if the installation directory was not present before installation 2002-07-18 Wolfgang Müller * pthread-compile-test-program.cc (main): return type must be int 2002-07-17 Wolfgang Müller * GIFTServer/Server.cc: * libMRML/include/CSessionManager.h (class CSessionManager): * libMRML/cc/CSessionManager.cc: Uses now CI18nTranslator class * libMRML/cc/CI18nTranslator.cc: * libMRML/include/CI18nTranslator.h: adding support for internationalization of mrml files. This i18n is adapted to frequent changes of the languages during runtime, as it is appropriate for servers. 2002-07-12 Wolfgang Müller * scripts/perl/gift-add-collection.pre-pl: Finding all images within a tree before starting. Enables us to write out progress. 2002-07-10 Wolfgang Müller * scripts/perl/gift-add-collection.pre-pl: 1) use strict 2) applied bugfix for lThumbnailURLPrefix by karl s. eiringer 2002-07-08 Wolfgang Müller * dtd/mrml.dtd: Ralf Juengling tells me that there are two definitions for algorithm in the dtd. Changed 2002-06-19 Wolfgang Müller * libGIFTAcInvertedFile/cc/CAcIFFileSystem.cc: * libGIFTAcInvertedFile/include/CAcIFFileSystem.h: Changes for putting temporary data at a place where we know we can write 2002-06-17 Wolfgang Müller * gift-check-perl-config.pl: this script checks if perl modules needed are there * scripts/perl/gift-start.pre-pl: making this script ready for public use. 2002-06-04 Wolfgang Müller * libMRML/cc/CQuery.cc (query): reading cutoff attribute as double value instead of long. 2002-06-03 Wolfgang Müller * Makefile.am: using current installed expat packaged version. This has become necessary for reasons of linking with external plugins. Sorry folx. 2002-06-03 Wolfgang Müller * expat/xmlparse/Makefile.am (LTLIBRARIES): It turns out that I have to install lib_temp_xml_parse.la when using new libtool and new gcc 2002-05-29 Wolfgang Müller * GIFTServer/CDomainSocket.cc(serveStream): * GIFTServer/CTCPSocket.cc(serveStream): cannot close socket in serveStream, otherwise multithreading goes down the drain * libGIFTAcInvertedFile/include/merge_sort_streams.h: Quite massive changes to make it work with the full file lenght allowed by the system. The problem is that stream_pos does not have incrementation operators etc... Checked in again, have done some debugging in the meanwhile * configure.in: moving cp statement to very end of the file makes sure that this is executed at the right moment 2002-05-28 Wolfgang Müller * libGIFTAcDistanceMatrix/include/CPersistentVector.h(init): using fill for filling vector with intial value * libGIFTQuHierarchy/cc/CQHierarchy.cc: include * libGIFTQuInvertedFile/cc/CQInvertedFile.cc: cast to int in call of limitNumberTo * libGIFTAcInvertedFile/include/CAcIFFileSystem.h: changes for v31 2002-05-26 Wolfgang Müller * libGIFTAcDistanceMatrix/include/CDrawer.h: * CDrawer.h: * libGIFTAcInvertedFile/cc/CAdditionalDocumentInformation.cc: * libGIFTAcInvertedFile/cc/CAcIFFileSystem.cc: * libMRML/include/CMagic.h: * libMRML/include/CIDRelevanceLevelPair.h: * libMRML/include/CAccessorImplementation.h: remove .h from standard include file names assert.h becomes cassert * libMRML/cc/CSessionManager.cc: include 2002-05-24 Wolfgang Müller * libMRML/cc/CSessionManager.cc(setAlgorithm): bracket notation in maps creates new empty element. this was a reason for some crashes. fixed. * libMRML/cc/CXEVCommunication.cc: removed try/catch exception handling 2002-05-15 Wolfgang Müller * configure.in(AM_CONFIG_HEADER): added cp gift-config.h libMRML/include in order to install gift-config.h together with the libMRML includes * libMRML/include/Makefile.am (install-data-local): target to install the autoconf-generated gift-config.h * libMRML/cc/CSessionManager.cc(getNewID): if -luuid is present, session IDs will ge uuids, instead of integers starting at one 2002-05-08 Wolfgang Müller * libMRML/cc/Makefile.am (libMRML-config.cc): * libMRML/cc/libMRML-config.pre-cc (main): changing the way libdir is treated. adding --plugin-dir flag. 2002-05-03 Wolfgang Müller * libMRML/cc/libMRML-config.pre-cc (main): get rid of spaces that are "too much" 2002-04-30 Wolfgang Müller * libMRML/cc/CDynamicQueryFactory.cc: * libMRML/cc/CAFPlugin.cc: exit -> exception * scripts/perl/Makefile.am (PERLCONFIG): adding "-e" before sed expression. 2002-03-30 Wolfgang Müller * dtd/mrml.dtd: appliet Pruet Boonma's segment query patch as discussed in help-gift@gnu.org * libGIFTAcInvertedFile/cc/CAcIFFileSystem.cc (URLToFeatureList): Bugfix: deplaced endif to avoid returning NULL pointers. (Bug report Dr. Stéphane Marchand-Maillet) * scripts/perl/gift-dtd-to-keywords.pre-pl (translateToCC): generating include statement with correct location where mrml_const.h will be installed. (Bug report Pruet Boonma). 2002-03-30 Wolfgang Müller * libMRML/cc/Makefile.am (libMRML-config.cc): * configure.in: * libMRML/cc/libMRML-config.pre-cc: with-mysql-dir configure option and its usage 2002-03-03 Wolfgang Müller * libMRML/cc/CQueryParadigmMatcher.cc: bugfix in operator(). one branch did not always return a defined value * libMRML/cc/Makefile.am (libMRML_la_LDFLAGS): incrementing version info * libMRML/include/CAccessorAdmin.h: * libMRML/cc/CAccessorAdmin.cc: Added: getQueryParadigmList * libMRML/include/CAccessorAdminCollection.h: * libMRML/cc/CAccessorAdminCollection.cc: New member functions: getCollectionElement, getQueryParadigmList. They makes it easier to find configuration errors without constructing an CQuery element (not yet used) 2002-03-02 Wolfgang Müller Release gift-0.1.8. 2002-03-02 Wolfgang Müller * libMRML/include/Makefile.am (dist-hook): * libMRML/cc/Makefile.am (dist-hook): remove files that contain configuration data 2002-02-28 Wolfgang Müller * libGIFTAcDistanceMatrix/include/CPersistentVector.h: * libGIFTAcDistanceMatrix/include/CPersistentMatrix.h: make it compile with gcc v3. mainly more picky for implicit type casting as well as local classes 2002-02-26 Wolfgang Müller * libMRML/cc/CQueryParadigmMatcher.cc(matches): implemented matcher function 2002-02-18 MUELLER Wolfgang * README: removed first line as requested by RMS 2002-02-18 Wolfgang Müller * libMRML/include/GIFTExceptions.h: * libMRML/cc/GIFTExceptions.cc: const and non-const constructor, destructor 2002-02-18 Wolfgang Müller * libMRML/cc/CSessionManager.cc: catching non-default exception in query * libMRML/cc/CQueryTreeBuilder.cc (getQueryByID): throwing on error. commented out giving back first algorithm on exception. this can fail miserably. better is to tell error. * libMRML/cc/createErrorMessage.cc: * libMRML/include/createErrorMessage.h: convenience function for creating MRML error messages * libMRML/cc/CXEVCommunication.cc: catch exception on algorithm construction * libGIFTAcURL2FTS/cc/CAcURL2FTS.cc (CAcURL2FTS): Throw exception if url2fts unreadable * libMRML/cc/GIFTExceptions.cc: adding an accessor to the message contained in the exception. * libGIFTAcURL2FTS/include/CAcURL2FTS.h: * libGIFTAcURL2FTS/cc/CAcURL2FTS.cc: adding exception class VEConfigurationError. This is thrown if an error occurs that is caused by some configuration mistake. 2002-02-10 Wolfgang Müller * GIFTServer/CDomainSocket.cc: * GIFTServer/CTCPSocket.cc: * GIFTServer/CMultiServer.cc: multiple sockets used by one gift instance * GIFTServer/Makefile.am: * GIFTServer/CDomainSocket.h: * GIFTServer/CTCPSocket.h: * GIFTServer/CMultiServer.h: * GIFTServer/processMessage.cc: * GIFTServer/processMessage.h: * GIFTServer/CProcessMessageParameters.h: * GIFTServer/CProcessMessageParameters.cc: * GIFTServer/Server.cc: * Makefile.am: Moving classes and functions defined in Server.cc out of Server.cc in order to make them usable for other servers like e.g. multi-gift 2002-01-26 Wolfgang Müller * libMRML/cc/Makefile.am (libMRML_la_LDFLAGS): changed libtool version number * CRPipe.cc: * CReaper.cc: * CReaperDistributor.cc: * executeVector.cc: * CRPipe.h: * CReaper.h: * CReaperDistributor.h: * safePopen.h: these files contain the implementation of a kind of safe popen * libMRML/cc/Makefile.am: added CRPipe.cc CReaper.cc CReaperDistributor.cc safePopen.cc * libMRML/include/Makefile.am (libMRML_HEADERS): added CRPipe.h CReaper.h CReaperDistributor.h safePopen.h 2002-01-23 Wolfgang Müller * libGIFTAcInvertedFile/include/Makefile.am (InvertedFile_HEADERS): * libGIFTAcDistanceMatrix/include/Makefile.am (DistanceMatrix_HEADERS): * libGIFTQuInvertedFile/include/Makefile.am (libGIFTQuInvertedFile_HEADERS): * libMRML/include/Makefile.am (libMRML_HEADERS): * libGIFTAcHierarchy/include/Makefile.am (libGIFTAcHierarchydir): (libGIFTAcHierarchy_HEADERS): * libGIFTQuHierarchy/include/Makefile.am: * libGIFTAcURL2FTS/include/Makefile.am: adding uses-declarations.h to distribution * libGIFTAcInvertedFile/cc/CAcIFFileSystem.cc (init): show errno (init): have to clear file flags after close * GIFTServer/oneMinus.cc: * GIFTServer/modifyDistanceMatrix.cc: using namespace std * GIFTServer/modifyDistanceMatrix.cc: include iostream * GIFTServer/Server.cc (main): return int change fstream::in+fstream::out to fstream::in|fstream::out * libGIFTAcInvertedFile/include/merge_sort_streams.h: streampos becomes STREAMPOS which is defined as long long int => ++ is defined * libGIFTAcInvertedFile/cc/CInvertedFileChunk.cc: (writeBinary): * libGIFTAcInvertedFile/cc/CIFListStart.cc: read and write need typecast to char* when using g++ v3 2002-01-22 MUELLER Wolfgang * GIFTServer/Server.cc (main): adding seeding by pid third parameter has to be "0" to block seeding 2002-01-20 Wolfgang Müller * libMRML/cc/Makefile.am (libMRML-config.cc): * libMRML/cc/libMRML-config.pre-cc (main): make it work. replacing @ by % in the sed operation transforming pre-cc to cc and consequently in the pre-cc source 2002-01-12 Wolfgang Müller * configure.in: $(CXX) instead of $(CC) in perl test compile 2002-01-11 MUELLER Wolfgang * configure.in(AC_CHECK_FILE[$PERL...]): added -ldl to non-perl branch as consequence of patch suggestion by Pruet Boonma 2002-01-10 MUELLER Wolfgang * libGIFTAcInvertedFile/include/merge_sort_streams.h: streampos troubles * libGIFTAcInvertedFile/cc/CDocumentFrequencyList.cc: * libGIFTAcInvertedFile/cc/CDocumentFrequencyElement.cc: (char*) cast in read/write from/to stream * libGIFTAcURL2FTS/cc/CAcURL2FTS.cc: Yay, gcc v3.0.3 found me an error mIDToFFN.find gave back an iterator mURLToFFN. * libMRML/cc/CXMLElement.cc: * libMRML/cc/CAttributeList.cc: * libMRML/cc/CXMLElementBuilder.cc: include iostream * libMRML/include/CQMultiple.h: * libMRML/include/CAccessorImplementation.h: ifdef HAS_HASH_MAP * libGIFTAcInvertedFile/cc/CBitSetCollection.cc: * libGIFTAcInvertedFile/include/CIFListStart.h: * libGIFTAcInvertedFile/include/CAdditionalDocumentInformation.h: * libGIFTAcInvertedFile/include/CAcSQLInvertedFile.h: * libGIFTAcInvertedFile/include/CAcInvertedFile.h: * libGIFTAcInvertedFile/include/CAcIFMySQL.h: * libGIFTAcInvertedFile/include/CADIHash.h: * libGIFTAcInvertedFile/include/CAcIFFileSystem.h: * libMRML/include/myNew.h: * libGIFTAcInvertedFile/cc/CIFListStart.cc: * libGIFTAcInvertedFile/include/CDocumentFrequencyElement.h: iostream.h becomes iostream fstream.h becomes fstream etc. * libMRML/include/GIFTExceptions.h: added using namespace * libMRML/include/CIDRelevanceLevelPair.h: casting to double for making fabs unambiguous * libMRML/include/CAccessorElement.h: include makes it compile * libMRML/cc/CAccessorElement.cc(operator<<): small changes not affecting functionality for obtaining better error messages from gcc v3 2002-01-09 Wolfgang Müller * libMRML/cc/CAccessorElement.cc: cast TID to long * scripts/perl/gift-dtd-to-keywords.pre-pl (translateToH(): adding using namespaces directive to c++ output * libMRML/cc/CAccessorElement.cc: convert "char" to strings 2002-01-09 Wolfgang Müller * libGIFTAcInvertedFile/include/uses-declarations.h: * libGIFTAcDistanceMatrix/include/uses-declarations.h: * libGIFTQuInvertedFile/include/uses-declarations.h: * libMRML/include/uses-declarations.h: * libGIFTAcHierarchy/include/uses-declarations.h: * libGIFTAcPerl/include/uses-declarations.h: * libGIFTQuHierarchy/include/uses-declarations.h: * libGIFTQuPerl/include/uses-declarations.h: * libGIFTAcURL2FTS/include/uses-declarations.h: Added header files containing the "using namespace" declarations for each library. * /libGIFTAcInvertedFile/include/CADIHash.h: * libGIFTAcInvertedFile/include/CAcSQLInvertedFile.h: * libGIFTAcInvertedFile/include/CDocumentFrequencyHash.h: * libGIFTAcInvertedFile/include/CDocumentFrequencyList.h: * libGIFTAcInvertedFile/include/CIFListStart.h: * libGIFTAcInvertedFile/include/CAdditionalDocumentInformation.h: * libGIFTAcInvertedFile/include/CBitSetCollection.h: * libGIFTAcInvertedFile/include/CAFSpecialised.h: * libGIFTAcInvertedFile/include/CIFBuilderTriplet.h: * libGIFTAcInvertedFile/include/CAFIFMySQL.h: * libGIFTAcInvertedFile/include/CInitializedDouble.h: * libGIFTAcInvertedFile/include/CInvertedFileChunk.h: * libGIFTAcInvertedFile/include/CAFInvertedFile.h: * libGIFTAcInvertedFile/include/CComparisonResults.h: * libGIFTAcInvertedFile/include/CAcInvertedFile.h: * libGIFTAcInvertedFile/include/CAcIFFileSystem.h: * libGIFTAcInvertedFile/include/CDocumentFrequencyElement.h: * libGIFTAcInvertedFile/include/CAcIFMySQL.h: * libGIFTAcInvertedFile/include/CAcInvertedFileAbstraction.h: * libGIFTAcDistanceMatrix/include/CSquasher.h: * libGIFTAcDistanceMatrix/include/CDistanceCalculator.h: * libGIFTAcDistanceMatrix/include/CPersistentTranslatedIndexMatrix.h: * libGIFTAcDistanceMatrix/include/CDrawer.h: * libGIFTAcDistanceMatrix/include/CInformationCalculator.h: * libGIFTAcDistanceMatrix/include/CIDToMatrixIndex.h: * libGIFTAcDistanceMatrix/include/CAcDistanceMatrix.h: * libGIFTAcDistanceMatrix/include/CAFDistanceMatrix.h: * libGIFTAcDistanceMatrix/include/CPersistentVector.h: * libGIFTAcDistanceMatrix/include/CProbabilityCombiner.h: * libGIFTAcDistanceMatrix/include/CPersistentMatrix.h: * libGIFTQuInvertedFile/include/CWeightingFunctionPointerList.h: * libGIFTQuInvertedFile/include/CQInvertedFile.h: * libGIFTQuInvertedFile/include/CWeightingFunction.h: * libGIFTQuInvertedFile/include/CQueryNormalizer.h: * libGIFTQuInvertedFile/include/CWFStandardTF.h: * libGIFTQuInvertedFile/include/CWFBestFullyWeighted.h: * libGIFTQuInvertedFile/include/CWFBinaryTerm.h: * libGIFTQuInvertedFile/include/CQNEuclideanLengthSquare.h: * libGIFTQuInvertedFile/include/CQNBestFullyWeighted.h: * libGIFTQuInvertedFile/include/CQNSquareDFLogICFSum.h: * libGIFTQuInvertedFile/include/CWFCoordinationLevel.h: * libGIFTQuInvertedFile/include/CWeighter.h: * libGIFTQuInvertedFile/include/CWFClassicalIDF.h: * libGIFTQuInvertedFile/include/CScoreBoard.h: * libGIFTQuInvertedFile/include/CQNNoNormalization.h: * libGIFTQuInvertedFile/include/CWFBestProbabilistic.h: * libGIFTQuInvertedFile/include/CQNMaxDocumentFrequency.h: * libGIFTQuInvertedFile/include/CWFProbability.h: * libGIFTQuInvertedFile/include/CWeightingFunctionPointerHash.h: * libMRML/include/CTimeStampGenerator.h: * libMRML/include/CXEVCommunication.h: * libMRML/include/CXEVTripletList.h: * libMRML/include/CMagic.h: * libMRML/include/CSelfDestroyPointer.h: * libMRML/include/CAccessorFactory.h: * libMRML/include/CSessionManager.h: * libMRML/include/CArraySelfDestroyPointer.h: * libMRML/include/CQueryTreeBuilder.h: * libMRML/include/CAccessorImplementation.h: * libMRML/include/CAFPlugin.h: * libMRML/include/CAccessorAdmin.h: * libMRML/include/CAlgorithm.h: * libMRML/include/CAccessorElement.h: * libMRML/include/CAccessor.h: * libMRML/include/CXMLHelper.h: * libMRML/include/CMutex.h: * libMRML/include/CQueryParadigmMatcher.h: * libMRML/include/CPropertySheetList.h: * libMRML/include/CXMLElementVisitor.h: * libMRML/include/CAccessorFactoryContainer.h: * libMRML/include/CRelevanceLevelList.h: * libMRML/include/CNoDelete.h: * libMRML/include/CQueryTreeNode.h: * libMRML/include/CAlgorithmCollection.h: * libMRML/include/CMRMLStringConstants.h: * libMRML/include/CQMultiple.h: * libMRML/include/CIDRelevanceLevelPairList.h: * libMRML/include/CQueryPlugin.h: * libMRML/include/CDebuggingMemoryManager.h: * libMRML/include/CStaticQueryFactory.h: * libMRML/include/CCommunicationHandler.h: * libMRML/include/CAttributeList.h: * libMRML/include/CRelevanceLevel.h: * libMRML/include/CXMLElementBuilder.h: * libMRML/include/CIDRelevanceLevelPair.h: * libMRML/include/CAccessorAdminCollection.h: * libMRML/include/CQuery.h: * libMRML/include/CQParallel.h: * libMRML/include/CXMLElement.h: * libMRML/include/CDynamicQueryFactory.h: * libGIFTAcHierarchy/include/CAFHierarchy.h: * libGIFTAcHierarchy/include/CAcHierarchy.h: * GIFTServer/CSelfDestroyPointer.h: * GIFTServer/CArraySelfDestroyPointer.h: * libGIFTAcPerl/include/CAFPerl.h: * libGIFTAcPerl/include/CAcPerl.h: * libGIFTQuHierarchy/include/CQHierarchy.h: * libGIFTQuPerl/include/CXMLTripletList.h: * libGIFTQuPerl/include/CQPerl.h: * libGIFTQuPerl/include/CXMLTriplet.h: * libGIFTAcURL2FTS/include/CAFURL2FTS.h: * libGIFTAcURL2FTS/include/CAcURL2FTS.h: Added an #include "../include/uses-declarations.h" for proper namespace handling 2002-01-04 Wolfgang Müller * libMRML/cc/Makefile.am(libMRML-config.cc): bug in sed script INCLUDE substitution fixed 2002-01-08 MUELLER Wolfgang * libMRML/cc/CCommunicationHandler.cc (getPeerAddressString): (setPeerAddressString): New functions to get at the peer address (readAndParse): printing a time stamp, of the incoming message, as well as the peer address string * GIFTServer/Server.cc(CProcessMessageParameters): (main): Changes to get at the peer name, and pass it to the communication handler 2002-01-03 Wolfgang Müller * expat/Makefile.am: changing sequence of subdirs. xmlwf must be last, gennmtab must be first. * PluginMaker/libGIFTQu@PLUGIN_NAME@/Makefile.am.in (SUBDIRS): cc AND include * PluginMaker/libGIFTAc@PLUGIN_NAME@/cc/CAF@PLUGIN_NAME@.cc.in: * PluginMaker/libGIFTAc@PLUGIN_NAME@/include/CAF@PLUGIN_NAME@.h.in: * PluginMaker/libGIFTAc@PLUGIN_NAME@/cc/CAc@PLUGIN_NAME@.cc.in: * PluginMaker/libGIFTAc@PLUGIN_NAME@/include/CAc@PLUGIN_NAME@.h.in: * PluginMaker/libGIFTQu@PLUGIN_NAME@/cc/CQ@PLUGIN_NAME@.cc.in: * PluginMaker/libGIFTQu@PLUGIN_NAME@/include/CQ@PLUGIN_NAME@.h.in: adjusting include paths 2002-01-03 Wolfgang Müller * PluginMaker/configure.in.in(AC_OUTPUT): generate make files in include directories * PluginMaker/gift-plugin-maker.pl (wanted): don't copy files in the CVS directory when making plugin 2001-12-29 Wolfgang Müller * libMRML/cc/libMRML-config.pre-cc: New file 2001-12-27 Wolfgang Müller * libMRML/cc/CCommunicationHandler.cc (addToMultiResponse): don't add empty trees * PluginMaker/libGIFTQu@PLUGIN_NAME@/include/Makefile.am.in: * PluginMaker/libGIFTAc@PLUGIN_NAME@/include/Makefile.am.in: new files 2001-12-26 Wolfgang Müller * expat/xmlwf/Makefile.am(wf_HEADERS): * expat/xmlparse/Makefile.am (parse_HEADERS): 2001-12-23 Wolfgang Müller * expat/xmltok/Makefile.am (INCLUDES): adding gennmtab * expat/gennmtab/Makefile.am: making nametab.h at the right place and time 2001-12-11 MUELLER Wolfgang * libMRML/include/CQMultiple.h: * libMRML/cc/CQMultiple.cc: Changes to accomodate merging by URL (instead of merging by ID). * Doc/Doxyfile.in (PROJECT_NAME): create ini file with @PACKAGE@ and @VERSION@ that will be substituted. * FeatureExtraction/Makefile.am (EXTRA_DIST): install headers * GIFTServer/gift-mrml-messages/Makefile.am: gift-ihandshake.pre-mrml gift-iconfigure.pre-mrml * GIFTServer/gift-config/Makefile.am (EXTRA_DIST): gift-config.mrml * libGIFTAcInvertedFile/include/Makefile.am (noinst_HEADERS): there were wrong headers in this file * expat/xmltok/Makefile.am (EXTRA_DIST): xmltok_impl.c xmltok_ns.c are actually include files which need to be distributed using EXTRA_DIST * dtd/Makefile.am: make mrml.dtd part of the distro * Doc/Makefile.am: making doc makefile proof against missing tools * scripts/perl/Makefile.am: making sure all prerequisites are distributed 2001-12-10 MUELLER Wolfgang * bootstrap-cvs.sh: add missing * expat/Makefile: removed Globally: moving automatically generated files out of CVS Move towards a working "make dist" target 2001-12-08 MUELLER Wolfgang * libGIFTAcDistanceMatrix/include/Makefile.am: new file * libGIFTQuPerl/include/Makefile.am: new file * libGIFTQuPerl/Makefile.am(noinst_HEADERS): * libMRML/include/Makefile.am(noinst_HEADERS): make sure that *.h files are distributed * scripts/perl/Makefile.am (EXTRA_SCRIPTS): pre- pre-files must be distributed * libSquirePPM/Makefile.am (noinst_HEADERS): * bootstrap-cvs.sh: Added bootstrap script which is to be called when having checked out the GIFT from CVS. 2001-12-03 Wolfgang Müller * libMRML/include/CQMultiple.h(mUsesFastQuery): new attribute which checks if fastQuery is used or not. This means either result merging by URL (query) by ID (fastQuery). 2001-11-23 Wolfgang Müller * dtd/mrml.dtd(query-result): can contain multiple query-result-element lists (query-step): changing the sequence in the model for working around bug in dtd-to-tex 2001-11-08 Wolfgang Müller * dtd/mrml.dtd: query step implied 2001-10-11 Wolfgang Müller * dtd/mrml.dtd: I added "error" tags as children of response tags where useful. The goal is to have components report their errors, and thus to make it clearer where the error occurred. 2001-11-01 Wolfgang Mueller * dtd/mrml.dtd: added cui-text-query tag to dtd, enabled multiple user-relevance-lists in one query-step added cui-query-string. 2001-10-25 MUELLER Wolfgang * libMRML/cc/CCommunicationHandler.cc(endMultiRequest): * libMRML/cc/CCommunicationHandler.cc(startMultiRequest): putting time stamp generation back into the code. Time stamp generation is interesting for logging * GIFTServer/Server.cc (main): write out into log file the time at which the GIFT was started (as XML comment) 2001-10-24 MUELLER Wolfgang * configure.in: Changed warning message for enable-interactive. * libMRML/cc/Makefile.am (INCLUDES): removed doubly specified LDFLAGS * gift-install-prerequisites.pl: Heavy modification in all the script 2001-10-16 Wolfgang Müller * libMRML/cc/CAccessorAdminCollection.cc(getProxy): * libMRML/include/CAccessorAdminCollection.h: To counter problems with people who do queries to a collection with "" as ID, give back the default collection to the request. This is a quick but useful fix, please see code for caveats 2001-10-11 MUELLER Wolfgang * libMRML/cc/CSessionManager.cc: Returning error tag if unknown session 2001-09-27 MUELLER Wolfgang * libMRML/cc/CSessionManager.cc(query): * libMRML/cc/CAlgorithmCollection.cc (CAlgorithmCollection): Moving calls to my_throw in a way that they are USED => this makes compilers with good exception handling necessary. 2001-05-31 Wolfgang Mueller * configure.in: changeing package version number 2001-09-10 MUELLER Wolfgang * libMRML/cc/CQMultiple.cc: CQMThread gets an additional attribute: mWeight. mWeight describes which weight the result obtained by this thread should receive. It has to be taken care of manually, and it does not cause any thing to happen automatically. add CQMThread::getWeight function (fastQuery): using CQMThread::getWeight() for weighting result correctly. 2001-07-30 MUELLER Wolfgang * libGIFTAcInvertedFile/cc/CAcIFFileSystem.cc: * configure.in: add option --disable-foreign-urls and compiler define IGNORE_UNKNOWN_URLS for disabling people's use of URLs that are not part of the collection queried. * scripts/perl/gift-url-to-fts.pre-pl (convertURLToFeatureFile): adding a line that logs the external URL along with the time and the thumbnail file, as well as the name of the feature file generated 2001-05-08 MUELLER Wolfgang * libMRML/include/CSessionManager.h (CSessionManager): * libMRML/cc/CSessionManager.cc (CSessionManager): adding a newSession function, that creates a session with a given ID in case of a user requesting a non-exsistent session. 2001-05-07 MUELLER Wolfgang * libMRML/cc/CSessionManager.cc: Removed my_throw in case of unknown session for query 2001-04-21 MUELLER Wolfgang * FeatureExtraction/extract_block_features.c(init_feature_variables): Applied David Squire's bug fix for wrong features (int) becomes rint() * configure.in: new flag __GIFT_FREE_UNUSED_ACCESSORS default is not to free unused accessors, in order to increase speed. Real solution to this would be some cacheing method. (AM_INIT_AUTOMAKE): Changed package version to 0.1.6pre2 2001-05-31 Wolfgang Mueller * GIFTServer/generateInvertedFile.cc: have to initialise gMutex. Otherwise failure in gift-generate-inverted-file when doing multi-threading 2001-05-22 Wolfgang Mueller * libMRML/cc/CQMultiple.cc (fastQuery): commenting out lTemporary [was unused]. * scripts/perl/gift-add-collection.pre-pl (wanted): removing ^ in front of second http: s[^http:/][^http://] is now s[^http:/][http://] * libMRML/cc/CIDRelevanceLevelPair.cc: * libMRML/include/CIDRelevanceLevelPair.h: Added cmath include, as well as an author notice * libMRML/include/CAlgorithm.h(CAlgorithm): * libMRML/cc/CAlgorithm.cc(CAlgorithm): Now we can construct an algorithm not only from another algorithm, but also from an exsisting CXMLElement * libMRML/include/CAccessorAdminCollection.h: making private classes public where necessary * libMRML/cc/CQueryTreeNode.cc(configure): inAttributes is not any more a flat attribute list, but a tree of type CXMLElement 2001-04-19 Wolfgang Müller * libMRML/cc/CAccessorAdmin.cc(closeAccessor): CMutex/gMutex include New diagnostics including process ID (openAccessor): openclosecounter was not incremented when reusing accessor. fixed. * libGIFTAcInvertedFile/cc/CAcIFFileSystem.cc (URLToFeatureList): return emty feature list instead of null pointer * libGIFTAcInvertedFile/cc/CDocumentFrequencyList.cc: removing mutex from readbinary [should be already mutexed] (CDocumentFrequencyList) in default constructor, create array of one element to avoid segfault? removed assertion that makes the program fail in any case. * libMRML/cc/CMutex.cc (CMutex): printing out the lock pids * libGIFTAcInvertedFile/cc/CDocumentFrequencyList.cc(readBinary) : printing out the pid. * libMRML/include/CQueryTreeNode.h: changed CSelfDestructionPointer CSelfDestructionPointer to CAlgorithm* CQuery* respectively * libMRML/cc/CQueryTreeNode.cc(~CQueryTreeNode): Destroying mContent and mAlgorithm by hand to control destruction sequence * GIFTServer/Makefile.am: removed references to gift-debug-test 2001-04-17 Wolfgang Müller * libGIFTQuInvertedFile/cc/CQInvertedFile.cc: added decent destructor which closes the accessor on destruction * libGIFTAcInvertedFile/cc/CAcIFFileSystem.cc: changing local to global mutex * libMRML/cc/CCommunicationHandler.cc (endMultiRequest): 2001-02-02 Wolfgang Müller * configure.in: Changing quotes "" to [] in all calls of AC_MSG 2001-04-12 MUELLER Wolfgang * libMRML/cc/CXMLElement.cc(clone): changeing copy() instruction to use of CAttributeList copy constructor. * libMRML/cc/CXMLElementBuilder.cc: adding empty default constructor 2001-04-11 MUELLER Wolfgang * libMRML/cc/Makefile.am (libMRML_la_SOURCES): adding CXMLElementBuilder to this list 2001-04-09 MUELLER Wolfgang * configure.in(CXXFLAGS): set flags for efence * libMRML/cc/CAttributeList.cc: took out a couple of checknprints as well as a call to check() 2001-04-05 MUELLER Wolfgang * configure.in: allow full multithreading * libMRML/cc/CAttributeList.cc: changing some printouts to asserts to increase speed. 2001-04-04 MUELLER Wolfgang * libMRML/cc/CDebuggingMemoryManager.cc: * libMRML/include/CDebuggingMemoryManager.h: * libMRML/include/myNew.h: * GIFTServer/Server.cc: replacing memory management in order to have a better view on what happens in memory. part of memory overwrite problems and their solutions (hopefully). * libMRML/cc/CSessionManager.cc(setActiveAlgorithm): * libMRML/cc/CAlgorithmCollection.cc(makeDefaultAlgorithm): check the default algorithm. 2001-04-03 MUELLER Wolfgang * libMRML/cc/CMagic.cc: adding to assertion some printout to cout * libMRML/cc/CAttributeList.cc: adding mutex locks 2001-03-29 MUELLER Wolfgang * libMRML/include/CXMLElement.h: adding mMutex * libMRML/cc/CQMultiple.cc: put back copying of CXMLElement on construction of CQMThread the help-gplusplus mailing list suggests there is a severe problem in bastring. quite a number of people report mystical problems. The general strategy is now to avoid synchronous reads on string incarnations. 2001-03-28 MUELLER Wolfgang * configure.in: * libMRML/cc/CQMultiple.cc: added __GIFT_CQMULTIPLE_TREADS__ __NO_GIFT_CQMULTIPLE_TREADS__ * configure.in: * GIFTServer/Server.cc: added __GIFT_SERVER_TREADS__ __NO_GIFT_SERVER_TREADS__ * configure.in: * libMRML/cc/CQMultiple.cc: * libMRML/cc/CMutex.cc: * libMRML/include/CMutex.h: introduced new flag __GIFT_USES_THREADS__ instead of stupid use of HAVE_LIBPTHREAD * scripts/emacs-lisp/gift-compile-current.el (gift-Utomake): splitting concat strings in another way to make commenting options easier 2001-04-02 Wolfgang Müller * libMRML/cc/CAttributeList.cc: For verifying if there some bugs which seem to reside in the string classes kill the GIFT, I am changing the type etc. of the attribute list to char wherever possible I am starting out with changing map to map which is the easiest for going to map I have to write a comparison operator 2001-03-14 Wolfgang Müller * libMRML/include/CXMLElementBuilder.h: * libMRML/cc/CXMLElementBuilder.cc: added #ifdefs around debugging printouts 2001-03-27 MUELLER Wolfgang * libMRML/cc/CQMultiple.cc: cut out lone of CQuery in CQMThread * libMRML/cc/CAttributeList.cc: checking if attributes are longer than 200 char. * libMRML/cc/CTimeStampGenerator.cc (generateTimeStamp): added lock/unlock * libMRML/cc/CCommunicationHandler.cc(readAndParse): adding expressive debugging printouts to cerr§ * scripts/perl/CFeedbackClient.pre-pm (addCollection): Uncommented if $vDEBUG{addCollection}; Applied Patch by Henning Müller: He sais: this patch basically changes two things. It adds a new flag to the debug options, so I can block any output on the screen in CFeedbackClient. I just called it others, so it does not conflict with any of yours. The other problem I had when using the benchmark test was an error with an access to an undefined hash element in getAlgorithm. I check wether this element is defined and if not, I sent adefault back. 2001-03-26 MUELLER Wolfgang * GIFTServer/Server.cc: commented lock/unlock pair in processMessage * configure.in: Added -D_PTHREADS for multithreading 2001-03-23 MUELLER Wolfgang * libMRML/cc/CQuery.cc (query): added mutex lock * scripts/perl/gift-add-collection.pre-pl: Collections reference url2fts, however, the file name must be url2fts.xml 2001-03-22 MUELLER Wolfgang * libMRML/cc/CCommunicationHandler.cc: Currently each connection mutex-locks. I.e. multithreading is only used in CQMultiple.cc * libMRML/include/CXMLElement.h: Tracking misterious stuff happening when multithreading. Adding mutex to CXMLElement. 2001-03-21 MUELLER Wolfgang * libMRML/cc/CQMultiple.cc (fastQuery): I seem to have solved a problem regarding a leak of ressources when doing multi threading. You can find further description in the comment EX-LEAK 2001-03-08 MUELLER Wolfgang * GIFTServer/Server.cc: Teardown: tries to read all characters (includin junk) from the other side before finally closing the socket. * scripts/perl/gift-start.pre-pl: a log of the PRINTOUT of each gift instance goes now to a temporary file of the type gift$PID.tmplog $PID being the proces id of the instance of gift-start.pre-pl (NOT the instance of the GIFT) 2001-03-07 MUELLER Wolfgang * dtd/mrml.dtd: added cui-time-stamp tag with calendar-time attribute * libMRML/cc/Makefile.am: corresponding changes * libMRML/include/CTimeStampGenerator.h: * libMRML/cc/CTimeStampGenerator.cc: Added these files. A CTimeStampGenerator is made for generating time stamps * libMRML/cc/CSessionManager.cc(openSession): When opening session, add session-name and user-id to the resulting element. This resolves some ambiguities in parsing log files. This is OPTIONAL MRML. 2001-03-02 Wolfgang Müller * libMRML/include/CXMLElementBuilder.h: * libMRML/cc/CXMLElementBuilder.cc: Added this class it builds an XML tree from a string. This currently is done within CCommunicationHandler, but I found I am using this about everywhere, so I put it into a special class. * libMRML/include/CCommunicationHandler.h: small changes in the comments 2001-02-21 MUELLER Wolfgang * scripts/perl/gift-add-collection.pre-pl (wanted): adding code for URL escaping. * scripts/perl/gift-start.pre-pl (REAPER): added reaper to get rid of annoying problem in gift-start 2001-02-15 MUELLER Wolfgang * libGIFTAcInvertedFile/cc/CDocumentFrequencyElement.cc: _NO_PRINTOUT_WRITE_BINARY ifdeffed out annoying printouts on writing * libGIFTAcInvertedFile/include/merge_sort_streams.h: replaced "int" by streampos to follow linux's evolution * libGIFTAcURL2FTS/cc/CAcURL2FTS.cc (CAcURL2FTS): made lBuffer a global variable. FIXME: it's not elegant to slurp in the whole thing at once. * GIFTServer/Makefile.am: * configure.in: UNPUBLISHED_DIR contains now the name of the unpublished directory AND the -L flags. This is a fix for libtool problems I had 2001-02-13 MUELLER Wolfgang * GIFTServer/generateInvertedFile.cc (main): changed url2fts to url2fts.xml 2001-02-06 MUELLER Wolfgang * scripts/perl/gift-add-collection.pre-pl (wanted): changing the argument list in the "system" calls to avoid shell escapes and misinterpretation of spaces. * scripts/perl/gift-start.pre-pl: new file. This script starts up the GIFT, and sends out mails if the gift goes down. 2001-02-05 MUELLER Wolfgang * libGIFTAcURL2FTS/cc/CAcURL2FTS.cc: changed XML Error message to give information in which file the error occured. * scripts/perl/CXTVWriter.pre-pm: use CXMLTreeVisitor; 2001-01-31 MUELLER Wolfgang * libGIFTAcInvertedFile/cc/CAcIFFileSystem.cc (_NO_CONSISTENCYPRINT): (_NO_CHECK_CONSISTENCY): These defines block some annoying checks and check printouts, that are done when indexing collections, and which take MUCH longer than the indexing itself. * scripts/perl/Makefile.am (distclean): Added this target. It does the same as make clean in this directory * libMRML/cc/CCommunicationHandler.cc(parseString): do not exit on XML error * libMRML/cc/CAlgorithmCollection.cc (CAlgorithmCollection): * libMRML/cc/CAccessorCollection.cc(CAccessorCollection): added to printout on XML error. * GIFTServer/Makefile.am: remove data_DATA line 2001-01-24 Wolfgang Mueller * configure.in: replaced all "CPPFLAGS" by "CXXFLAGS" $CC pthread-compile-test-program.cc uses LDFLAGS now. 2001-01-23 Wolfgang Mueller * GIFTServer/Makefile.am(gift_LDADD): changed link sequence we need to link libMRML first. Otherwise the perl stuff does not get linked correctly 2001-01-11 Wolfgang Müller * scripts/perl/CXMLTreeBuilder.pm (handleChar): added ? after newline in regexp. makes me catch more whitespace text nodes. 2001-01-03 Wolfgang Müller * libGIFTQuBayesian/cc/Makefile.am (libGIFTQuBayesian_la_SOURCES): Renamed CIFQuickAndDirtyHunter to CQTracker. * libGIFTQuBayesian/cc/CIFQuickAndDirtyHunter.cc: * libGIFTQuBayesian/include/CIFQuickAndDirtyHunter.h: * libGIFTQuBayesian/cc/CQTracker.cc: * libGIFTQuBayesian/include/CQTracker.h: Renamed CIFQuickAndDirtyHunter to CQTracker. This fits the naming scheme, it's shorter, and it meeds the case better. 2000-12-29 Wolfgang Müller * scripts/emacs-lisp/gift-compile-current.el (gift-associated): Change routines for finding associated files so that they cope also with flat directory structures. (gift-switch-to-associated-h): 2000-12-28 Wolfgang Müller * libGIFTAcURL2FTS/include/CAcURL2FTS.h: * libGIFTAcURL2FTS/cc/CAcURL2FTS.cc: adding the functions newStartURL2FTSElement newEndURL2FTSElement in order to read url2fts.xml files. * scripts/perl/gift-add-collection.pre-pl: Making this script xml-ready. 2000-12-24 Wolfgang Müller * libMRML/cc/CXEVCommunication.cc: changed include CCommunicationHandler 2000-12-23 Wolfgang Müller * libMRML/cc/Makefile.am (libMRML_la_SOURCES): * GIFTServer/Makefile.am (gift_SOURCES): * GIFTServer/CCommunicationHandler.cc: * GIFTServer/CCommunicationHandler.h: * libMRML/cc/CCommunicationHandler.cc: * libMRML/include/CCommunicationHandler.h: moved CCommunicationHandler.cc to libMRML 2000-12-20 Wolfgang Müller * scripts/perl/gift-add-collection.pre-pl: appending an "/" to lIndexPrefix. We assume that the path ends with a "/" throughout the program. 2000-12-15 Wolfgang Müller * scripts/emacs-lisp/gift-compile-current.el (gift-Utomake): (gift-Itomake): use --enable-multi-threading option * NEWS: news. * Doc/gift-guide.sgml: documented new options of configure. Erased "done" items from "to-do" list. * configure.in: created --enable-multi-threading option. 2000-12-14 Wolfgang Müller * libGIFTQuPerl/cc/plug_in_fo.cc: surrounding the whole file with #ifdef __GIFT_WITH_PERL__ 2000-12-13 Wolfgang Müller * Doc/Makefile.am (CLEANFILES): Don't remove gift-guide.txt and configuring-and-hacking-the-gift.txt these files are part of the distribution. Now. * README: New short readme for the impatient * configure.in: Making gift-install-prerequisites.pl part of the configuration process. * Doc/gift-guide.sgml (Caveat): Adding and changing some parts about the installation procedure which has become much nicer. * gift-install-prerequisites.pl: added this file it automatically installs all software prerequisites. that are needed by the GIFT. 2000-12-10 Wolfgang Müller * dtd/Makefile.am: making automatically libMRML/cc/mrml_const.cc and libMRML/include/mrml_const.h and mrml_const.java using scripts/perl/gift-dtd-to-keywords.pl * Makefile.am (SUBDIRS): changing sequence. make scripts first, then dtd, then libraries. 2000-12-07 Wolfgang Müller * libMRML/cc/CAlgorithm.cc(getInheritsFrom): * libMRML/include/CAlgorithm.h(getInheritsFrom): added 2000-12-06 Wolfgang Müller * GIFTServer/CCommunicationHandler.cc(waitReadStream): Added error handling * GIFTServer/CCommunicationHandler.h: A mutex for the communication handler makes sure that no two threads write to the log in the same moment. 2000-12-05 Wolfgang Müller * GIFTServer/Server.cc: waiting for eof from client for better teardown * GIFTServer/CCommunicationHandler.cc(waitReadStream): removed &lWaitingTime from read wait 2000-12-01 Wolfgang Müller * libGIFTAcInvertedFile/include/CAcIFFileSystem.h: improving doc of the constructor * Doc/Makefile.am: New targets and new cleanfiles for making more documentation (noinst_DATA): Now the documentation is automatically made. (system-doc): Doxyfile is a precondition for the target. * Doc/Doxyfile (MAN_EXTENSION): Manpages into 3gift * configure.in: replacing kdoc by doxygen. 2000-11-30 Wolfgang Müller * scripts/perl/gift-url-to-fts.pre-pl (convertURLToFeatureFile): did not give __BINDIR__ for gift-extract-features * libMRML/cc/CQMultiple.cc(fastQuery): Giving something to do for the main thread (CQMThread): adding function callFunction which does not spawn a thread * scripts/perl/gift-add-collection.pre-pl: lDatabaseName became lCollectionName Reading DOT_FILE .gift-add-collection Primitive variable reprlacement Moved generation/copying of configuration files behind processing of the --help option 2000-11-29 Wolfgang Müller * configure.in: Now doing explicit check for being able to lock recursively. * libGIFTAcInvertedFile/cc/CAcIFFileSystem.cc (URLToFeatureList): adjusted path to new directory.h [bugfix relative to unreleased version]. 2000-11-28 Wolfgang Müller * libMRML/cc/CSessionManager.cc: * libMRML/include/CSessionManager.h: making CSession threadsafe: mMutexSession * libGIFTAcURL2FTS/include/CAcURL2FTS.h: * libGIFTAcURL2FTS/cc/CAcURL2FTS.cc: analog: adding mMutexURL2FTS * libGIFTAcHierarchy/include/CAcHierarchy.h: adding mMutexHierarchy * libGIFTAcHierarchy/cc/CAcHierarchy.cc: adding mMutexHierarchy.lock()/unlock() to all functions 2000-11-27 Wolfgang Müller * libMRML/cc/CQMultiple.cc: added function doQueryThread. This function is supposed to run in a spawned thread. * configure.in: Added check for POSIX threads Changing versioning for libraries * GIFTServer/Makefile.am (gift_generate_inverted_file_LDADD): Changing library paths to match reality... * GIFTServer/Server.cc (main): moving the construction of gHandler into the socket listening loop * GIFTServer/CCommunicationHandler.h: * GIFTServer/CCommunicationHandler.cc: Changed constructor to take the session manager as parameter, as well as the ostream of the logfile. The corresponding members become references instread of auto variables. Deleted unused members mSessionFile mConfigFile * GIFTServer/CCommunicationHandler.cc: * libMRML/cc/CXEVCommunication.cc: * libMRML/include/CXEVCommunication.h: Disentangling the two classes in order to prepare them for multithreading. * libMRML/cc/CSessionManager.cc: Instead of throwing exceptions giving back error message in case of unknown session. Advantage: easier multithreading. 2000-11-24 Wolfgang Müller * libGIFTAcInvertedFile/cc/CAcIFFileSystem.cc: adding lock/unlock calls to all functions * libMRML/include/CAccessor.h: Beginning to add multithreading using posix threads. Adding conditionally a lock/unlock, and a mutex. 2000-11-22 Wolfgang Müller * Doc/Makefile.am (CLEANFILES): the automatically generated documentation will now be deleted before shipping. * Doc/autoDoc/HTML: * Doc/autoDoc/TeX: Deleted. * libGIFTAcInvertedFile/cc/Makefile.am: * libMRML/cc/Makefile.am: * libGIFTAcInvertedFile/cc/CAcIFFileSystem.cc (URLToFeatureList): * libMRML/cc/CAccessorCollection.cc: These files now use directory.h . This makes the use of pre-cc obsolete. Makefile.am-s changed accordingly. 2000-11-21 Wolfgang Müller * libMRML/include/CAccessorFactory.h(closeAccessor): * libMRML/cc/CAccessorFactory.cc(closeAccessor): Added closeAccessor function * libMRML/include/CAccessorProxy.h(CContent): * libMRML/cc/CAccessorProxy.cc(openAccessor): * libMRML/include/CAccessorFactoryContainer.h(CContent): * libMRML/cc/CAccessorFactoryContainer.cc(openAccessor): Moved the open/close-accessor logic from the factory container to the accessor proxy. Affects openAccessor in both classes, as well as the definition of a map which administrates this logic. This is mContent of type CContent * libMRML/include/CAccessorFactoryContainer.h: * libMRML/cc/CAccessorFactoryContainer.cc: Changed params of CAccessorFactoryContainer::configure to CXMLElement* [was const]. 2000-11-20 Wolfgang Müller * libMRML/include/Makefile.am: * libMRML/Makefile.am: generating a file directory.h from ./configure results in order to get around this ugly pre-cc business * GIFTServer/Makefile.am: Added remark that CAcPerl and CQuPerl HAVE to be linked at linking time. * libMRML/include/CAccessorFactoryContainer.cc: * libMRML/cc/CAccessorFactoryContainer.cc: Some aftermath of cleaning the accessorfactorycontainer business up. CAccessorFactoryContainer::openAccessor needed a new parameter. changed call to openAccessor * libMRML/cc/CAFPlugin.cc: * libMRML/include/CAFPlugin.h: Added these files. They implement an accessor Factory which functions for plugged-in accessors. * libMRML/cc/CAccessorFactoryContainer.cc: Receives now a parameter which is an XML parse tree. This tree is scanned for names of directories. These directories will be scanned for plugins. Changed error message, if a plugin is registered twice 2000-11-18 Wolfgang Müller * libMRML/cc/CAccessorFactoryContainer.cc: Made a constructor for this function 2000-11-17 Wolfgang Müller * libMRML/cc/CAlgorithmCollection.cc: * libMRML/cc/CAccessorCollection.cc: ifdef-ed out some debugging printout * libMRML/include/CAccessorCollection.h: * libMRML/cc/CAccessorCollection.cc: unused function getAllQueryMethods deleted * libMRML/cc/CAccessorProxy.cc(constructor): emptied constructor of things which are realy none of CAccessorProxy's business [moved into CAccessorFActoryContainer] (constructor): Gets new parameter inFactoryContainer * libMRML/cc/CAccessorCollection.cc(constructor): Give mFactory as parameter to new new CAccessorProxy * libMRML/include/CAccessorCollection.h: mFactory becomes new member * libMRML/cc/CDynamicBaseTypeFactory.cc: Two query engines are not plugins CQPerl and CQMultiple. CQMultiple will be used too often, and CQPerl would be only doable if we could count on libPerl being present on the system. Now I consider CQuery plugins working. Tomorrow we do the same with CAccessors. * libMRML/cc/CBaseTypeFactory.cc (makeQuery): ifdef-ed out this function if LINK_DYNAMICALLY * libMRML/cc/CSessionManager.cc(makeQuery): call works without algorithm collection now * libMRML/cc/CAlgorithmCollection.cc: * libMRML/include/CAlgorithmCollection.h: mFactory removed. becomes inFactory in makeQuery, which means that makeQuery has become quite obsolete * libMRML/cc/CAlgorithmCollection.cc (constructor): Takes now a CBaseTypeFactory as parameter * libMRML/include/CDynamicBaseTypeFactory.h: Is now inherited from CBaseTypeFactory * libMRML/include/CBaseTypeFactory.h: making makeQuery virtual * libMRML/include/CSessionManager.h (class CSessionManager): Added mBaseTypeFactory * libMRML/cc/CSessionManager.cc(setActiveAlgorithm): added inBaseTypeFactory to the call, handed through to buildQueryTree * libMRML/include/CQueryTreeBuilder.h: * libMRML/cc/CQueryTreeBuilder.cc: Added an inBaseTypeFactory parameter to the configure call. and to the buildQueryTree function. * libMRML/include/CQueryTreeNode.h: Things are getting hot. I removed mFactory from CQueryTreeNode. This design is not compatible to the idea of having external plugins. Added an inBaseTypeFactory parameter to the configure function. * libMRML/include/CAlgorithmCollection.h: * libMRML/include/CAlgorithmCollection.cc: Changed things that dependent on the -DLINK_DYNAMICALLY flag, either the classic CBaseTypeFactory or the new CDynamicBaseTypeFactory is used * libMRML/cc/Makefile.am: Added the aforementioned files * libMRML/cc/CQueryPlugin.cc: * libMRML/include/CQueryPlugin.h: * libMRML/include/CDynamicBaseTypeFactory.h: * libMRML/cc/CDynamicBaseTypeFactory.cc: New files: The dynamic pendant to CBaseTypeFactory. It scans a directory for suitable .so-s and then calls their plug_in_fo functions. This gets stored in CQueryPlugin objects. * libGIFTQuHierarchy/cc/plug_in_fo.cc: * libGIFTQuInvertedFile/cc/plug_in_fo.cc: * libGIFTQuPerl/cc/plug_in_fo.cc: New files. This file contains functions to be used as plugin information. 2000-11-16 Wolfgang Müller * GIFTServer/CCommunicationHandler.cc: moved the "ID administration subsystem" TID gID; to libMRML/cc/CSessionManager.cc 2000-11-15 Wolfgang Müller * GIFTServer/Server.cc: Cleaned include list and added CAcURL2FTS accessor * GIFTServer/CCommunicationHandler.h: Cleaned the include list * GIFTServer/CCommunicationHandler.cc: Cleaned the include list * libGIFTAcInvertedFile/include/CAcIFMySQL.h: added include of CAcURL2FTS * libMRML/include/CAccessor.h: * libGIFTAcInvertedFile/include/CAcInvertedFile.h: Slimmed list of includes * GIFTServer/Makefile.am: (gift_LDADD): removed @PERL_LD_ADD@ from this target and put it into libInvertedFile_la_LIBADD * libInvertedFile/cc/Makefile.am (libInvertedFile_la_LIBADD): created this target. * GIFTServer/CSelfDestroyPointer.h (CSelfClonePointer): Added to CSelfClonePointer * CAccessor.h: * CAccessorCollection.h: * CAccessorElement.h: * CAccessorFactory.h: * CAccessorFactoryContainer.h: * CAccessorProxy.h: * CAlgorithm.h: * CAlgorithmCollection.h: * CAttributeList.h: * CBaseTypeFactory.h: * CIDRelevanceLevelPair.h: * CIDRelevanceLevelPairList.h: * CMagic.h: * CPropertySheetList.h: * CRelevanceLevel.h: * CRelevanceLevelList.h: * CSessionManager.h: * CXEVCommunication.h: * CXEVTripletList.h: * CXMLElement.h: * CXMLElementVisitor.h: * CXMLHelper.h: * GIFTExceptions.h: * mrml_const.c: moved these files from libInvertedFile/include to libMRML/include * CAccessor.cc: * CAccessorCollection.cc: * CAccessorElement.cc: * CAccessorFactory.cc: * CAccessorFactoryContainer.cc: * CAccessorProxy.cc: * CAlgorithm.cc: * CAlgorithmCollection.cc: * CAttributeList.cc: * CBaseTypeFactory.cc: * CIDRelevanceLevelPair.cc: * CIDRelevanceLevelPairList.cc: * CMagic.cc: * CPropertySheetList.cc: * CRelevanceLevel.cc: * CRelevanceLevelList.cc: * CSessionManager.cc: * CXEVCommunication.cc: * CXEVTripletList.cc: * CXMLElement.cc: * CXMLElementVisitor.cc: * CXMLHelper.cc: * GIFTExceptions.cc: * mrml_const.c: moved these files from libInvertedFile/cc to libMRML/cc * libMRML/Makefile.am: created * configure.in: added entry for libMRML. This library will contain all the MRML-specific parts of the GIFT, i.e. the framework. I will subsequently break down libInvertedFile into smallerlibs which will eventualley end up as plugins. * GIFTServer/Server.cc: * GIFTServer/CCommunicationHandler.cc: moved sendMessage and readMessage from Server.cc to CCommunicationHandler.cc in order to solve linking problems when using dynamic libraries * scripts/emacs-lisp/gift-compile-current.el (gift-GIFTServerMake): Changed this function to do what the name sais [quite a change, actually]. It now does the same as Utomake, but without configuring first. * GIFTServer/Makefile.am: adding -L$(libdir) to a number of targets. * configure.in: restructured the file to use libtool, inspired by the libtool demo 2000-11-12 * scripts/perl/CGLDistanceMatrix.pre-pm: created * scripts/perl/CXTVWriter.pre-pm: moved 'use lib' statement out of CXTVWriter 2000-11-11 * libInvertedFile/include/CAcDistanceMatrix.h: * GIFTServer/obsolete.cc: removed this file 2000-11-09 * GIFTServer/gift-config/gift-config.pre-mrml(m/$lTheLine/): Changed query-paradigm tag. now clear that the types inverted-file and perl-demo can be used * scripts/perl/gift-add-collection.pre-pl (wanted): deleted this line from collection tag cui-perl-script-file="__BINDIR__/CGIFTLinkDemo.pl" it is rather part of the algorithm tag * GIFTServer/gift-config/gift-config.pre-mrml: Setting pruning to 70% of the features as default, except for histogram features * libInvertedFile/include/CAcURL2FTS.h: Adding friend entry for CAcIFFileSystem. * libInvertedFile/cc/CAcIFFileSystem.pre-cc (checkConsistency): Function did not compile (was defined out) * libInvertedFile/cc/CAcIFFileSystem.pre-cc (FeatureToList): * libInvertedFile/cc/CAcIFFileSystem.pre-cc (getFeatureFile): Removing old emulation of read binary for lists * libInvertedFile/cc/CDocumentFrequencyList.cc: Cleaning up: making readBinary read also into a list * libInvertedFile/cc/CQInvertedFile.cc(buildQueryHash): Cleaning error-prone redundancies. 2000-11-04 * expat/Makefile (check): Adding a message into the expat makefile, along with the check target. Presently we do not run any checking, but at least the target should run through. 2000-10-30 Wolfgang Müller * CAcInvertedFile.cc: * CAcInvertedFile.pre-cc: Files obsolete: deleted * GIFTServer/gift-config/gift-config.pre-mrml: cui-perl-package attribute added * GIFTServer/gift-config/Makefile.am (data_DATA): Removed InvertedFileFeatureDescription.db * GIFTServer/gift-config/gift-config.pre-mrml: Changed line for cui-perl-script-file to reflect new perl embedding architecture and the location of gift-add-collection.pre-pl * scripts/perl/gift-add-collection.pre-pl: Added part which automatically adds gift-embed-perl-modules.pl * IFFDBase.db: * InvertedFileFeatureDescription.db: Deleted. They are now automatically generated during installation. 2000-10-29 Wolfgang Müller * Doc/Makefile.am (system-doc): Removed "../libBayesian/include/*.h" from kdoc call. We cannot ship libBayesian, because we have to clear that yet (possible patents of others). * libInvertedFile/cc/CQPerl.cc (CQPerl): Changing completely the way CQPerl works. Reason for this are inherent memory leaks in the current version. * libInvertedFile/cc/CDocumentFrequencyList.cc: Cured small bugs end(), end()const, setEnd() * libInvertedFile/cc/CAcPerl.cc: Adding destructor 2000-10-25 Wolfgang Müller * libInvertedFile/include/CSelfDestroyPointer.h: Bracketed out some debugging output: ifdef _DEBUG_SELF_DESTROY_ * scripts/perl/CXTVWriter.pre-pm (initialize): Setting data mode in XML::Writer 2000-10-23 Wolfgang Müller * libInvertedFile/cc/CAcInvertedFile.cc: The whole file was already commented out. These comments are now deleted inorder to de-obfuscate the line count * libInvertedFile/include/CXMLElement.h: Made destructor of CXMLElement virtual * libInvertedFile/include/CQuery.h: Made destructor of CQuery virtual. * libInvertedFile/include/CAccessor.h: Made destructor of CQuery virtual. * libInvertedFile/cc/CSessionManager.cc: added deleteSession function. (setActiveAlgorithm): have to delete old mQueryTree before constructing new one. * libInvertedFile/cc/CXEVCommunication.cc: activated delete-session signal. * libInvertedFile/cc/CAcIFFileSystem.pre-cc (FeatureToList): Noticed that I have not used the readBinary function from the CDocumentFrequencyList class. I am using it now. * libInvertedFile/cc/CQInvertedFile.cc(buildQueryHash): * libInvertedFile/cc/CInvertedFileChunk.cc (writeBinary): Replacement code for vector::push_back * libInvertedFile/include/CDocumentFrequencyList.h: * libInvertedFile/cc/CDocumentFrequencyList.cc: Adding functions to mimick STL, as well as function setEnd. 2000-10-22 Wolfgang Müller * libInvertedFile/cc/CAcIFFileSystem.pre-cc: Changed ifdef CDocumentFrequencyListIsVector to ifndef CDocumentFrequencyListIsList * libInvertedFile/include/CDocumentFrequencyList.h: * libInvertedFile/cc/CDocumentFrequencyList.cc: Added a destructor + debugging code which counts up/down if the CDocumentFrequencyLists are properly allocated/deallocated Replaced the use of vectors by the use of arrays * libInvertedFile/include/CWeightingFunctionPointerHash.h: added function clear. * libInvertedFile/include/CXMLElement.h: * libInvertedFile/cc/CXMLElement.cc: Added destructor ~CXMLElement * libInvertedFile/include/CSessionManager.h: * libInvertedFile/cc/CSessionManager.cc: Added destructor for CSession (CSessionManager::closeSession): deleting the session when closing for avoiding memory leaks. * libInvertedFile/include/CQueryTreeBuilder.h: Changed type of CQueryContainer. Was before map > This would lead to double destruction. * libInvertedFile/cc/CQueryTreeNode.cc: * libInvertedFile/include/CQueryTreeNode.h: mContent changed type to CSelfDestroyPointer, i.e. it will be automatically destroyed on the destruction of the query tree. Had to put in some static_cast in the cout ... lines. 2000-10-13 Wolfgang Müller * configure.in: instead of changing LD_FLAGS the check for perl now creates a new autoconf variable PERL_LD_ADD. (GIFTServer/Makefile.am): PERL_LD_ADD is used for linking gift. The standard method (LD_FLAGS) does not work for reasons of sequence dependencies. 2000-10-12 Wolfgang Müller * configure.in: bugfix -D__GIFT_WITH_MYSQL__ to -D__GIFT_WITH_PERL__ in perl expression 2000-10-10 Wolfgang Müller * scripts/perl/gift-add-collection.pre-pl: help does not get called before anything happens. BAD. Changed this my moving a call to mkdir. (wanted): Added making a path to the thumbnail if necessary. 2000-10-09 Wolfgang Müller * libInvertedFile/cc/xs_init.cc: ifdef __GIFT_WITH_PERL__ comments out Perl-specific-parts, if needed. RELEASE 0.1.4 here 2000-10-08 Wolfgang Müller * scripts/perl/gift-add-collection.pre-pl (wanted): changed regexp which checks for image file name extensions to case insensitive * Doc/gift-guide.sgml (Caveat): This file was changed to make it more readable and to reflect some new features. 2000-10-06 Wolfgang Müller * libInvertedFile/cc/Makefile.am: * scripts/perl/gift-add-collection.pre-pl: adding option --gift-home to specify a location for the configuration directory other than home, if the environment variable $GIFT_HOME is not set. * libInvertedFile/cc/CMatrix.cc: * libInvertedFile/include/CMatrix.h: * libInvertedFile/cc/CWeightedFeature.cc: * libInvertedFile/include/CWeightedFeature.h: * libInvertedFile/cc/CMatrixWithEigenVectors.cc: * libInvertedFile/include/CMatrixWithEigenVectors.h: * libInvertedFile/cc/Makefile.am (libInvertedFile_a_SOURCES): removed CMatrix.cc CMatrixWithEigenVectors.cc CWeightedFeature.cc as they are currently unused (old idea). * scripts/perl/gift-socket-workaround.pre-pl: * scripts/perl/Makefile.am: Removed gift-socket-workaround.pre-pl and related targets * libInvertedFile/cc/CAccessorProxy.cc: * libInvertedFile/include/CAccessorProxy.h: * libInvertedFile/include/CAFPerl.h: * libInvertedFile/cc/CAFPerl.h: * libInvertedFile/cc/CBaseTypeFactory.cc (makeQuery): * libInvertedFile/include/CAcPerl.h: * libInvertedFile/cc/CAcPerl.h: * libInvertedFile/include/CQPerl.h: * libInvertedFile/cc/CQPerl.cc: ifdef __GIFT_WITH_PERL__ comments out Perl-specific-parts, if needed. * libInvertedFile/cc/Makefile.am (INCLUDES): removed @PERL_CC_ADDITIONS@ * GIFTServer/Makefile.am (gift_LDFLAGS): removed (gift_LDADD): removed @PERL_LD_ADDITIONS@ * libInvertedFile/cc/Makefile.am (INCLUDES): removed @MY_SQL_PLUS@ @MY_SQL@ * configure.in: got rid of ugly perl code stuff. Implemented real test if -lsqlplus is there and working same for includes * scripts/emacs-lisp/gift-compile-current.el (gift-utomake): Changed this to delete ./config.cache before deletion. * perl-compile-test-program.cc: File was added. This file is compiled when running ./configure in order to test if perl is well installed. It should compile with a decently installed Perl 5. 2000-10-05 Wolfgang Müller * libInvertedFile/include/CAcIFMySQL.h: ...(class string) not accepted by gcc any more. * GIFTServer/Server.cc (main): gGIFTHome is now the variable which contains the current home directory of the gift. 2000-10-02 Wolfgang Müller * libInvertedFile/include/CDNFullyWeighted.h: * libInvertedFile/include/CDocumentNormalizer.h: these obsolete files were deleted * libInvertedFile/include/CAcIFFileSystem.h: * libInvertedFile/include/CAcInvertedFile.h: * libInvertedFile/include/CAccessorImplementation.h: deleted: #include "CCollectionFrequencyList.h" * libInvertedFile/cc/Makefile.am (libInvertedFile_a_SOURCES): removed CCollectionFrequencyElement.cc * libInvertedFile/cc/CCollectionFrequencyElement.cc: removed * libInvertedFile/include/CCollectionFrequencyElement.h: removed * libInvertedFile/include/CCollectionFrequencyList.h: removed * libInvertedFile/cc/CAlgorithmIDList.cc: * libInvertedFile/cc/CAlgorithmIDListList.cc: * libInvertedFile/include/CAlgorithmIDList.h: * libInvertedFile/include/CAlgorithmIDListList.h: * libInvertedFile/cc/CSessionManager.cc (startConfigElement): removed references to algorithm-id-list-list (toXML): removed "lReturnValue += CAlgorithmIDListList::toXML();" (convertPropertyToXML): commented out this function * libInvertedFile/include/CSessionManager.h: removed #include "CAlgorithmIDListList.h" * libInvertedFile/cc/Makefile.am (libInvertedFile_a_SOURCES): Removed AlgorithmIDList AlgorithmIDListList * libInvertedFile/cc/CAttributeList.cc: ifdef'ed out a couple of debugging printouts. 2000-09-29 Wolfgang Müller * Doc/Makefile.am (gift-guide.txt): Added this target. It makes gift-guide.txt which is then copied to README by hand. 2000-09-27 Wolfgang Müller * scripts/perl/CXMLTreeBuilder.pre-pm (addChildToTree): Changed debugging output 2000-09-26 Wolfgang Müller * scripts/perl/gift-add-collection.pre-pl (wanted): On finding a pre-exsisting feature file, gift checks, if this file is newer than the script. If so, the script will not generate a new feature file. This greatly simplifies re-indexing databases after adding images. 2000-09-25 Wolfgang Müller * scripts/perl/gift-url-to-fts.pre-pl (convertURLToFeatureFile): * libInvertedFile/cc/CAcIFFileSystem.pre-cc (URLToFeatureList): Removed feature file naming bug in the case of an previously unknown image * libInvertedFile/cc/CQInvertedFile.cc: If mModulo!=0, only features with featureID % mModulo == mModuloClass are taken into account. * scripts/perl/CFeedbackClient.pre-pm (getAlgorithmID): * scripts/perl/CFeedbackClient.pre-pm (getCollectionID): Changed these functions in a way that they return identity if they are fed with an ID -instead of a number- by mistake. * libInvertedFile/include/CQInvertedFile.h: * libInvertedFile/cc/CQInvertedFile.cc(CQInvertedFile::init): Reading the attributes mrml::cui_pr_modulo mrml::cui_pr_moculo_class into the variable mModulo and mModuloClass. * libInvertedFile/include/mrml_const.h: * libInvertedFile/cc/mrml_const.cc: Newly generated these files from changed DTD using gift-dtd-to-keywords.pl * dtd/mrml.dtd: added the attributes cui-pr-modulo and cui-pr-modulo-class to algorithm 2000-09-22 MUELLER Wolfgang * GIFTServer/gift-mrml-messages/gift-iconfigure.mrml: * scripts/perl/CFeedbackClient.pre-pm (configureSession): Added a further optional parameter $lAdditionalAlgorithmAttributes. This is a string which will be placed at the position of an attribute within the MRML signal for configuration that will be sent to the server. 2000-09-21 MUELLER Wolfgang * GIFTServer/gift-config/gift-config.pre-mrml: Changed faulty reference to CVLDAudreyTam.pl to CViperLinkDemo.pl * scripts/perl/gift-mrml-client.pre-pl: Using Getopt::Long for better configuring this script. * ALLFILES: Viper has changed its name to GIFT. According to this all occurences of "viper" have been changed to "gift". Derived names have changed vrom CVL.... to CGL etc. The files have also been MOVED accordingly. Sorry for this, but this gives us consistency. 2000-09-19 MUELLER Wolfgang * configure.in: adding --enable-set-web-publishing-directory --enable-set-web-publishing-location for improving v-add-collection.pl * Doc/viper-guide.sgml (Caveat): Added item containing description how to "configure" SnakeCharmer after unpacking. 2000-08-18 MUELLER Wolfgang * Doc/viper-guide.sgml (Always): Added changes to reflect changes in v-add-collection.pl . Also adding remarks about JAVA2 vs. JAVA1.1. 2000-08-17 Wolfgang MÜLLER * libInvertedFile/cc/CAlgorithmCollection.cc: Added function containsAlgorithmByType 2000-08-16 Wolfgang MÜLLER * libInvertedFile/cc/CAlgorithm.cc: Do attribute inheritance for CAlgorithms only (not for other XML elements) like e.g. * libInvertedFile/cc/CAccessorProxy.cc: added perl accessor entry * scripts/perl/v-add-collection.pre-pl: Putting thumbnails into a _thumbnail directory. if you are indexing ~/aaa, the thumbnails will be put into ~/aaa_thumbnails by default. * libInvertedFile/cc/CAlgorithmCollection.cc(CAlgorithmCollection::getAlgorithmByType): New, more sensible strategy of returning default algorithm. 2000-08-15 Wolfgang MÜLLER * scripts/perl/v-add-collection.pre-pl: In order to avoid bugs, this v-add-collection.pre-pl creates for each collection created its InvertedFileFeatureInformation.db on the fly. More than that, it will now recognize if an image directory is in the public_html, and will set the options accordingly. One does not need to do anything to put things on the web. * ViperServer/viper-config/viper-config.pre-mrml: Changed this file for providing a reasonable configuration for novice users 2000-07-27 MUELLER Wolfgang * libInvertedFile/include/CAFIFMySQL.h: * libInvertedFile/cc/CAFIFMySQL.cc: Added file. * libInvertedFile/include/CDocumentFrequencyList.h: Added default constructor 2000-07-17 Wolfgang MÜLLER * libInvertedFile/include/CAcIFFileSystem.h: * libInvertedFile/cc/CAcIFFileSystem.cc: This class does what CAcInvertedFile did before. In order to avoid double inheritance, I had to make the CAcURL2FTS class a member [instead of the inheritance that was used before]. * libInvertedFile/include/CAcInvertedFile.h: * libInvertedFile/cc/CAcInvertedFile.cc: CAcInvertedFile has become purely abstract. * libInvertedFile/include/CAccessor.h: * libInvertedFile/cc/CAccessor.cc: * libInvertedFile/include/CAccessorImplementation.h: * libInvertedFile/cc/CAccessorImplementation.cc: CAccessor has become a pure abstract class. CAccessorImplementation contains now the implementation of CAccessor. This is preparing the structure for accessors which access SQL databases. 2000-07-14 Wolfgang MÜLLER * libInvertedFile/cc/CAcURL2FTS.cc: * libInvertedFile/include/CAcURL2FTS.h: Adding accessors to the filenames in CAcURL2FTS * scripts/emacs-lisp/v-compile-current.el (v-switch-to-associated-c++): this function is now aware of the fact that there exsist files which have the extension .pre-cc and which will be turned into .cc by a sed script. This allows some preconfigurations. (v-switch-to-associated-h): the same. (v-associated): the same. (v-compile-current): dito 2000-07-05 Wolfgang MÜLLER * configure.in: "released" as 0.1.1 2000-07-03 MUELLER Wolfgang * Doc/Makefile.am (CLEANFILES): added viper-guide.info * Doc/Makefile.am (all): added target system-doc and viper-guide.info, in a way that the Makefile will try to make them, however, building will be continued even if the Doc cannot be made. 2000-07-03 Wolfgang MÜLLER * Doc/viper-guide.sgml : removing remarks about known bugs which have been fixed in the meanwhile. 2000-06-26 MUELLER Wolfgang * libInvertedFile/cc/CQPerl.cc (CQPerl): Adding the use of CAcPerl * libInvertedFile/include/CAcPerl.h: * libInvertedFile/cc/CAcPerl.cc: * libInvertedFile/include/CAFPerl.h: * libInvertedFile/cc/CAFPerl.cc: New files for configuring perl accessors for a collection * ViperServer/generateInvertedFile.cc (main): * libInvertedFile/cc/CAFInvertedFile.cc: Changing new CAcInvertedFile to new CAcIFFileSystem. * libInvertedFile/include/CAcIFFileSystem.h: * libInvertedFile/cc/CAcIFFileSystem.cc: * libInvertedFile/include/CAcInvertedFile.h: Moving files: CAcInvertedFile now contains some abstraction of CAcIFFileSystem and CAcIFMySQl. The old CAcInvertedFile is now CAcIFFileSystem * libInvertedFile/include/CAcIFMySQL.h: * libInvertedFile/cc/CAcIFMySQL.cc: Created. Will contain Cornelia's code? removing getRandomRLLs, because unused. * libInvertedFile/include/CAcInvertedFile.h: * libInvertedFile/include/CAccessor.h: adding comments removing getRandomRLLs, because unused 2000-06-23 MUELLER Wolfgang * ViperServer/Makefile.am: Adding @PERL_LD_ADDITIONS@ * libInvertedFile/cc/Makefile.am: Adding @PERL_CC_ADDITIONS@ * configure.in (PERL_LD_ADDITIONS): * configure.in (PERL_CC_ADDITIONS): New variables and substitutions which contain the additional cc and ld flags needed when lining Perl with Viper * ViperServer/Server.cc (main): void cast became char cast. uint became int. 2000-06-21 Wolfgang MÜLLER * libInvertedFile/include/CAlgorithmIDList.h: * libInvertedFile/cc/CAlgorithmIDList.cc: setID(const string&); * libInvertedFile/include/CSessionManager.h: * libInvertedFile/cc/CSessionManager.cc(CSessionManager::toXMLHandshake): is not anymore const. 2000-06-20 Wolfgang MÜLLER * configure.in: * Makefile.am (SUBDIRS): Changing for separating the libBayesian files from the distribution. These files presently are unused, but we have to check the patent situation before making them GNU. In fact I do not see too many problems, as the inspiration drawn from the patented PicHunter system is quite remote, our system that uses libBayesian is slow and rather for research purposes. However, I would like to contact NEC first before proceeding * libBayesian/cc/CDistanceCalculator.cc: changing calls to do_for_equal_first by adding lInserter. The in-line version does not compile any more with the new gcc. 2000-06-19 Wolfgang MÜLLER * scripts/perl/v-add-collection.pre-pl (wanted): Viper does not cope well with the fact that kaffe removes "//" out of URLs. So when adding collections, we have to do the same. * libInvertedFile/cc/CAccessorCollection.cc: * libInvertedFile/cc/CAlgorithmCollection.cc: Proper error message when configuration file not found. 2000-06-14 Wolfgang MÜLLER * scripts/perl/CFeedbackClient.pre-pm (handleStart): changing m[] to m:: in order to deconfuse the perl mode of XEmacs. Adding more comments. * dtd/mrml.dtd: added allows-children tag, as well as some further comments * scripts/perl/v-dtd-to-tex.pre-pl: Added a description of the --fragment option 2000-05-25 MUELLER Wolfgang * libInvertedFile/cc/CAlgorithm.cc: the HACK marked part did not cope with text nodes in the configuration before. 2000-05-23 MUELLER Wolfgang * libInvertedFile/include/CXMLElement.h: * libInvertedFile/cc/CXMLElement.cc: getText Function. 2000-05-19 MUELLER Wolfgang * ViperServer/viper-config/Makefile.am (MRMLCONFIG): Inserted __BINDIR__ and __PERL_LOCATION__ * ViperServer/viper-config/viper-config.pre-mrml: Added "a-perl" algorithm, removed legacy code the (property-item-list) and algorithm-list-list. 2000-05-18 MUELLER Wolfgang * libInvertedFile/cc/Makefile.am: Added a echo|sed to the INCLUDE part. The goal of this is to remove the define -Dbool=char from the perl configuration data. * libInvertedFile/include/CXMLElement.h: * libInvertedFile/cc/CXMLElement.cc: Added a type of nodes. Necessary for text/CDATA nodes. 2000-05-17 MUELLER Wolfgang * scripts/perl/CTripleTransfer.pre-pl: * scripts/perl/CVLDAudreyMTam.pre-pl: * scripts/perl/CVLStructuredAnnotation.pre-pm: * scripts/perl/CViperLink.pre-pm: * scripts/perl/CViperLinkDemo.pre-pl: * scripts/perl/CXMLTreeBuilder.pre-pm: * scripts/perl/CXMLTreeVisitor.pre-pm: * scripts/perl/CXTVTripletList.pre-pm: * scripts/perl/CXTVTripletList.pre-pm: * scripts/perl/Makefile.am: Added these files, changed Makefile.am accordingly (bin_SCRIPTS): 2000-04-20 MUELLER Wolfgang * ViperServer/Server.cc: * ViperServer/CCommunicationHandler.cc: fixing even more the problem when VIPER_HOME is unset. Test works now. 2000-04-19 MUELLER Wolfgang * scripts/perl/CFeedbackClient.pre-pm: * scripts/perl/CFCMovingTarget.pre-pm: I spent a "nice afternoon" (between 20:00 and 01:40) changing some undocumented stuff, i.e. all the files which have to do with benchmarking and MRML negotiation in Perl, fixing some small annoying mistakes. * scripts/perl/CQueryPradigmMatcher.pre-pm: added a $self where it was missing. 2000-04-18 MUELLER Wolfgang * scripts/perl/CFeedbackClient.pre-pm (getCollection(): Quite radical changes in about all the program for bringing MRML negotiation on the state of the JAVA/C++ packages. 2000-04-17 MUELLER Wolfgang * ViperServer/CCommunicationHandler.cc(readAndParse): Fixed annoying bug which lets viper crash if the environment variable VIPER_HOME is unset. * ViperServer/viper-config/Makefile.am (clean): Have to delete viper-config.mrml when cleaning. * scripts/perl/CQueryPradigmMatcher.pre-pm: A perl module for matching query-paradigm and query-paradigm-list * scripts/perl/Makefile.am (EXTRA_SCRIPTS): Adding CQueryParadigmMatcher.pre-pm 2000-04-13 MUELLER Wolfgang * ViperServer/viper-config/viper-config.pre-mrml: Added query-paradigm tag into algorithm, as well as an empty property sheet. * scripts/perl/v-add-collection.pre-pl: Added query-paradigm tag to the "collection" elements in print statement. 2000-04-10 MUELLER Wolfgang * ViperServer/Server.cc(sendMessage): Put last sent message into a separate file * ViperServer/CCommunicationHandler.cc(readAndParse): Put last recieved message into a separate file 2000-04-04 MUELLER Wolfgang * libInvertedFile/include/CAttributeList.h(operator[]): * libInvertedFile/cc/CAttributeList.cc(operator[]): got rid of embarassing workaround which seemed to be unnecessary AND causing bugs. * libInvertedFile/cc/CSessionManager.cc(CSessionManager::query): fixed a bug which made the system crash if the session which is supposed to be containing the query is unknown. Now the system exits with an error message instead. * ViperServer/Server.cc(startMRMLElement): * ViperServer/Server.cc(endMRMLElement): Commented out this "legacy code". * ViperServer/CCommunicationHandler.h(CSortBySessionID_SH): * ViperServer/CCommunicationHandler.cc(CSortBySessionID_SH): never used=>removed * libInvertedFile/include/CXEVCommunication.h(startVisit): * libInvertedFile/cc/CXEVCommunication.cc(startVisit): * libInvertedFile/include/CXMLElementVisitor.h(startVisit): * libInvertedFile/cc/CXMLElementVisitor.cc(startVisit): * libInvertedFile/include/CXEVCommunication.h(endVisit): * libInvertedFile/cc/CXEVCommunication.cc(endVisit): * libInvertedFile/include/CXMLElementVisitor.h(endVisit): * libInvertedFile/cc/CXMLElementVisitor.cc(endVisit): Changing from preorder visits to a visit both ways, i.e. visitor is called once before visiting the children, once afterwards * ViperServer/CCommunicationHandler.h(processQuery): * ViperServer/CCommunicationHandler.cc(processQuery): * ViperServer/CCommunicationHandler.h(endConfiguration): * ViperServer/CCommunicationHandler.cc(endConfiguration): * ViperServer/CCommunicationHandler.h(setCurrentSession): * ViperServer/CCommunicationHandler.cc(setCurrentSession): Cleaning up. Deleted all functions which are not used any more because of the new visitor aproach. Also trying to move things into the threadsafe direction 2000-03-28 MUELLER Wolfgang * scripts/emacs-lisp/v-compile-current.el (v-compile-current): added JAVA support to this function which before worked only for .cc and .h files 2000-03-27 MUELLER Wolfgang * libInvertedFile/cc/Makefile.am (libInvertedFile_a_SOURCES): adding CXMLElementVisitor and CXEVCommunication * libInvertedFile/include/CXEVCommunication.h: * libInvertedFile/cc/CXEVCommunication.cc: * libInvertedFile/include/CXMLElementVisitor.h: * libInvertedFile/cc/CXMLElementVisitor.cc: A visitor which is supposed to visit the subtree of an CXMLElement * ViperServer/Server.cc * ViperServer/CCommunicationHandler.h: * ViperServer/CCommunicationHandler.cc: Moving things towards DOM parsing with subsequent traversal. This is a bit slower, but easier to change afterwards. * ViperServer/CCommunicationHandler.h(stringOfRelevanceLevelList): * ViperServer/CCommunicationHandler.cc(stringOfRelevanceLevelList): Removed this obsolete function. * libInvertedFile/include/CXMLElement.h(getNumberOfAttributes): * libInvertedFile/cc/CXMLElement.cc(getNumberOfAttributes): adding a function to get the number of attributes in an CXMLElement. * libInvertedFile/include/CPropertySheetMatcher.h: * libInvertedFile/cc/CPropertySheetMatcher.cc: * libInvertedFile/cc/Makefile.am: A new class for matchin property sheets. This becomes important for getAlgorithm, getCollection. * ViperServer/CCommunicationHandler.cc(getAlgorithms): * ViperServer/CCommunicationHandler.h(getAlgorithms): added * ViperServer/Server.cc(startMRMLElement): adding getAlgorithms and getCollections. * ViperServer/CCommunicationHandler.cc(getCollections): * libInvertedFile/include/CSessionManager.h(getCollections): * libInvertedFile/cc/CSessionManager.cc(getCollections): New function. Probably only temporarily in CSessionManager, but here to stay in the CCommunicationHandler. * libInvertedFile/include/CAlgorithmCollection.h(CAlgorithmCollection): * libInvertedFile/cc/CAlgorithmCollection.cc(CAlgorithmCollection): Constructor now takes an argument, the config file. * libInvertedFile/include/CAlgorithmCollection.cc(startAlgorithmCollectionElement): * libInvertedFile/include/CAlgorithmCollection.cc(endAlgorithmCollectionElement): Making CAlgorithmCollection read the configuration file as a part of operation to disentangle CAlgorithmCollection and CSessionManager * libInvertedFile/include/CSessionManager.h: Adding some critic comments to CSessionManager. * libInvertedFile/cc/CAccessorProxy.cc(toXMLElement): * libInvertedFile/include/CAccessorProxy.h(toXMLElement): * libInvertedFile/include/CAccessorCollection.h(toXMLElement): * libInvertedFile/cc/CAccessorCollection.cc(toXMLElement): * libInvertedFile/cc/CAlgorithmCollection.cc(toXMLElement): * libInvertedFile/include/CAlgorithmCollection.h(toXMLElement): Added the function toXMLElement which turns the content of the respective structures into an CXMLElement which can be used for answering mrml_const::get_collections and mrml_const::get_algorithms requests 2000-03-24 MUELLER Wolfgang * scripts/perl/v-dtd-to-tex.pre-pl: complete rewrite of this perl program, in order to make output better, and in order to suppress our proprietary extensions from the tex output if needed. As a downside, this perl program now needs XML::Parser, which is not so surprising after all. 2000-03-23 MUELLER Wolfgang * ViperServer/CCommunicationHandler.h(openSession): * ViperServer/CCommunicationHandler.h(renameSession): * ViperServer/CCommunicationHandler.h(deleteSession): * ViperServer/CCommunicationHandler.h(getSessionsForUser): * ViperServer/CCommunicationHandler.cc(openSession): * ViperServer/CCommunicationHandler.cc(renameSession): * ViperServer/CCommunicationHandler.cc(deleteSession): * ViperServer/CCommunicationHandler.cc(getSessionsForUser): Changed return value of these functions to CXMLElement* * ViperServer/CCommunicationHandler.h(getSessions): * ViperServer/CCommunicationHandler.cc(getSessions): * ViperServer/Server.cc: adding functions to implement mrml:get-sessions. 2000-03-22 MUELLER Wolfgang * ViperServer/CCommunicationHandler.h(newSession): * ViperServer/CCommunicationHandler.cc(newSession): deleted. * dtd/mrml.dtd(open-session): Added "password" attribute. * ViperServer/CCommunicationHandler.h(openSession): * ViperServer/CCommunicationHandler.h(renameSession): * ViperServer/CCommunicationHandler.h(deleteSession): * ViperServer/CCommunicationHandler.h(getSessionsForUser): * ViperServer/CCommunicationHandler.cc(openSession): * ViperServer/CCommunicationHandler.cc(renameSession): * ViperServer/CCommunicationHandler.cc(deleteSession): * ViperServer/CCommunicationHandler.cc(getSessionsForUser): Adding new functions for new MRML handshake. 2000-03-21 MUELLER Wolfgang * version 0.1 as sent to the FSF. * configure.in: * Makefile.am (SUBDIRS): Added a new directory for scientific work which has not yet been published and thus is not yet released. 2000-03-13 Wolfgang MÜLLER * libInvertedFile/cc/CAcInvertedFile.cc(newGenerateInvertedFile): Delete viper-auxiliary-? files created by the mergesort performed. The files stay intact if newGenerateInvertedFile aborts with an error for facilitating debugging. * libInvertedFile/include/mrml_const.h: * libInvertedFile/cc/mrml_const.cc: Making all string constants named constants in the c++ sense. By this we can check if a string constant is defined or not, typos are detected at compile time. 2000-03-05 Wolfgang MÜLLER * libInvertedFile/include/CAcDistanceMatrix.h: * libInvertedFile/include/CAcInvertedFile.h: * libInvertedFile/include/CAcURL2FTS.h: * libInvertedFile/cc/CAcDistanceMatrix.cc: * libInvertedFile/cc/CAcInvertedFile.cc: * libInvertedFile/cc/CAcURL2FTS.cc: Have to change the constructors for the new CAccessor factory design 2000-03-01 Wolfgang MÜLLER * libInvertedFile/include/CAccessorFactoryContainer.h: * libInvertedFile/include/CAccessorFactoryContainer.cc: * libInvertedFile/include/CAccessorFactory.h: * libInvertedFile/include/CAccessorFactory.cc: * libInvertedFile/include/COpenCloseTracker.h: * libInvertedFile/cc/COpenCloseTracker.cc: * libInvertedFile/include/CAccessorProxy.h: * libInvertedFile/cc/CAccessorProxy.cc: * libInvertedFile/cc/CAccessorCollection.cc: Changing the CAccessor factory design. Makes adding accessors as easy as adding CQueries. 2000-02-18 Wolfgang MÜLLER * scripts/perl/CFeedbackClient.pre-pm: * scripts/perl/v-mrml-client.pre-pl: renamed file from v-mrml-client.pre-pm to CFeedbackClient.pre-pm created new v-mrml-client.pre-pm which uses CFeedbackClient v-mrml-client contains now a very simple client which does a one-shot query 2000-02-17 Wolfgang MÜLLER * libInvertedFile/cc/CQInvertedFile.cc(buildQueryHash): The deleting of feature lists that are not wanted does is not compatible with STL vectors. Unfortunately we changed the type to vector, so we have to do something we chose to use the #define from CDocumentFrequencyList * ViperServer/Server.cc(startMRMLElement): * ViperServer/Server.cc(endMRMLElement): query-step: building an XML subtree instead of a CRelevanceLevelList. Changing tag names to new MRML * ViperServer/CCommunicationHandler.h(startTreeBuilding): * ViperServer/CCommunicationHandler.h(addToCurrentTree): * ViperServer/CCommunicationHandler.h(moveUpCurrentTree): * ViperServer/CCommunicationHandler.cc(startTreeBuilding): * ViperServer/CCommunicationHandler.cc(addToCurrentTree): * ViperServer/CCommunicationHandler.cc(moveUpCurrentTree): Adding functionality for making document subtrees. * libInvertedFile/cc/CSessionManager.cc: * libInvertedFile/cc/CQuery.cc: * libBayesian/cc/CEnhancedPicHunter.cc: * libInvertedFile/cc/CQIFFerDeLance.cc: * libInvertedFile/cc/CQInvertedFile.cc: * libInvertedFile/include/CSessionManager.h: * libInvertedFile/include/CQuery.h: * libBayesian/include/CEnhancedPicHunter.h: * libInvertedFile/include/CQIFFerDeLance.h: * libInvertedFile/include/CQInvertedFile.h: In fastQuery and query: a new way of passing parameters. Parameters now given as an XML document subtree (CXMLElement) 2000-02-14 Wolfgang MÜLLER * FeatureExtraction/extract_block_features.c: HACK to convert integer features to float features. WARNING: this is a real hack. We write floats in the place of integers. At the time of writing this happens at line 480. (For people who get the creeps: David wants to redesign feature extraction anyway). * FeatureExtraction/viper_features.h (FREQ_MAX): Changed to 0x7ffffff to get a high resolution for the above HACK 2000-02-10 Wolfgang Müller * libInvertedFile/cc/CAcInvertedFile.cc (newGenerateInvertedFile): * libInvertedFile/cc/CAcInvertedFile.cc (generateInvertedFile): * libInvertedFile/cc/CAcInvertedFile.h (newGenerateInvertedFile): Changes for incorporating new writeBinary function. Added function newGenerateInvertedFile. Supposed to be much faster * libInvertedFile/cc/CInvertedFileChunk.cc (writeBinary): added one parameter. Now the CInvertedfileChunk also writes the FeatureID. Before that the caller had to assure that FeatureID was written. 2000-01-24 Wolfgang Mueller * libInvertedFile/cc/CScoreBoard.h(CScoreboard::CScoreboard): * libInvertedFile/cc/CScoreBoard.cc(CScoreboard::operator()): * libInvertedFile/cc/CScoreBoard.cc(CScoreboard::CScoreboard): Changed things such, that CScoreBoard does not need a CAccessor for being constructed. 2000-01-06 Wolfgang Mueller * libInvertedFile/cc/CQInvertedFile.cc (blockFeatureGroup): now activates blocking of feature groups 2000-01-04 Wolfgang Mueller * libInvertedFile/cc/CWeightingFunction.cc (addQueryFeature): Even if the inital version entry is younger than this... This is to notify other members, that I deleted in the function mentioned above the adjustRelevanceSum entry, which seems redundant to me. (setID): Necessary changes for rocchio weighting. 1999-11-29 Wolfgang Mueller * libInvertedFile/include/CInvertedFileQuery.h: Changed pruning interface: Scoreboard pruning now works on a fraction of the total number of features, as well as a factor of the total number of documents we want to retrieve. 1999-11-18 Wolfgang Mueller * libInvertedFile/include/ViperExceptions.h: * libInvertedFile/include/ViperExceptions.h: VEProgrammingMistake added. Goal of this: show if we think what you experienced is not an uncaught case, but rather a blunt programming mistake. * libInvertedFile/cc/CAlgorithm.cc (buildQueryTree): preliminary implementation * libInvertedFile/cc/CAlgorithmCollection.cc (getAlgorithm): * libInvertedFile/cc/CAlgorithmCollection.cc (makeAlgorithm): * libInvertedFile/include/CAlgorithmCollection.h (getAlgorithm): * libInvertedFile/include/CAlgorithmCollection.h (makeAlgorithm): Thes functions operate now on algorithm TYPES. * libInvertedFile/include/CQuery.h: added addChild function and lCChildren type and lCChildren mChildren variable. For building query trees. * libInvertedFile/cc/CAlgorithm.cc: CAlgorithm::getType added in reaction to previous change. * mrml.dtd: added attribute "type" to algorithm. Background of this is: the actual IDs of the algorithms have to be generated by the interface, because there can be multiple instances of one type of algorithm. Only the interface knows if this is the case. So TODO: we need to add also the functionality to property sheets to send a unique ID. * libInvertedFile/cc/CInvertedFileQuery.cc (buildNormalizedQueryList): Using CSortByAbsQueryFactor_WF instead of CSortByQueryFactor_WF (without the "Abs") for queries. * libInvertedFile/include/CWeightingFunction.h: added CSortByAbsQueryFactor_WF. its a new sorting operator for making Viper more immune against negative feedback. This probably will become unnecessary when we incorporate Rocchio feedback. The problem was that if features get negative they get pruned, although they might have large impact on the query result. gift-0.1.14/COPYING0000644000175200001440000004311010153634214010476 00000000000000 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.