From 17049f05f9ef09b3dc2a9c5d1de3f21de7c03193 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 13 Sep 2005 09:58:33 +0000 Subject: Load /tmp/tmp.2Zlqcz/libxml2-2.6.22 into packages/libxml2/branches/upstream/current. --- doc/devhelp/libxml2-xmlstring.html | 217 +++++++++++++++++++++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 doc/devhelp/libxml2-xmlstring.html (limited to 'doc/devhelp/libxml2-xmlstring.html') diff --git a/doc/devhelp/libxml2-xmlstring.html b/doc/devhelp/libxml2-xmlstring.html new file mode 100644 index 0000000..f7abfa3 --- /dev/null +++ b/doc/devhelp/libxml2-xmlstring.html @@ -0,0 +1,217 @@ + + + + + xmlstring: set of routines to process strings + + + + + + + + + + + + + + + + +

+ xmlstring +

+

xmlstring - set of routines to process strings

+

type and interfaces needed for the internal string handling of the library, especially UTF8 processing.

+

Author(s): Daniel Veillard

+
+

Synopsis

+
#define BAD_CAST;
+typedef unsigned char xmlChar;
+int	xmlStrcmp			(const xmlChar * str1, 
const xmlChar * str2); +xmlChar * xmlCharStrndup (const char * cur,
int len); +const xmlChar * xmlStrcasestr (const xmlChar * str,
xmlChar * val); +xmlChar * xmlStrcat (xmlChar * cur,
const xmlChar * add); +int xmlStrPrintf (xmlChar * buf,
int len,
const xmlChar * msg,
... ...); +const xmlChar * xmlStrstr (const xmlChar * str,
const xmlChar * val); +int xmlUTF8Size (const xmlChar * utf); +int xmlStrQEqual (const xmlChar * pref,
const xmlChar * name,
const xmlChar * str); +xmlChar * xmlStrncatNew (const xmlChar * str1,
const xmlChar * str2,
int len); +const xmlChar * xmlUTF8Strpos (const xmlChar * utf,
int pos); +xmlChar * xmlStrdup (const xmlChar * cur); +xmlChar * xmlCharStrdup (const char * cur); +const xmlChar * xmlStrchr (const xmlChar * str,
xmlChar val); +int xmlStrlen (const xmlChar * str); +int xmlStrncmp (const xmlChar * str1,
const xmlChar * str2,
int len); +xmlChar * xmlStrsub (const xmlChar * str,
int start,
int len); +xmlChar * xmlStrncat (xmlChar * cur,
const xmlChar * add,
int len); +int xmlGetUTF8Char (const unsigned char * utf,
int * len); +int xmlStrcasecmp (const xmlChar * str1,
const xmlChar * str2); +xmlChar * xmlStrndup (const xmlChar * cur,
int len); +int xmlStrVPrintf (xmlChar * buf,
int len,
const xmlChar * msg,
va_list ap); +int xmlUTF8Strsize (const xmlChar * utf,
int len); +int xmlCheckUTF8 (const unsigned char * utf); +int xmlStrncasecmp (const xmlChar * str1,
const xmlChar * str2,
int len); +int xmlUTF8Strlen (const xmlChar * utf); +xmlChar * xmlUTF8Strsub (const xmlChar * utf,
int start,
int len); +int xmlStrEqual (const xmlChar * str1,
const xmlChar * str2); +int xmlUTF8Charcmp (const xmlChar * utf1,
const xmlChar * utf2); +xmlChar * xmlUTF8Strndup (const xmlChar * utf,
int len); +int xmlUTF8Strloc (const xmlChar * utf,
const xmlChar * utfchar); +
+
+
+

Description

+
+
+

Details

+
+

Macro BAD_CAST

#define BAD_CAST;
+

Macro to cast a string to an xmlChar * when one know its safe.

+
+
+

Typedef xmlChar

unsigned char xmlChar;
+

This is a basic byte in an UTF-8 encoded string. It's unsigned allowing to pinpoint case where char * are assigned to xmlChar * (possibly making serialization back impossible).

+
+
+

xmlCharStrdup ()

xmlChar *	xmlCharStrdup		(const char * cur)
+

a strdup for char's to xmlChar's

+
cur:the input char *
Returns:a new xmlChar * or NULL
+
+

xmlCharStrndup ()

xmlChar *	xmlCharStrndup		(const char * cur, 
int len)
+

a strndup for char's to xmlChar's

+
cur:the input char *
len:the len of @cur
Returns:a new xmlChar * or NULL
+
+ +
+
+
+

xmlStrEqual ()

int	xmlStrEqual			(const xmlChar * str1, 
const xmlChar * str2)
+

Check if both string are equal of have same content Should be a bit more readable and faster than xmlStrEqual()

+
str1:the first xmlChar *
str2:the second xmlChar *
Returns:1 if they are equal, 0 if they are different
+
+

xmlStrPrintf ()

int	xmlStrPrintf			(xmlChar * buf, 
int len,
const xmlChar * msg,
... ...)
+

Formats @msg and places result into @buf.

+
buf:the result buffer.
len:the result buffer length.
msg:the message with printf formatting.
...:extra parameters for the message.
Returns:the number of characters written to @buf or -1 if an error occurs.
+
+

xmlStrQEqual ()

int	xmlStrQEqual			(const xmlChar * pref, 
const xmlChar * name,
const xmlChar * str)
+

Check if a QName is Equal to a given string

+
pref:the prefix of the QName
name:the localname of the QName
str:the second xmlChar *
Returns:1 if they are equal, 0 if they are different
+
+

xmlStrVPrintf ()

int	xmlStrVPrintf			(xmlChar * buf, 
int len,
const xmlChar * msg,
va_list ap)
+

Formats @msg and places result into @buf.

+
buf:the result buffer.
len:the result buffer length.
msg:the message with printf formatting.
ap:extra parameters for the message.
Returns:the number of characters written to @buf or -1 if an error occurs.
+
+

xmlStrcasecmp ()

int	xmlStrcasecmp			(const xmlChar * str1, 
const xmlChar * str2)
+

a strcasecmp for xmlChar's

+
str1:the first xmlChar *
str2:the second xmlChar *
Returns:the integer result of the comparison
+
+

xmlStrcasestr ()

const xmlChar *	xmlStrcasestr		(const xmlChar * str, 
xmlChar * val)
+

a case-ignoring strstr for xmlChar's

+
str:the xmlChar * array (haystack)
val:the xmlChar to search (needle)
Returns:the xmlChar * for the first occurrence or NULL.
+
+

xmlStrcat ()

xmlChar *	xmlStrcat		(xmlChar * cur, 
const xmlChar * add)
+

a strcat for array of xmlChar's. Since they are supposed to be encoded in UTF-8 or an encoding with 8bit based chars, we assume a termination mark of '0'.

+
cur:the original xmlChar * array
add:the xmlChar * array added
Returns:a new xmlChar * containing the concatenated string.
+
+

xmlStrchr ()

const xmlChar *	xmlStrchr		(const xmlChar * str, 
xmlChar val)
+

a strchr for xmlChar's

+
str:the xmlChar * array
val:the xmlChar to search
Returns:the xmlChar * for the first occurrence or NULL.
+
+

xmlStrcmp ()

int	xmlStrcmp			(const xmlChar * str1, 
const xmlChar * str2)
+

a strcmp for xmlChar's

+
str1:the first xmlChar *
str2:the second xmlChar *
Returns:the integer result of the comparison
+
+

xmlStrdup ()

xmlChar *	xmlStrdup		(const xmlChar * cur)
+

a strdup for array of xmlChar's. Since they are supposed to be encoded in UTF-8 or an encoding with 8bit based chars, we assume a termination mark of '0'.

+
cur:the input xmlChar *
Returns:a new xmlChar * or NULL
+
+

xmlStrlen ()

int	xmlStrlen			(const xmlChar * str)
+

length of a xmlChar's string

+
str:the xmlChar * array
Returns:the number of xmlChar contained in the ARRAY.
+
+

xmlStrncasecmp ()

int	xmlStrncasecmp			(const xmlChar * str1, 
const xmlChar * str2,
int len)
+

a strncasecmp for xmlChar's

+
str1:the first xmlChar *
str2:the second xmlChar *
len:the max comparison length
Returns:the integer result of the comparison
+
+

xmlStrncat ()

xmlChar *	xmlStrncat		(xmlChar * cur, 
const xmlChar * add,
int len)
+

a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add.

+
cur:the original xmlChar * array
add:the xmlChar * array added
len:the length of @add
Returns:a new xmlChar *, the original @cur is reallocated if needed and should not be freed
+
+

xmlStrncatNew ()

xmlChar *	xmlStrncatNew		(const xmlChar * str1, 
const xmlChar * str2,
int len)
+

same as xmlStrncat, but creates a new string. The original two strings are not freed.

+
str1:first xmlChar string
str2:second xmlChar string
len:the len of @str2
Returns:a new xmlChar * or NULL
+
+

xmlStrncmp ()

int	xmlStrncmp			(const xmlChar * str1, 
const xmlChar * str2,
int len)
+

a strncmp for xmlChar's

+
str1:the first xmlChar *
str2:the second xmlChar *
len:the max comparison length
Returns:the integer result of the comparison
+
+

xmlStrndup ()

xmlChar *	xmlStrndup		(const xmlChar * cur, 
int len)
+

a strndup for array of xmlChar's

+
cur:the input xmlChar *
len:the len of @cur
Returns:a new xmlChar * or NULL
+
+

xmlStrstr ()

const xmlChar *	xmlStrstr		(const xmlChar * str, 
const xmlChar * val)
+

a strstr for xmlChar's

+
str:the xmlChar * array (haystack)
val:the xmlChar to search (needle)
Returns:the xmlChar * for the first occurrence or NULL.
+
+

xmlStrsub ()

xmlChar *	xmlStrsub		(const xmlChar * str, 
int start,
int len)
+

Extract a substring of a given string

+
str:the xmlChar * array (haystack)
start:the index of the first char (zero based)
len:the length of the substring
Returns:the xmlChar * for the first occurrence or NULL.
+
+

xmlUTF8Charcmp ()

int	xmlUTF8Charcmp			(const xmlChar * utf1, 
const xmlChar * utf2)
+

compares the two UCS4 values

+
utf1:pointer to first UTF8 char
utf2:pointer to second UTF8 char
Returns:result of the compare as with xmlStrncmp
+
+

xmlUTF8Size ()

int	xmlUTF8Size			(const xmlChar * utf)
+

calculates the internal size of a UTF8 character

+
utf:pointer to the UTF8 character
Returns:the numbers of bytes in the character, -1 on format error
+
+

xmlUTF8Strlen ()

int	xmlUTF8Strlen			(const xmlChar * utf)
+

compute the length of an UTF8 string, it doesn't do a full UTF8 checking of the content of the string.

+
utf:a sequence of UTF-8 encoded bytes
Returns:the number of characters in the string or -1 in case of error
+
+

xmlUTF8Strloc ()

int	xmlUTF8Strloc			(const xmlChar * utf, 
const xmlChar * utfchar)
+

a function to provide the relative location of a UTF8 char

+
utf:the input UTF8 *
utfchar:the UTF8 character to be found
Returns:the relative character position of the desired char or -1 if not found
+
+

xmlUTF8Strndup ()

xmlChar *	xmlUTF8Strndup		(const xmlChar * utf, 
int len)
+

a strndup for array of UTF8's

+
utf:the input UTF8 *
len:the len of @utf (in chars)
Returns:a new UTF8 * or NULL
+
+

xmlUTF8Strpos ()

const xmlChar *	xmlUTF8Strpos		(const xmlChar * utf, 
int pos)
+

a function to provide the equivalent of fetching a character from a string array

+
utf:the input UTF8 *
pos:the position of the desired UTF8 char (in chars)
Returns:a pointer to the UTF8 character or NULL
+
+

xmlUTF8Strsize ()

int	xmlUTF8Strsize			(const xmlChar * utf, 
int len)
+

storage size of an UTF8 string the behaviour is not garanteed if the input string is not UTF-8

+
utf:a sequence of UTF-8 encoded bytes
len:the number of characters in the array
Returns:the storage size of the first 'len' characters of ARRAY
+
+

xmlUTF8Strsub ()

xmlChar *	xmlUTF8Strsub		(const xmlChar * utf, 
int start,
int len)
+

Create a substring from a given UTF-8 string Note: positions are given in units of UTF-8 chars

+
utf:a sequence of UTF-8 encoded bytes
start:relative pos of first char
len:total number to copy
Returns:a pointer to a newly created string or NULL if any problem
+
+
+
+ + -- cgit v1.2.3 From 0fd83af441e251fc23fc1af7959fd6ecfa105fe1 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Fri, 6 Jan 2006 18:28:17 +0100 Subject: Load /tmp/tmp.U9vXwU/libxml2-2.6.23 into local/libxml2/branches/upstream/current. --- ChangeLog | 540 ++ HTMLparser.c | 11 +- HTMLtree.c | 22 +- Makefile.am | 2 +- Makefile.in | 2 +- NEWS | 332 +- SAX2.c | 4 + c14n.c | 2 +- config.h.in | 18 +- configure | 615 +- configure.in | 65 +- doc/APIchunk0.html | 8 +- doc/APIchunk1.html | 1 + doc/APIchunk10.html | 19 +- doc/APIchunk11.html | 10 +- doc/APIchunk12.html | 28 +- doc/APIchunk13.html | 14 +- doc/APIchunk14.html | 42 +- doc/APIchunk15.html | 17 +- doc/APIchunk16.html | 7 +- doc/APIchunk17.html | 12 +- doc/APIchunk18.html | 5 +- doc/APIchunk19.html | 7 +- doc/APIchunk2.html | 10 +- doc/APIchunk20.html | 10 +- doc/APIchunk21.html | 20 +- doc/APIchunk22.html | 47 +- doc/APIchunk23.html | 22 +- doc/APIchunk24.html | 28 +- doc/APIchunk25.html | 7 +- doc/APIchunk26.html | 5 +- doc/APIchunk27.html | 3 - doc/APIchunk28.html | 13 +- doc/APIchunk29.html | 1 + doc/APIchunk3.html | 1 + doc/APIchunk4.html | 4 + doc/APIchunk5.html | 9 +- doc/APIchunk6.html | 7 +- doc/APIchunk7.html | 5 +- doc/APIchunk8.html | 9 +- doc/APIchunk9.html | 10 +- doc/APIconstructors.html | 4 +- doc/APIfiles.html | 17 + doc/APIfunctions.html | 14 + doc/APIsymbols.html | 17 + doc/FAQ.html | 63 +- doc/Makefile.am | 1 - doc/Makefile.in | 1 - doc/XMLinfo.html | 2 +- doc/XSLT.html | 2 +- doc/bugs.html | 2 +- doc/catalog.html | 2 +- doc/contribs.html | 8 +- doc/devhelp/libxml2-HTMLtree.html | 9 +- doc/devhelp/libxml2-pattern.html | 14 +- doc/devhelp/libxml2-relaxng.html | 2 +- doc/devhelp/libxml2-schemasInternals.html | 145 +- doc/devhelp/libxml2-tree.html | 2 +- doc/devhelp/libxml2-valid.html | 6 +- doc/devhelp/libxml2-xmlIO.html | 7 +- doc/devhelp/libxml2-xmlerror.html | 5 + doc/devhelp/libxml2-xmlreader.html | 9 +- doc/devhelp/libxml2-xmlregexp.html | 12 +- doc/devhelp/libxml2-xmlsave.html | 5 + doc/devhelp/libxml2-xmlschemas.html | 73 +- doc/devhelp/libxml2-xmlstring.html | 8 +- doc/devhelp/libxml2.devhelp | 17 + doc/downloads.html | 9 +- doc/encoding.html | 16 +- doc/examples/Makefile.am | 104 +- doc/examples/Makefile.in | 102 +- doc/examples/examples.xml | 418 +- doc/help.html | 2 +- doc/html/libxml-HTMLtree.html | 5 +- doc/html/libxml-pattern.html | 12 +- doc/html/libxml-relaxng.html | 2 +- doc/html/libxml-schemasInternals.html | 127 +- doc/html/libxml-tree.html | 2 +- doc/html/libxml-valid.html | 6 +- doc/html/libxml-xmlIO.html | 5 +- doc/html/libxml-xmlerror.html | 5 + doc/html/libxml-xmlreader.html | 7 +- doc/html/libxml-xmlregexp.html | 10 +- doc/html/libxml-xmlsave.html | 5 +- doc/html/libxml-xmlschemas.html | 69 +- doc/html/libxml-xmlstring.html | 8 +- doc/index.html | 6 +- doc/intro.html | 2 +- doc/libxml2-api.xml | 384 +- doc/libxml2.xsa | 52 +- doc/namespaces.html | 2 +- doc/news.html | 332 +- doc/python.html | 15 +- doc/site.xsl | 2 +- doc/xml.html | 492 +- doc/xmldtd.html | 2 +- doc/xmlreader.html | 4 +- elfgcchack.h | 64 +- error.c | 19 +- gentest.py | 1 + include/libxml/HTMLtree.h | 5 + include/libxml/pattern.h | 7 + include/libxml/schemasInternals.h | 177 +- include/libxml/valid.h | 2 +- include/libxml/xmlIO.h | 4 + include/libxml/xmlerror.h | 5 + include/libxml/xmlreader.h | 9 + include/libxml/xmlregexp.h | 4 +- include/libxml/xmlsave.h | 4 +- include/libxml/xmlschemas.h | 7 +- include/libxml/xmlversion.h | 10 +- include/libxml/xmlversion.h.in | 2 +- include/win32config.h | 4 +- include/wsockcompat.h | 12 + legacy.c | 1 - libxml.3 | 2 +- libxml.spec.in | 30 - libxml2.spec | 36 +- macos/src/config-mac.h | 9 - nanohttp.c | 142 +- parser.c | 43 +- parserInternals.c | 62 +- pattern.c | 517 +- python/libxml.py | 3 +- python/libxml2-py.c | 98 +- python/setup.py | 2 +- relaxng.c | 1 - result/HTML/53867.html | 66 + result/HTML/53867.html.err | 0 result/HTML/53867.html.sax | 26 + result/XPath/tests/nodespat | 94 + result/c14n/exc-without-comments/test-2 | 11 + result/noent/ns7 | 2 + result/ns7 | 2 + result/ns7.rde | 1 + result/ns7.rdr | 1 + result/ns7.sax | 5 + result/ns7.sax2 | 5 + result/regexp/* | 1 - result/regexp/hard | 5 + result/schemas/bug303566_1_1.err | 2 +- result/schemas/bug312957_1_0.err | 2 +- result/schemas/bug321475_1_0 | 1 + result/schemas/bug321475_1_0.err | 0 result/schemas/bug322411_1_0 | 1 + result/schemas/bug322411_1_0.err | 0 result/schemas/bug323510_1_0 | 1 + result/schemas/bug323510_1_0.err | 1 + result/schemas/decimal-1_1_0 | 1 + result/schemas/decimal-1_1_0.err | 8 + result/schemas/decimal-2_1_0 | 1 + result/schemas/decimal-2_1_0.err | 4 + result/schemas/decimal-3_1_0 | 1 + result/schemas/decimal-3_1_0.err | 8 + result/schemas/derivation-ok-extension-err_0_0.err | 2 +- result/schemas/derivation-ok-extension_0_0.err | 2 +- .../derivation-ok-restriction-2-1-1_0_0.err | 12 +- .../derivation-ok-restriction-4-1-err_0_0.err | 6 +- result/schemas/element-err_0_0.err | 22 +- result/schemas/idc-keyref-err1_1_0 | 1 + result/schemas/idc-keyref-err1_1_0.err | 1 + result/schemas/include3_0_0.err | 2 +- result/schemas/restriction-attr1_0_0.err | 2 +- result/schemas/scc-no-xmlns_0_0.err | 2 +- result/schemas/scc-no-xsi_0_0.err | 2 +- result/schemas/src-attribute1_0_0.err | 2 +- result/schemas/src-attribute2_0_0.err | 2 +- result/schemas/src-attribute3-1_0_0.err | 2 +- result/schemas/src-attribute3-2-form_0_0.err | 2 +- result/schemas/src-attribute3-2-st_0_0.err | 2 +- result/schemas/src-attribute3-2-type_0_0.err | 2 +- result/schemas/src-attribute4_0_0.err | 2 +- result/schemas/src-element1_0_0.err | 2 +- result/schemas/src-element3_0_0.err | 4 +- runsuite.c | 53 +- runtest.c | 18 +- schematron.c | 6 +- test/HTML/53867.html | 69 + test/XPath/docs/nodes | 2 + test/XPath/tests/nodespat | 5 + test/c14n/exc-without-comments/test-2.xml | 20 + test/c14n/exc-without-comments/test-2.xpath | 6 + test/ns7 | 1 + test/regexp/hard | 5 + test/schemas/bug321475_0.xml | 10 + test/schemas/bug321475_1.xsd | 48 + test/schemas/bug322411_0.xml | 93 + test/schemas/bug322411_1.xsd | 35 + test/schemas/bug323510_0.xml | 3 + test/schemas/bug323510_1.xsd | 12 + test/schemas/decimal-1.xml | 37 + test/schemas/decimal-1.xsd | 29 + test/schemas/decimal-1_0.xml | 24 + test/schemas/decimal-1_1.xsd | 19 + test/schemas/decimal-2_0.xml | 14 + test/schemas/decimal-2_1.xsd | 18 + test/schemas/decimal-3_0.xml | 17 + test/schemas/decimal-3_1.xsd | 18 + test/schemas/idc-keyref-err1_0.xml | 14 + test/schemas/idc-keyref-err1_1.xsd | 53 + testapi.c | 446 +- tree.c | 95 +- uri.c | 144 +- valid.c | 23 +- vms/config.vms | 9 - win32/Makefile.mingw | 4 +- win32/Makefile.mingw.orig | 336 + win32/Makefile.mingw.rej | 17 + win32/configure.js | 8 + win32/libxml2.def.src | 9 + xmlIO.c | 55 +- xmlmodule.c | 9 +- xmlreader.c | 211 +- xmlregexp.c | 517 +- xmlsave.c | 47 +- xmlschemas.c | 9553 ++++++++++++-------- xmlschemastypes.c | 166 +- xmlstring.c | 14 +- xmlwriter.c | 75 +- xpath.c | 97 +- 220 files changed, 12466 insertions(+), 6252 deletions(-) create mode 100644 result/HTML/53867.html create mode 100644 result/HTML/53867.html.err create mode 100644 result/HTML/53867.html.sax create mode 100644 result/XPath/tests/nodespat create mode 100644 result/c14n/exc-without-comments/test-2 create mode 100644 result/noent/ns7 create mode 100644 result/ns7 create mode 100644 result/ns7.rde create mode 100644 result/ns7.rdr create mode 100644 result/ns7.sax create mode 100644 result/ns7.sax2 delete mode 100644 result/regexp/* create mode 100644 result/schemas/bug321475_1_0 create mode 100644 result/schemas/bug321475_1_0.err create mode 100644 result/schemas/bug322411_1_0 create mode 100644 result/schemas/bug322411_1_0.err create mode 100644 result/schemas/bug323510_1_0 create mode 100644 result/schemas/bug323510_1_0.err create mode 100644 result/schemas/decimal-1_1_0 create mode 100644 result/schemas/decimal-1_1_0.err create mode 100644 result/schemas/decimal-2_1_0 create mode 100644 result/schemas/decimal-2_1_0.err create mode 100644 result/schemas/decimal-3_1_0 create mode 100644 result/schemas/decimal-3_1_0.err create mode 100644 result/schemas/idc-keyref-err1_1_0 create mode 100644 result/schemas/idc-keyref-err1_1_0.err create mode 100644 test/HTML/53867.html create mode 100644 test/XPath/docs/nodes create mode 100644 test/XPath/tests/nodespat create mode 100644 test/c14n/exc-without-comments/test-2.xml create mode 100644 test/c14n/exc-without-comments/test-2.xpath create mode 100644 test/ns7 create mode 100644 test/schemas/bug321475_0.xml create mode 100644 test/schemas/bug321475_1.xsd create mode 100644 test/schemas/bug322411_0.xml create mode 100644 test/schemas/bug322411_1.xsd create mode 100644 test/schemas/bug323510_0.xml create mode 100644 test/schemas/bug323510_1.xsd create mode 100644 test/schemas/decimal-1.xml create mode 100644 test/schemas/decimal-1.xsd create mode 100644 test/schemas/decimal-1_0.xml create mode 100644 test/schemas/decimal-1_1.xsd create mode 100644 test/schemas/decimal-2_0.xml create mode 100644 test/schemas/decimal-2_1.xsd create mode 100644 test/schemas/decimal-3_0.xml create mode 100644 test/schemas/decimal-3_1.xsd create mode 100644 test/schemas/idc-keyref-err1_0.xml create mode 100644 test/schemas/idc-keyref-err1_1.xsd create mode 100644 win32/Makefile.mingw.orig create mode 100644 win32/Makefile.mingw.rej (limited to 'doc/devhelp/libxml2-xmlstring.html') diff --git a/ChangeLog b/ChangeLog index b8cd4e5..46037c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,543 @@ +Thu Jan 5 16:25:06 CET 2006 Daniel Veillard + + * NEWS configure.in libxml.spec.in testapi.c doc/*: upated the news + regenerated the docs, preparing for release of 2.6.23 + * pattern.c xmlschemas.c: fixed some comments + +Thu Jan 5 15:48:27 CET 2006 Kasimier Buchcik + + * test/XPath/docs/nodes test/XPath/tests/nodespat + result/XPath/tests/nodespat: Added regression tests for + the latest XPath/pattern fixes. + +Thu Jan 5 15:43:38 CET 2006 Kasimier Buchcik + + * pattern.c: Another fix to handle "foo//.": "foo" was not + included in the resulting node-set. + +Thu Jan 5 13:22:29 CET 2006 Kasimier Buchcik + + * pattern.c xpath.c include/libxml/pattern.h: + Fixed bug #322928, reported by Erich Schubert: The bug was + in pattern.c, which is used for a tiny subset of xpath + expression which can be evaluated in an optimized way. + The doc-node was never considered when evaluating "//" + expressions. Additionally, we fixed resolution + to nodes of any type in pattern.c; i.e. a "//." didn't work + yet, as it did select only element-nodes. Due to this + issue the pushing of nodes in xpath.c needed to be adjusted + as well. + +Wed Jan 4 18:07:47 CET 2006 Daniel Veillard + + * parser.c: tiny refactoring patch from Bjorn Reese + +Wed Jan 4 15:00:51 CET 2006 Daniel Veillard + + * SAX2.c: fix bug #324432 with + * test/ns7 resul//ns7*: added to the regression tests + +Wed Jan 4 10:53:56 CET 2006 Daniel Veillard + + * include/wsockcompat.h: applied patch from Mark Junker, fixing a + MinGW compilation problem, should close bug #324943 + +Tue Jan 3 11:49:54 CET 2006 Kasimier Buchcik + + * xmlschemas.c: Removed last dependency on the obsolete enum + xmlSchemaValidError. + +Mon Jan 2 11:20:00 CET 2006 Daniel Veillard + + * xmlreader.c include/libxml/xmlreader.h xmlschemas.c: compilation + and doc build fixes from Michael Day + +Wed Dec 28 22:12:34 CET 2005 Daniel Veillard + + * xmlregexp.c: bug in xmlRegExecPushString2() pointed out by + Sreeni Nair. + +Tue Dec 20 16:55:31 CET 2005 Rob Richards + + * tree.c: fix bug #322136 in xmlNodeBufGetContent when entity ref is + a child of an element (fix by Oleksandr Kononenko). + * HTMLtree.c include/libxml/HTMLtree.h: Add htmlDocDumpMemoryFormat. + +Tue Dec 20 11:43:06 CET 2005 Kasimier Buchcik + + * xmlschemas.c xmlstring.c: Fixed a segfault during + text concatenation when validating a node tree: + xmlStrncat was called with a @len of -1; but unlike + xmlStrncatNew, it does not calculate the length + automatically in such a case (reported by Judy Hay + on the mailing list). + Updated the descriptions of the involved string + functions to note this. + +Thu Dec 15 12:11:07 CET 2005 Daniel Veillard + + * nanohttp.c: applied patch from Gary Coady to accept gzipped + http resources. + +Wed Dec 14 18:41:26 CET 2005 Kasimier Buchcik + + * win32/configure.js: Added enable/disable of runtime + debugging (LIBXML_DEBUG_RUNTIME). + +Wed Dec 14 18:11:50 CET 2005 Kasimier Buchcik + + * include/libxml/xmlversion.h.in: Fixed to define + LIBXML_DEBUG_RUNTIME on the basis of @WITH_RUN_DEBUG@. + +Tue Dec 13 12:49:23 CET 2005 Kasimier Buchcik + + * test/schemas/bug321475* result/schemas/bug321475*: + Added regression test for bug #321475 (reported by + Gabor Nagy). Fixing of bug #323510 seemed to have + fixed this bug as well. + +Mon Dec 12 16:19:16 CET 2005 Kasimier Buchcik + + * test/schemas/bug323510* result/schemas/bug323510*: + Added regression test for bug #323510. + +Mon Dec 12 16:11:13 CET 2005 Kasimier Buchcik + + * xmlschemas.c: Workaround for bug #323510 (reported by + Jonathan Filiatrault): substituted the epsilon transition + for a labelled transition, in order to avoid a bug in + xmlregexp.c which eliminated the epsilon transition and + marked the initial state as final. + +Mon Dec 12 14:25:46 CET 2005 Daniel Veillard + + * xmlreader.c: Gary Coady pointed a memory leak in + xmlTextReaderReadInnerXml() applied patch fixing #323864 + +Sat Dec 10 12:08:28 CET 2005 Daniel Veillard + + * HTMLparser.c configure.in parserInternals.c runsuite.c runtest.c + testapi.c xmlschemas.c xmlschemastypes.c xmlstring.c: fixed a number + of warnings shown by HP-UX compiler and reported by Rick Jones + +Fri Dec 9 18:57:31 CET 2005 Rob Richards + + * xmlwriter.c: Insert space between pubid and sysid when both + passed to xmlTextWriterStartDTD and indenting not being used. + Remove no longer used Mem callbacks. + +Fri Dec 9 11:01:16 CET 2005 Kasimier Buchcik + + * runsuite.c: Changed to instantly mark instance-tests as + failed if the corresponding schema was invalid. This + reflects the side of the Python code for the XML Schema test + suite. We now get the same number of failed tests on both + sides. + +Wed Dec 7 14:59:01 CET 2005 Kasimier Buchcik + + * xmlreader.c include/libxml/xmlreader.h: Added + xmlTextReaderSchemaValidateCtxt() to the API. + +Wed Dec 7 12:59:56 CET 2005 Kasimier Buchcik + + * xmlschemas.c: Fixed a segfault: the instance document was + still tried to be validated, if the schema, dynamically + acquired using XSI was invalid, thus mangled. The + validation will stop (or rather won't validate) now in + such a case. The schema parser error code will be set + on the validion context now; this is somehow not nice, + but it assures that the validation context indicates an + error in there was a parser error. + +Tue Dec 6 18:57:23 CET 2005 Daniel Veillard + + * xmlreader.c: small doc patch from Aron Stansvik + * legacy.c: another doc patch for a deprecated API + +Mon Dec 5 16:23:49 CET 2005 Kasimier Buchcik + + * Makefile.am: Tiny change for 'make tests': raised + the number of expected failures for James Clark's + XML Schema datatype tests from 10 to 11. The additional + reported error was agreed to be correct long time ago, + but we missed to adjust the message reported by + the testing script. + +Fri Dec 2 13:51:14 CET 2005 Kasimier Buchcik + + * result/schemas/decimal* result/schemas/bug322411*: + Added missing regression test results for the latest IDC + and xs:decimal bugs. + +Wed Nov 30 12:22:23 CET 2005 Kasimier Buchcik + + * test/schemas/decimal* test/schemas/bug322411*: Added + regression tests for the latest IDC and xs:decimal bugs. + +Wed Nov 30 11:57:35 CET 2005 Kasimier Buchcik + + * xmlschemas.c: Fixed bubbling of duplicate IDC nodes: the + parent's list of duplicates was filled with NULLs instead + of the nodes under certain conditions. This lead to a + segfault when the list's entries were accessed. + +Mon Nov 28 17:28:53 CET 2005 Kasimier Buchcik + + * xmlschemastypes.c: Fixed parsing of xs:decimal to + allow/deny special lexical forms. Fixed the totalDigits + for values in the range (x < 1) && (x > -1) && (x != 0); + E.g "0.123" has now a totalDigits of 3 (was 4 previously). + Adjusted the comparison function for decimals due to this + change. As a side effect comparison against zeroes was + optimized. + +Mon Nov 28 13:25:11 CET 2005 Kasimier Buchcik + + * xmlschemas.c: An assignment to a local variable, which was + used to access the IDC node list, was missing after the + reallocation of the list (reported by Fabrice GUY + bug #322411). Renamed the define ENABLE_IDC_NODE_TABLES + to ENABLE_IDC_NODE_TABLES_TEST and *disabled* it, since + it is used to force bubbling of IDC node tables even + if not necessary; this was intended to be used for test + purposes, but I obviously missed to disable it (although + it apparently helped finding the bug). + +Wed Nov 23 17:34:52 CET 2005 Kasimier Buchcik + + * xmlschemas.c: In xmlSchemaAssembleByXSI() the return value + of xmlSchemaGetMetaAttrInfo() was not assigned to anything; + this caused XSI-driven-dynamic schema acquisition to fail + with @noNamespaceSchemaLocation (reported by Julien Lamy + on the mailing list). + +Tue Nov 22 18:31:34 CET 2005 Kasimier Buchcik + + * xmlschemas.c: Fixed a bug in xmlSchemaFindRedefCompInGraph() + which caused the search for components to stop at the + first encountered attribute group component. + Fixed error report in xmlSchemaCheckSRCRedefineFirst(): the + designation of a not-found component was not reported. + +Mon Nov 21 12:23:28 CET 2005 Daniel Veillard + + * xmlschemastypes.c: Albert Chin found another signed/unsigned problem + in the date and time code raised on IRIX 6.5 + +Fri Nov 18 18:13:38 CET 2005 Kasimier Buchcik + + * xmlschemas.c include/libxml/xmlschemas.h: + Added xmlSchemaSetParserStructuredErrors() to the API. + Fixed channeling of error relevant information to + subsequent parser/validation contexts. + +Thu Nov 17 14:11:43 CET 2005 Daniel Veillard + + * parserInternals.c: removed unreachable code pointed out by + Oleksandr Kononenko, fixes bug #321695 + +Thu Nov 17 08:24:31 CET 2005 Daniel Veillard + + * parser.c: use ctxt->standalone = -2 to indicate that the + XMLDecl was parsed but no standalone attribute was found, + suggested by Michael Day to detect if an XMLDecl was found. + +Tue Nov 15 09:49:24 CET 2005 Daniel Veillard + + * runtest.c: Hisashi Fujinaka pointed that errors in Schemas tests + were not properly reported. + +Sun Nov 13 13:42:41 CET 2005 Daniel Veillard + + * xmlIO.c: applied patch from Geert Jansen to remove xmlBufferClose() + which is not needed. + +Fri Nov 11 13:48:52 CET 2005 Kasimier Buchcik + + * xmlschemas.c: Changed xmlSchemaFormatIDCKeySequence() + to use xmlSchemaGetCanonValueWhtspExt() in order to + correctly report values for xs:anySimpleType. + * test/schemas/idc-keyref-err1* + result/schemas/idc-keyref-err1*: Added a test for this change. + +Wed Nov 9 13:07:24 EST 2005 Rob Richards + + * xmlIO.c xmlwriter.c: function consolidation when writing to xmlBuffer. + Return error condition not len if xmlwriter fails writing to buffer. + +Wed Nov 9 09:54:54 CET 2005 Daniel Veillard + + * xmlsave.c xmlIO.c include/libxml/xmlIO.h include/libxml/xmlsave.h: + applied patch from Geert Jansen to implement the save function to + a xmlBuffer, and a bit of cleanup. + +Mon Nov 7 14:58:39 CET 2005 Kasimier Buchcik + + * xmlschemas.c xmlschemastypes.c: Fixed the type of the + totalDigits value to be positiveInteger. + Fixed crash in an error report function when we gave it + the document node; only element and attribute nodes are + processed now (reported by Rob Richards). + +Tue Nov 1 16:22:29 CET 2005 Daniel Veillard + + * xmlregexp.c: fix bug #319897, problem with counted atoms + when the transition itself is counted too + * result/regexp/hard test/regexp/hard: augmented the regression + tests with the problem exposed. + +Tue Nov 1 11:54:39 CET 2005 Daniel Veillard + + * win32/Makefile.mingw include/win32config.h: applied patch from + Mark Junker to fix compilation with MinGW + +Fri Oct 28 18:36:08 CEST 2005 Daniel Veillard + + * libxml.3: tiny fix from Albert Chin + * runsuite.c runtest.c testapi.c: portability cleanup for arch + needing trio for *printf + +Fri Oct 28 12:21:39 EDT 2005 Rob Richards + + * tree.c: add additional checks to prevent tree corruption. fix problem + copying attribute using xmlDocCopyNode from one document to another. + +Fri Oct 28 17:58:13 CEST 2005 Daniel Veillard + + * config.h.in configure.in vms/config.vms macos/src/config-mac.h: + cleanup from Albert Chin + * doc/Makefile.am: html/index.sgml doesn't exist anymore + +Fri Oct 28 16:53:51 CEST 2005 Daniel Veillard + + * xmlIO.c xmlmodule.c: more portability patches from Albert Chin for + HP-UX and AIX + +Fri Oct 28 10:36:10 CEST 2005 Daniel Veillard + + * xmlmodule.c configure.in: applied 2 patches from Albert Chin for + module portability + +Fri Oct 28 10:24:39 CEST 2005 Daniel Veillard + + * error.c: fixing a portability problem on some old Unices with + patch from Albert Chin + +2005-10-27 Aleksey Sanin + + * c14n.c result/c14n/exc-without-comments/test-2 + test/c14n/exc-without-comments/test-2.xml + test/c14n/exc-without-comments/test-2.xpath: fixing + bug in exc-c14n namespace visibility + test case (bug #319367) + +Thu Oct 27 16:10:31 CEST 2005 Daniel Veillard + + * python/libxml.py: remove warnings to stdout patch from Nic Ferrier + +Thu Oct 27 13:54:52 CEST 2005 Daniel Veillard + + * valid.c xmlregexp.c include/libxml/valid.h + include/libxml/xmlregexp.h: avoid function parameters names 'list' + as this seems to give troubles with VC6 and stl as reported by + Samuel Diaz Garcia. + +Wed Oct 26 10:59:21 CEST 2005 Daniel Veillard + + * parserInternals.c: fix a problem in some error case on Solaris + when passed a NULL filename, pointed by Albert Chin. + +Tue Oct 25 14:34:58 CEST 2005 Daniel Veillard + + * HTMLparser.c: script HTML parser error fix, corrects bug #319715 + * result/HTML/53867* test/HTML/53867.html: added test from Michael Day + to the regression suite + +Tue Oct 25 14:21:11 CEST 2005 Daniel Veillard + + * HTMLparser.c: typo fix from Michael Day + +Mon Oct 24 20:16:23 EDT 2005 Rob Richards + + * tree.c: fix issue adding non-namespaced attributes in xmlAddChild(), + xmlAddNextSibling() and xmlAddPrevSibling() (bug #319108) - part 1. + +Sat Oct 22 10:00:41 HKT 2005 William Brack + + * parser.c: fixed second spot where CRLF split between chunks + could cause trouble (bug #319279) + * gentest.py, testapi.c: fixed two problems involved with + --with-minimum compilation (compilation errors with schematron + and formal expressions tests) + +Fri Oct 21 10:50:14 EDT 2005 Rob Richards + + * xmlsave.c: prevent output of fragment tags when serializing XHTML. + +Wed Oct 19 16:53:47 BST 2005 Daniel Veillard + + * xmlregexp.c: commiting a some fixes and debug done yesterday in + the London airport. + +Thu Oct 20 12:54:23 CEST 2005 Kasimier Buchcik + + * xmlschemas.c: Removed creation of a temporary parser context + during validation when processing xsi:type; this previously + added a string to the dict of the schema - to assure thread + safety, we don't want to modify a given schema during + validation. + +Thu Oct 20 17:05:29 HKT 2005 William Brack + + * xmlwriter.c: fixed problem in xmlTextWriterVSprintf caused by + misuse of vsnprintf + * configure.in, config.h.in: added a configuration check for + va_copy and added a define for VA_COPY for xmlwriter.c fix + * parser.c: fixed problem with CRLF split between chunks (bug + #319279) (fix provided by Brion Vibber) + +Wed Oct 19 18:49:52 CEST 2005 Kasimier Buchcik + + * xmlschemas.c: Fixed a potential memory leak in + xmlSchemaCheckCSelectorXPath() when an internal error occurs. + Fixed setting of ctxt->err to the given error code in + the parsing error functions. + * pattern.c: Added internal xmlCompileIDCXPathPath() as a + starting point for IDC XPath compilation; this and some other + tiny changes fixes issues regarding whitespace in the + expressions and IDC selector/field relevant restrictions of + the subset of XPath. Fixed a missing blocking of attributes + in xmlStreamPushInternal(). + +Mon Oct 17 15:06:05 EDT 2005 Daniel Veillard + + * runtest.c: removed the error message + * relaxng.c xmlschemas.c: removed 2 instability warnings from function + documentation + * include/libxml/schemasInternals.h: changed warning about API stability + * xmlregexp.c: trying to improve runtime execution of non-deterministic + regexps and automata. Not fully finished but should be way better. + +Mon Oct 17 16:12:02 CEST 2005 Kasimier Buchcik + + * xmlschemas.c: Fixed a memory leak in + xmlSchemaContentModelDump(). Added output of local types + in xmlSchemaElementDump(). Tiny cosmetical changes to the + dump output. + +Mon Oct 17 14:29:08 CEST 2005 Kasimier Buchcik + + * tree.c pattern.c: Silenced intel compiler warnings (reported + by Kjartan Maraas, bug #318517). + * xmlschemas.c: The above changes in pattern.c revealed an + inconsistency wrt IDCs: we now _only_ pop XPath states, if + we really pushed them beforehand; this was previously not + checked for the case when we discover an element node to be + invalid wrt the content model. + Fixed segfault in xmlSchemaGetEffectiveValueConstraint(). + +Fri Oct 14 16:40:18 CEST 2005 Kasimier Buchcik + + * result/schemas/*.err: Adapted regression test results. + +Fri Oct 14 16:21:22 CEST 2005 Kasimier Buchcik + + * xmlschemas.c: Fixed some identity-constraint issues: + Restructured IDC node-tables + Allowed IDCs to resolve also to nodes of complex type with + simple content. + Added check for keyrefs with references to keyrefs. + IDC target-nodes were interferring with IDC node-tables, + since they used one list of entries only. I separated this + one big list into 3 lists: 1 for IDC node-table entries, + 1 for _duplicates_ of IDC node-table entries and 1 for + IDC target-nodes. More code, but cleaner and it works at last. + Keyrefs will fail to resolve to duplicate key/unique entries. + I thought this was already working this way, but it didn't. + The wording of the definition for [node table] in the spec + can lead to a scenario, where keyrefs resolve perfectly, even + if the relevant key-sequences of the referenced key/unique have + duplicates in the subtree. Currently only Saxon 8.5.1 is + dissallowing resolution to duplicate entries correctly - we + will follow Saxon here. + Removed some intel compiler warnings (reported by + Kjartan Maraas, bug #318517). + * pattern.c: Fixed an IDC-XPath problem when resolving to + attributes. + +Mon Oct 14 01:15:14 CEST 2005 Rob Richards + * nanohttp.c include/wsockcompat.h: applied patch from Kolja Nowak + to use getaddrinfo() if supported in Windows build (bug# 317431). + +Mon Oct 10 15:33:48 CEST 2005 Kasimier Buchcik + + * result/schemas/*: Adapted regression test results. + +Mon Oct 10 15:12:43 CEST 2005 Kasimier Buchcik + + * xmlschemas.c include/libxml/schemasInternals.h + include/libxml/xmlerror.h: Initial implementation for + redefinitions; this still misses checks for restrictions + of the content model of complex types. + Fixed default/fixed values for attributes (looks like they + did not work in the last releases). + Completed constraints for attribute uses. + Seperated attribute derivation from attribute constraints. + Completed constraints for attribute group definitions. + Disallowing s of schemas in no target namespace if the + importing schema is a chameleon schema. This contradicts + the way Saxon, Xerces-J, XSV and IBM's SQC works, but the + W3C XML Schema WG, thinks it is correct to dissalow such + imports. + Added cos-all-limited constraints. + Restructured reference resolution to model groups and element + declarations. + Misc cleanup. + +Fri Oct 7 04:34:12 CEST 2005 Rob Richards + + * schematron.c xmlregexp.c: remove warnings under Windows. + +Wed Sep 28 23:42:14 CEST 2005 Daniel Veillard + + * parser.c: applied patch from Massimo Morara fixing bug #317447 + about risk of invalid write in xmlStringLenDecodeEntities + +Tue Sep 27 11:20:57 CEST 2005 Daniel Veillard + + * error.c: Adrian Mouat pointed out redundancies in xmlReportError() + +Mon Sep 26 19:18:24 CEST 2005 Daniel Veillard + + * xmlregexp.c: seems a test to avoid duplicate transition is + really needed at all times. Luka Por gave an example hitting + this. Changed back the internal API. + +Thu Sep 22 13:14:07 CEST 2005 Daniel Veillard + + * xmlreader.c: fixing leak in xmlTextReaderReadString() #316924 + +Thu Sep 15 16:12:44 CEST 2005 Daniel Veillard + + * uri.c: more fixes to the behaviour of xmlBuildRelativeURI + +Thu Sep 15 15:08:21 CEST 2005 Daniel Veillard + + * xmlregexp.c: detect combinatory explosion and return with + a runtime error in those case, c.f. #316338 though maybe we + should not see such an explosion with that specific regexp, + more checking needs to be done. + +Wed Sep 14 19:52:18 CEST 2005 Kasimier Buchcik + + * include/libxml/schemasInternals.h: Added some comments for the + struct fields. + +Wed Sep 14 13:24:27 HKT 2005 William Brack + + * uri.c: fixed problem when xmlBuildRelativeURI was given a + blank path (bug 316224) + Mon Sep 12 23:41:40 CEST 2005 Daniel Veillard * NEWS configure.in doc//*: release of 2.6.22 updated doc and diff --git a/HTMLparser.c b/HTMLparser.c index d11ae08..12afdd8 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -2678,7 +2678,7 @@ htmlParseScript(htmlParserCtxtPtr ctxt) { break; /* while */ } else { htmlParseErr(ctxt, XML_ERR_TAG_NAME_MISMATCH, - "Element %s embbeds close tag\n", + "Element %s embeds close tag\n", ctxt->name, NULL); } } else { @@ -2701,6 +2701,7 @@ htmlParseScript(htmlParserCtxtPtr ctxt) { } nbchar = 0; } + GROW; NEXTL(l); cur = CUR_CHAR(l); } @@ -4778,7 +4779,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { } break; case XML_PARSER_START_TAG: { - const xmlChar *name, *oldname; + const xmlChar *name; int failed; const htmlElemDesc * info; @@ -4831,7 +4832,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { SKIP(2); if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL)) ctxt->sax->endElement(ctxt->userData, name); - oldname = htmlnamePop(ctxt); + htmlnamePop(ctxt); ctxt->instate = XML_PARSER_CONTENT; #ifdef DEBUG_PUSH xmlGenericError(xmlGenericErrorContext, @@ -4852,7 +4853,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { */ if (xmlStrEqual(name, ctxt->name)) { nodePop(ctxt); - oldname = htmlnamePop(ctxt); + htmlnamePop(ctxt); } ctxt->instate = XML_PARSER_CONTENT; @@ -4869,7 +4870,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if ((info != NULL) && (info->empty)) { if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL)) ctxt->sax->endElement(ctxt->userData, name); - oldname = htmlnamePop(ctxt); + htmlnamePop(ctxt); } ctxt->instate = XML_PARSER_CONTENT; #ifdef DEBUG_PUSH diff --git a/HTMLtree.c b/HTMLtree.c index e77ee65..d73024a 100644 --- a/HTMLtree.c +++ b/HTMLtree.c @@ -506,16 +506,17 @@ htmlNodeDumpFile(FILE *out, xmlDocPtr doc, xmlNodePtr cur) { } /** - * htmlDocDumpMemory: + * htmlDocDumpMemoryFormat: * @cur: the document * @mem: OUT: the memory pointer * @size: OUT: the memory length + * @format: should formatting spaces been added * * Dump an HTML document in memory and return the xmlChar * and it's size. * It's up to the caller to free the memory. */ void -htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) { +htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) { xmlOutputBufferPtr buf; xmlCharEncodingHandlerPtr handler = NULL; const char *encoding; @@ -572,7 +573,8 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) { return; } - htmlDocContentDumpOutput(buf, cur, NULL); + htmlDocContentDumpFormatOutput(buf, cur, NULL, format); + xmlOutputBufferFlush(buf); if (buf->conv != NULL) { *size = buf->conv->use; @@ -584,6 +586,20 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) { (void)xmlOutputBufferClose(buf); } +/** + * htmlDocDumpMemory: + * @cur: the document + * @mem: OUT: the memory pointer + * @size: OUT: the memory length + * + * Dump an HTML document in memory and return the xmlChar * and it's size. + * It's up to the caller to free the memory. + */ +void +htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) { + htmlDocDumpMemoryFormat(cur, mem, size, 1); +} + /************************************************************************ * * diff --git a/Makefile.am b/Makefile.am index ee09a7b..5ef9d90 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1070,7 +1070,7 @@ SchemasPythonTests: LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ export LD_LIBRARY_PATH; \ echo "## XML Schemas datatypes Python based test suite" ; \ - echo "## It is normal to see 10 errors reported" ; \ + echo "## It is normal to see 11 errors reported" ; \ $(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \ fi) @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" MAKEFLAGS+=--silent pytests ; fi) diff --git a/Makefile.in b/Makefile.in index 3e66d17..d238442 100644 --- a/Makefile.in +++ b/Makefile.in @@ -2328,7 +2328,7 @@ SchemasPythonTests: LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ export LD_LIBRARY_PATH; \ echo "## XML Schemas datatypes Python based test suite" ; \ - echo "## It is normal to see 10 errors reported" ; \ + echo "## It is normal to see 11 errors reported" ; \ $(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \ fi) @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" MAKEFLAGS+=--silent pytests ; fi) diff --git a/NEWS b/NEWS index 6d91fc6..ccb9ace 100644 --- a/NEWS +++ b/NEWS @@ -15,176 +15,216 @@ ChangeLog.html to the CVS at http://cvs.gnome.org/viewcvs/libxml2/ code base.There is the list of public releases: +2.6.23: Jan 5 2006: + - portability fixes: Windows (Rob Richards), getaddrinfo on Windows + (Kolja Nowak, Rob Richards), icc warnings (Kjartan Maraas), + --with-minimum compilation fixes (William Brack), error case handling fix + on Solaris (Albert Chin), don't use 'list' as parameter name reported by + Samuel Diaz Garcia, more old Unices portability fixes (Albert Chin), + MinGW compilation (Mark Junker), HP-UX compiler warnings (Rick Jones), + + - code cleanup: xmlReportError (Adrian Mouat), remove xmlBufferClose + (Geert Jansen), unreachable code (Oleksandr Kononenko), refactoring + parsing code (Bjorn Reese) + - bug fixes: xmlBuildRelativeURI and empty path (William Brack), + combinatory explosion and performances in regexp code, leak in + xmlTextReaderReadString(), xmlStringLenDecodeEntities problem (Massimo + Morara), Identity Constraints bugs and a segfault (Kasimier Buchcik), + XPath pattern based evaluation bugs (DV & Kasimier), + xmlSchemaContentModelDump() memory leak (Kasimier), potential leak in + xmlSchemaCheckCSelectorXPath(), xmlTextWriterVSprintf() misuse of + vsnprintf (William Brack), XHTML serialization fix (Rob Richards), CRLF + split problem (William), issues with non-namespaced attributes in + xmlAddChild() xmlAddNextSibling() and xmlAddPrevSibling() (Rob Richards), + HTML parsing of script, Python must not output to stdout (Nic Ferrier), + exclusive C14N namespace visibility (Aleksey Sanin), XSD dataype + totalDigits bug (Kasimier Buchcik), error handling when writing to an + xmlBuffer (Rob Richards), runtest schemas error not reported (Hisashi + Fujinaka), signed/unsigned problem in date/time code (Albert Chin), fix + XSI driven XSD validation (Kasimier), parsing of xs:decimal (Kasimier), + fix DTD writer output (Rob Richards), leak in xmlTextReaderReadInnerXml + (Gary Coady), regexp bug affecting schemas (Kasimier), configuration of + runtime debugging (Kasimier), xmlNodeBufGetContent bug on entity refs + (Oleksandr Kononenko), xmlRegExecPushString2 bug (Sreeni Nair), + compilation and build fixes (Michael Day), removed dependancies on + xmlSchemaValidError (Kasimier), bug with , more XPath + pattern based evaluation fixes (Kasimier) + - improvements: XSD Schemas redefinitions/restrictions (Kasimier + Buchcik), node copy checks and fix for attribute (Rob Richards), counted + transition bug in regexps, ctxt->standalone = -2 to indicate no + standalone attribute was found, add xmlSchemaSetParserStructuredErrors() + (Kasimier Buchcik), add xmlTextReaderSchemaValidateCtxt() to API + (Kasimier), handle gzipped HTTP resources (Gary Coady), add + htmlDocDumpMemoryFormat. (Rob Richards), + - documentation: typo (Michael Day), libxml man page (Albert Chin), save + function to XML buffer (Geert Jansen), small doc fix (Aron Stansvik), + + + 2.6.22: Sep 12 2005: - build fixes: compile without schematron (Stéphane Bidoul) - bug fixes: xmlDebugDumpNode on namespace node (Oleg Paraschenko)i, - CDATA push parser bug, xmlElemDump problem with XHTML1 doc, - XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, - fix some output formatting for meta element (Rob Richards), - script and style XHTML1 serialization (David Madore), Attribute - derivation fixups in XSD (Kasimier Buchcik), better IDC error - reports (Kasimier Buchcik) - - - improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), - add XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements - preparing for derive (Kasimier Buchcik). + CDATA push parser bug, xmlElemDump problem with XHTML1 doc, + XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, fix some + output formatting for meta element (Rob Richards), script and style + XHTML1 serialization (David Madore), Attribute derivation fixups in XSD + (Kasimier Buchcik), better IDC error reports (Kasimier Buchcik) + - improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), add + XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements preparing for + derive (Kasimier Buchcik). - documentation: generation of gtk-doc like docs, integration with - devhelp. + devhelp. 2.6.21: Sep 4 2005: - build fixes: Cygwin portability fixes (Gerrit P. Haase), calling - convention problems on Windows (Marcus Boerger), cleanups based on - Linus' sparse tool, update of win32/configure.js (Rob Richards), - remove warnings on Windows(Marcus Boerger), compilation without SAX1, - detection of the Python binary, use $GCC inestad of $CC = 'gcc' (Andrew - W. Nosenko), compilation/link with threads and old gcc, compile - problem by C370 on Z/OS, + convention problems on Windows (Marcus Boerger), cleanups based on Linus' + sparse tool, update of win32/configure.js (Rob Richards), remove warnings + on Windows(Marcus Boerger), compilation without SAX1, detection of the + Python binary, use $GCC inestad of $CC = 'gcc' (Andrew W. Nosenko), + compilation/link with threads and old gcc, compile problem by C370 on + Z/OS, - bug fixes: http_proxy environments (Peter Breitenlohner), HTML UTF-8 - bug (Jiri Netolicky), XPath NaN compare bug (William Brack), - htmlParseScript potential bug, Schemas regexp handling of spaces, - Base64 Schemas comparisons NIST passes, automata build error xsd:all, - xmlGetNodePath for namespaced attributes (Alexander Pohoyda), - xmlSchemas foreign namespaces handling, XML Schemas facet comparison - (Kupriyanov Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier - Buchcik), xml: namespace ahndling in Schemas (Kasimier), empty model - group in Schemas (Kasimier), wilcard in Schemas (Kasimier), URI - composition (William), xs:anyType in Schemas (Kasimier), Python resolver - emmitting error messages directly, Python xmlAttr.parent (Jakub Piotr - Clapa), trying to fix the file path/URI conversion, - xmlTextReaderGetAttribute fix (Rob Richards), xmlSchemaFreeAnnot memleak - (Kasimier), HTML UTF-8 serialization, streaming XPath, Schemas determinism - detection problem, XInclude bug, Schemas context type (Dean Hill), - validation fix (Derek Poon), xmlTextReaderGetAttribute[Ns] namespaces - (Rob Richards), Schemas type fix (Kuba Nowakowski), UTF-8 parser bug, - error in encoding handling, xmlGetLineNo fixes, bug on entities handling, - entity name extraction in error handling with XInclude, text nodes - in HTML body tags (Gary Coady), xml:id and IDness at the treee level - fixes, XPath streaming patterns bugs. + bug (Jiri Netolicky), XPath NaN compare bug (William Brack), + htmlParseScript potential bug, Schemas regexp handling of spaces, Base64 + Schemas comparisons NIST passes, automata build error xsd:all, + xmlGetNodePath for namespaced attributes (Alexander Pohoyda), xmlSchemas + foreign namespaces handling, XML Schemas facet comparison (Kupriyanov + Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier Buchcik), xml: + namespace ahndling in Schemas (Kasimier), empty model group in Schemas + (Kasimier), wilcard in Schemas (Kasimier), URI composition (William), + xs:anyType in Schemas (Kasimier), Python resolver emmitting error + messages directly, Python xmlAttr.parent (Jakub Piotr Clapa), trying to + fix the file path/URI conversion, xmlTextReaderGetAttribute fix (Rob + Richards), xmlSchemaFreeAnnot memleak (Kasimier), HTML UTF-8 + serialization, streaming XPath, Schemas determinism detection problem, + XInclude bug, Schemas context type (Dean Hill), validation fix (Derek + Poon), xmlTextReaderGetAttribute[Ns] namespaces (Rob Richards), Schemas + type fix (Kuba Nowakowski), UTF-8 parser bug, error in encoding handling, + xmlGetLineNo fixes, bug on entities handling, entity name extraction in + error handling with XInclude, text nodes in HTML body tags (Gary Coady), + xml:id and IDness at the treee level fixes, XPath streaming patterns + bugs. - improvements: structured interfaces for schemas and RNG error reports - (Marcus Boerger), optimization of the char data inner loop parsing - (thanks to Behdad Esfahbod for the idea), schematron validation - though not finished yet, xmlSaveOption to omit XML declaration, - keyref match error reports (Kasimier), formal expression handling - code not plugged yet, more lax mode for the HTML parser, - parser XML_PARSE_COMPACT option for text nodes allocation. + (Marcus Boerger), optimization of the char data inner loop parsing + (thanks to Behdad Esfahbod for the idea), schematron validation though + not finished yet, xmlSaveOption to omit XML declaration, keyref match + error reports (Kasimier), formal expression handling code not plugged + yet, more lax mode for the HTML parser, parser XML_PARSE_COMPACT option + for text nodes allocation. - documentation: xmllint man page had --nonet duplicated 2.6.20: Jul 10 2005: - - build fixes: Windows build (Rob Richards), Mingw compilation (Igor - Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and - andriy@google.com), use gcc weak references to pthread to avoid the - pthread dependancy on Linux, compilation problem (Steve Nairn), - compiling of subset (Morten Welinder), IPv6/ss_family compilation - (William Brack), compilation when disabling parts of the library, - standalone test distribution. - - - bug fixes: bug in lang(), memory cleanup on errors (William Brack), - HTTP query strings (Aron Stansvik), memory leak in DTD (William), - integer overflow in XPath (William), nanoftp buffer size, pattern - "." apth fixup (Kasimier), leak in tree reported by Malcolm Rowe, - replaceNode patch (Brent Hendricks), CDATA with NULL content - (Mark Vakoc), xml:base fixup on XInclude (William), pattern - fixes (William), attribute bug in exclusive c14n (Aleksey Sanin), - xml:space and xml:lang with SAX2 (Rob Richards), namespace - trouble in complex parsing (Malcolm Rowe), XSD type QNames fixes - (Kasimier), XPath streaming fixups (William), RelaxNG bug (Rob Richards), - Schemas for Schemas fixes (Kasimier), removal of ID (Rob Richards), - a small RelaxNG leak, HTML parsing in push mode bug (James Bursa), - failure to detect UTF-8 parsing bugs in CDATA sections, areBlanks() - heuristic failure, duplicate attributes in DTD bug (William). - - - improvements: lot of work on Schemas by Kasimier Buchcik both on - conformance and streaming, Schemas validation messages (Kasimier - Buchcik, Matthew Burgess), namespace removal at the python level - (Brent Hendricks), Update to new Schemas regression tests from - W3C/Nist (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation - of xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert), - standalone test framework and programs, new DOM import APIs - xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and - xmlDOMWrapRemoveNode(), extension of xmllint capabilities for - SAX and Schemas regression tests, xmlStopParser() available in - pull mode too, ienhancement to xmllint --shell namespaces support, - Windows port of the standalone testing tools (Kasimier and William), - xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() - SAX Schemas APIs, Schemas xmlReader support. - + - build fixes: Windows build (Rob Richards), Mingw compilation (Igor + Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and + andriy@google.com), use gcc weak references to pthread to avoid the + pthread dependancy on Linux, compilation problem (Steve Nairn), compiling + of subset (Morten Welinder), IPv6/ss_family compilation (William Brack), + compilation when disabling parts of the library, standalone test + distribution. + - bug fixes: bug in lang(), memory cleanup on errors (William Brack), + HTTP query strings (Aron Stansvik), memory leak in DTD (William), integer + overflow in XPath (William), nanoftp buffer size, pattern "." apth fixup + (Kasimier), leak in tree reported by Malcolm Rowe, replaceNode patch + (Brent Hendricks), CDATA with NULL content (Mark Vakoc), xml:base fixup + on XInclude (William), pattern fixes (William), attribute bug in + exclusive c14n (Aleksey Sanin), xml:space and xml:lang with SAX2 (Rob + Richards), namespace trouble in complex parsing (Malcolm Rowe), XSD type + QNames fixes (Kasimier), XPath streaming fixups (William), RelaxNG bug + (Rob Richards), Schemas for Schemas fixes (Kasimier), removal of ID (Rob + Richards), a small RelaxNG leak, HTML parsing in push mode bug (James + Bursa), failure to detect UTF-8 parsing bugs in CDATA sections, + areBlanks() heuristic failure, duplicate attributes in DTD bug + (William). + - improvements: lot of work on Schemas by Kasimier Buchcik both on + conformance and streaming, Schemas validation messages (Kasimier Buchcik, + Matthew Burgess), namespace removal at the python level (Brent + Hendricks), Update to new Schemas regression tests from W3C/Nist + (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation of + xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert), + standalone test framework and programs, new DOM import APIs + xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and + xmlDOMWrapRemoveNode(), extension of xmllint capabilities for SAX and + Schemas regression tests, xmlStopParser() available in pull mode too, + ienhancement to xmllint --shell namespaces support, Windows port of the + standalone testing tools (Kasimier and William), + xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() SAX + Schemas APIs, Schemas xmlReader support. 2.6.19: Apr 02 2005: - - build fixes: drop .la from RPMs, --with-minimum build fix (William - Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with - AIX 5.3 compiler, fixed elfgcchack.h generation and PLT reduction - code on Linux/ELF/gcc4 - - bug fixes: schemas type decimal fixups (William Brack), xmmlint return - code (Gerry Murphy), small schemas fixes (Matthew Burgess and - GUY Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey - Sanin), segfault in Schemas (Kasimier Buchcik), Schemas attribute - validation (Kasimier), Prop related functions and xmlNewNodeEatName - (Rob Richards), HTML serialization of name attribute on a elements, - Python error handlers leaks and improvement (Brent Hendricks), - uninitialized variable in encoding code, Relax-NG validation bug, - potential crash if gnorableWhitespace is NULL, xmlSAXParseDoc and - xmlParseDoc signatures, switched back to assuming UTF-8 in case - no encoding is given at serialization time - - improvements: lot of work on Schemas by Kasimier Buchcik on facets - checking and also mixed handling. + - build fixes: drop .la from RPMs, --with-minimum build fix (William + Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with AIX + 5.3 compiler, fixed elfgcchack.h generation and PLT reduction code on + Linux/ELF/gcc4 + - bug fixes: schemas type decimal fixups (William Brack), xmmlint return + code (Gerry Murphy), small schemas fixes (Matthew Burgess and GUY + Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey Sanin), + segfault in Schemas (Kasimier Buchcik), Schemas attribute validation + (Kasimier), Prop related functions and xmlNewNodeEatName (Rob Richards), + HTML serialization of name attribute on a elements, Python error handlers + leaks and improvement (Brent Hendricks), uninitialized variable in + encoding code, Relax-NG validation bug, potential crash if + gnorableWhitespace is NULL, xmlSAXParseDoc and xmlParseDoc signatures, + switched back to assuming UTF-8 in case no encoding is given at + serialization time + - improvements: lot of work on Schemas by Kasimier Buchcik on facets + checking and also mixed handling. - 2.6.18: Mar 13 2005: - - build fixes: warnings (Peter Breitenlohner), testapi.c generation, - Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed), - some gcc4 fixes, HP-UX portability fixes (Rick Jones). - - bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and - xmlreader stopping on non-fatal errors, thread support for dictionnaries - reference counting (Gary Coady), internal subset and push problem, - URL saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python - paths fixup (Stephane Bidoul), xmlGetNodePath and namespaces, - xmlSetNsProp fix (Mike Hommey), warning should not count as error - (William Brack), xmlCreatePushParser empty chunk, XInclude parser - flags (William), cleanup FTP and HTTP code to reuse the uri parsing - and IPv6 (William), xmlTextWriterStartAttributeNS fix (Rob Richards), - XMLLINT_INDENT being empty (William), xmlWriter bugs (Rob Richards), - multithreading on Windows (Rich Salz), xmlSearchNsByHref fix (Kasimier), - Python binding leak (Brent Hendricks), aliasing bug exposed by gcc4 - on s390, xmlTextReaderNext bug (Rob Richards), Schemas decimal type - fixes (William Brack), xmlByteConsumed static buffer (Ben Maurer). - - improvement: speedup parsing comments and DTDs, dictionnary support for - hash tables, Schemas Identity constraints (Kasimier), streaming XPath - subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical - values handling (Kasimier), add xmlTextReaderByteConsumed (Aron - Stansvik), - - Documentation: Wiki support (Joel Reed) - + - build fixes: warnings (Peter Breitenlohner), testapi.c generation, + Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed), + some gcc4 fixes, HP-UX portability fixes (Rick Jones). + - bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and + xmlreader stopping on non-fatal errors, thread support for dictionnaries + reference counting (Gary Coady), internal subset and push problem, URL + saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python paths + fixup (Stephane Bidoul), xmlGetNodePath and namespaces, xmlSetNsProp fix + (Mike Hommey), warning should not count as error (William Brack), + xmlCreatePushParser empty chunk, XInclude parser flags (William), cleanup + FTP and HTTP code to reuse the uri parsing and IPv6 (William), + xmlTextWriterStartAttributeNS fix (Rob Richards), XMLLINT_INDENT being + empty (William), xmlWriter bugs (Rob Richards), multithreading on Windows + (Rich Salz), xmlSearchNsByHref fix (Kasimier), Python binding leak (Brent + Hendricks), aliasing bug exposed by gcc4 on s390, xmlTextReaderNext bug + (Rob Richards), Schemas decimal type fixes (William Brack), + xmlByteConsumed static buffer (Ben Maurer). + - improvement: speedup parsing comments and DTDs, dictionnary support for + hash tables, Schemas Identity constraints (Kasimier), streaming XPath + subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical + values handling (Kasimier), add xmlTextReaderByteConsumed (Aron + Stansvik), + - Documentation: Wiki support (Joel Reed) 2.6.17: Jan 16 2005: - - build fixes: Windows, warnings removal (William Brack), - maintainer-clean dependency(William), build in a different directory - (William), fixing --with-minimum configure build (William), BeOS - build (Marcin Konicki), Python-2.4 detection (William), compilation - on AIX (Dan McNichol) + - build fixes: Windows, warnings removal (William Brack), + maintainer-clean dependency(William), build in a different directory + (William), fixing --with-minimum configure build (William), BeOS build + (Marcin Konicki), Python-2.4 detection (William), compilation on AIX (Dan + McNichol) - bug fixes: xmlTextReaderHasAttributes (Rob Richards), xmlCtxtReadFile() - to use the catalog(s), loop on output (William Brack), XPath memory leak, - ID deallocation problem (Steve Shepard), debugDumpNode crash (William), - warning not using error callback (William), xmlStopParser bug (William), - UTF-16 with BOM on DTDs (William), namespace bug on empty elements - in push mode (Rob Richards), line and col computations fixups (Aleksey - Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William), - patterns with too many steps, bug in RNG choice optimization, line - number sometimes missing. - - - improvements: XSD Schemas (Kasimier Buchcik), python generator (William), - xmlUTF8Strpos speedup (William), unicode Python strings (William), - XSD error reports (Kasimier Buchcik), Python __str__ call serialize(). - - - new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber - for the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs - (mostly Joel Reed), error extraction API from regexps, new XMLSave - option for format (Phil Shafer) - - documentation: site improvement (John Fleck), FAQ entries (William). + to use the catalog(s), loop on output (William Brack), XPath memory leak, + ID deallocation problem (Steve Shepard), debugDumpNode crash (William), + warning not using error callback (William), xmlStopParser bug (William), + UTF-16 with BOM on DTDs (William), namespace bug on empty elements in + push mode (Rob Richards), line and col computations fixups (Aleksey + Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William), + patterns with too many steps, bug in RNG choice optimization, line number + sometimes missing. + - improvements: XSD Schemas (Kasimier Buchcik), python generator + (William), xmlUTF8Strpos speedup (William), unicode Python strings + (William), XSD error reports (Kasimier Buchcik), Python __str__ call + serialize(). + - new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber for + the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs (mostly Joel + Reed), error extraction API from regexps, new XMLSave option for format + (Phil Shafer) + - documentation: site improvement (John Fleck), FAQ entries + (William). 2.6.16: Nov 10 2004: @@ -197,7 +237,7 @@ http://cvs.gnome.org/viewcvs/libxml2/ - documentation: fix to xmllint man page, some API function descritpion were updated. - improvements: DTD validation APIs provided at the Python level (Brent - Hendricks) + Hendricks) 2.6.15: Oct 27 2004: diff --git a/SAX2.c b/SAX2.c index 9f7edf6..17425e7 100644 --- a/SAX2.c +++ b/SAX2.c @@ -2233,9 +2233,13 @@ xmlSAX2StartElementNs(void *ctx, */ if ((URI != NULL) && (ret->ns == NULL)) { ret->ns = xmlSearchNs(ctxt->myDoc, parent, prefix); + if ((ret->ns == NULL) && (xmlStrEqual(prefix, BAD_CAST "xml"))) { + ret->ns = xmlSearchNs(ctxt->myDoc, ret, prefix); + } if (ret->ns == NULL) { ns = xmlNewNs(ret, NULL, prefix); if (ns == NULL) { + xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs"); return; } diff --git a/c14n.c b/c14n.c index 32c7004..33a5803 100644 --- a/c14n.c +++ b/c14n.c @@ -802,7 +802,7 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) if(xmlStrlen(attr->ns->prefix) == 0) { has_empty_ns = 1; } - } else if(attr->ns == NULL) { + } else if((attr->ns != NULL) && (xmlStrlen(attr->ns->prefix) == 0) && (xmlStrlen(attr->ns->href) == 0)) { has_visibly_utilized_empty_ns = 1; } } diff --git a/config.h.in b/config.h.in index 8484193..1dafc10 100644 --- a/config.h.in +++ b/config.h.in @@ -97,24 +97,12 @@ /* Define if history library is there (-lhistory) */ #undef HAVE_LIBHISTORY -/* Define to 1 if you have the `inet' library (-linet). */ -#undef HAVE_LIBINET - -/* Define to 1 if you have the `net' library (-lnet). */ -#undef HAVE_LIBNET - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -#undef HAVE_LIBNSL - /* Define if pthread library is there (-lpthread) */ #undef HAVE_LIBPTHREAD /* Define if readline library is there (-lreadline) */ #undef HAVE_LIBREADLINE -/* Define to 1 if you have the `socket' library (-lsocket). */ -#undef HAVE_LIBSOCKET - /* Have compression library */ #undef HAVE_LIBZ @@ -237,6 +225,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Whether va_copy() is available */ +#undef HAVE_VA_COPY + /* Define to 1 if you have the `vfprintf' function. */ #undef HAVE_VFPRINTF @@ -252,6 +243,9 @@ /* Define to 1 if you have the `_stat' function. */ #undef HAVE__STAT +/* Whether __va_copy() is available */ +#undef HAVE___VA_COPY + /* Name of package */ #undef PACKAGE diff --git a/configure b/configure index ac6e4bb..ad70461 100755 --- a/configure +++ b/configure @@ -1618,7 +1618,7 @@ host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` LIBXML_MAJOR_VERSION=2 LIBXML_MINOR_VERSION=6 -LIBXML_MICRO_VERSION=22 +LIBXML_MICRO_VERSION=23 LIBXML_MICRO_VERSION_SUFFIX= LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION @@ -19934,8 +19934,6 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' - -# AM_MAINTAINER_MODE _cppflags="${CPPFLAGS}" @@ -26028,58 +26026,20 @@ fi done -echo "$as_me:$LINENO: checking for gethostent" >&5 -echo $ECHO_N "checking for gethostent... $ECHO_C" >&6 -if test "${ac_cv_func_gethostent+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF +echo "$as_me:$LINENO: checking for va_copy" >&5 +echo $ECHO_N "checking for va_copy... $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. */ -/* Define gethostent to an innocuous variant, in case declares gethostent. - For example, HP-UX 11i declares gettimeofday. */ -#define gethostent innocuous_gethostent - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gethostent (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef gethostent - -/* 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 gethostent (); -/* 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_gethostent) || defined (__stub___gethostent) -choke me -#else -char (*f) () = gethostent; -#endif -#ifdef __cplusplus -} -#endif - +#include +va_list ap1,ap2; int main () { -return f != gethostent; +va_copy(ap1,ap2); ; return 0; } @@ -26106,47 +26066,38 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_gethostent=yes + have_va_copy=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostent=no +have_va_copy=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostent" >&5 -echo "${ECHO_T}$ac_cv_func_gethostent" >&6 -if test $ac_cv_func_gethostent = yes; then - : -else +echo "$as_me:$LINENO: result: $have_va_copy" >&5 +echo "${ECHO_T}$have_va_copy" >&6 +if test x"$have_va_copy" = x"yes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_VA_COPY 1 +_ACEOF -echo "$as_me:$LINENO: checking for gethostent in -lnsl" >&5 -echo $ECHO_N "checking for gethostent in -lnsl... $ECHO_C" >&6 -if test "${ac_cv_lib_nsl_gethostent+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" -cat >conftest.$ac_ext <<_ACEOF + echo "$as_me:$LINENO: checking for __va_copy" >&5 +echo $ECHO_N "checking for __va_copy... $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 gethostent (); +#include + va_list ap1,ap2; int main () { -gethostent (); +__va_copy(ap1,ap2); ; return 0; } @@ -26173,82 +26124,51 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_nsl_gethostent=yes + have___va_copy=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_nsl_gethostent=no +have___va_copy=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_nsl_gethostent" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostent" >&6 -if test $ac_cv_lib_nsl_gethostent = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNSL 1 -_ACEOF - - LIBS="-lnsl $LIBS" + echo "$as_me:$LINENO: result: $have___va_copy" >&5 +echo "${ECHO_T}$have___va_copy" >&6 + if test x"$have___va_copy" = x"yes"; then -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE___VA_COPY 1 +_ACEOF + fi fi -echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 -if test "${ac_cv_func_setsockopt+set}" = set; then +echo "$as_me:$LINENO: checking for library containing gethostent" >&5 +echo $ECHO_N "checking for library containing gethostent... $ECHO_C" >&6 +if test "${ac_cv_search_gethostent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_func_search_save_LIBS=$LIBS +ac_cv_search_gethostent=no +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define setsockopt to an innocuous variant, in case declares setsockopt. - For example, HP-UX 11i declares gettimeofday. */ -#define setsockopt innocuous_setsockopt - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char setsockopt (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef setsockopt /* 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 setsockopt (); -/* 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_setsockopt) || defined (__stub___setsockopt) -choke me -#else -char (*f) () = setsockopt; -#endif -#ifdef __cplusplus -} -#endif - +char gethostent (); int main () { -return f != setsockopt; +gethostent (); ; return 0; } @@ -26275,30 +26195,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_setsockopt=yes + ac_cv_search_gethostent="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_setsockopt=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 -if test $ac_cv_func_setsockopt = yes; then - : -else - -echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 -if test "${ac_cv_lib_socket_setsockopt+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 +if test "$ac_cv_search_gethostent" = no; then + for ac_lib in nsl; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -26311,11 +26219,11 @@ 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 setsockopt (); +char gethostent (); int main () { -setsockopt (); +gethostent (); ; return 0; } @@ -26342,82 +26250,51 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_socket_setsockopt=yes + ac_cv_search_gethostent="-l$ac_lib" +break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_setsockopt=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + done fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 -if test $ac_cv_lib_socket_setsockopt = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSOCKET 1 -_ACEOF - - LIBS="-lsocket $LIBS" - +LIBS=$ac_func_search_save_LIBS fi +echo "$as_me:$LINENO: result: $ac_cv_search_gethostent" >&5 +echo "${ECHO_T}$ac_cv_search_gethostent" >&6 +if test "$ac_cv_search_gethostent" != no; then + test "$ac_cv_search_gethostent" = "none required" || LIBS="$ac_cv_search_gethostent $LIBS" fi -echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 -if test "${ac_cv_func_setsockopt+set}" = set; then +echo "$as_me:$LINENO: checking for library containing setsockopt" >&5 +echo $ECHO_N "checking for library containing setsockopt... $ECHO_C" >&6 +if test "${ac_cv_search_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_func_search_save_LIBS=$LIBS +ac_cv_search_setsockopt=no +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define setsockopt to an innocuous variant, in case declares setsockopt. - For example, HP-UX 11i declares gettimeofday. */ -#define setsockopt innocuous_setsockopt - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char setsockopt (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef setsockopt /* 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 setsockopt (); -/* 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_setsockopt) || defined (__stub___setsockopt) -choke me -#else -char (*f) () = setsockopt; -#endif -#ifdef __cplusplus -} -#endif - int main () { -return f != setsockopt; +setsockopt (); ; return 0; } @@ -26444,30 +26321,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_setsockopt=yes + ac_cv_search_setsockopt="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_setsockopt=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 -if test $ac_cv_func_setsockopt = yes; then - : -else - -echo "$as_me:$LINENO: checking for setsockopt in -lnet" >&5 -echo $ECHO_N "checking for setsockopt in -lnet... $ECHO_C" >&6 -if test "${ac_cv_lib_net_setsockopt+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnet $LIBS" -cat >conftest.$ac_ext <<_ACEOF +if test "$ac_cv_search_setsockopt" = no; then + for ac_lib in socket net; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -26511,82 +26376,51 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_net_setsockopt=yes + ac_cv_search_setsockopt="-l$ac_lib" +break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_net_setsockopt=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + done fi -echo "$as_me:$LINENO: result: $ac_cv_lib_net_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_net_setsockopt" >&6 -if test $ac_cv_lib_net_setsockopt = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNET 1 -_ACEOF - - LIBS="-lnet $LIBS" - +LIBS=$ac_func_search_save_LIBS fi +echo "$as_me:$LINENO: result: $ac_cv_search_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_search_setsockopt" >&6 +if test "$ac_cv_search_setsockopt" != no; then + test "$ac_cv_search_setsockopt" = "none required" || LIBS="$ac_cv_search_setsockopt $LIBS" fi -echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6 -if test "${ac_cv_func_connect+set}" = set; then +echo "$as_me:$LINENO: checking for library containing connect" >&5 +echo $ECHO_N "checking for library containing connect... $ECHO_C" >&6 +if test "${ac_cv_search_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_func_search_save_LIBS=$LIBS +ac_cv_search_connect=no +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define connect to an innocuous variant, in case declares connect. - For example, HP-UX 11i declares gettimeofday. */ -#define connect innocuous_connect - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char connect (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef connect /* 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 connect (); -/* 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_connect) || defined (__stub___connect) -choke me -#else -char (*f) () = connect; -#endif -#ifdef __cplusplus -} -#endif - int main () { -return f != connect; +connect (); ; return 0; } @@ -26613,30 +26447,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_connect=yes + ac_cv_search_connect="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_connect=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6 -if test $ac_cv_func_connect = yes; then - : -else - -echo "$as_me:$LINENO: checking for connect in -linet" >&5 -echo $ECHO_N "checking for connect in -linet... $ECHO_C" >&6 -if test "${ac_cv_lib_inet_connect+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-linet $LIBS" -cat >conftest.$ac_ext <<_ACEOF +if test "$ac_cv_search_connect" = no; then + for ac_lib in inet; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -26680,27 +26502,23 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_inet_connect=yes + ac_cv_search_connect="-l$ac_lib" +break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_connect=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + done fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_connect" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_connect" >&6 -if test $ac_cv_lib_inet_connect = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBINET 1 -_ACEOF - - LIBS="-linet $LIBS" - +LIBS=$ac_func_search_save_LIBS fi +echo "$as_me:$LINENO: result: $ac_cv_search_connect" >&5 +echo "${ECHO_T}$ac_cv_search_connect" >&6 +if test "$ac_cv_search_connect" != no; then + test "$ac_cv_search_connect" = "none required" || LIBS="$ac_cv_search_connect $LIBS" fi @@ -26708,7 +26526,7 @@ fi echo "$as_me:$LINENO: checking for type of socket length (socklen_t)" >&5 echo $ECHO_N "checking for type of socket length (socklen_t)... $ECHO_C" >&6 cat > conftest.$ac_ext < @@ -26719,7 +26537,7 @@ int main(void) { (void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL) ; return 0; } EOF -if { (eval echo configure:26722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then +if { (eval echo configure:26540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then rm -rf conftest* echo "$as_me:$LINENO: result: socklen_t *" >&5 @@ -26731,7 +26549,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -26742,7 +26560,7 @@ int main(void) { (void)getsockopt (1, 1, 1, NULL, (size_t *)NULL) ; return 0; } EOF -if { (eval echo configure:26745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then +if { (eval echo configure:26563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then rm -rf conftest* echo "$as_me:$LINENO: result: size_t *" >&5 @@ -26754,7 +26572,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -26765,7 +26583,7 @@ int main(void) { (void)getsockopt (1, 1, 1, NULL, (int *)NULL) ; return 0; } EOF -if { (eval echo configure:26768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then +if { (eval echo configure:26586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then rm -rf conftest* echo "$as_me:$LINENO: result: int *" >&5 @@ -27529,7 +27347,7 @@ RDL_LIBS="" if test "${GCC}" != "yes" ; then case "${host}" in - *-*-hpux* ) + hppa*-*-hpux* ) CFLAGS="${CFLAGS} -Wp,-H30000" ;; *-dec-osf* ) @@ -27777,8 +27595,101 @@ fi ;; *) - MODULE_EXTENSION=".so" - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 + 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 + libxml_have_shl_load=yes +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 @@ -27844,18 +27755,105 @@ 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 - WITH_MODULES=1 - MODULE_PLATFORM_LIBS="-ldld" + MODULE_PLATFORM_LIBS="-ldld" + libxml_have_shl_load=yes +else -cat >>confdefs.h <<\_ACEOF -#define HAVE_SHLLOAD + 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. */ -fi +#ifdef __STDC__ +# include +#else +# include +#endif +#undef dlopen - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +/* 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 + libxml_have_dlopen=yes +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 @@ -27921,16 +27919,44 @@ 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 + MODULE_PLATFORM_LIBS="-ldl" + libxml_have_dlopen=yes +fi + +fi + +fi + +fi + + + if test "${libxml_have_shl_load}" = "yes"; then + MODULE_EXTENSION=".sl" WITH_MODULES=1 - MODULE_PLATFORM_LIBS="-ldl" cat >>confdefs.h <<\_ACEOF -#define HAVE_DLOPEN +#define HAVE_SHLLOAD _ACEOF + fi -fi + if test "${libxml_have_dlopen}" = "yes"; then + case "${host}" in + *-*-hpux* ) + MODULE_EXTENSION=".sl" + ;; + * ) + MODULE_EXTENSION=".so" + ;; + esac + WITH_MODULES=1 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DLOPEN +_ACEOF + + fi ;; esac fi @@ -31039,3 +31065,4 @@ fi chmod +x xml2-config python/setup.py +echo Done configuring diff --git a/configure.in b/configure.in index 6119d61..253b63a 100644 --- a/configure.in +++ b/configure.in @@ -5,7 +5,7 @@ AC_CANONICAL_HOST LIBXML_MAJOR_VERSION=2 LIBXML_MINOR_VERSION=6 -LIBXML_MICRO_VERSION=22 +LIBXML_MICRO_VERSION=23 LIBXML_MICRO_VERSION_SUFFIX= LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION @@ -50,8 +50,6 @@ test "x$U" != "x" && AC_MSG_ERROR(Compiler not ANSI compliant) AC_LIBTOOL_WIN32_DLL AM_PROG_LIBTOOL -# AM_MAINTAINER_MODE - dnl dnl We process the AC_ARG_WITH first so that later we can modify dnl some of them to try to prevent impossible combinations. This @@ -432,11 +430,31 @@ dnl Checking the standard string functions availability AC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf,, NEED_TRIO=1) +dnl Checking for va_copy availability +AC_MSG_CHECKING([for va_copy]) +AC_TRY_LINK([#include +va_list ap1,ap2;], [va_copy(ap1,ap2);], +have_va_copy=yes, +have_va_copy=no) +AC_MSG_RESULT($have_va_copy) +if test x"$have_va_copy" = x"yes"; then + AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available]) +else + AC_MSG_CHECKING([for __va_copy]) + AC_TRY_LINK([#include + va_list ap1,ap2;], [__va_copy(ap1,ap2);], + have___va_copy=yes, + have___va_copy=no) + AC_MSG_RESULT($have___va_copy) + if test x"$have___va_copy" = x"yes"; then + AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available]) + fi +fi + dnl Checks for inet libraries: -AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent)) -AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) -AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(net, setsockopt)) -AC_CHECK_FUNC(connect, , AC_CHECK_LIB(inet, connect)) +AC_SEARCH_LIBS(gethostent, [nsl]) +AC_SEARCH_LIBS(setsockopt, [socket net]) +AC_SEARCH_LIBS(connect, [inet]) dnl Determine what socket length (socklen_t) data type is AC_MSG_CHECKING([for type of socket length (socklen_t)]) @@ -569,7 +587,7 @@ dnl DEC : Enable NaN/Inf dnl if test "${GCC}" != "yes" ; then case "${host}" in - *-*-hpux* ) + hppa*-*-hpux* ) CFLAGS="${CFLAGS} -Wp,-H30000" ;; *-dec-osf* ) @@ -703,18 +721,34 @@ if test "$with_modules" != "no" ; then ]) ;; *) - MODULE_EXTENSION=".so" - AC_CHECK_LIB(dld, shl_load, [ + AC_CHECK_FUNC(shl_load, libxml_have_shl_load=yes, [ + AC_CHECK_LIB(dld, shl_load, [ + MODULE_PLATFORM_LIBS="-ldld" + libxml_have_shl_load=yes], [ + AC_CHECK_FUNC(dlopen, libxml_have_dlopen=yes, [ + AC_CHECK_LIB(dl, dlopen, [ + MODULE_PLATFORM_LIBS="-ldl" + libxml_have_dlopen=yes])])])]) + + if test "${libxml_have_shl_load}" = "yes"; then + MODULE_EXTENSION=".sl" WITH_MODULES=1 - MODULE_PLATFORM_LIBS="-ldld" AC_DEFINE([HAVE_SHLLOAD], [], [Have shl_load based dso]) - ]) + fi - AC_CHECK_LIB(dl, dlopen, [ + if test "${libxml_have_dlopen}" = "yes"; then + case "${host}" in + *-*-hpux* ) + MODULE_EXTENSION=".sl" + ;; + * ) + MODULE_EXTENSION=".so" + ;; + esac + WITH_MODULES=1 - MODULE_PLATFORM_LIBS="-ldl" AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso]) - ]) + fi ;; esac fi @@ -1320,3 +1354,4 @@ ln -s Copyright COPYING AC_OUTPUT(libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h xml2-config libxml-2.0.pc libxml-2.0-uninstalled.pc python/setup.py) chmod +x xml2-config python/setup.py +echo Done configuring diff --git a/doc/APIchunk0.html b/doc/APIchunk0.html index 36b401b..7763664 100644 --- a/doc/APIchunk0.html +++ b/doc/APIchunk0.html @@ -73,7 +73,9 @@ A:link, A:visited, A:active { text-decoration: underline }
Activation
xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
xmlTextReaderSchemaValidate
+xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetSchema
+
Actually
XML_SCHEMAS_TYPE_VARIETY_ABSENT
Add
xmlACatalogAdd
xmlAddChild
xmlAddChildList
@@ -96,7 +98,9 @@ A:link, A:visited, A:active { text-decoration: underline } xmlCleanupGlobals
xmlInitGlobals
AegeanNumbers
xmlUCSIsAegeanNumbers
-
All
xmlNanoFTPGet
+
All
_xmlSchema
+_xmlSchemaType
+xmlNanoFTPGet
xmlNanoFTPList
xmlParseAttValue
xmlTextWriterEndDocument
@@ -203,6 +207,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParseInNodeContext
xmlSAXParseEntity
Base
_xmlParserInput
+_xmlSchemaType
xmlNodeGetBase
BaseChar
IS_BASECHAR
IS_LETTER
@@ -230,6 +235,7 @@ A:link, A:visited, A:active { text-decoration: underline }
Both
XML_SUBSTITUTE_BOTH
xmlStreamPush
xmlStreamPushAttr
+xmlStreamPushNode
BoxDrawing
xmlUCSIsBoxDrawing
BraillePatterns
xmlUCSIsBraillePatterns
Brzozowski
xmlExpExpDerive
diff --git a/doc/APIchunk1.html b/doc/APIchunk1.html index 668482d..2736de5 100644 --- a/doc/APIchunk1.html +++ b/doc/APIchunk1.html @@ -301,6 +301,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlReconciliateNs
Correct
xmlSetCompressMode
xmlSetDocCompressMode
+
Could
_xmlSchemaType
Count
xmlLsCountNode
Creates
htmlNewDoc
htmlNewDocNoDtD
diff --git a/doc/APIchunk10.html b/doc/APIchunk10.html index 74cea54..c397308 100644 --- a/doc/APIchunk10.html +++ b/doc/APIchunk10.html @@ -55,6 +55,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlShellDir
xmlTextWriterWriteRawLen
above
xmlParseMarkupDecl
+xmlStreamWantsAnyNode
xmlXPathSubstringFunction
absent
XML_SCHEMAS_ELEM_BLOCK_ABSENT
XML_SCHEMAS_ELEM_BLOCK_EXTENSION
@@ -106,6 +107,7 @@ A:link, A:visited, A:active { text-decoration: underline }
account
xmlSchemaValidateFacetWhtsp
act
xmlStreamPush
xmlStreamPushAttr
+xmlStreamPushNode
activate
xmlTextReaderSetParserProp
activated
DEBUG_MEMORY
xmlAutomataNewAllTrans
@@ -119,6 +121,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
xmlTextReaderSchemaValidate
+xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetSchema
activation
xmlGetLineNo
acts
xmlGetProp
@@ -162,6 +165,7 @@ A:link, A:visited, A:active { text-decoration: underline } attributeSAXFunc
htmlDocContentDumpFormatOutput
htmlDocContentDumpOutput
+htmlDocDumpMemoryFormat
htmlNodeDump
htmlNodeDumpFile
htmlNodeDumpFileFormat
@@ -196,6 +200,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathSubstringFunction
additional
xmlDOMWrapAdoptNode
xmlDOMWrapReconcileNamespaces
+
additionally
xmlStreamWantsAnyNode
address
xmlModuleSymbol
xmlNewTextWriterDoc
adds
xmlAutomataNewAllTrans
@@ -362,6 +367,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNanoFTPProxy
xmlStreamPush
xmlStreamPushAttr
+xmlStreamPushNode
xmlTextReaderPreserve
xmlTextReaderPreservePattern
xmlXPathStringEvalNumber
@@ -415,7 +421,6 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMAS_ANYATTR_SKIP
XML_SCHEMAS_ANYATTR_STRICT
XML_SCHEMAS_ELEM_NSDEFAULT
-_xmlSchema
xmlNamespaceParseNCName
xmlNamespaceParseNSDef
xmlNamespaceParseQName
@@ -525,11 +530,16 @@ A:link, A:visited, A:active { text-decoration: underline }
atomic
xmlGcMemGet
xmlGcMemSetup
attached
xmlTextReaderGetRemainder
-
attr
XML_SCHEMAS_ATTRGROUP_MARKED
+
attr
XML_SCHEMAS_ATTRGROUP_HAS_REFS
+XML_SCHEMAS_ATTRGROUP_MARKED
+XML_SCHEMAS_ATTRGROUP_REDEFINED
_xmlID
_xmlRef
+
attribute-
xmlStreamPushNode
attribute-list
xmlParseDefaultDecl
xmlParseEntityRef
+
attribute-node
xmlStreamPushAttr
+
attribute-nodes
xmlStreamWantsAnyNode
attributeFormDefault
XML_SCHEMAS_QUALIF_ATTR
augmented
docbParseDocument
htmlParseDocument
@@ -546,8 +556,11 @@ A:link, A:visited, A:active { text-decoration: underline }
autoclose
htmlAutoCloseTag
autoclosed
htmlIsAutoClosed
autogeneration
xmlKeepBlanksDefault
-
automatically
xmlCharEncOutFunc
+
automatically
XML_SCHEMAS_TYPE_VARIETY_ABSENT
+xmlCharEncOutFunc
xmlNewTextChild
+xmlStrncatNew
+
automaton
_xmlSchemaType
autoreference
_xmlDoc
avoiding
xmlTextReaderNext
xmlTextReaderNextSibling
diff --git a/doc/APIchunk11.html b/doc/APIchunk11.html index 763623f..ce2a617 100644 --- a/doc/APIchunk11.html +++ b/doc/APIchunk11.html @@ -58,10 +58,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNewStringInputStream
xmlRelaxNGNewValidCtxt
xmlSchemaNewStringValue
-xmlSchemaNewValidCtxt
-xmlSchemaSAXPlug
-xmlSchemaSAXUnplug
-xmlSchemaValidateStream
xmlSchematronNewValidCtxt
xmlSetCompressMode
xmlSetDocCompressMode
@@ -96,6 +92,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
xmlTextReaderSchemaValidate
+xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetParserProp
xmlTextReaderSetSchema
xmlValidGetValidElements
@@ -194,7 +191,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParseElementMixedContentDecl
bracket
xmlParseCharData
branch
xmlDOMWrapRemoveNode
-xmlSchemaValidateOneElement
break
_xmlError
xmlDOMWrapAdoptNode
xmlDOMWrapReconcileNamespaces
@@ -210,6 +206,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlAllocParserInputBuffer
xmlFreeParserInputBuffer
xmlOutputBufferClose
+xmlOutputBufferCreateBuffer
xmlOutputBufferCreateFd
xmlOutputBufferCreateFile
xmlOutputBufferCreateFilename
@@ -264,7 +261,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaParse
xmlSchematronParse
xmlTextReaderNextSibling
-
built-in
xmlSchemaGetBuiltInListSimpleTypeItemType
+
built-in
_xmlSchemaType
+xmlSchemaGetBuiltInListSimpleTypeItemType
xmlSchemaGetBuiltInType
xmlSchemaIsBuiltInTypeFacet
xmlSchemaValidateFacetWhtsp
diff --git a/doc/APIchunk12.html b/doc/APIchunk12.html index 9d1944e..6db6d0d 100644 --- a/doc/APIchunk12.html +++ b/doc/APIchunk12.html @@ -37,7 +37,8 @@ A:link, A:visited, A:active { text-decoration: underline } w-w x-x y-z -

Letter c:

calculates
xmlUTF8Size
+

Letter c:

calculated
xmlStrncatNew
+
calculates
xmlUTF8Size
calling
_xmlXPathContext
xmlBuildRelativeURI
xmlC14NDocDumpMemory
@@ -51,7 +52,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathSubValues
xmlXPathValueFlipSign
calls
xlinkNodeDetectFunc
-xmlSchemaSAXPlug
xmlXPathAxisFunc
came
xmlPopInput
cannot
xmlParseAttribute
@@ -121,6 +121,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlLoadCatalogs
category
xmlUCSIsCat
cause
xmlShellPrintXPathError
+
cdata-section-
xmlStreamPushNode
+xmlStreamWantsAnyNode
ceiling
xmlXPathCeilingFunction
certainly
xmlTextReaderGetRemainder
chained
xmlFreeNsList
@@ -128,10 +130,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlCtxtResetLastError
xmlNanoFTPCwd
xmlParseSDDecl
-xmlRelaxNGParse
xmlResetLastError
xmlSchemaCollapseString
-xmlSchemaParse
xmlSchemaWhiteSpaceReplace
xmlSubstituteEntitiesDefault
xmlSwitchEncoding
@@ -318,6 +318,7 @@ A:link, A:visited, A:active { text-decoration: underline }
combining
IS_COMBINING_CH
come
xmlStreamPush
xmlStreamPushAttr
+xmlStreamPushNode
coment
xmlTextWriterEndComment
comes
xmlValidityErrorFunc
xmlValidityWarningFunc
@@ -341,6 +342,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextWriterWriteFormatComment
xmlTextWriterWriteVFormatComment
xmlXPathIsNodeType
+
comment-
xmlStreamPushNode
+xmlStreamWantsAnyNode
comments
xmlC14NDocDumpMemory
xmlC14NDocSave
xmlC14NDocSaveTo
@@ -415,6 +418,9 @@ A:link, A:visited, A:active { text-decoration: underline } LIBXML_SCHEMATRON_ENABLED
LIBXML_TEST_VERSION
LIBXML_UNICODE_ENABLED
+_xmlSchemaAttribute
+_xmlSchemaElement
+_xmlSchemaFacet
xmlAutomataCompile
xmlCheckVersion
xmlExpDump
@@ -451,6 +457,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNodeGetBase
complex
XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION
XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION
+_xmlSchemaType
complexType
XML_SCHEMAS_TYPE_ABSTRACT
XML_SCHEMAS_TYPE_BLOCK_DEFAULT
XML_SCHEMAS_TYPE_BLOCK_EXTENSION
@@ -459,6 +466,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMAS_TYPE_FINAL_RESTRICTION
XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD
complicated
xmlBuildRelativeURI
+
component
_xmlSchemaType
components
_xmlSchema
compound
xmlXPathFreeNodeSet
xmlXPtrFreeLocationSet
@@ -580,7 +588,9 @@ A:link, A:visited, A:active { text-decoration: underline }
consist
xmlXPathNextAncestor
constant
XML_SAX2_MAGIC
xmlByteConsumed
-
constraint
_xmlSchemaWildcard
+
constraint
_xmlSchemaAttribute
+_xmlSchemaElement
+_xmlSchemaWildcard
_xmlSchemaWildcardNs
xmlParseEntityRef
xmlValidateNotationDecl
@@ -644,7 +654,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStrlen
xmlXPathDistinct
xmlXPathDistinctSorted
-
contains
xmlCurrentChar
+
contains
XML_SCHEMAS_ATTRGROUP_HAS_REFS
+xmlCurrentChar
xmlParseEntityRef
xmlParsePEReference
xmlParserHandlePEReference
@@ -693,6 +704,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaGetParserErrors
xmlSchemaSetParserErrors
continuing
xmlXPathSubstringFunction
+
contraint
_xmlSchemaElement
contrary
xmlNodeListGetRawString
xmlXPathFreeNodeSetList
control
_xmlXPathContext
@@ -743,6 +755,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathStringFunction
xmlXPathStringLengthFunction
converter
xmlAllocOutputBuffer
+xmlOutputBufferCreateBuffer
xmlOutputBufferCreateFd
xmlOutputBufferCreateFile
xmlOutputBufferCreateFilename
@@ -782,6 +795,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
xmlTextReaderSchemaValidate
+xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetSchema
xmlValidateDtd
count
ftpListCallback
@@ -807,7 +821,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlCreateEnumeration
xmlNewCatalog
xmlNewDtd
-xmlNewGlobalNs
xmlNewNs
creates
xmlAutomataNewAllTrans
xmlAutomataNewCountTrans
@@ -850,7 +863,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlMemGet
xmlMemUsed
xmlOutputBufferCreateFilename
-xmlSchemaValidateFile
custom
xmlDOMWrapAdoptNode
xmlSaveSetAttrEscape
xmlSaveSetEscape
diff --git a/doc/APIchunk13.html b/doc/APIchunk13.html index a44fa80..d286a7a 100644 --- a/doc/APIchunk13.html +++ b/doc/APIchunk13.html @@ -44,6 +44,8 @@ A:link, A:visited, A:active { text-decoration: underline }
day:minute
ftpListCallback
de-coupled
xmlValidateDtd
deactivated
xmlTextReaderRelaxNGSetSchema
+xmlTextReaderSchemaValidate
+xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetSchema
deallocate
_xmlParserInput
xmlCleanupParser
@@ -112,7 +114,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathDebugDumpObject
decimal
xmlXPathStringFunction
decl
XML_SCHEMAS_ELEM_INTERNAL_CHECKED
-_xmlSchemaAttribute
xmlAddAttributeDecl
xmlNewDocElementContent
xmlNewElementContent
@@ -212,6 +213,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSAX2StartElementNs
xmlTextReaderPreservePattern
xmlValidateDtd
+
defs
_xmlSchema
+_xmlSchemaElement
delayed
xmlOutputBufferWrite
xmlOutputBufferWriteEscape
xmlOutputBufferWriteString
@@ -248,18 +251,17 @@ A:link, A:visited, A:active { text-decoration: underline } xmlExpStringDerive
des
xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
-xmlTextReaderSchemaValidate
xmlTextReaderSetSchema
desactivated
xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
-xmlTextReaderSchemaValidate
xmlTextReaderSetSchema
descendant
xmlXPathNextDescendant
descendant-or-self
xmlXPathNextDescendantOrSelf
descendants
xmlXPathNextDescendant
xmlXPathNextDescendantOrSelf
xmlXPathNextFollowing
-
described
xmlValidateAttributeDecl
+
described
xmlStreamWantsAnyNode
+xmlValidateAttributeDecl
xmlValidateDocument
xmlValidateDocumentFinal
xmlValidateDtdFinal
@@ -350,7 +352,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSAX2EndElementNs
xmlSAX2Reference
xmlSAX2StartElementNs
-xmlSchemaIsValid
detection
docbCreatePushParserCtxt
xlinkExtendedLinkFunk
xlinkExtendedLinkSetFunk
@@ -378,6 +379,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlPatterncompile
xmlStreamPush
xmlStreamPushAttr
+xmlStreamPushNode
dictionnary
_xmlParserCtxt
_xmlXPathContext
xmlDictCreate
@@ -586,9 +588,7 @@ A:link, A:visited, A:active { text-decoration: underline }
duplicates
xmlSchemaCopyValue
duration
xmlSchemaGetCanonValue
during
xmlSAXDefaultVersion
-xmlSchemaIsValid
xmlSchemaNewDocParserCtxt
-xmlSchemaSetValidOptions
xmlSchematronNewDocParserCtxt
dynamic
LIBXML_MODULE_EXTENSION

A-B diff --git a/doc/APIchunk14.html b/doc/APIchunk14.html index 5c7e274..c093285 100644 --- a/doc/APIchunk14.html +++ b/doc/APIchunk14.html @@ -70,9 +70,12 @@ A:link, A:visited, A:active { text-decoration: underline } resolveEntitySAXFunc
xmlSAX2ResolveEntity

elem
XML_SCHEMAS_ELEM_INTERNAL_CHECKED
-
element-
xmlXPathOrderDocElems
+
element-
xmlStreamPushNode
+xmlXPathOrderDocElems
element-node
xmlDOMWrapReconcileNamespaces
+xmlStreamPush
element-nodes
xmlDOMWrapReconcileNamespaces
+xmlStreamWantsAnyNode
elementFormDefault
XML_SCHEMAS_QUALIF_ELEM
elementdecl
xmlParseElementDecl
xmlParseMarkupDecl
@@ -256,6 +259,35 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathConvertBoolean
xmlXPathConvertNumber
xmlXPathConvertString
+
errors
INPUT_CHUNK
+_xmlSAXHandler
+_xmlSAXHandlerV1
+_xmlValidCtxt
+_xmlXPathContext
+fatalErrorSAXFunc
+initGenericErrorDefaultFunc
+xmlCharEncOutFunc
+xmlCheckHTTPInput
+xmlDOMWrapAdoptNode
+xmlDOMWrapReconcileNamespaces
+xmlDOMWrapRemoveNode
+xmlDebugCheckDocument
+xmlExpGetLanguage
+xmlExpGetStart
+xmlHashAddEntry
+xmlHashAddEntry2
+xmlHashAddEntry3
+xmlRelaxNGGetParserErrors
+xmlRelaxNGSetParserErrors
+xmlSchemaGetCanonValue
+xmlSchemaGetCanonValueWhtsp
+xmlSchemaGetParserErrors
+xmlSchemaSetParserErrors
+xmlSchemaValueAppend
+xmlSchemaValueGetAsString
+xmlSchemaValueGetNext
+xmlShellCmd
+xmlStreamWantsAnyNode
errror
xmlDOMWrapNewCtxt
escape
docbEncodeEntities
htmlEncodeEntities
@@ -277,7 +309,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSaveSetEscape
especially
xmlExpParse
established
xmlNanoFTPUpdateURL
-
etc
xmlDocGetRootElement
+
etc
_xmlSchemaFacet
+xmlDocGetRootElement
xmlDocSetRootElement
xmlParseInNodeContext
evaluate
xmlXPathEvalExpr
@@ -309,11 +342,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParseBalancedChunkMemoryRecover
xmlTextWriterFullEndElement
xmlXPathRoundFunction
-
event
xmlSchemaSAXPlug
-xmlSchemaSAXUnplug
-xmlSchemaValidateStream
events
htmlSAXParseDoc
-xmlSchemaValidateStream
ever
xmlExpCtxtNbCons
everywhere
xmlSAXParseFileWithData
xmlSAXParseMemoryWithData
@@ -375,6 +404,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchematronNewParserCtxt
xmlStreamPush
xmlStreamPushAttr
+xmlStreamPushNode
experimental
xmlDOMWrapAdoptNode
xmlDOMWrapReconcileNamespaces
xmlDOMWrapRemoveNode
diff --git a/doc/APIchunk15.html b/doc/APIchunk15.html index da7f8f7..c6452a2 100644 --- a/doc/APIchunk15.html +++ b/doc/APIchunk15.html @@ -55,6 +55,7 @@ A:link, A:visited, A:active { text-decoration: underline }
facets
XML_SCHEMAS_TYPE_FACETSNEEDVALUE
XML_SCHEMAS_TYPE_HAS_FACETS
XML_SCHEMAS_TYPE_NORMVALUENEEDED
+_xmlSchemaType
xmlSchemaCheckFacet
facility
xmlExpCtxtNbCons
xmlExpCtxtNbNodes
@@ -102,7 +103,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSAXParseMemoryWithData
far
_xmlParserCtxt
fatalErrorSAXFunc
-xmlSchemaIsValid
fashion
xmlNewRMutex
fast
htmlInitAutoClose
faster
htmlNodeStatus
@@ -118,6 +118,8 @@ A:link, A:visited, A:active { text-decoration: underline }
fed
xmlCreatePushParserCtxt
xmlNewTextReader
xmlNewTextReaderFilename
+xmlStreamPushNode
+xmlStreamWantsAnyNode
fetch
xmlNanoFTPGetSocket
xmlNanoFTPOpen
xmlNanoHTTPFetch
@@ -202,7 +204,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderIsValid
flagged
_htmlElemDesc
htmlGetMetaEncoding
-
flags
_xmlXPathContext
+
flags
XML_SCHEMAS_TYPE_VARIETY_ABSENT
+_xmlXPathContext
xmlDOMWrapAdoptNode
xmlDOMWrapReconcileNamespaces
xmlPatterncompile
@@ -222,9 +225,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStringLenGetNodeList
floor
xmlXPathFloorFunction
flow
xmlScanName
-xmlSchemaSAXPlug
-xmlSchemaSAXUnplug
-xmlSchemaValidateStream
flushes
xmlOutputBufferClose
xmlOutputBufferFlush
follow
xmlAutomataNewNegTrans
@@ -285,6 +285,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextWriterWriteVFormatRaw
xmlTextWriterWriteVFormatString
formatting
htmlDocContentDumpFormatOutput
+htmlDocDumpMemoryFormat
htmlNodeDump
htmlNodeDumpFile
htmlNodeDumpFileFormat
@@ -307,7 +308,6 @@ A:link, A:visited, A:active { text-decoration: underline } htmlSAXParseFile
xmlParseCtxtExternalEntity
xmlParseExternalEntity
-
forward
xmlSchemaValidateStream
fptr
XML_CAST_FPTR
fragment
_xmlURI
xmlNewDocFragment
@@ -381,10 +381,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlRelaxNGSetParserErrors
xmlRelaxNGSetValidErrors
xmlRelaxNGSetValidStructuredErrors
-xmlSchemaGetValidErrors
xmlSchemaSetParserErrors
-xmlSchemaSetValidErrors
-xmlSchemaSetValidStructuredErrors
+xmlSchemaSetParserStructuredErrors
xmlShellCmd
xmlSwitchEncoding
xmlSwitchInputEncoding
@@ -396,7 +394,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlValidCtxtNormalizeAttributeValue
xmlValidNormalizeAttributeValue
xmlXIncludeSetFlags
-
future
xmlSchemaValidateFile

A-B C-C D-E diff --git a/doc/APIchunk16.html b/doc/APIchunk16.html index d04b049..dcc30f1 100644 --- a/doc/APIchunk16.html +++ b/doc/APIchunk16.html @@ -161,12 +161,13 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathFloorFunction
xmlXPathSubstringFunction

greater-than
xmlNewTextChild
-
group
XML_SCHEMAS_ATTRGROUP_MARKED
+
group
XML_SCHEMAS_ATTRGROUP_HAS_REFS
+XML_SCHEMAS_ATTRGROUP_MARKED
+XML_SCHEMAS_ATTRGROUP_REDEFINED
XML_SCHEMAS_ELEM_FINAL_ABSENT
XML_SCHEMAS_ELEM_FINAL_EXTENSION
XML_SCHEMAS_ELEM_FINAL_RESTRICTION
XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD
-_xmlSchemaAttribute
_xmlSchemaAttributeGroup
_xmlSchemaElement
ftpListCallback
@@ -275,8 +276,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaGetBuiltInListSimpleTypeItemType
highly
htmlParseElement
xmlParseElement
-xmlRelaxNGParse
-xmlSchemaParse
hold
xmlDOMWrapReconcileNamespaces
xmlNewTextWriterDoc
xmlNewTextWriterPushParser
diff --git a/doc/APIchunk17.html b/doc/APIchunk17.html index 22d1024..eabec9f 100644 --- a/doc/APIchunk17.html +++ b/doc/APIchunk17.html @@ -40,6 +40,8 @@ A:link, A:visited, A:active { text-decoration: underline }

Letter i:

iconv
LIBXML_ICONV_ENABLED
LIBXML_ISO8859X_ENABLED
identify
xmlParseAttributeType
+
identity-constraint
_xmlSchema
+_xmlSchemaElement
ignorable
ignorableWhitespace
ignorableWhitespaceSAXFunc
xmlIsBlankNode
@@ -130,6 +132,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNanoFTPList
xmlNanoHTTPFetch
xmlNanoHTTPSave
+
incl
_xmlSchemaType
include
XINCLUDE_NODE
xmlC14NDocDumpMemory
xmlC14NDocSave
@@ -217,6 +220,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNanoHTTPOpenRedir
xmlStreamPush
xmlStreamPushAttr
+xmlStreamPushNode
indicates
XML_SCHEMAS_TYPE_FACETSNEEDVALUE
XML_SCHEMAS_TYPE_INTERNAL_INVALID
XML_SCHEMAS_TYPE_INTERNAL_RESOLVED
@@ -288,7 +292,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNewTextReader
xmlRelaxNGGetParserErrors
xmlSchemaGetParserErrors
-xmlSchemaValidateStream
xmlTextReaderByteConsumed
xmlXPathOrderDocElems
informations
_xmlAttr
@@ -313,13 +316,12 @@ A:link, A:visited, A:active { text-decoration: underline } xmlRelaxParserSetFlag
xmlSAX2EndElementNs
xmlSAX2StartElementNs
-xmlSchemaGetValidErrors
-xmlSchemaSetValidErrors
xmlShellDir
xmlXIncludeProcessNode
informative
_xmlError
infos
_xmlParserCtxt
inherited
_xmlParserCtxt
+_xmlSchemaType
xmlEntityReferenceFunc
xmlNodeGetSpacePreserve
xmlXPathNextAttribute
@@ -327,6 +329,7 @@ A:link, A:visited, A:active { text-decoration: underline }
inherits
xmlNewChild
xmlNewTextChild
initial
_xmlDoc
+_xmlSchemaAttribute
xmlAutomataGetInitState
xmlBufferCreateSize
xmlInitNodeInfoSeq
@@ -442,8 +445,6 @@ A:link, A:visited, A:active { text-decoration: underline } htmlParseDocument
xmlParseDocument
xmlParseReference
-xmlRelaxNGParse
-xmlSchemaParse
xmlTextReaderCurrentDoc
xmlTextReaderCurrentNode
interfaces
LIBXML_AUTOMATA_ENABLED
@@ -463,7 +464,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlRelaxNGNewDocParserCtxt
xmlRemoveID
xmlRemoveRef
-xmlSchemaValidateFile
interned
xmlPatterncompile
xmlTextReaderConstString
interning
xmlCopyNodeList
diff --git a/doc/APIchunk18.html b/doc/APIchunk18.html index 8bc0157..51e8c2a 100644 --- a/doc/APIchunk18.html +++ b/doc/APIchunk18.html @@ -73,8 +73,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathOrderDocElems
keyword
xmlParseDefaultDecl
kill
xmlCheckVersion
-
kind
_xmlSchemaAttribute
-_xmlSchemaAttributeGroup
+
kind
_xmlSchemaAttributeGroup
_xmlSchemaElement
_xmlSchemaFacet
_xmlSchemaNotation
@@ -134,8 +133,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlRootNode
xmlSaveFileTo
xmlSaveFormatFileTo
-xmlSchemaSAXPlug
-xmlSchemaSAXUnplug
leading
xmlParseAttValue
xmlParseElementChildrenContentDecl
xmlParseElementMixedContentDecl
diff --git a/doc/APIchunk19.html b/doc/APIchunk19.html index cecaf32..c54ee8d 100644 --- a/doc/APIchunk19.html +++ b/doc/APIchunk19.html @@ -51,7 +51,6 @@ A:link, A:visited, A:active { text-decoration: underline }
main
xmlIsMainThread
maintained
xmlRemoveID
xmlRemoveRef
-xmlSchemaSAXPlug
major
xmlDecodeEntities
make
xmlCreateEntitiesTable
xmlNewNode
@@ -149,12 +148,14 @@ A:link, A:visited, A:active { text-decoration: underline } xmlExpMaxToken
xmlExpNewCtxt
xmlPatternMaxDepth
+
maybe
_xmlSchemaElement
mean
xmlPatternMinDepth
means
xmlExpNewRange
xmlSetGenericErrorFunc
xmlSetStructuredErrorFunc
xmlStreamPush
xmlStreamPushAttr
+xmlStreamPushNode
mechanism
_xmlXPathContext
xmlStructuredErrorFunc
xmlXPathRegisterFuncLookup
@@ -177,6 +178,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextWriterWriteVFormatRaw
xmlTextWriterWriteVFormatString
xmlXPathStringFunction
+
member-types
_xmlSchemaType
memo
getSystemId
xmlSAX2GetSystemId
memorylist
xmlMemDisplay
@@ -259,7 +261,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSAXParseMemory
xmlSAXParseMemoryWithData
xmlSetCompressMode
-
model
xmlValidBuildContentModel
+
model
_xmlSchemaType
+xmlValidBuildContentModel
modified
xmlBufferCreateStatic
xmlNodeAddContent
xmlNodeAddContentLen
diff --git a/doc/APIchunk2.html b/doc/APIchunk2.html index 9a0e7ab..85de2bb 100644 --- a/doc/APIchunk2.html +++ b/doc/APIchunk2.html @@ -133,15 +133,6 @@ A:link, A:visited, A:active { text-decoration: underline }
DefaultDecl
xmlParseAttributeListDecl
xmlParseDefaultDecl
Deletes
xmlListDelete
-
Deprecated
_xmlSchema
-htmlAttrAllowed
-xmlCleanupPredefinedEntities
-xmlCopyElementContent
-xmlFreeElementContent
-xmlInitializePredefinedEntities
-xmlNewElementContent
-xmlParseQuotedString
-xmlSprintfElementContent
Depth
_xmlParserCtxt
_xmlValidCtxt
Dereference
xmlExpFree
@@ -155,6 +146,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderIsNamespaceDecl
xmlTextReaderStandalone
Devanagari
xmlUCSIsDevanagari
+
Different
xmlStreamPushNode
Digit
IS_DIGIT
xmlNamespaceParseNCName
xmlParseName
diff --git a/doc/APIchunk20.html b/doc/APIchunk20.html index 01db33a..9d751f3 100644 --- a/doc/APIchunk20.html +++ b/doc/APIchunk20.html @@ -80,7 +80,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathLangFunction
nearly
xmlSAXParseFileWithData
xmlSAXParseMemoryWithData
-
necessary
_htmlElemDesc
+
necessary
XML_SCHEMAS_TYPE_VARIETY_ABSENT
+_htmlElemDesc
xmlCheckUTF8
xmlDebugDumpString
need
WITH_TRIO
@@ -101,6 +102,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlRegExecErrInfo
xmlRegExecNextValues
xmlSchemaNewStringValue
+xmlStreamWantsAnyNode
xmlValidGetValidElements
xmlXPathNewContext
needed
_xmlParserCtxt
@@ -116,7 +118,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParseElementChildrenContentDecl
xmlParseElementMixedContentDecl
xmlReconciliateNs
-xmlSchemaSAXPlug
xmlSetBufferAllocationScheme
xmlShellPwd
xmlStrncat
@@ -136,6 +137,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStrstr
needs
xmlEntityReferenceFunc
xmlSchemaValidateFacetWhtsp
+xmlStreamWantsAnyNode
xmlXPathNodeSetFreeNs
negated
_xmlSchemaWildcard
negative
xmlC14NDocDumpMemory
@@ -215,7 +217,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlIsLetter
xmlSAX2InitDefaultSAXHandler
xmlXPathBooleanFunction
-
none
getNamespace
+
none
XML_SCHEMAS_TYPE_VARIETY_ABSENT
+getNamespace
xmlDecodeEntities
xmlGetLastChild
xmlOutputBufferCreateFilename
@@ -265,7 +268,6 @@ A:link, A:visited, A:active { text-decoration: underline } _xmlSchema
_xmlSchemaElement
xmlDecodeEntities
-xmlNewGlobalNs
xmlParserHandleReference
xmlScanName
ns-decls
xmlDOMWrapAdoptNode
diff --git a/doc/APIchunk21.html b/doc/APIchunk21.html index 6789f9d..13518b1 100644 --- a/doc/APIchunk21.html +++ b/doc/APIchunk21.html @@ -50,11 +50,11 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathMultValues
xmlXPathSubValues
obligated
xmlParseEntityRef
-
obsolete
_xmlSchemaAttribute
-xmlNormalizeWindowsPath
+
obsolete
xmlNormalizeWindowsPath
obsolete:
XML_SCHEMAS_ELEM_TOPLEVEL
occupied
xmlCanonicPath
-
occur
xmlParseComment
+
occur
XML_SCHEMAS_TYPE_VARIETY_ABSENT
+xmlParseComment
xmlParseMarkupDecl
occured
xmlCtxtGetLastError
xmlDictCreate
@@ -152,6 +152,7 @@ A:link, A:visited, A:active { text-decoration: underline }
onto
xmlParserInputBufferGrow
xmlStreamPush
xmlStreamPushAttr
+xmlStreamPushNode
opaque
_xmlSchema
_xmlURI
open
htmlCtxtReadFd
@@ -222,7 +223,6 @@ A:link, A:visited, A:active { text-decoration: underline }
option
xmlDOMWrapAdoptNode
xmlDOMWrapReconcileNamespaces
xmlGetLineNo
-xmlSchemaValidCtxtGetOptions
optional
XML_SCHEMAS_ATTR_USE_OPTIONAL
docbCreatePushParserCtxt
htmlCreatePushParserCtxt
@@ -244,7 +244,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParseMisc
xmlPatterncompile
xmlSchemaCheckFacet
-xmlSchemaValidateStream
xmlShellSave
xmlShellValidate
xmlURIUnescapeString
@@ -252,12 +251,11 @@ A:link, A:visited, A:active { text-decoration: underline } xmlCtxtUseOptions
xmlDOMWrapRemoveNode
xmlModuleOpen
+xmlSaveToBuffer
xmlSaveToFd
xmlSaveToFilename
xmlSaveToIO
-xmlSchemaSetValidOptions
-xmlSchemaValidCtxtGetOptions
-xmlSchemaValidateFile
+xmlTextReaderSchemaValidateCtxt
ordered
xmlListAppend
xmlListInsert
xmlXPathNextAncestor
@@ -278,14 +276,14 @@ A:link, A:visited, A:active { text-decoration: underline }
oriented
xmlValidityErrorFunc
xmlValidityWarningFunc
origin
_xmlXPathContext
-
original
xmlCharEncodingInputFunc
+
original
_xmlSchemaElement
+_xmlSchemaFacet
+xmlCharEncodingInputFunc
xmlCopyError
xmlGetEncodingAlias
xmlListMerge
xmlParseEntityValue
xmlParseURIRaw
-xmlSchemaSAXPlug
-xmlSchemaSAXUnplug
xmlShellSave
xmlStrcat
xmlStrncat
diff --git a/doc/APIchunk22.html b/doc/APIchunk22.html index 42008e7..fdec580 100644 --- a/doc/APIchunk22.html +++ b/doc/APIchunk22.html @@ -81,8 +81,6 @@ A:link, A:visited, A:active { text-decoration: underline }
partial
xmlOutputBufferWrite
xmlOutputBufferWriteEscape
xmlOutputBufferWriteString
-
particle
_xmlSchemaAttribute
-_xmlSchemaElement
particular
_xmlNodeSet
pass
xmlCurrentChar
xmlRelaxParserSetFlag
@@ -137,7 +135,9 @@ A:link, A:visited, A:active { text-decoration: underline } xmlPatternStreamable
xmlPatterncompile
xmlSchemaValidateFacetWhtsp
+xmlStreamWantsAnyNode
xmlTextReaderPreservePattern
+
patterns
_xmlSchemaFacet
pcdata
cdataBlock
cdataBlockSAXFunc
xmlSAX2CDataBlock
@@ -179,8 +179,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlReconciliateNs
xmlRegExecErrInfo
xmlRegExecNextValues
-xmlSchemaSAXPlug
-xmlSchemaSAXUnplug
xmlValidGetValidElements
points
_xmlChRangeGroup
pop
xmlPopInput
@@ -199,8 +197,36 @@ A:link, A:visited, A:active { text-decoration: underline }
positioned
xmlTextReaderReadString
positionned
xmlTextReaderReadAttributeValue
positions
xmlUTF8Strsub
-
possible
_xmlSchemaType
-xmlCopyNodeList
+
positive
UTF8ToHtml
+UTF8Toisolat1
+docbEncodeEntities
+htmlEncodeEntities
+isolat1ToUTF8
+xmlBufferAdd
+xmlBufferAddHead
+xmlBufferCCat
+xmlBufferCat
+xmlCharEncodingInputFunc
+xmlCharEncodingOutputFunc
+xmlRelaxNGValidateDoc
+xmlSchemaCheckFacet
+xmlSchemaValPredefTypeNode
+xmlSchemaValPredefTypeNodeNoNorm
+xmlSchemaValidateFacet
+xmlSchemaValidateFacetWhtsp
+xmlSchemaValidateLengthFacet
+xmlSchemaValidateLengthFacetWhtsp
+xmlSchemaValidateListSimpleTypeFacet
+xmlSchemaValidatePredefinedType
+xmlTextReaderPreservePattern
+xmlValidateNCName
+xmlValidateNMToken
+xmlValidateName
+xmlValidateQName
+xmlXPathBooleanFunction
+xmlXPathFloorFunction
+xmlXPathStringFunction
+
possible
xmlCopyNodeList
xmlCreateEntityParserCtxt
xmlParseDefaultDecl
xmlParseExternalID
@@ -210,6 +236,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
xmlTextReaderSchemaValidate
+xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetSchema
xmlValidateDtdFinal
possibly
xmlDocGetRootElement
@@ -249,7 +276,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlPatternStreamable
xmlRegNewExecCtxt
xmlRelaxNGNewValidCtxt
-xmlSchemaNewValidCtxt
xmlSchematronNewValidCtxt
xmlTextReaderRelaxNGSetSchema
xmlTextReaderSetSchema
@@ -403,8 +429,11 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
xmlTextReaderSchemaValidate
+xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetSchema
processing-instruction
xmlXPathIsNodeType
+
processing-instruction-node
xmlStreamPushNode
+
processing-instruction-nodes
xmlStreamWantsAnyNode
processor
xmlCurrentChar
xmlParseAttValue
xmlParseEntityRef
@@ -425,6 +454,7 @@ A:link, A:visited, A:active { text-decoration: underline }
progresses
xmlRegNewExecCtxt
progressive
_xmlParserCtxt
xmlAllocParserInputBuffer
+xmlOutputBufferCreateBuffer
xmlOutputBufferCreateFd
xmlOutputBufferCreateFile
xmlOutputBufferCreateFilename
@@ -484,7 +514,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlOutputMatchCallback
xmlSaveFormatFile
xmlSaveFormatFileEnc
-xmlSchemaValidateStream
xmlUTF8Strloc
xmlUTF8Strpos
provides
endElementNsSAX2Func
@@ -519,6 +548,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStreamPop
xmlXPathEvalExpr
pushed
xmlRegExecErrInfo
+xmlStreamPushNode
+xmlStreamWantsAnyNode
xmlXPathFunction
pushing
xmlParsePEReference
put
xmlCatalogAdd
diff --git a/doc/APIchunk23.html b/doc/APIchunk23.html index d5a969d..b217f1c 100644 --- a/doc/APIchunk23.html +++ b/doc/APIchunk23.html @@ -116,8 +116,7 @@ A:link, A:visited, A:active { text-decoration: underline }
read-only
xmlDictCreateSub
readable
xmlStrEqual
reader-
xmlTextReaderGetRemainder
-
reading
xmlSchemaValidateStream
-xmlShell
+
reading
xmlShell
ready
INPUT_CHUNK
xmlAutomataCompile
realloc
_xmlBuffer
@@ -212,9 +211,9 @@ A:link, A:visited, A:active { text-decoration: underline }
recursively
xmlLoadACatalog
xmlParseAttValue
redeclared
xmlReconciliateNs
-
redef
_xmlSchemaAttributeGroup
+
redefined
XML_SCHEMAS_ATTRGROUP_REDEFINED
+XML_SCHEMAS_TYPE_REDEFINED
redefinition
xmlErrMemory
-
redefinitions
_xmlSchemaType
redir
xmlNanoHTTPMethodRedir
redirected
xmlNanoHTTPMethodRedir
xmlNanoHTTPOpenRedir
@@ -235,10 +234,10 @@ A:link, A:visited, A:active { text-decoration: underline } xmlAddRef
xmlFreeRefTable
xmlNewCharRef
-
referenced
_xmlSchemaAttributeGroup
-xmlLinkGetData
+
referenced
xmlLinkGetData
xmlParseAttValue
-
references
XML_SCHEMAS_ATTR_INTERNAL_RESOLVED
+
references
XML_SCHEMAS_ATTRGROUP_HAS_REFS
+XML_SCHEMAS_ATTR_INTERNAL_RESOLVED
XML_SCHEMAS_ELEM_CIRCULAR
XML_SCHEMAS_ELEM_INTERNAL_RESOLVED
htmlParseEntityRef
@@ -268,6 +267,7 @@ A:link, A:visited, A:active { text-decoration: underline }
refs
_xmlDoc
_xmlParserCtxt
refuse
xmlNewNs
+
regex
_xmlSchemaFacet
regexp
_xmlElement
xmlAutomataCompile
xmlRegExecErrInfo
@@ -397,7 +397,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlHashUpdateEntry2
xmlHashUpdateEntry3
xmlNewTextChild
-xmlSchemaSAXPlug
xmlXPathTranslateFunction
replacement
xmlACatalogAdd
xmlCatalogAdd
@@ -474,6 +473,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSetStructuredErrorFunc
xmlStreamPush
xmlStreamPushAttr
+xmlStreamPushNode
resides
xmlTextReaderConstXmlLang
xmlTextReaderXmlLang
resize
xmlBufferResize
@@ -504,7 +504,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlRelaxNGFreeParserCtxt
xmlRelaxNGFreeValidCtxt
xmlSchemaFreeParserCtxt
-xmlSchemaFreeValidCtxt
xmlSchematronFreeParserCtxt
xmlSchematronFreeValidCtxt
xmlTextReaderClose
@@ -516,8 +515,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNanoHTTPContentLength
responsible
xmlC14NDocDumpMemory
xmlCanonicPath
-
restored
xmlSchemaSAXUnplug
-xmlTextReaderSetErrorHandler
+
restored
xmlTextReaderSetErrorHandler
xmlTextReaderSetStructuredErrorHandler
restrict
xmlParseExternalID
restriction
XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION
@@ -586,7 +584,6 @@ A:link, A:visited, A:active { text-decoration: underline } internalSubsetSAXFunc
xmlDocGetRootElement
xmlDocSetRootElement
-xmlNewGlobalNs
xmlParseDocTypeDecl
xmlParseNamespace
xmlPatternFromRoot
@@ -595,6 +592,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlShellPwd
xmlStreamPush
xmlStreamPushAttr
+xmlStreamPushNode
xmlValidateRoot
xmlXPathNewValueTree
xmlXPathRoot
diff --git a/doc/APIchunk24.html b/doc/APIchunk24.html index ed6bc81..63d494b 100644 --- a/doc/APIchunk24.html +++ b/doc/APIchunk24.html @@ -80,6 +80,7 @@ A:link, A:visited, A:active { text-decoration: underline }
saving
LIBXML_OUTPUT_ENABLED
LIBXML_WRITER_ENABLED
xmlKeepBlanksDefault
+xmlOutputBufferCreateBuffer
xmlOutputBufferCreateFd
xmlOutputBufferCreateFile
xmlOutputBufferCreateFilename
@@ -89,6 +90,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSaveFlush
xmlSaveSetAttrEscape
xmlSaveSetEscape
+xmlSaveToBuffer
xmlSaveToFd
xmlSaveToFilename
xmlSaveToIO
@@ -124,13 +126,11 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaGetFacetValueAsULong
xmlSchemaGetValType
xmlSchemaNewMemParserCtxt
-xmlSchemaValidateDoc
xmlSchemaValidateFacet
xmlSchemaValidateFacetWhtsp
-xmlSchemaValidateFile
-xmlSchemaValidateStream
xmlSchematronNewMemParserCtxt
xmlTextReaderSchemaValidate
+xmlTextReaderSchemaValidateCtxt
schematron
xmlSchematronValidateDoc
scheme
_xmlURI
xmlBufferSetAllocationScheme
@@ -186,8 +186,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlValidateOneElement
xmlValidateOneNamespace
seq
xmlParseElementChildrenContentDecl
-
sequence
_xmlSchemaElement
-_xmlSchemaFacet
+
sequence
_xmlSchemaFacet
_xmlSchemaType
xmlCharEncOutFunc
xmlClearNodeInfoSeq
@@ -214,6 +213,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathNormalizeFunction
sequqnce
xmlExpIsNillable
serialization
LIBXML_OUTPUT_ENABLED
+xmlSaveToBuffer
xmlSaveToFd
xmlSaveToFilename
xmlSaveToIO
@@ -221,7 +221,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlShellWrite
xmlValidatePopElement
xmlValidatePushElement
-
serializing
xmlSaveToFd
+
serializing
xmlSaveToBuffer
+xmlSaveToFd
xmlSaveToFilename
xmlSaveToIO
server
_xmlURI
@@ -327,6 +328,7 @@ A:link, A:visited, A:active { text-decoration: underline }
simple
XML_SCHEMAS_TYPE_ABSTRACT
XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION
XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION
+_xmlSchemaType
xlinkSimpleLinkFunk
xmlAttrSerializeTxtContent
xmlFreeMutex
@@ -348,7 +350,8 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMAS_TYPE_VARIETY_UNION
simply
xmlSetGenericErrorFunc
xmlSetStructuredErrorFunc
-
since
xmlBuildRelativeURI
+
since
XML_SCHEMAS_TYPE_VARIETY_ABSENT
+xmlBuildRelativeURI
xmlDOMWrapAdoptNode
xmlDOMWrapReconcileNamespaces
xmlParseExternalID
@@ -438,6 +441,7 @@ A:link, A:visited, A:active { text-decoration: underline }
spaces
_xmlParserCtxt
htmlDocContentDumpFormatOutput
htmlDocContentDumpOutput
+htmlDocDumpMemoryFormat
htmlNodeDumpFileFormat
htmlNodeDumpFormatOutput
htmlNodeDumpOutput
@@ -555,7 +559,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNewCharRef
xmlNewTextWriterTree
xmlSaveTree
-xmlSchemaValidateOneElement
xmlXPathOrderDocElems
xmlXPathSubstringFunction
xmlXPtrNewCollapsedRange
@@ -646,8 +649,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStrdup
xmlStrdupFunc
streamable
xmlPatternStreamable
-xmlSchemaValidateFile
streaming
xmlPatternGetStreamCtxt
+xmlStreamWantsAnyNode
streams
_xmlParserCtxt
xmlSkipBlankChars
strict
XML_SCHEMAS_ANYATTR_STRICT
@@ -669,8 +672,10 @@ A:link, A:visited, A:active { text-decoration: underline } xmlRegExecErrInfo
xmlRegExecNextValues
xmlRegexpCompile
+xmlStrEqual
xmlStreamPush
xmlStreamPushAttr
+xmlStreamPushNode
xmlStrncatNew
stripping
xmlXPathNormalizeFunction
strncasecmp
xmlStrncasecmp
@@ -690,7 +695,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaNewQNameValue
xmlSchemaNewStringValue
structured
xmlRelaxNGSetValidStructuredErrors
-xmlSchemaSetValidStructuredErrors
+xmlSchemaSetParserStructuredErrors
xmlSetStructuredErrorFunc
structures
xmlFreeDoc
xmlFreeNs
@@ -715,8 +720,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlExpSubsume
subexpressions
xmlExpParse
subject
xmlParseSDDecl
-xmlRelaxNGParse
-xmlSchemaParse
sublanguage
xmlXPathLangFunction
submits
xmlRegisterHTTPPostCallbacks
subsequent
xmlIOHTTPOpenW
@@ -763,7 +766,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlReconciliateNs
xmlRelaxNGValidateFullElement
xmlSaveTree
-xmlSchemaValidateOneElement
xmlShellDu
xmlShellWrite
xmlTextReaderExpand
diff --git a/doc/APIchunk25.html b/doc/APIchunk25.html index 98b46a8..594667e 100644 --- a/doc/APIchunk25.html +++ b/doc/APIchunk25.html @@ -101,6 +101,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathNotEqualValues
tested
_xmlParserInput
testing
xmlRegexpCompile
+
text-
xmlStreamPushNode
+xmlStreamWantsAnyNode
text-node
xmlIsBlankNode
textDecl?
xmlParseExternalSubset
than
xmlCheckUTF8
@@ -166,6 +168,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlHashUpdateEntry3
xmlXPathSubstringFunction
xmlXPathTranslateFunction
+
this?
_xmlSchemaType
those
xmlCheckLanguageID
xmlKeepBlanksDefault
xmlParseSDDecl
@@ -400,15 +403,17 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPtrLocationSetMerge
xmlXPtrNewLocationSetNodes
two-character
xmlCurrentChar
-
typ
_xmlSchemaTypeLink
+
type:
xmlStreamPushNode
typefixed
XML_SCHEMAS_TYPE_INTERNAL_RESOLVED
types
XML_SCHEMAS_FACET_COLLAPSE
+_xmlSchemaType
_xmlXPathContext
xmlExternalEntityLoader
xmlParseSDDecl
xmlSchemaGetCanonValue
xmlSchemaNewStringValue
xmlSchemaValidateFacetWhtsp
+xmlStreamWantsAnyNode
typo
xmlParseTextDecl

A-B C-C diff --git a/doc/APIchunk26.html b/doc/APIchunk26.html index 8a0befa..0f38063 100644 --- a/doc/APIchunk26.html +++ b/doc/APIchunk26.html @@ -68,6 +68,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMAS_TYPE_FINAL_UNION
XML_SCHEMAS_TYPE_VARIETY_ATOMIC
XML_SCHEMAS_TYPE_VARIETY_UNION
+_xmlSchemaType
xmlXPathIdFunction

unique
_xmlParserInput
_xmlSchema
@@ -117,7 +118,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParseEntityRef
xmlParserHandleReference
xmlSAX2UnparsedEntityDecl
-
unplug
xmlSchemaSAXPlug
unpredictable
UTF8ToHtml
UTF8Toisolat1
docbEncodeEntities
@@ -150,7 +150,6 @@ A:link, A:visited, A:active { text-decoration: underline } _xmlXPathContext
xmlDOMWrapReconcileNamespaces
xmlDOMWrapRemoveNode
-xmlSchemaValidateFile
xmlShellBase
xmlShellCat
xmlShellDir
@@ -182,6 +181,8 @@ A:link, A:visited, A:active { text-decoration: underline }
usage
xmlGetBufferAllocationScheme
xmlSetBufferAllocationScheme
used:
XML_DEFAULT_VERSION
+
used?
_xmlSchemaAttribute
+_xmlSchemaElement
useful
xmlGcMemGet
xmlGcMemSetup
xmlNewRMutex
diff --git a/doc/APIchunk27.html b/doc/APIchunk27.html index 2db1f05..a5257c9 100644 --- a/doc/APIchunk27.html +++ b/doc/APIchunk27.html @@ -63,9 +63,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlRelaxNGSetValidErrors
xmlSAX2InitDefaultSAXHandler
xmlSchemaGetParserErrors
-xmlSchemaGetValidErrors
xmlSchemaSetParserErrors
-xmlSchemaSetValidErrors
xmlSearchNs
xmlTextReaderSetErrorHandler
xmlTextReaderSetStructuredErrorHandler
@@ -115,7 +113,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlCheckLanguageID
xmlKeepBlanksDefault
xmlMemShow
-xmlSchemaIsValid
xmlXIncludeProcess
xmlXIncludeProcessFlags
xmlXIncludeProcessNode
diff --git a/doc/APIchunk28.html b/doc/APIchunk28.html index 232b492..8fb67a9 100644 --- a/doc/APIchunk28.html +++ b/doc/APIchunk28.html @@ -109,7 +109,9 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlBuffer
xmlCharEncFirstLine
xmlCharEncInFunc
xmlCharEncOutFunc
+xmlOutputBufferCreateBuffer
xmlBufferPtr
xmlNewTextWriterMemory
+xmlOutputBufferCreateBuffer
xmlBuildURI
xmlBuildRelativeURI
xmlBytesConsumed
xmlTextReaderByteConsumed
xmlCatalogAllow
xmlCatalogGetDefaults
@@ -339,6 +341,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlPatternGetStreamCtxt
xmlPatternStreamable
xmlPatterncompile
xmlStreamPush
xmlStreamPushAttr
+xmlStreamPushNode
xmlPopInput:
xmlPopInput
xmlPushInput:
xmlPushInput
xmlRFreeMutex
xmlFreeRMutex
@@ -385,22 +388,20 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlSAX2StartDocument
startDocument
xmlSAX2StartElement
startElement
xmlSAX2UnparsedEntityDecl
unparsedEntityDecl
-
xmlSAXHandlerPtr
xmlSchemaSAXPlug
xmlSAXVersion
xmlSAXDefaultVersion
-
xmlSaveOptions
xmlSaveToFd
+
xmlSaveOptions
xmlSaveToBuffer
+xmlSaveToFd
xmlSaveToFilename
xmlSaveToIO
-
xmlSchemaAttributeGroupPtr
_xmlSchemaAttributeGroup
-
xmlSchemaSAXPlug
xmlSchemaSAXUnplug
xmlSchemaValType
xmlSchemaGetValType
-
xmlSchemaValidOption
xmlSchemaSetValidOptions
xmlSchematronValidOptions
xmlSchematronNewValidCtxt
xmlSetExternalEntityLoader
resolveEntity
resolveEntitySAXFunc
xmlSAX2ResolveEntity
xmlSnprintfElementContent
xmlSprintfElementContent
-
xmlStrEqual
xmlStrEqual
+
xmlStrcmp
xmlStrEqual
xmlStrdup
xmlNewNode
+
xmlStreamPush
xmlStreamPushNode
xmlStringDecodeEntities
xmlDecodeEntities
xmlStringGetNodeList
xmlParseAttValue
xmlStrncat
xmlStrncatNew
diff --git a/doc/APIchunk29.html b/doc/APIchunk29.html index e9edd2c..3469fca 100644 --- a/doc/APIchunk29.html +++ b/doc/APIchunk29.html @@ -54,6 +54,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSaveTree
xmlSchemaGetCanonValue
xmlSchemaGetCanonValueWhtsp
+xmlTextReaderSchemaValidateCtxt
you
xmlNewDocNode
xmlNewDocNodeEatName
xmlNewTextChild
diff --git a/doc/APIchunk3.html b/doc/APIchunk3.html index e2ac654..7d6d9e0 100644 --- a/doc/APIchunk3.html +++ b/doc/APIchunk3.html @@ -176,6 +176,7 @@ A:link, A:visited, A:active { text-decoration: underline }
HighSurrogates
xmlUCSIsHighSurrogates
Hiragana
xmlUCSIsHiragana
Hmm
xmlSchemaValueGetAsBoolean
+
Holds
_xmlSchemaType
How
_xmlParserInput
However
docbFreeParserCtxt
htmlFreeParserCtxt
diff --git a/doc/APIchunk4.html b/doc/APIchunk4.html index 858dadd..01c825a 100644 --- a/doc/APIchunk4.html +++ b/doc/APIchunk4.html @@ -86,6 +86,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSAXParseDTD
Local
_xmlOutputBuffer
_xmlParserInputBuffer
+_xmlSchemaType
LocalPart
xmlNamespaceParseQName
xmlSplitQName
xmlSplitQName2
@@ -212,6 +213,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParserHandlePEReference
xmlStreamPush
xmlStreamPushAttr
+xmlStreamPushNode
xmlTextReaderCurrentDoc
NRK
_htmlElemDesc
NSDef
xmlNamespaceParseNSDef
@@ -275,6 +277,7 @@ A:link, A:visited, A:active { text-decoration: underline }
Non-static
xmlIOHTTPOpenW
Normalization
xmlNormalizeURIPath
Normalization:
xmlParseAttValue
+
Not
_xmlSchemaElement
NotaNumber
xmlXPathIsNaN
Notation
_xmlNotation
xmlParseEntityDecl
@@ -311,6 +314,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSaveFormatFile
xmlSaveFormatFileEnc
xmlSchemaValidateFacetWhtsp
+xmlStrncat
xmlTextReaderSetParserProp
xmlValidateDtd
Note:
fatalErrorSAXFunc
diff --git a/doc/APIchunk5.html b/doc/APIchunk5.html index 31e1e79..f54bb37 100644 --- a/doc/APIchunk5.html +++ b/doc/APIchunk5.html @@ -45,12 +45,17 @@ A:link, A:visited, A:active { text-decoration: underline } xmlRegExecErrInfo
xmlRegExecNextValues
OUT:
htmlDocDumpMemory
+htmlDocDumpMemoryFormat
xmlDocDumpFormatMemory
xmlDocDumpMemory
Obsolete
XML_SCHEMAS_ANYATTR_LAX
XML_SCHEMAS_ANYATTR_SKIP
XML_SCHEMAS_ANYATTR_STRICT
XML_SCHEMAS_ELEM_NSDEFAULT
+_xmlSchema
+_xmlSchemaElement
+_xmlSchemaFacet
+_xmlSchemaType
Obtain
xmlTextReaderLocatorBaseURI
xmlTextReaderLocatorLineNumber
Ogham
xmlUCSIsOgham
@@ -65,6 +70,8 @@ A:link, A:visited, A:active { text-decoration: underline }
Optional
_htmlElemDesc
Oriya
xmlUCSIsOriya
Osmanya
xmlUCSIsOsmanya
+
Otherwise
xmlStreamPush
+xmlStreamPushAttr
Output
xmlOutputCloseCallback
xmlOutputMatchCallback
xmlOutputOpenCallback
@@ -145,7 +152,6 @@ A:link, A:visited, A:active { text-decoration: underline }
People
xmlEncodeEntities
PhoneticExtensions
xmlUCSIsPhoneticExtensions
Please
xmlNormalizeWindowsPath
-
Plug
xmlSchemaSAXPlug
Pointer
xmlCheckUTF8
Points
xmlXPtrNewRangePoints
Pop
xmlRelaxNGValidatePopElement
@@ -235,6 +241,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlRelaxNGValidatePushElement
xmlStreamPush
xmlStreamPushAttr
+xmlStreamPushNode
xmlValidatePushElement
Pushes
inputPush
namePush
diff --git a/doc/APIchunk6.html b/doc/APIchunk6.html index b6d4741..3f790bb 100644 --- a/doc/APIchunk6.html +++ b/doc/APIchunk6.html @@ -58,6 +58,7 @@ A:link, A:visited, A:active { text-decoration: underline }
Qualified
xmlSplitQName3
Query
xmlDictSize
xmlHashSize
+xmlStreamWantsAnyNode
Question:
xmlParseTextDecl

Letter R:

REC
IS_BASECHAR
IS_COMBINING
@@ -88,6 +89,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
xmlTextReaderSchemaValidate
+xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetSchema
Reader
xmlTextReaderPreserve
xmlTextReaderPreservePattern
@@ -109,7 +111,6 @@ A:link, A:visited, A:active { text-decoration: underline }
Recurse
xmlSearchNsByHref
Recursion
xmlParsePEReference
xmlParserHandlePEReference
-
Redefinitions
_xmlSchemaAttributeGroup
Ref
_xmlRef
xmlAddRef
xmlFreeRefTable
@@ -170,7 +171,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlRelaxNGSetValidErrors
xmlRelaxNGSetValidStructuredErrors
xmlRelaxNGValidateDoc
-
RelaxNG
xmlRelaxNGCleanupTypes
+
RelaxNG
_xmlSchemaElement
+xmlRelaxNGCleanupTypes
xmlRelaxNGDump
xmlRelaxNGDumpTree
xmlRelaxNGFree
@@ -182,7 +184,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlRelaxParserSetFlag
xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
-xmlTextReaderSchemaValidate
RelaxNGs
xmlRelaxNGNewDocParserCtxt
xmlRelaxNGNewMemParserCtxt
xmlRelaxNGNewParserCtxt
diff --git a/doc/APIchunk7.html b/doc/APIchunk7.html index 5c9847c..5b71d96 100644 --- a/doc/APIchunk7.html +++ b/doc/APIchunk7.html @@ -50,7 +50,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSAX2InitDocbDefaultSAXHandler
xmlSAX2InitHtmlDefaultSAXHandler
xmlSAX2StartElementNs
-xmlSchemaValidateStream
SAX::substituteEntities
xmlSubstituteEntitiesDefault
SDDecl
xmlParseSDDecl
SDDecl?
xmlParseXMLDecl
@@ -107,6 +106,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaGetBuiltInListSimpleTypeItemType
xmlSchemaGetCanonValue
xmlSchemaParse
+xmlTextReaderSchemaValidate
+xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetSchema
Schemas
LIBXML_SCHEMAS_ENABLED
xmlRegexpCompile
@@ -118,7 +119,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaNewDocParserCtxt
xmlSchemaNewMemParserCtxt
xmlSchemaNewParserCtxt
-xmlSchemaNewValidCtxt
Schematron
LIBXML_SCHEMATRON_ENABLED
xmlSchematronFree
xmlSchematronParse
@@ -168,7 +168,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlExpDump
Sets
htmlSetMetaEncoding
xmlBufferSetAllocationScheme
-xmlSchemaSetValidOptions
xmlXPathDifference
xmlXPathDistinct
xmlXPathDistinctSorted
diff --git a/doc/APIchunk8.html b/doc/APIchunk8.html index 0407e65..8c3b0a4 100644 --- a/doc/APIchunk8.html +++ b/doc/APIchunk8.html @@ -51,7 +51,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStringLenGetNodeList
TODO
xmlParseElementChildrenContentDecl
xmlParseSDDecl
-
TODO:
htmlEntityLookup
+
TODO:
XML_SCHEMAS_TYPE_VARIETY_ABSENT
+htmlEntityLookup
htmlEntityValueLookup
htmlNodeDumpFileFormat
xmlDecodeEntities
@@ -161,7 +162,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlValidateOneElement
xmlValidateOneNamespace
xmlValidateRoot
-
Type
xmlParseAttribute
+
Type
_xmlSchemaType
+xmlParseAttribute
xmlParseAttributeType
xmlParseDocTypeDecl
xmlParseElement
@@ -218,7 +220,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlReplaceNode
xmlUnlinkNode
Unlinks
xmlDOMWrapRemoveNode
-
Unplug
xmlSchemaSAXUnplug
Unregisters
xmlCleanupEncodingAliases
xmlDelEncodingAlias
Update
xmlNanoFTPUpdateURL
@@ -245,11 +246,13 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
xmlTextReaderSchemaValidate
+xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetSchema
Used
XML_SCHEMAS_ANY_LAX
XML_SCHEMAS_ANY_STRICT
XML_SCHEMAS_ATTR_USE_PROHIBITED
XML_SKIP_IDS
+_xmlSchemaType
xmlCatalogGetDefaults
xmlCatalogSetDebug
xmlCatalogSetDefaults
diff --git a/doc/APIchunk9.html b/doc/APIchunk9.html index 91895db..ac0163d 100644 --- a/doc/APIchunk9.html +++ b/doc/APIchunk9.html @@ -41,9 +41,6 @@ A:link, A:visited, A:active { text-decoration: underline }
Validate
XML_SCHEMAS_ANY_LAX
xmlRelaxNGValidateDoc
xmlRelaxNGValidateFullElement
-xmlSchemaValidateDoc
-xmlSchemaValidateOneElement
-xmlSchemaValidateStream
xmlSchematronValidateDoc
xmlShellValidate
xmlValidateAttributeValue
@@ -74,8 +71,7 @@ A:link, A:visited, A:active { text-decoration: underline }
VersionNum
xmlParseVersionInfo
xmlParseVersionNum

Letter W:

W3C
xmlTextReaderSchemaValidate
-
WARNING
xmlRelaxNGParse
-xmlSchemaParse
+xmlTextReaderSchemaValidateCtxt
WARNING:
xmlDOMWrapAdoptNode
xmlDOMWrapReconcileNamespaces
xmlDOMWrapRemoveNode
@@ -92,6 +88,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParserHandlePEReference
xmlParserHandleReference
WWW-Authenticate
xmlNanoHTTPAuthHeader
+
WXS
_xmlSchemaElement
Walk
xmlListReverseWalk
xmlListWalk
Warning
xmlSaveFileTo
@@ -156,7 +153,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlValidateOneElement
xmlValidateOneNamespace
xmlValidateRoot
-
XML-Schema
xmlSchemaGetValidErrors
XMLDecl
xmlParseXMLDecl
XMLDecl?
xmlParseDocument
XMLSchema
xmlSchemaGetPredefinedType
@@ -186,6 +182,7 @@ A:link, A:visited, A:active { text-decoration: underline }
XML_ENTITY_DECL
_xmlEntity
XML_ERR_OK
xmlParseInNodeContext
XML_SCHEMAS_ELEM_GLOBAL
XML_SCHEMAS_ELEM_TOPLEVEL
+
XML_SCHEMAS_FACET_PRESERVE
_xmlSchemaFacet
XML_SCHEMAS_STRING
xmlSchemaNewStringValue
XML_SUBSTITUTE_PEREF
xmlDecodeEntities
xmlStringDecodeEntities
@@ -209,6 +206,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPtrRangeToFunction
XSD
xmlAutomataNewNegTrans
xmlTextReaderSchemaValidate
+xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetSchema
XSLT
_xmlNode
_xmlXPathContext
diff --git a/doc/APIconstructors.html b/doc/APIconstructors.html index 9598e49..7029c33 100644 --- a/doc/APIconstructors.html +++ b/doc/APIconstructors.html @@ -430,6 +430,7 @@ A:link, A:visited, A:active { text-decoration: underline }

Type xmlOutputBufferCreateFilenameFunc:

xmlOutputBufferCreateFilenameDefault
xmlThrDefOutputBufferCreateFilenameDefault

Type xmlOutputBufferPtr:

xmlAllocOutputBuffer
+xmlOutputBufferCreateBuffer
xmlOutputBufferCreateFd
xmlOutputBufferCreateFile
xmlOutputBufferCreateFilename
@@ -481,7 +482,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlRelaxNGNewParserCtxt

Type xmlRelaxNGPtr:

xmlRelaxNGParse

Type xmlRelaxNGValidCtxtPtr:

xmlRelaxNGNewValidCtxt
-

Type xmlSaveCtxtPtr:

xmlSaveToFd
+

Type xmlSaveCtxtPtr:

xmlSaveToBuffer
+xmlSaveToFd
xmlSaveToFilename
xmlSaveToIO

Type xmlSchemaFacetPtr:

xmlSchemaNewFacet
diff --git a/doc/APIfiles.html b/doc/APIfiles.html index 744feb1..4f960e0 100644 --- a/doc/APIfiles.html +++ b/doc/APIfiles.html @@ -102,6 +102,7 @@ A:link, A:visited, A:active { text-decoration: underline } htmlDocContentDumpOutput
htmlDocDump
htmlDocDumpMemory
+htmlDocDumpMemoryFormat
htmlGetMetaEncoding
htmlIsBooleanAttr
htmlNewDoc
@@ -914,6 +915,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStreamPop
xmlStreamPush
xmlStreamPushAttr
+xmlStreamPushNode
+xmlStreamWantsAnyNode

Module relaxng:

XML_RELAXNGP_CRNG
XML_RELAXNGP_FREE_DOC
XML_RELAXNGP_NONE
@@ -1000,7 +1003,9 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMAS_ANY_SKIP
XML_SCHEMAS_ANY_STRICT
XML_SCHEMAS_ATTRGROUP_GLOBAL
+XML_SCHEMAS_ATTRGROUP_HAS_REFS
XML_SCHEMAS_ATTRGROUP_MARKED
+XML_SCHEMAS_ATTRGROUP_REDEFINED
XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED
XML_SCHEMAS_ATTR_FIXED
XML_SCHEMAS_ATTR_GLOBAL
@@ -1103,6 +1108,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMAS_TYPE_MIXED
XML_SCHEMAS_TYPE_NORMVALUENEEDED
XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD
+XML_SCHEMAS_TYPE_REDEFINED
XML_SCHEMAS_TYPE_VARIETY_ABSENT
XML_SCHEMAS_TYPE_VARIETY_ATOMIC
XML_SCHEMAS_TYPE_VARIETY_LIST
@@ -1124,6 +1130,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS
XML_SCHEMA_CONTENT_SIMPLE
XML_SCHEMA_CONTENT_UNKNOWN
+XML_SCHEMA_EXTRA_ATTR_USE_PROHIB
XML_SCHEMA_EXTRA_QNAMEREF
XML_SCHEMA_FACET_ENUMERATION
XML_SCHEMA_FACET_FRACTIONDIGITS
@@ -1142,6 +1149,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMA_TYPE_ANY_ATTRIBUTE
XML_SCHEMA_TYPE_ATTRIBUTE
XML_SCHEMA_TYPE_ATTRIBUTEGROUP
+XML_SCHEMA_TYPE_ATTRIBUTE_USE
XML_SCHEMA_TYPE_BASIC
XML_SCHEMA_TYPE_CHOICE
XML_SCHEMA_TYPE_COMPLEX
@@ -1707,6 +1715,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNoNetExternalEntityLoader
xmlNormalizeWindowsPath
xmlOutputBufferClose
+xmlOutputBufferCreateBuffer
xmlOutputBufferCreateFd
xmlOutputBufferCreateFile
xmlOutputBufferCreateFilename
@@ -2187,13 +2196,18 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SAVE_NOT_UTF8
XML_SAVE_NO_DOCTYPE
XML_SAVE_UNKNOWN_ENCODING
+XML_SCHEMAP_AG_PROPS_CORRECT
XML_SCHEMAP_ATTRFORMDEFAULT_VALUE
XML_SCHEMAP_ATTRGRP_NONAME_NOREF
XML_SCHEMAP_ATTR_NONAME_NOREF
+XML_SCHEMAP_AU_PROPS_CORRECT
XML_SCHEMAP_AU_PROPS_CORRECT_2
XML_SCHEMAP_A_PROPS_CORRECT_2
+XML_SCHEMAP_A_PROPS_CORRECT_3
XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF
+XML_SCHEMAP_COS_ALL_LIMITED
XML_SCHEMAP_COS_CT_EXTENDS_1_1
+XML_SCHEMAP_COS_CT_EXTENDS_1_2
XML_SCHEMAP_COS_CT_EXTENDS_1_3
XML_SCHEMAP_COS_ST_DERIVED_OK_2_1
XML_SCHEMAP_COS_ST_DERIVED_OK_2_2
@@ -2692,6 +2706,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
xmlTextReaderSchemaValidate
+xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetErrorHandler
xmlTextReaderSetParserProp
xmlTextReaderSetSchema
@@ -2759,6 +2774,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSaveOption
xmlSaveSetAttrEscape
xmlSaveSetEscape
+xmlSaveToBuffer
xmlSaveToFd
xmlSaveToFilename
xmlSaveToIO
@@ -2811,6 +2827,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaSAXPlugStruct
xmlSchemaSAXUnplug
xmlSchemaSetParserErrors
+xmlSchemaSetParserStructuredErrors
xmlSchemaSetValidErrors
xmlSchemaSetValidOptions
xmlSchemaSetValidStructuredErrors
diff --git a/doc/APIfunctions.html b/doc/APIfunctions.html index 3d660c4..593cc82 100644 --- a/doc/APIfunctions.html +++ b/doc/APIfunctions.html @@ -371,6 +371,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStrdup
xmlStreamPush
xmlStreamPushAttr
+xmlStreamPushNode
xmlStringCurrentChar
xmlStringDecodeEntities
xmlStringGetNodeList
@@ -557,6 +558,7 @@ A:link, A:visited, A:active { text-decoration: underline } UTF8Toisolat1
docbEncodeEntities
htmlDocDumpMemory
+htmlDocDumpMemoryFormat
htmlEncodeEntities
isolat1ToUTF8
xmlCharEncodingInputFunc
@@ -839,6 +841,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSAXUserParseMemory
xmlSaveToIO
xmlSchemaSetParserErrors
+xmlSchemaSetParserStructuredErrors
xmlSchemaSetValidErrors
xmlSchemaSetValidStructuredErrors
xmlSchemaValidateStream
@@ -960,6 +963,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNewTextWriterMemory
xmlNodeBufGetContent
xmlNodeDump
+xmlOutputBufferCreateBuffer
+xmlSaveToBuffer

Type xmlC14NIsVisibleCallback:

xmlC14NExecute

Type xmlCatalogAllow:

xmlCatalogSetDefaults

Type xmlCatalogPrefer:

xmlCatalogSetDefaultPrefer
@@ -1003,6 +1008,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStrncat
xmlXPathWrapString

Type xmlChar **:

htmlDocDumpMemory
+htmlDocDumpMemoryFormat
xmlC14NDocDumpMemory
xmlC14NDocSave
xmlC14NDocSaveTo
@@ -1042,6 +1048,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlCharEncInFunc
xmlCharEncOutFunc

Type xmlCharEncodingHandlerPtr:

xmlAllocOutputBuffer
+xmlOutputBufferCreateBuffer
xmlOutputBufferCreateFd
xmlOutputBufferCreateFile
xmlOutputBufferCreateFilename
@@ -1076,6 +1083,7 @@ A:link, A:visited, A:active { text-decoration: underline } htmlDocContentDumpOutput
htmlDocDump
htmlDocDumpMemory
+htmlDocDumpMemoryFormat
htmlNodeDump
htmlNodeDumpFile
htmlNodeDumpFileFormat
@@ -1865,6 +1873,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaGetParserErrors
xmlSchemaParse
xmlSchemaSetParserErrors
+xmlSchemaSetParserStructuredErrors

Type xmlSchemaPtr:

xmlSchemaDump
xmlSchemaFree
xmlSchemaNewValidCtxt
@@ -1913,6 +1922,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaValidateFile
xmlSchemaValidateOneElement
xmlSchemaValidateStream
+xmlTextReaderSchemaValidateCtxt

Type xmlSchemaValidityErrorFunc:

xmlSchemaSetParserErrors
xmlSchemaSetValidErrors

Type xmlSchemaValidityErrorFunc *:

xmlSchemaGetParserErrors
@@ -1952,7 +1962,10 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStreamPop
xmlStreamPush
xmlStreamPushAttr
+xmlStreamPushNode
+xmlStreamWantsAnyNode

Type xmlStructuredErrorFunc:

xmlRelaxNGSetValidStructuredErrors
+xmlSchemaSetParserStructuredErrors
xmlSchemaSetValidStructuredErrors
xmlSetStructuredErrorFunc
xmlTextReaderSetStructuredErrorHandler
@@ -2028,6 +2041,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
xmlTextReaderSchemaValidate
+xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetErrorHandler
xmlTextReaderSetParserProp
xmlTextReaderSetSchema
diff --git a/doc/APIsymbols.html b/doc/APIsymbols.html index a335a81..36d294c 100644 --- a/doc/APIsymbols.html +++ b/doc/APIsymbols.html @@ -779,13 +779,18 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SAVE_NO_XHTML
XML_SAVE_UNKNOWN_ENCODING
XML_SAX2_MAGIC
+XML_SCHEMAP_AG_PROPS_CORRECT
XML_SCHEMAP_ATTRFORMDEFAULT_VALUE
XML_SCHEMAP_ATTRGRP_NONAME_NOREF
XML_SCHEMAP_ATTR_NONAME_NOREF
+XML_SCHEMAP_AU_PROPS_CORRECT
XML_SCHEMAP_AU_PROPS_CORRECT_2
XML_SCHEMAP_A_PROPS_CORRECT_2
+XML_SCHEMAP_A_PROPS_CORRECT_3
XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF
+XML_SCHEMAP_COS_ALL_LIMITED
XML_SCHEMAP_COS_CT_EXTENDS_1_1
+XML_SCHEMAP_COS_CT_EXTENDS_1_2
XML_SCHEMAP_COS_CT_EXTENDS_1_3
XML_SCHEMAP_COS_ST_DERIVED_OK_2_1
XML_SCHEMAP_COS_ST_DERIVED_OK_2_2
@@ -977,7 +982,9 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMAS_ANY_SKIP
XML_SCHEMAS_ANY_STRICT
XML_SCHEMAS_ATTRGROUP_GLOBAL
+XML_SCHEMAS_ATTRGROUP_HAS_REFS
XML_SCHEMAS_ATTRGROUP_MARKED
+XML_SCHEMAS_ATTRGROUP_REDEFINED
XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED
XML_SCHEMAS_ATTR_FIXED
XML_SCHEMAS_ATTR_GLOBAL
@@ -1106,6 +1113,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMAS_TYPE_MIXED
XML_SCHEMAS_TYPE_NORMVALUENEEDED
XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD
+XML_SCHEMAS_TYPE_REDEFINED
XML_SCHEMAS_TYPE_VARIETY_ABSENT
XML_SCHEMAS_TYPE_VARIETY_ATOMIC
XML_SCHEMAS_TYPE_VARIETY_LIST
@@ -1211,6 +1219,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS
XML_SCHEMA_CONTENT_SIMPLE
XML_SCHEMA_CONTENT_UNKNOWN
+XML_SCHEMA_EXTRA_ATTR_USE_PROHIB
XML_SCHEMA_EXTRA_QNAMEREF
XML_SCHEMA_FACET_ENUMERATION
XML_SCHEMA_FACET_FRACTIONDIGITS
@@ -1229,6 +1238,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMA_TYPE_ANY_ATTRIBUTE
XML_SCHEMA_TYPE_ATTRIBUTE
XML_SCHEMA_TYPE_ATTRIBUTEGROUP
+XML_SCHEMA_TYPE_ATTRIBUTE_USE
XML_SCHEMA_TYPE_BASIC
XML_SCHEMA_TYPE_CHOICE
XML_SCHEMA_TYPE_COMPLEX
@@ -1534,6 +1544,7 @@ A:link, A:visited, A:active { text-decoration: underline } htmlDocContentDumpOutput
htmlDocDump
htmlDocDumpMemory
+htmlDocDumpMemoryFormat
htmlDocPtr
htmlElemDesc
htmlElemDescPtr
@@ -2331,6 +2342,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNsType
xmlOutputBuffer
xmlOutputBufferClose
+xmlOutputBufferCreateBuffer
xmlOutputBufferCreateFd
xmlOutputBufferCreateFile
xmlOutputBufferCreateFilename
@@ -2637,6 +2649,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSaveOption
xmlSaveSetAttrEscape
xmlSaveSetEscape
+xmlSaveToBuffer
xmlSaveToFd
xmlSaveToFilename
xmlSaveToIO
@@ -2704,6 +2717,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaSAXPlugStruct
xmlSchemaSAXUnplug
xmlSchemaSetParserErrors
+xmlSchemaSetParserStructuredErrors
xmlSchemaSetValidErrors
xmlSchemaSetValidOptions
xmlSchemaSetValidStructuredErrors
@@ -2819,6 +2833,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStreamPop
xmlStreamPush
xmlStreamPushAttr
+xmlStreamPushNode
+xmlStreamWantsAnyNode
xmlStringComment
xmlStringCurrentChar
xmlStringDecodeEntities
@@ -2910,6 +2926,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
xmlTextReaderSchemaValidate
+xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetErrorHandler
xmlTextReaderSetParserProp
xmlTextReaderSetSchema
diff --git a/doc/FAQ.html b/doc/FAQ.html index 7f68c99..da553fb 100644 --- a/doc/FAQ.html +++ b/doc/FAQ.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -FAQ
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

FAQ

Main Menu
Related links

Table of Contents:

  • License(s)
  • +FAQ
    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
    Made with Libxml2 Logo

    The XML C parser and toolkit of Gnome

    FAQ

    Main Menu
    Related links

    Table of Contents:

    • License(s)
    • Installation
    • Compilation
    • Developer corner
    • @@ -118,40 +118,47 @@ A:link, A:visited, A:active { text-decoration: underline }

      CFLAGS=`xml2-config --cflags`

      LIBS=`xml2-config --libs`

      -
    • I want to install my own copy of libxml2 in my home directory and link - my programs against it, but it doesn't work +
    • I want to install my own copy of libxml2 in my home directory and + link my programs against it, but it doesn't work

      There are many different ways to accomplish this. Here is one way to - do this under Linux. Suppose your home directory is /home/user. - Then:

      + do this under Linux. Suppose your home directory is /home/user. + Then:

      • Create a subdirectory, let's call it myxml
      • unpack the libxml2 distribution into that subdirectory
      • -
      • chdir into the unpacked distribution (/home/user/myxml/libxml2 - )
      • +
      • chdir into the unpacked distribution + (/home/user/myxml/libxml2 )
      • configure the library using the "--prefix" switch, - specifying an installation subdirectory in /home/user/myxml, - e.g. -

        ./configure --prefix /home/user/myxml/xmlinst {other - configuration options}

      • + specifying an installation subdirectory in + /home/user/myxml, e.g. +

        ./configure --prefix /home/user/myxml/xmlinst {other + configuration options}

        +
      • now run make followed by make install
      • At this point, the installation subdirectory contains the complete - "private" include files, library files and binary program files (e.g. - xmllint), located in -

        /home/user/myxml/xmlinst/lib, /home/user/myxml/xmlinst/include - and /home/user/myxml/xmlinst/bin

        - respectively.
      • -
      • In order to use this "private" library, you should first add it - to the beginning of your default PATH (so that your own private - program files such as xmllint will be used instead of the normal - system ones). To do this, the Bash command would be -

        export PATH=/home/user/myxml/xmlinst/bin:$PATH

      • + "private" include files, library files and binary program files (e.g. + xmllint), located in +

        /home/user/myxml/xmlinst/lib, + /home/user/myxml/xmlinst/include and + /home/user/myxml/xmlinst/bin

        + respectively. +
      • In order to use this "private" library, you should first add it to + the beginning of your default PATH (so that your own private program + files such as xmllint will be used instead of the normal system + ones). To do this, the Bash command would be +

        export PATH=/home/user/myxml/xmlinst/bin:$PATH

        +
      • Now suppose you have a program test1.c that you would - like to compile with your "private" library. Simply compile it - using the command

        gcc `xml2-config --cflags --libs` -o test - test.c

        Note that, because your PATH has been set with - /home/user/myxml/xmlinst/bin at the beginning, the - xml2-config program which you just installed will be used instead of - the system default one, and this will automatically get the - correct libraries linked with your program.
    • + like to compile with your "private" library. Simply compile it using + the command +

      gcc `xml2-config --cflags --libs` -o test test.c

      + Note that, because your PATH has been set with + /home/user/myxml/xmlinst/bin at the beginning, the xml2-config + program which you just installed will be used instead of the system + default one, and this will automatically get the correct + libraries linked with your program. +
    + +

  • xmlDocDump() generates output on one line.

    Libxml2 will not invent spaces in the content of a document since all spaces in the content of a document are diff --git a/doc/Makefile.am b/doc/Makefile.am index 7332659..55c5ef5 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -110,7 +110,6 @@ install-data-local: $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html -@INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html -@INSTALL@ -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html - -@INSTALL@ -m 0644 $(srcdir)/html/index.sgml $(DESTDIR)$(HTML_DIR)/html $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/tutorial -@INSTALL@ -m 0644 $(srcdir)/tutorial/*.* \ $(DESTDIR)$(HTML_DIR)/tutorial diff --git a/doc/Makefile.in b/doc/Makefile.in index b8b3d34..f80c05f 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -731,7 +731,6 @@ install-data-local: $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html -@INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html -@INSTALL@ -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html - -@INSTALL@ -m 0644 $(srcdir)/html/index.sgml $(DESTDIR)$(HTML_DIR)/html $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/tutorial -@INSTALL@ -m 0644 $(srcdir)/tutorial/*.* \ $(DESTDIR)$(HTML_DIR)/tutorial diff --git a/doc/XMLinfo.html b/doc/XMLinfo.html index e89bdad..ad43eff 100644 --- a/doc/XMLinfo.html +++ b/doc/XMLinfo.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -XML
    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
    Made with Libxml2 Logo

    The XML C parser and toolkit of Gnome

    XML

    Main Menu
    Related links

    XML is a standard for +XML
    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
    Made with Libxml2 Logo

    The XML C parser and toolkit of Gnome

    XML

    Main Menu
    Related links

    XML is a standard for markup-based structured documents. Here is an example XML document:

    <?xml version="1.0"?>
     <EXAMPLE prop1="gnome is great" prop2="&amp; linux too">
    diff --git a/doc/XSLT.html b/doc/XSLT.html
    index 7212cb6..41adf2f 100644
    --- a/doc/XSLT.html
    +++ b/doc/XSLT.html
    @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica}
     H2 {font-family: Verdana,Arial,Helvetica}
     H3 {font-family: Verdana,Arial,Helvetica}
     A:link, A:visited, A:active { text-decoration: underline }
    -XSLT
    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
    Made with Libxml2 Logo

    The XML C parser and toolkit of Gnome

    XSLT

    Main Menu
    Related links

    Check the separate libxslt page

    XSL Transformations, is a +XSLT
    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
    Made with Libxml2 Logo

    The XML C parser and toolkit of Gnome

    XSLT

    Main Menu
    Related links

    Check the separate libxslt page

    XSL Transformations, is a language for transforming XML documents into other XML documents (or HTML/textual output).

    A separate library called libxslt is available implementing XSLT-1.0 for libxml2. This module "libxslt" too can be found in the Gnome CVS base.

    You can check the progresses on the libxslt Changelog.

    Daniel Veillard

    diff --git a/doc/bugs.html b/doc/bugs.html index cadebe8..f598051 100644 --- a/doc/bugs.html +++ b/doc/bugs.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Reporting bugs and getting help
    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
    Made with Libxml2 Logo

    The XML C parser and toolkit of Gnome

    Reporting bugs and getting help

    Main Menu
    Related links

    Well, bugs or missing features are always possible, and I will make a +Reporting bugs and getting help
    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
    Made with Libxml2 Logo

    The XML C parser and toolkit of Gnome

    Reporting bugs and getting help

    Main Menu
    Related links

    Well, bugs or missing features are always possible, and I will make a point of fixing them in a timely fashion. The best way to report a bug is to use the Gnome bug tracking database (make sure to use the "libxml2" module name). I diff --git a/doc/catalog.html b/doc/catalog.html index 9947f90..3750123 100644 --- a/doc/catalog.html +++ b/doc/catalog.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Catalog support
    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
    Made with Libxml2 Logo

    The XML C parser and toolkit of Gnome

    Catalog support

    Main Menu
    Related links

    Table of Content:

    1. General overview
    2. +Catalog support
      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
      Made with Libxml2 Logo

      The XML C parser and toolkit of Gnome

      Catalog support

      Main Menu
      Related links

      Table of Content:

      1. General overview
      2. The definition
      3. Using catalogs
      4. Some examples
      5. diff --git a/doc/contribs.html b/doc/contribs.html index 8ea1843..a89c9ea 100644 --- a/doc/contribs.html +++ b/doc/contribs.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Contributions
        Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
        Made with Libxml2 Logo

        The XML C parser and toolkit of Gnome

        Contributions

        Main Menu
        Related links
        • Bjorn Reese, William Brack and Thomas Broyer have provided a number of +Contributions
          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
          Made with Libxml2 Logo

          The XML C parser and toolkit of Gnome

          Contributions

          Main Menu
          Related links

          Daniel Veillard

          diff --git a/doc/devhelp/libxml2-HTMLtree.html b/doc/devhelp/libxml2-HTMLtree.html index b7c35b4..6430f8b 100644 --- a/doc/devhelp/libxml2-HTMLtree.html +++ b/doc/devhelp/libxml2-HTMLtree.html @@ -51,9 +51,10 @@ int htmlNodeDumpFileFormat (FILE * out,
          xmlDocPtr doc,
          xmlNodePtr cur,
          const char * encoding,
          int format); void htmlDocDumpMemory (xmlDocPtr cur,
          xmlChar ** mem,
          int * size); int htmlSaveFile (const char * filename,
          xmlDocPtr cur); -htmlDocPtr htmlNewDocNoDtD (const xmlChar * URI,
          const xmlChar * ExternalID); int htmlDocDump (FILE * f,
          xmlDocPtr cur); +void htmlDocDumpMemoryFormat (xmlDocPtr cur,
          xmlChar ** mem,
          int * size,
          int format); int htmlIsBooleanAttr (const xmlChar * name); +int htmlSaveFileFormat (const char * filename,
          xmlDocPtr cur,
          const char * encoding,
          int format); void htmlNodeDumpFormatOutput (xmlOutputBufferPtr buf,
          xmlDocPtr doc,
          xmlNodePtr cur,
          const char * encoding,
          int format); int htmlSetMetaEncoding (htmlDocPtr doc,
          const xmlChar * encoding); int htmlSaveFileEnc (const char * filename,
          xmlDocPtr cur,
          const char * encoding); @@ -63,7 +64,7 @@ int htmlNodeDump (xmlChar * htmlGetMetaEncoding (htmlDocPtr doc); void htmlNodeDumpFile (FILE * out,
          xmlDocPtr doc,
          xmlNodePtr cur); void htmlDocContentDumpFormatOutput (xmlOutputBufferPtr buf,
          xmlDocPtr cur,
          const char * encoding,
          int format); -int htmlSaveFileFormat (const char * filename,
          xmlDocPtr cur,
          const char * encoding,
          int format); +htmlDocPtr htmlNewDocNoDtD (const xmlChar * URI,
          const xmlChar * ExternalID); void htmlDocContentDumpOutput (xmlOutputBufferPtr buf,
          xmlDocPtr cur,
          const char * encoding); @@ -108,6 +109,10 @@ void htmlDocContentDumpOutput (

          htmlDocDumpMemory ()

          void	htmlDocDumpMemory		(xmlDocPtr cur, 
          xmlChar ** mem,
          int * size)

          Dump an HTML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory.

          cur:the document
          mem:OUT: the memory pointer
          size:OUT: the memory length
          +
          +

          htmlDocDumpMemoryFormat ()

          void	htmlDocDumpMemoryFormat		(xmlDocPtr cur, 
          xmlChar ** mem,
          int * size,
          int format)
          +

          Dump an HTML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory.

          +
          cur:the document
          mem:OUT: the memory pointer
          size:OUT: the memory length
          format:should formatting spaces been added

          htmlGetMetaEncoding ()

          const xmlChar *	htmlGetMetaEncoding	(htmlDocPtr doc)

          Encoding definition lookup in the Meta tags

          diff --git a/doc/devhelp/libxml2-pattern.html b/doc/devhelp/libxml2-pattern.html index 621767e..321bd79 100644 --- a/doc/devhelp/libxml2-pattern.html +++ b/doc/devhelp/libxml2-pattern.html @@ -55,11 +55,13 @@ void xmlFreePatternList (xmlPatternStreamable (xmlPatternPtr comp); int xmlStreamPushAttr (xmlStreamCtxtPtr stream,
          const xmlChar * name,
          const xmlChar * ns); int xmlPatternMatch (xmlPatternPtr comp,
          xmlNodePtr node); +int xmlStreamWantsAnyNode (xmlStreamCtxtPtr streamCtxt); int xmlStreamPop (xmlStreamCtxtPtr stream); void xmlFreePattern (xmlPatternPtr comp); int xmlStreamPush (xmlStreamCtxtPtr stream,
          const xmlChar * name,
          const xmlChar * ns); int xmlPatternMaxDepth (xmlPatternPtr comp); xmlPatternPtr xmlPatterncompile (const xmlChar * pattern,
          xmlDict * dict,
          int flags,
          const xmlChar ** namespaces); +int xmlStreamPushNode (xmlStreamCtxtPtr stream,
          const xmlChar * name,
          const xmlChar * ns,
          int nodeType); void xmlFreeStreamCtxt (xmlStreamCtxtPtr stream);
          @@ -143,13 +145,21 @@ The content of this structure is not made public by the API.
          stream:the stream context
          Returns:-1 in case of error, 0 otherwise.

          xmlStreamPush ()

          int	xmlStreamPush			(xmlStreamCtxtPtr stream, 
          const xmlChar * name,
          const xmlChar * ns)
          -

          Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.

          +

          Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an element-node.

          stream:the stream context
          name:the current name
          ns:the namespace name
          Returns:-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.

          xmlStreamPushAttr ()

          int	xmlStreamPushAttr		(xmlStreamCtxtPtr stream, 
          const xmlChar * name,
          const xmlChar * ns)
          -

          Push new attribute data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.

          +

          Push new attribute data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an attribute-node.

          stream:the stream context
          name:the current name
          ns:the namespace name
          Returns:-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.

          +

          xmlStreamPushNode ()

          int	xmlStreamPushNode		(xmlStreamCtxtPtr stream, 
          const xmlChar * name,
          const xmlChar * ns,
          int nodeType)
          +

          Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Different from xmlStreamPush() this function can be fed with nodes of type: element-, attribute-, text-, cdata-section-, comment- and processing-instruction-node.

          +
          stream:the stream context
          name:the current name
          ns:the namespace name
          nodeType:the type of the node being pushed
          Returns:-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.
          +
          +

          xmlStreamWantsAnyNode ()

          int	xmlStreamWantsAnyNode		(xmlStreamCtxtPtr streamCtxt)
          +

          Query if the streaming pattern additionally needs to be fed with text-, cdata-section-, comment- and processing-instruction-nodes. If the result is 0 then only element-nodes and attribute-nodes need to be pushed.

          +
          streamCtxt:the stream context
          Returns:1 in case of need of nodes of the above described types, 0 otherwise. -1 on API errors.
          +
          diff --git a/doc/devhelp/libxml2-relaxng.html b/doc/devhelp/libxml2-relaxng.html index a10bd11..9dd4bb1 100644 --- a/doc/devhelp/libxml2-relaxng.html +++ b/doc/devhelp/libxml2-relaxng.html @@ -228,7 +228,7 @@ The content of this structure is not made public by the API.
          schema:a precompiled XML RelaxNGs
          Returns:the validation context or NULL in case of error

          xmlRelaxNGParse ()

          xmlRelaxNGPtr	xmlRelaxNGParse		(xmlRelaxNGParserCtxtPtr ctxt)
          -

          parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances. *WARNING* this interface is highly subject to change

          +

          parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.

          ctxt:a Relax-NG parser context
          Returns:the internal XML RelaxNG structure built from the resource or NULL in case of error

          xmlRelaxNGSetParserErrors ()

          void	xmlRelaxNGSetParserErrors	(xmlRelaxNGParserCtxtPtr ctxt, 
          xmlRelaxNGValidityErrorFunc err,
          xmlRelaxNGValidityWarningFunc warn,
          void * ctx)
          diff --git a/doc/devhelp/libxml2-schemasInternals.html b/doc/devhelp/libxml2-schemasInternals.html index ba7d1c1..2f9cbc9 100644 --- a/doc/devhelp/libxml2-schemasInternals.html +++ b/doc/devhelp/libxml2-schemasInternals.html @@ -39,7 +39,7 @@ schemasInternals

          schemasInternals - internal interfaces for XML Schemas

          -

          internal interfaces for the XML Schemas handling and schema validity checking

          +

          internal interfaces for the XML Schemas handling and schema validity checking The Schemas development is a Work In Progress. Some of those interfaces are not garanteed to be API or ABI stable !

          Author(s): Daniel Veillard

          Synopsis

          @@ -66,11 +66,12 @@ #define XML_SCHEMAS_ATTR_USE_PROHIBITED; #define XML_SCHEMAS_ELEM_NILLABLE; #define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION; -#define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED; +#define XML_SCHEMAS_ATTRGROUP_REDEFINED; #define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD; #define XML_SCHEMAS_TYPE_BLOCK_DEFAULT; #define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION; #define XML_SCHEMAS_TYPE_FINAL_EXTENSION; +#define XML_SCHEMAS_TYPE_REDEFINED; #define XML_SCHEMAS_ELEM_FIXED; #define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD; #define XML_SCHEMAS_TYPE_VARIETY_ATOMIC; @@ -90,7 +91,9 @@ #define XML_SCHEMAS_ANYATTR_LAX; #define XML_SCHEMAS_TYPE_GLOBAL; #define XML_SCHEMAS_TYPE_ABSTRACT; +#define XML_SCHEMAS_TYPE_MIXED; #define XML_SCHEMAS_ATTR_FIXED; +#define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED; #define XML_SCHEMAS_ANY_SKIP; #define XML_SCHEMAS_FINAL_DEFAULT_LIST; #define XML_SCHEMAS_TYPE_VARIETY_ABSENT; @@ -99,7 +102,7 @@ #define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED; #define XML_SCHEMAS_ELEM_NSDEFAULT; #define XML_SCHEMAS_ELEM_GLOBAL; -#define XML_SCHEMAS_TYPE_MIXED; +#define XML_SCHEMAS_ELEM_TOPLEVEL; #define XML_SCHEMAS_ANY_LAX; #define XML_SCHEMAS_TYPE_FINAL_RESTRICTION; #define XML_SCHEMAS_TYPE_HAS_FACETS; @@ -108,7 +111,7 @@ #define XML_SCHEMAS_ELEM_FINAL_ABSENT; #define XML_SCHEMAS_TYPE_BLOCK_EXTENSION; #define XML_SCHEMAS_TYPE_INTERNAL_INVALID; -#define XML_SCHEMAS_ELEM_TOPLEVEL; +#define XML_SCHEMAS_ATTRGROUP_HAS_REFS; #define XML_SCHEMAS_ELEM_ABSTRACT; #define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION; #define XML_SCHEMAS_TYPE_FINAL_UNION; @@ -187,10 +190,18 @@ void xmlSchemaFreeWildcard (

          Macro XML_SCHEMAS_ATTRGROUP_GLOBAL

          #define XML_SCHEMAS_ATTRGROUP_GLOBAL;
           

          The attribute wildcard has been already builded.

          +
          +
          +

          Macro XML_SCHEMAS_ATTRGROUP_HAS_REFS

          #define XML_SCHEMAS_ATTRGROUP_HAS_REFS;
          +

          Whether this attr. group contains attr. group references.


          Macro XML_SCHEMAS_ATTRGROUP_MARKED

          #define XML_SCHEMAS_ATTRGROUP_MARKED;
           

          Marks the attr group as marked; used for circular checks.

          +
          +
          +

          Macro XML_SCHEMAS_ATTRGROUP_REDEFINED

          #define XML_SCHEMAS_ATTRGROUP_REDEFINED;
          +

          The attr group was redefined.


          Macro XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED

          #define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED;
          @@ -443,10 +454,14 @@ void	xmlSchemaFreeWildcard		(

          Macro XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD

          #define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD;
           

          the complexType owns an attribute wildcard, i.e. it can be freed by the complexType

          +
          +
          +

          Macro XML_SCHEMAS_TYPE_REDEFINED

          #define XML_SCHEMAS_TYPE_REDEFINED;
          +

          The type was redefined.


          Macro XML_SCHEMAS_TYPE_VARIETY_ABSENT

          #define XML_SCHEMAS_TYPE_VARIETY_ABSENT;
          -

          the simpleType has a variety of "absent".

          +

          the simpleType has a variety of "absent". TODO: Actually not necessary :-/, since if none of the variety flags occur then it's automatically absent.


          Macro XML_SCHEMAS_TYPE_VARIETY_ATOMIC

          #define XML_SCHEMAS_TYPE_VARIETY_ATOMIC;
          @@ -489,25 +504,25 @@ void	xmlSchemaFreeWildcard		(

          Structure xmlSchemaAttribute

          struct _xmlSchemaAttribute {
          -    xmlSchemaTypeType	type	: The kind of type
          -    struct _xmlSchemaAttribute *	next	: the next attribute if in a group ...
          -    const xmlChar *	name	: name of the declaration or empty if particle
          -    const xmlChar *	id
          -    const xmlChar *	ref	: the local name of the attribute decl. if a particle
          -    const xmlChar *	refNs	: the ns URI of the attribute decl. if a particle
          +    xmlSchemaTypeType	type
          +    struct _xmlSchemaAttribute *	next	: the next attribute (not used?)
          +    const xmlChar *	name	: the name of the declaration
          +    const xmlChar *	id	: Deprecated; not used
          +    const xmlChar *	ref	: Deprecated; not used
          +    const xmlChar *	refNs	: Deprecated; not used
               const xmlChar *	typeName	: the local name of the type definition
               const xmlChar *	typeNs	: the ns URI of the type definition
               xmlSchemaAnnotPtr	annot
          -    xmlSchemaTypePtr	base	: obsolete, not used
          -    int	occurs
          -    const xmlChar *	defValue
          +    xmlSchemaTypePtr	base	: Deprecated; not used
          +    int	occurs	: Deprecated; not used
          +    const xmlChar *	defValue	: The initial value of the value constraint
               xmlSchemaTypePtr	subtypes	: the type definition
               xmlNodePtr	node
               const xmlChar *	targetNamespace
               int	flags
          -    const xmlChar *	refPrefix
          -    xmlSchemaValPtr	defVal
          -    xmlSchemaAttributePtr	refDecl
          +    const xmlChar *	refPrefix	: Deprecated; not used
          +    xmlSchemaValPtr	defVal	: The compiled value constraint
          +    xmlSchemaAttributePtr	refDecl	: Deprecated; not used
           } xmlSchemaAttribute;
           

          @@ -517,16 +532,17 @@ void xmlSchemaFreeWildcard (attribute if in a group ... const xmlChar * name const xmlChar * id - const xmlChar * ref - const xmlChar * refNs + const xmlChar * ref : Deprecated; not used + const xmlChar * refNs : Deprecated; not used xmlSchemaAnnotPtr annot - xmlSchemaAttributePtr attributes + xmlSchemaAttributePtr attributes : Deprecated; not used xmlNodePtr node int flags xmlSchemaWildcardPtr attributeWildcard - const xmlChar * refPrefix - xmlSchemaAttributeGroupPtr refItem : The referenced attribute group - const xmlChar * targetNamespace : xmlSchemaAttributeGroupPtr redef Redefinitions + const xmlChar * refPrefix : Deprecated; not used + xmlSchemaAttributeGroupPtr refItem : Deprecated; not used + const xmlChar * targetNamespace + void * attrUses } xmlSchemaAttributeGroup;

          @@ -556,7 +572,7 @@ void xmlSchemaFreeWildcard (XML_SCHEMA_CONTENT_ELEMENTS = 2 XML_SCHEMA_CONTENT_MIXED = 3 XML_SCHEMA_CONTENT_SIMPLE = 4 - XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS = 5 /* obsolete, not used */ + XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS = 5 /* Obsolete */ XML_SCHEMA_CONTENT_BASIC = 6 XML_SCHEMA_CONTENT_ANY = 7 }; @@ -565,17 +581,17 @@ void xmlSchemaFreeWildcard (

          Structure xmlSchemaElement

          struct _xmlSchemaElement {
               xmlSchemaTypeType	type	: The kind of type
          -    struct _xmlSchemaType *	next	: the next type if in a sequence ...
          +    struct _xmlSchemaType *	next	: Not used?
               const xmlChar *	name
          -    const xmlChar *	id
          -    const xmlChar *	ref	: the local name of the element declaration if a particle
          -    const xmlChar *	refNs	: the ns URI of the element declaration if a particle
          +    const xmlChar *	id	: Deprecated; not used
          +    const xmlChar *	ref	: Deprecated; not used
          +    const xmlChar *	refNs	: Deprecated; not used
               xmlSchemaAnnotPtr	annot
               xmlSchemaTypePtr	subtypes	: the type definition
               xmlSchemaAttributePtr	attributes
               xmlNodePtr	node
          -    int	minOccurs
          -    int	maxOccurs
          +    int	minOccurs	: Deprecated; not used
          +    int	maxOccurs	: Deprecated; not used
               int	flags
               const xmlChar *	targetNamespace
               const xmlChar *	namedType
          @@ -583,13 +599,13 @@ void	xmlSchemaFreeWildcard		(xmlChar *	substGroup
               const xmlChar *	substGroupNs
               const xmlChar *	scope
          -    const xmlChar *	value
          +    const xmlChar *	value	: The original value of the value constraint.
               struct _xmlSchemaElement *	refDecl	: This will now be used for the substitution group affiliation
          -    xmlRegexpPtr	contModel
          +    xmlRegexpPtr	contModel	: Obsolete for WXS, maybe used for RelaxNG
               xmlSchemaContentType	contentType
          -    const xmlChar *	refPrefix
          -    xmlSchemaValPtr	defVal
          -    void *	idcs
          +    const xmlChar *	refPrefix	: Deprecated; not used
          +    xmlSchemaValPtr	defVal	: The compiled value contraint.
          +    void *	idcs	: The identity-constraint defs
           } xmlSchemaElement;
           

          @@ -601,14 +617,14 @@ void xmlSchemaFreeWildcard (

          Structure xmlSchemaFacet

          struct _xmlSchemaFacet {
               xmlSchemaTypeType	type	: The kind of type
               struct _xmlSchemaFacet *	next	: the next type if in a sequence ...
          -    const xmlChar *	value
          -    const xmlChar *	id
          +    const xmlChar *	value	: The original value
          +    const xmlChar *	id	: Obsolete
               xmlSchemaAnnotPtr	annot
               xmlNodePtr	node
          -    int	fixed
          +    int	fixed	: XML_SCHEMAS_FACET_PRESERVE, etc.
               int	whitespace
          -    xmlSchemaValPtr	val
          -    xmlRegexpPtr	regexp
          +    xmlSchemaValPtr	val	: The compiled value
          +    xmlRegexpPtr	regexp	: The regex for patterns
           } xmlSchemaFacet;
           

          @@ -646,39 +662,40 @@ void xmlSchemaFreeWildcard (xmlSchemaTypeType type : The kind of type struct _xmlSchemaType * next : the next type if in a sequence ... const xmlChar * name - const xmlChar * id - const xmlChar * ref - const xmlChar * refNs + const xmlChar * id : Deprecated; not used + const xmlChar * ref : Deprecated; not used + const xmlChar * refNs : Deprecated; not used xmlSchemaAnnotPtr annot xmlSchemaTypePtr subtypes - xmlSchemaAttributePtr attributes + xmlSchemaAttributePtr attributes : Deprecated; not used xmlNodePtr node - int minOccurs - int maxOccurs + int minOccurs : Deprecated; not used + int maxOccurs : Deprecated; not used int flags xmlSchemaContentType contentType - const xmlChar * base - const xmlChar * baseNs - xmlSchemaTypePtr baseType - xmlSchemaFacetPtr facets - struct _xmlSchemaType * redef : possible redefinitions for the type - int recurse - xmlSchemaAttributeLinkPtr attributeUses + const xmlChar * base : Base type's local name + const xmlChar * baseNs : Base type's target namespace + xmlSchemaTypePtr baseType : The base type component + xmlSchemaFacetPtr facets : Local facets + struct _xmlSchemaType * redef : Deprecated; not used + int recurse : Obsolete + xmlSchemaAttributeLinkPtr * attributeUses : Deprecated; not used xmlSchemaWildcardPtr attributeWildcard - int builtInType - xmlSchemaTypeLinkPtr memberTypes - xmlSchemaFacetLinkPtr facetSet - const xmlChar * refPrefix - xmlSchemaTypePtr contentTypeDef - xmlRegexpPtr contModel + int builtInType : Type of built-in types. + xmlSchemaTypeLinkPtr memberTypes : member-types if a union type. + xmlSchemaFacetLinkPtr facetSet : All facets (incl. inherited) + const xmlChar * refPrefix : Deprecated; not used + xmlSchemaTypePtr contentTypeDef : Used for the simple content of complex types. Could we use @subtypes + xmlRegexpPtr contModel : Holds the automaton of the content model const xmlChar * targetNamespace + void * attrUses } xmlSchemaType;


          Structure xmlSchemaTypeLink

          struct _xmlSchemaTypeLink {
               struct _xmlSchemaTypeLink *	next	: the next type link ...
          -    xmlSchemaTypePtr	type	: the linked typ
          +    xmlSchemaTypePtr	type	: the linked type
           } xmlSchemaTypeLink;
           

          @@ -717,6 +734,7 @@ void xmlSchemaFreeWildcard (XML_SCHEMA_TYPE_IDC_KEY = 23 XML_SCHEMA_TYPE_IDC_KEYREF = 24 XML_SCHEMA_TYPE_PARTICLE = 25 + XML_SCHEMA_TYPE_ATTRIBUTE_USE = 26 XML_SCHEMA_FACET_MININCLUSIVE = 1000 XML_SCHEMA_FACET_MINEXCLUSIVE = 1001 XML_SCHEMA_FACET_MAXINCLUSIVE = 1002 @@ -730,6 +748,7 @@ void xmlSchemaFreeWildcard (XML_SCHEMA_FACET_MAXLENGTH = 1010 XML_SCHEMA_FACET_MINLENGTH = 1011 XML_SCHEMA_EXTRA_QNAMEREF = 2000 + XML_SCHEMA_EXTRA_ATTR_USE_PROHIB = 2001 };

          @@ -798,11 +817,11 @@ The content of this structure is not made public by the API.


          Structure xmlSchemaWildcard

          struct _xmlSchemaWildcard {
               xmlSchemaTypeType	type	: The kind of type
          -    const xmlChar *	id
          +    const xmlChar *	id	: Deprecated; not used
               xmlSchemaAnnotPtr	annot
               xmlNodePtr	node
          -    int	minOccurs
          -    int	maxOccurs
          +    int	minOccurs	: Deprecated; not used
          +    int	maxOccurs	: Deprecated; not used
               int	processContents
               int	any	: Indicates if the ns constraint is of ##any
               xmlSchemaWildcardNsPtr	nsSet	: The list of allowed namespaces
          diff --git a/doc/devhelp/libxml2-tree.html b/doc/devhelp/libxml2-tree.html
          index 9b77b9a..9395f76 100644
          --- a/doc/devhelp/libxml2-tree.html
          +++ b/doc/devhelp/libxml2-tree.html
          @@ -1225,7 +1225,7 @@ void	xmlFreeNsList			(
          doc:the document pointer
          name:the DTD name
          ExternalID:the external ID
          SystemID:the system ID
          Returns:a pointer to the new DTD structure

          xmlNewGlobalNs ()

          xmlNsPtr	xmlNewGlobalNs		(xmlDocPtr doc, 
          const xmlChar * href,
          const xmlChar * prefix)
          -

          Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!! It now create a namespace on the root element of the document if found.

          +

          Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!!

          doc:the document carrying the namespace
          href:the URI associated
          prefix:the prefix for the namespace
          Returns:NULL this functionality had been removed

          xmlNewNode ()

          xmlNodePtr	xmlNewNode		(xmlNsPtr ns, 
          const xmlChar * name)
          diff --git a/doc/devhelp/libxml2-valid.html b/doc/devhelp/libxml2-valid.html index 7832502..3b23e67 100644 --- a/doc/devhelp/libxml2-valid.html +++ b/doc/devhelp/libxml2-valid.html @@ -81,7 +81,7 @@ int xmlValidateAttributeDecl (xmlElementPtr xmlGetDtdQElementDesc (xmlDtdPtr dtd,
          const xmlChar * name,
          const xmlChar * prefix); xmlNotationTablePtr xmlCopyNotationTable (xmlNotationTablePtr table); int xmlValidateDocument (xmlValidCtxtPtr ctxt,
          xmlDocPtr doc); -int xmlValidGetPotentialChildren (xmlElementContent * ctree,
          const xmlChar ** list,
          int * len,
          int max); +int xmlValidGetPotentialChildren (xmlElementContent * ctree,
          const xmlChar ** names,
          int * len,
          int max); xmlNotationPtr xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
          xmlDtdPtr dtd,
          const xmlChar * name,
          const xmlChar * PublicID,
          const xmlChar * SystemID); int xmlValidateElementDecl (xmlValidCtxtPtr ctxt,
          xmlDocPtr doc,
          xmlElementPtr elem); xmlAttributePtr xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
          xmlDtdPtr dtd,
          const xmlChar * elem,
          const xmlChar * name,
          const xmlChar * ns,
          xmlAttributeType type,
          xmlAttributeDefault def,
          const xmlChar * defaultValue,
          xmlEnumerationPtr tree); @@ -426,9 +426,9 @@ The content of this structure is not made public by the API.

          Does the validation related extra step of the normalization of attribute values: If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by single space (#x20) character. Also check VC: Standalone Document Declaration in P32, and update ctxt->valid accordingly

          ctxt:the validation context or NULL
          doc:the document
          elem:the parent
          name:the attribute name
          value:the attribute value
          Returns:a new normalized string if normalization is needed, NULL otherwise the caller must free the returned value.

          -

          xmlValidGetPotentialChildren ()

          int	xmlValidGetPotentialChildren	(xmlElementContent * ctree, 
          const xmlChar ** list,
          int * len,
          int max)
          +

          xmlValidGetPotentialChildren ()

          int	xmlValidGetPotentialChildren	(xmlElementContent * ctree, 
          const xmlChar ** names,
          int * len,
          int max)

          Build/extend a list of potential children allowed by the content tree

          -
          ctree:an element content tree
          list:an array to store the list of child names
          len:a pointer to the number of element in the list
          max:the size of the array
          Returns:the number of element in the list, or -1 in case of error.
          +
          ctree:an element content tree
          names:an array to store the list of child names
          len:a pointer to the number of element in the list
          max:the size of the array
          Returns:the number of element in the list, or -1 in case of error.

          xmlValidGetValidElements ()

          int	xmlValidGetValidElements	(xmlNode * prev, 
          xmlNode * next,
          const xmlChar ** names,
          int max)

          This function returns the list of authorized children to insert within an existing tree while respecting the validity constraints forced by the Dtd. The insertion point is defined using @prev and @next in the following ways: to insert before 'node': xmlValidGetValidElements(node->prev, node, ... to insert next 'node': xmlValidGetValidElements(node, node->next, ... to replace 'node': xmlValidGetValidElements(node->prev, node->next, ... to prepend a child to 'node': xmlValidGetValidElements(NULL, node->childs, to append a child to 'node': xmlValidGetValidElements(node->last, NULL, ... pointers to the element names are inserted at the beginning of the array and do not need to be freed.

          diff --git a/doc/devhelp/libxml2-xmlIO.html b/doc/devhelp/libxml2-xmlIO.html index 9e03d5f..8c41d1d 100644 --- a/doc/devhelp/libxml2-xmlIO.html +++ b/doc/devhelp/libxml2-xmlIO.html @@ -71,9 +71,10 @@ int xmlRegisterInputCallbacks (xmlFreeParserInputBuffer (xmlParserInputBufferPtr in); void xmlRegisterDefaultInputCallbacks (void); int xmlParserInputBufferGrow (xmlParserInputBufferPtr in,
          int len); +typedef int xmlOutputCloseCallback (void * context); xmlOutputBufferPtr xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder); xmlParserInputPtr xmlNoNetExternalEntityLoader (const char * URL,
          const char * ID,
          xmlParserCtxtPtr ctxt); -typedef int xmlOutputCloseCallback (void * context); +xmlOutputBufferPtr xmlOutputBufferCreateBuffer (xmlBufferPtr buffer,
          xmlCharEncodingHandlerPtr encoder); int xmlIOHTTPMatch (const char * filename); void * xmlIOHTTPOpen (const char * filename); xmlParserInputBufferPtr xmlParserInputBufferCreateIO (xmlInputReadCallback ioread,
          xmlInputCloseCallback ioclose,
          void * ioctx,
          xmlCharEncoding enc); @@ -229,6 +230,10 @@ void * xmlIOHTTPOpenW (const char * post_uri,

          xmlOutputBufferClose ()

          int	xmlOutputBufferClose		(xmlOutputBufferPtr out)

          flushes and close the output I/O channel and free up all the associated resources

          out:a buffered output
          Returns:the number of byte written or -1 in case of error.
          +
          +

          xmlOutputBufferCreateBuffer ()

          xmlOutputBufferPtr	xmlOutputBufferCreateBuffer	(xmlBufferPtr buffer, 
          xmlCharEncodingHandlerPtr encoder)
          +

          Create a buffered output for the progressive saving to a xmlBuffer

          +
          buffer:a xmlBufferPtr
          encoder:the encoding converter or NULL
          Returns:the new parser output or NULL

          xmlOutputBufferCreateFd ()

          xmlOutputBufferPtr	xmlOutputBufferCreateFd	(int fd, 
          xmlCharEncodingHandlerPtr encoder)

          Create a buffered output for the progressive saving to a file descriptor

          diff --git a/doc/devhelp/libxml2-xmlerror.html b/doc/devhelp/libxml2-xmlerror.html index 44792da..d0eb477 100644 --- a/doc/devhelp/libxml2-xmlerror.html +++ b/doc/devhelp/libxml2-xmlerror.html @@ -811,6 +811,11 @@ void xmlResetError (XML_SCHEMAP_WARN_UNLOCATED_SCHEMA = 3084 /* 3084 */ XML_SCHEMAP_WARN_ATTR_REDECL_PROH = 3085 /* 3085 */ XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH = 3086 /* 3085 */ + XML_SCHEMAP_AG_PROPS_CORRECT = 3087 /* 3086 */ + XML_SCHEMAP_COS_CT_EXTENDS_1_2 = 3088 /* 3087 */ + XML_SCHEMAP_AU_PROPS_CORRECT = 3089 /* 3088 */ + XML_SCHEMAP_A_PROPS_CORRECT_3 = 3090 /* 3089 */ + XML_SCHEMAP_COS_ALL_LIMITED = 3091 /* 3090 */ XML_MODULE_OPEN = 4900 /* 4900 */ XML_MODULE_CLOSE = 4901 /* 4901 */ XML_CHECK_FOUND_ELEMENT = 5000 diff --git a/doc/devhelp/libxml2-xmlreader.html b/doc/devhelp/libxml2-xmlreader.html index 585f47e..a3bbbb5 100644 --- a/doc/devhelp/libxml2-xmlreader.html +++ b/doc/devhelp/libxml2-xmlreader.html @@ -124,6 +124,7 @@ int xmlReaderNewMemory (xmlChar * xmlTextReaderConstValue (xmlTextReaderPtr reader); xmlTextReaderPtr xmlNewTextReader (xmlParserInputBufferPtr input,
          const char * URI); xmlChar * xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader,
          int no); +int xmlTextReaderSchemaValidateCtxt (xmlTextReaderPtr reader,
          xmlSchemaValidCtxtPtr ctxt,
          int options); xmlChar * xmlTextReaderLocalName (xmlTextReaderPtr reader); xmlNodePtr xmlTextReaderExpand (xmlTextReaderPtr reader); const xmlChar * xmlTextReaderConstName (xmlTextReaderPtr reader); @@ -513,8 +514,12 @@ The content of this structure is not made public by the API.
          reader:the xmlTextReaderPtr used
          rng:the path to a RelaxNG schema or NULL
          Returns:0 in case the RelaxNG validation could be (des)activated and -1 in case of error.

          xmlTextReaderSchemaValidate ()

          int	xmlTextReaderSchemaValidate	(xmlTextReaderPtr reader, 
          const char * xsd)
          -

          Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). if @xsd is NULL, then RelaxNG validation is desactivated.

          -
          reader:the xmlTextReaderPtr used
          xsd:the path to a W3C XSD schema or NULL
          Returns:0 in case the schemas validation could be (des)activated and -1 in case of error.
          +

          Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). If @xsd is NULL, then XML Schema validation is deactivated.

          +
          reader:the xmlTextReaderPtr used
          xsd:the path to a W3C XSD schema or NULL
          Returns:0 in case the schemas validation could be (de)activated and -1 in case of error.
          +
          +

          xmlTextReaderSchemaValidateCtxt ()

          int	xmlTextReaderSchemaValidateCtxt	(xmlTextReaderPtr reader, 
          xmlSchemaValidCtxtPtr ctxt,
          int options)
          +

          Use W3C XSD schema context to validate the document as it is processed. Activation is only possible before the first Read(). If @ctxt is NULL, then XML Schema validation is deactivated.

          +
          reader:the xmlTextReaderPtr used
          ctxt:the XML Schema validation context or NULL
          options:options (not used yet)
          Returns:0 in case the schemas validation could be (de)activated and -1 in case of error.

          xmlTextReaderSetErrorHandler ()

          void	xmlTextReaderSetErrorHandler	(xmlTextReaderPtr reader, 
          xmlTextReaderErrorFunc f,
          void * arg)

          Register a callback function that will be called on error and warnings. If @f is NULL, the default error and warning handlers are restored.

          diff --git a/doc/devhelp/libxml2-xmlregexp.html b/doc/devhelp/libxml2-xmlregexp.html index 0de6668..e783648 100644 --- a/doc/devhelp/libxml2-xmlregexp.html +++ b/doc/devhelp/libxml2-xmlregexp.html @@ -75,10 +75,10 @@ void xmlExpFree (xmlExpNodePtr xmlExpNewAtom (xmlExpCtxtPtr ctxt,
          const xmlChar * name,
          int len); int xmlRegexpExec (xmlRegexpPtr comp,
          const xmlChar * content); int xmlRegExecPushString (xmlRegExecCtxtPtr exec,
          const xmlChar * value,
          void * data); -int xmlExpGetStart (xmlExpCtxtPtr ctxt,
          xmlExpNodePtr exp,
          const xmlChar ** list,
          int len); +int xmlExpGetStart (xmlExpCtxtPtr ctxt,
          xmlExpNodePtr exp,
          const xmlChar ** tokList,
          int len); xmlExpNodePtr xmlExpParse (xmlExpCtxtPtr ctxt,
          const char * expr); xmlExpCtxtPtr xmlExpNewCtxt (int maxNodes,
          xmlDictPtr dict); -int xmlExpGetLanguage (xmlExpCtxtPtr ctxt,
          xmlExpNodePtr exp,
          const xmlChar ** list,
          int len); +int xmlExpGetLanguage (xmlExpCtxtPtr ctxt,
          xmlExpNodePtr exp,
          const xmlChar ** langList,
          int len); xmlExpNodePtr xmlExpStringDerive (xmlExpCtxtPtr ctxt,
          xmlExpNodePtr exp,
          const xmlChar * str,
          int len); int xmlExpCtxtNbNodes (xmlExpCtxtPtr ctxt); int xmlExpMaxToken (xmlExpNodePtr expr); @@ -178,13 +178,13 @@ The content of this structure is not made public by the API.

          Free an expression context

          ctxt:an expression context

          -

          xmlExpGetLanguage ()

          int	xmlExpGetLanguage		(xmlExpCtxtPtr ctxt, 
          xmlExpNodePtr exp,
          const xmlChar ** list,
          int len)
          +

          xmlExpGetLanguage ()

          int	xmlExpGetLanguage		(xmlExpCtxtPtr ctxt, 
          xmlExpNodePtr exp,
          const xmlChar ** langList,
          int len)

          Find all the strings used in @exp and store them in @list

          -
          ctxt:the expression context
          exp:the expression
          list:where to store the tokens
          len:the allocated lenght of @list
          Returns:the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings
          +
          ctxt:the expression context
          exp:the expression
          langList:where to store the tokens
          len:the allocated lenght of @list
          Returns:the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings

          -

          xmlExpGetStart ()

          int	xmlExpGetStart			(xmlExpCtxtPtr ctxt, 
          xmlExpNodePtr exp,
          const xmlChar ** list,
          int len)
          +

          xmlExpGetStart ()

          int	xmlExpGetStart			(xmlExpCtxtPtr ctxt, 
          xmlExpNodePtr exp,
          const xmlChar ** tokList,
          int len)

          Find all the strings that appears at the start of the languages accepted by @exp and store them in @list. E.g. for (a, b) | c it will return the list [a, c]

          -
          ctxt:the expression context
          exp:the expression
          list:where to store the tokens
          len:the allocated lenght of @list
          Returns:the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings
          +
          ctxt:the expression context
          exp:the expression
          tokList:where to store the tokens
          len:the allocated lenght of @list
          Returns:the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings

          xmlExpIsNillable ()

          int	xmlExpIsNillable		(xmlExpNodePtr exp)

          Finds if the expression is nillable, i.e. if it accepts the empty sequqnce

          diff --git a/doc/devhelp/libxml2-xmlsave.html b/doc/devhelp/libxml2-xmlsave.html index 0c416f4..910a1df 100644 --- a/doc/devhelp/libxml2-xmlsave.html +++ b/doc/devhelp/libxml2-xmlsave.html @@ -50,6 +50,7 @@ typedef xmlSaveCtxt * xmlSaveCtxtPtr xmlSaveToFd (int fd,
          const char * encoding,
          int options); int xmlSaveClose (xmlSaveCtxtPtr ctxt); int xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
          xmlCharEncodingOutputFunc escape); +xmlSaveCtxtPtr xmlSaveToBuffer (xmlBufferPtr buffer,
          const char * encoding,
          int options); xmlSaveCtxtPtr xmlSaveToFilename (const char * filename,
          const char * encoding,
          int options); int xmlSaveFlush (xmlSaveCtxtPtr ctxt); long xmlSaveDoc (xmlSaveCtxtPtr ctxt,
          xmlDocPtr doc); @@ -101,6 +102,10 @@ The content of this structure is not made public by the API.

          xmlSaveSetEscape ()

          int	xmlSaveSetEscape		(xmlSaveCtxtPtr ctxt, 
          xmlCharEncodingOutputFunc escape)

          Set a custom escaping function to be used for text in element content

          ctxt:a document saving context
          escape:the escaping function
          Returns:0 if successful or -1 in case of error.
          +
          +

          xmlSaveToBuffer ()

          xmlSaveCtxtPtr	xmlSaveToBuffer		(xmlBufferPtr buffer, 
          const char * encoding,
          int options)
          +

          Create a document saving context serializing to a buffer with the encoding and the options given

          +
          buffer:a buffer
          encoding:the encoding name to use or NULL
          options:a set of xmlSaveOptions
          Returns:a new serialization context or NULL in case of error.

          xmlSaveToFd ()

          xmlSaveCtxtPtr	xmlSaveToFd		(int fd, 
          const char * encoding,
          int options)

          Create a document saving context serializing to a file descriptor with the encoding and the options given.

          diff --git a/doc/devhelp/libxml2-xmlschemas.html b/doc/devhelp/libxml2-xmlschemas.html index bf5120e..4801ea5 100644 --- a/doc/devhelp/libxml2-xmlschemas.html +++ b/doc/devhelp/libxml2-xmlschemas.html @@ -68,7 +68,7 @@ void xmlSchemaSetValidStructuredErr void xmlSchemaSetValidErrors (xmlSchemaValidCtxtPtr ctxt,
          xmlSchemaValidityErrorFunc err,
          xmlSchemaValidityWarningFunc warn,
          void * ctx); int xmlSchemaValidCtxtGetOptions (xmlSchemaValidCtxtPtr ctxt); int xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt,
          const char * filename,
          int options); -int xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,
          xmlDocPtr doc); +int xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,
          xmlDocPtr instance); void xmlSchemaFree (xmlSchemaPtr schema); xmlSchemaParserCtxtPtr xmlSchemaNewMemParserCtxt (const char * buffer,
          int size); int xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt,
          xmlSchemaValidityErrorFunc * err,
          xmlSchemaValidityWarningFunc * warn,
          void ** ctx); @@ -77,6 +77,7 @@ void xmlSchemaSetParserErrors (xmlSchemaValidityWarningFunc (void * ctx,
          const char * msg,
          ... ...); void xmlSchemaDump (FILE * output,
          xmlSchemaPtr schema); void xmlSchemaFreeValidCtxt (xmlSchemaValidCtxtPtr ctxt); +void xmlSchemaSetParserStructuredErrors (xmlSchemaParserCtxtPtr ctxt,
          xmlStructuredErrorFunc serror,
          void * ctx); xmlSchemaValidCtxtPtr xmlSchemaNewValidCtxt (xmlSchemaPtr schema);
          @@ -90,7 +91,7 @@ void xmlSchemaFreeValidCtxt (xmlChar * name : schema name const xmlChar * targetNamespace : the target namespace const xmlChar * version - const xmlChar * id + const xmlChar * id : Obsolete xmlDocPtr doc xmlSchemaAnnotPtr annot int flags @@ -106,8 +107,8 @@ void xmlSchemaFreeValidCtxt (xmlHashTablePtr idcDef - void * volatiles : Deprecated; not used anymore. + xmlHashTablePtr idcDef : All identity-constraint defs. + void * volatiles : Obsolete } xmlSchema;

          @@ -204,20 +205,20 @@ The content of this structure is not made public by the API.
          ctxt:the schema parser context

          xmlSchemaFreeValidCtxt ()

          void	xmlSchemaFreeValidCtxt		(xmlSchemaValidCtxtPtr ctxt)
          -

          Free the resources associated to the schema validation context

          -
          ctxt:the schema validation context
          +

          +

          ctxt:

          xmlSchemaGetParserErrors ()

          int	xmlSchemaGetParserErrors	(xmlSchemaParserCtxtPtr ctxt, 
          xmlSchemaValidityErrorFunc * err,
          xmlSchemaValidityWarningFunc * warn,
          void ** ctx)

          Get the callback information used to handle errors for a parser context

          ctxt:a XMl-Schema parser context
          err:the error callback result
          warn:the warning callback result
          ctx:contextual data for the callbacks result
          Returns:-1 in case of failure, 0 otherwise

          xmlSchemaGetValidErrors ()

          int	xmlSchemaGetValidErrors		(xmlSchemaValidCtxtPtr ctxt, 
          xmlSchemaValidityErrorFunc * err,
          xmlSchemaValidityWarningFunc * warn,
          void ** ctx)
          -

          Get the error and warning callback informations

          -
          ctxt:a XML-Schema validation context
          err:the error function result
          warn:the warning function result
          ctx:the functions context result
          Returns:-1 in case of error and 0 otherwise
          +

          +

          ctxt:
          err:
          warn:
          ctx:
          Returns:

          xmlSchemaIsValid ()

          int	xmlSchemaIsValid		(xmlSchemaValidCtxtPtr ctxt)
          -

          Check if any error was detected during validation.

          -
          ctxt:the schema validation context
          Returns:1 if valid so far, 0 if errors were detected, and -1 in case of internal error.
          +

          +

          ctxt:
          Returns:

          xmlSchemaNewDocParserCtxt ()

          xmlSchemaParserCtxtPtr	xmlSchemaNewDocParserCtxt	(xmlDocPtr doc)

          Create an XML Schemas parse context for that document. NB. The document may be modified during the parsing process.

          @@ -232,56 +233,60 @@ The content of this structure is not made public by the API.
          URL:the location of the schema
          Returns:the parser context or NULL in case of error

          xmlSchemaNewValidCtxt ()

          xmlSchemaValidCtxtPtr	xmlSchemaNewValidCtxt	(xmlSchemaPtr schema)
          -

          Create an XML Schemas validation context based on the given schema.

          -
          schema:a precompiled XML Schemas
          Returns:the validation context or NULL in case of error
          +

          +

          schema:
          Returns:

          xmlSchemaParse ()

          xmlSchemaPtr	xmlSchemaParse		(xmlSchemaParserCtxtPtr ctxt)
          -

          parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances. *WARNING* this interface is highly subject to change

          +

          parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.

          ctxt:a schema validation context
          Returns:the internal XML Schema structure built from the resource or NULL in case of error

          xmlSchemaSAXPlug ()

          xmlSchemaSAXPlugPtr	xmlSchemaSAXPlug	(xmlSchemaValidCtxtPtr ctxt, 
          xmlSAXHandlerPtr * sax,
          void ** user_data)
          -

          Plug a SAX based validation layer in a SAX parsing event flow. The original @saxptr and @dataptr data are replaced by new pointers but the calls to the original will be maintained.

          -
          ctxt:a schema validation context
          sax:a pointer to the original xmlSAXHandlerPtr
          user_data:a pointer to the original SAX user data pointer
          Returns:a pointer to a data structure needed to unplug the validation layer or NULL in case of errors.
          +

          +

          ctxt:
          sax:
          user_data:
          Returns:

          xmlSchemaSAXUnplug ()

          int	xmlSchemaSAXUnplug		(xmlSchemaSAXPlugPtr plug)
          -

          Unplug a SAX based validation layer in a SAX parsing event flow. The original pointers used in the call are restored.

          -
          plug:a data structure returned by xmlSchemaSAXPlug
          Returns:0 in case of success and -1 in case of failure.
          +

          +

          plug:
          Returns:

          xmlSchemaSetParserErrors ()

          void	xmlSchemaSetParserErrors	(xmlSchemaParserCtxtPtr ctxt, 
          xmlSchemaValidityErrorFunc err,
          xmlSchemaValidityWarningFunc warn,
          void * ctx)

          Set the callback functions used to handle errors for a validation context

          ctxt:a schema validation context
          err:the error callback
          warn:the warning callback
          ctx:contextual data for the callbacks
          +
          +

          xmlSchemaSetParserStructuredErrors ()

          void	xmlSchemaSetParserStructuredErrors	(xmlSchemaParserCtxtPtr ctxt, 
          xmlStructuredErrorFunc serror,
          void * ctx)
          +

          Set the structured error callback

          +
          ctxt:a schema parser context
          serror:the structured error function
          ctx:the functions context

          xmlSchemaSetValidErrors ()

          void	xmlSchemaSetValidErrors		(xmlSchemaValidCtxtPtr ctxt, 
          xmlSchemaValidityErrorFunc err,
          xmlSchemaValidityWarningFunc warn,
          void * ctx)
          -

          Set the error and warning callback informations

          -
          ctxt:a schema validation context
          err:the error function
          warn:the warning function
          ctx:the functions context
          +

          +

          ctxt:
          err:
          warn:
          ctx:

          xmlSchemaSetValidOptions ()

          int	xmlSchemaSetValidOptions	(xmlSchemaValidCtxtPtr ctxt, 
          int options)
          -

          Sets the options to be used during the validation.

          -
          ctxt:a schema validation context
          options:a combination of xmlSchemaValidOption
          Returns:0 in case of success, -1 in case of an API error.
          +

          +

          ctxt:
          options:
          Returns:

          xmlSchemaSetValidStructuredErrors ()

          void	xmlSchemaSetValidStructuredErrors	(xmlSchemaValidCtxtPtr ctxt, 
          xmlStructuredErrorFunc serror,
          void * ctx)
          -

          Set the structured error callback

          -
          ctxt:a schema validation context
          serror:the structured error function
          ctx:the functions context
          +

          +

          ctxt:
          serror:
          ctx:

          xmlSchemaValidCtxtGetOptions ()

          int	xmlSchemaValidCtxtGetOptions	(xmlSchemaValidCtxtPtr ctxt)
          -

          Get the validation context options.

          -
          ctxt:a schema validation context
          Returns:the option combination or -1 on error.
          +

          +

          ctxt:
          Returns:

          -

          xmlSchemaValidateDoc ()

          int	xmlSchemaValidateDoc		(xmlSchemaValidCtxtPtr ctxt, 
          xmlDocPtr doc)
          -

          Validate a document tree in memory.

          -
          ctxt:a schema validation context
          doc:a parsed document tree
          Returns:0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.
          +

          xmlSchemaValidateFile ()

          int	xmlSchemaValidateFile		(xmlSchemaValidCtxtPtr ctxt, 
          const char * filename,
          int options)
          -

          Do a schemas validation of the given resource, it will use the SAX streamable validation internally.

          -
          ctxt:a schema validation context
          filename:the URI of the instance
          options:a future set of options, currently unused
          Returns:0 if the document is valid, a positive error code number otherwise and -1 in case of an internal or API error.
          +

          +

          ctxt:
          filename:
          options:
          Returns:

          xmlSchemaValidateOneElement ()

          int	xmlSchemaValidateOneElement	(xmlSchemaValidCtxtPtr ctxt, 
          xmlNodePtr elem)
          -

          Validate a branch of a tree, starting with the given @elem.

          -
          ctxt:a schema validation context
          elem:an element node
          Returns:0 if the element and its subtree is valid, a positive error code number otherwise and -1 in case of an internal or API error.
          +

          +

          ctxt:
          elem:
          Returns:

          xmlSchemaValidateStream ()

          int	xmlSchemaValidateStream		(xmlSchemaValidCtxtPtr ctxt, 
          xmlParserInputBufferPtr input,
          xmlCharEncoding enc,
          xmlSAXHandlerPtr sax,
          void * user_data)
          -

          Validate an input based on a flow of SAX event from the parser and forward the events to the @sax handler with the provided @user_data the user provided @sax handler must be a SAX2 one.

          -
          ctxt:a schema validation context
          input:the input to use for reading the data
          enc:an optional encoding information
          sax:a SAX handler for the resulting events
          user_data:the context to provide to the SAX handler.
          Returns:0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.
          +

          +

          ctxt:
          input:
          enc:
          sax:
          user_data:
          Returns:

          diff --git a/doc/devhelp/libxml2-xmlstring.html b/doc/devhelp/libxml2-xmlstring.html index f7abfa3..43da9a4 100644 --- a/doc/devhelp/libxml2-xmlstring.html +++ b/doc/devhelp/libxml2-xmlstring.html @@ -108,7 +108,7 @@ int xmlUTF8Strloc (const
          utf:a sequence of UTF-8 encoded bytes
          len:a pointer to the minimum number of bytes present in the sequence. This is used to assure the next character is completely contained within the sequence.
          Returns:the char value or -1 in case of error, and sets *len to the actual number of bytes consumed (0 in case of error)

          xmlStrEqual ()

          int	xmlStrEqual			(const xmlChar * str1, 
          const xmlChar * str2)
          -

          Check if both string are equal of have same content Should be a bit more readable and faster than xmlStrEqual()

          +

          Check if both strings are equal of have same content. Should be a bit more readable and faster than xmlStrcmp()

          str1:the first xmlChar *
          str2:the second xmlChar *
          Returns:1 if they are equal, 0 if they are different


          xmlStrncat ()

          xmlChar *	xmlStrncat		(xmlChar * cur, 
          const xmlChar * add,
          int len)
          -

          a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add.

          +

          a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add. Note that if @len < 0 then this is an API error and NULL will be returned.

          cur:the original xmlChar * array
          add:the xmlChar * array added
          len:the length of @add
          Returns:a new xmlChar *, the original @cur is reallocated if needed and should not be freed

          xmlStrncatNew ()

          xmlChar *	xmlStrncatNew		(const xmlChar * str1, 
          const xmlChar * str2,
          int len)
          -

          same as xmlStrncat, but creates a new string. The original two strings are not freed.

          -
          str1:first xmlChar string
          str2:second xmlChar string
          len:the len of @str2
          Returns:a new xmlChar * or NULL
          +

          same as xmlStrncat, but creates a new string. The original two strings are not freed. If @len is < 0 then the length will be calculated automatically.

          +
          str1:first xmlChar string
          str2:second xmlChar string
          len:the len of @str2 or < 0
          Returns:a new xmlChar * or NULL

          xmlStrncmp ()

          int	xmlStrncmp			(const xmlChar * str1, 
          const xmlChar * str2,
          int len)

          a strncmp for xmlChar's

          diff --git a/doc/devhelp/libxml2.devhelp b/doc/devhelp/libxml2.devhelp index edc74cd..c8d5572 100644 --- a/doc/devhelp/libxml2.devhelp +++ b/doc/devhelp/libxml2.devhelp @@ -166,7 +166,9 @@ + + @@ -230,6 +232,7 @@ + @@ -956,13 +959,18 @@ + + + + + @@ -1309,6 +1317,7 @@ + @@ -1327,6 +1336,7 @@ + @@ -1922,6 +1932,7 @@ + @@ -2521,6 +2532,7 @@ + @@ -2757,6 +2769,7 @@ + @@ -2801,6 +2814,7 @@ + @@ -2881,6 +2895,8 @@ + + @@ -2961,6 +2977,7 @@ + diff --git a/doc/downloads.html b/doc/downloads.html index b0347d7..8dcfab9 100644 --- a/doc/downloads.html +++ b/doc/downloads.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Downloads
          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
          Made with Libxml2 Logo

          The XML C parser and toolkit of Gnome

          Downloads

          Main Menu
          Related links

          The latest versions of libxml2 can be found on the xmlsoft.org server ( HTTP, FTP and rsync are available), there is also +Downloads
          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
          Made with Libxml2 Logo

          The XML C parser and toolkit of Gnome

          Downloads

          Main Menu
          Related links

          The latest versions of libxml2 can be found on the xmlsoft.org server ( HTTP, FTP and rsync are available), there is also mirrors (Australia( Web), France) or on the Gnome FTP server as source archive , Antonin Sprinzl also provide a mirror in Austria. (NOTE that you need both the libxml(2) and libxml(2)-devel @@ -17,12 +17,13 @@ Windows binaries made by Igor Zlatovic are available in the Igor Zlatkovic is now the maintainer of the Windows port, he provides binaries. -

        • Blastwave provides - Solaris binaries.
        • +
        • Blastwave provides Solaris + binaries.
        • Steve Ball provides Mac Os X binaries.
        • The HP-UX porting center provides HP-UX binaries
        • -
        • Bull provides precompiled RPMs for AIX as patr of their GNOME packages
        • +
        • Bull provides precompiled RPMs for AIX as + patr of their GNOME packages
        • If you know other supported binary ports, please contact me.

          Snapshot:

          Contributions:

          I do accept external contributions, especially if compiling on another diff --git a/doc/encoding.html b/doc/encoding.html index 04d54e7..47171f7 100644 --- a/doc/encoding.html +++ b/doc/encoding.html @@ -7,14 +7,13 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Encodings support
          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
          Made with Libxml2 Logo

          The XML C parser and toolkit of Gnome

          Encodings support

          Main Menu
          Related links

          If you are not really familiar with Internationalization (usual shortcut +Encodings support
          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
          Made with Libxml2 Logo

          The XML C parser and toolkit of Gnome

          Encodings support

          Main Menu
          Related links

          If you are not really familiar with Internationalization (usual shortcut is I18N) , Unicode, characters and glyphs, I suggest you read a presentation by Tim Bray on Unicode and why you should care about it.

          If you don't understand why it does not make sense to have a string -without knowing what encoding it uses, then as Joel Spolsky said -please do -not write another line of code until you finish reading that article.. -It is a prerequisite to understand this page, and avoid a lot of problems -with libxml2, XML or text processing in general.

          Table of Content:

          1. What does internationalization support +without knowing what encoding it uses, then as Joel Spolsky said please do not +write another line of code until you finish reading that article.. It is +a prerequisite to understand this page, and avoid a lot of problems with +libxml2, XML or text processing in general.

            Table of Content:

            1. What does internationalization support mean ?
            2. The internal encoding, how and why
            3. @@ -185,7 +184,10 @@ detecting such a tag on input. Except for that the processing is the same set of encodings supported by iconv can be instantly be used by libxml. On a linux machine with glibc-2.1 the list of supported encodings and aliases fill 3 full pages, and include UCS-4, the full set of ISO-Latin encodings, and the -various Japanese ones.

              Encoding aliases

              From 2.2.3, libxml2 has support to register encoding names aliases. The +various Japanese ones.

              To convert from the UTF-8 values returned from the API to another encoding +then it is possible to use the function provided from the encoding module like UTF8Toisolat1, or use the +POSIX iconv() +API directly.

              Encoding aliases

              From 2.2.3, libxml2 has support to register encoding names aliases. The goal is to be able to parse document whose encoding is supported but where the name differs (for example from the default set of names accepted by iconv). The following functions allow to register and handle new aliases for diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am index 0bc8934..55a674d 100644 --- a/doc/examples/Makefile.am +++ b/doc/examples/Makefile.am @@ -15,20 +15,40 @@ install-data-local: $(mkinstalldirs) $(DESTDIR)$(HTML_DIR) -@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR) -EXTRA_DIST=examples.xsl index.py test3.xml tst.xml test2.xml writer.xml test1.xml examples.xml xpath1.res tree2.res reader3.res tree1.res reader1.res xpath2.res reader4.res io2.res io1.res +EXTRA_DIST=examples.xsl index.py examples.xml test1.xml test2.xml test3.xml tst.xml writer.xml io1.res io2.res reader1.res reader3.res reader4.res tree1.res tree2.res xpath1.res xpath2.res -noinst_PROGRAMS=reader3 io2 reader1 reader2 reader4 testWriter parse3 tree2 tree1 xpath2 parse1 xpath1 io1 parse4 parse2 +noinst_PROGRAMS=io1 io2 parse1 parse2 parse3 parse4 reader1 reader2 reader3 reader4 testWriter tree1 tree2 xpath1 xpath2 -reader3_SOURCES=reader3.c -reader3_LDFLAGS= -reader3_DEPENDENCIES= $(DEPS) -reader3_LDADD= @RDL_LIBS@ $(LDADDS) +io1_SOURCES=io1.c +io1_LDFLAGS= +io1_DEPENDENCIES= $(DEPS) +io1_LDADD= @RDL_LIBS@ $(LDADDS) io2_SOURCES=io2.c io2_LDFLAGS= io2_DEPENDENCIES= $(DEPS) io2_LDADD= @RDL_LIBS@ $(LDADDS) +parse1_SOURCES=parse1.c +parse1_LDFLAGS= +parse1_DEPENDENCIES= $(DEPS) +parse1_LDADD= @RDL_LIBS@ $(LDADDS) + +parse2_SOURCES=parse2.c +parse2_LDFLAGS= +parse2_DEPENDENCIES= $(DEPS) +parse2_LDADD= @RDL_LIBS@ $(LDADDS) + +parse3_SOURCES=parse3.c +parse3_LDFLAGS= +parse3_DEPENDENCIES= $(DEPS) +parse3_LDADD= @RDL_LIBS@ $(LDADDS) + +parse4_SOURCES=parse4.c +parse4_LDFLAGS= +parse4_DEPENDENCIES= $(DEPS) +parse4_LDADD= @RDL_LIBS@ $(LDADDS) + reader1_SOURCES=reader1.c reader1_LDFLAGS= reader1_DEPENDENCIES= $(DEPS) @@ -39,6 +59,11 @@ reader2_LDFLAGS= reader2_DEPENDENCIES= $(DEPS) reader2_LDADD= @RDL_LIBS@ $(LDADDS) +reader3_SOURCES=reader3.c +reader3_LDFLAGS= +reader3_DEPENDENCIES= $(DEPS) +reader3_LDADD= @RDL_LIBS@ $(LDADDS) + reader4_SOURCES=reader4.c reader4_LDFLAGS= reader4_DEPENDENCIES= $(DEPS) @@ -49,50 +74,25 @@ testWriter_LDFLAGS= testWriter_DEPENDENCIES= $(DEPS) testWriter_LDADD= @RDL_LIBS@ $(LDADDS) -parse3_SOURCES=parse3.c -parse3_LDFLAGS= -parse3_DEPENDENCIES= $(DEPS) -parse3_LDADD= @RDL_LIBS@ $(LDADDS) - -tree2_SOURCES=tree2.c -tree2_LDFLAGS= -tree2_DEPENDENCIES= $(DEPS) -tree2_LDADD= @RDL_LIBS@ $(LDADDS) - tree1_SOURCES=tree1.c tree1_LDFLAGS= tree1_DEPENDENCIES= $(DEPS) tree1_LDADD= @RDL_LIBS@ $(LDADDS) -xpath2_SOURCES=xpath2.c -xpath2_LDFLAGS= -xpath2_DEPENDENCIES= $(DEPS) -xpath2_LDADD= @RDL_LIBS@ $(LDADDS) - -parse1_SOURCES=parse1.c -parse1_LDFLAGS= -parse1_DEPENDENCIES= $(DEPS) -parse1_LDADD= @RDL_LIBS@ $(LDADDS) +tree2_SOURCES=tree2.c +tree2_LDFLAGS= +tree2_DEPENDENCIES= $(DEPS) +tree2_LDADD= @RDL_LIBS@ $(LDADDS) xpath1_SOURCES=xpath1.c xpath1_LDFLAGS= xpath1_DEPENDENCIES= $(DEPS) xpath1_LDADD= @RDL_LIBS@ $(LDADDS) -io1_SOURCES=io1.c -io1_LDFLAGS= -io1_DEPENDENCIES= $(DEPS) -io1_LDADD= @RDL_LIBS@ $(LDADDS) - -parse4_SOURCES=parse4.c -parse4_LDFLAGS= -parse4_DEPENDENCIES= $(DEPS) -parse4_LDADD= @RDL_LIBS@ $(LDADDS) - -parse2_SOURCES=parse2.c -parse2_LDFLAGS= -parse2_DEPENDENCIES= $(DEPS) -parse2_LDADD= @RDL_LIBS@ $(LDADDS) +xpath2_SOURCES=xpath2.c +xpath2_LDFLAGS= +xpath2_DEPENDENCIES= $(DEPS) +xpath2_LDADD= @RDL_LIBS@ $(LDADDS) valgrind: $(MAKE) CHECKER='valgrind' tests @@ -100,35 +100,35 @@ valgrind: tests: $(noinst_PROGRAMS) @(echo '## examples regression tests') @(echo > .memdump) - @($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp) + @($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse1 test1.xml) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse2 test2.xml) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse3) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse4 test3.xml) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./parse3) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./parse1 test1.xml) + @($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./parse4 test3.xml) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./parse2 test2.xml) + @($(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) diff --git a/doc/examples/Makefile.in b/doc/examples/Makefile.in index de15f68..4f45c76 100644 --- a/doc/examples/Makefile.in +++ b/doc/examples/Makefile.in @@ -38,11 +38,11 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -noinst_PROGRAMS = reader3$(EXEEXT) io2$(EXEEXT) reader1$(EXEEXT) \ - reader2$(EXEEXT) reader4$(EXEEXT) testWriter$(EXEEXT) \ - parse3$(EXEEXT) tree2$(EXEEXT) tree1$(EXEEXT) xpath2$(EXEEXT) \ - parse1$(EXEEXT) xpath1$(EXEEXT) io1$(EXEEXT) parse4$(EXEEXT) \ - parse2$(EXEEXT) +noinst_PROGRAMS = io1$(EXEEXT) io2$(EXEEXT) parse1$(EXEEXT) \ + parse2$(EXEEXT) parse3$(EXEEXT) parse4$(EXEEXT) \ + reader1$(EXEEXT) reader2$(EXEEXT) reader3$(EXEEXT) \ + reader4$(EXEEXT) testWriter$(EXEEXT) tree1$(EXEEXT) \ + tree2$(EXEEXT) xpath1$(EXEEXT) xpath2$(EXEEXT) subdir = doc/examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -325,15 +325,31 @@ target_alias = @target_alias@ INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@ DEPS = $(top_builddir)/libxml2.la LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@ -EXTRA_DIST = examples.xsl index.py test3.xml tst.xml test2.xml writer.xml test1.xml examples.xml xpath1.res tree2.res reader3.res tree1.res reader1.res xpath2.res reader4.res io2.res io1.res -reader3_SOURCES = reader3.c -reader3_LDFLAGS = -reader3_DEPENDENCIES = $(DEPS) -reader3_LDADD = @RDL_LIBS@ $(LDADDS) +EXTRA_DIST = examples.xsl index.py examples.xml test1.xml test2.xml test3.xml tst.xml writer.xml io1.res io2.res reader1.res reader3.res reader4.res tree1.res tree2.res xpath1.res xpath2.res +io1_SOURCES = io1.c +io1_LDFLAGS = +io1_DEPENDENCIES = $(DEPS) +io1_LDADD = @RDL_LIBS@ $(LDADDS) io2_SOURCES = io2.c io2_LDFLAGS = io2_DEPENDENCIES = $(DEPS) io2_LDADD = @RDL_LIBS@ $(LDADDS) +parse1_SOURCES = parse1.c +parse1_LDFLAGS = +parse1_DEPENDENCIES = $(DEPS) +parse1_LDADD = @RDL_LIBS@ $(LDADDS) +parse2_SOURCES = parse2.c +parse2_LDFLAGS = +parse2_DEPENDENCIES = $(DEPS) +parse2_LDADD = @RDL_LIBS@ $(LDADDS) +parse3_SOURCES = parse3.c +parse3_LDFLAGS = +parse3_DEPENDENCIES = $(DEPS) +parse3_LDADD = @RDL_LIBS@ $(LDADDS) +parse4_SOURCES = parse4.c +parse4_LDFLAGS = +parse4_DEPENDENCIES = $(DEPS) +parse4_LDADD = @RDL_LIBS@ $(LDADDS) reader1_SOURCES = reader1.c reader1_LDFLAGS = reader1_DEPENDENCIES = $(DEPS) @@ -342,6 +358,10 @@ reader2_SOURCES = reader2.c reader2_LDFLAGS = reader2_DEPENDENCIES = $(DEPS) reader2_LDADD = @RDL_LIBS@ $(LDADDS) +reader3_SOURCES = reader3.c +reader3_LDFLAGS = +reader3_DEPENDENCIES = $(DEPS) +reader3_LDADD = @RDL_LIBS@ $(LDADDS) reader4_SOURCES = reader4.c reader4_LDFLAGS = reader4_DEPENDENCIES = $(DEPS) @@ -350,42 +370,22 @@ testWriter_SOURCES = testWriter.c testWriter_LDFLAGS = testWriter_DEPENDENCIES = $(DEPS) testWriter_LDADD = @RDL_LIBS@ $(LDADDS) -parse3_SOURCES = parse3.c -parse3_LDFLAGS = -parse3_DEPENDENCIES = $(DEPS) -parse3_LDADD = @RDL_LIBS@ $(LDADDS) -tree2_SOURCES = tree2.c -tree2_LDFLAGS = -tree2_DEPENDENCIES = $(DEPS) -tree2_LDADD = @RDL_LIBS@ $(LDADDS) tree1_SOURCES = tree1.c tree1_LDFLAGS = tree1_DEPENDENCIES = $(DEPS) tree1_LDADD = @RDL_LIBS@ $(LDADDS) -xpath2_SOURCES = xpath2.c -xpath2_LDFLAGS = -xpath2_DEPENDENCIES = $(DEPS) -xpath2_LDADD = @RDL_LIBS@ $(LDADDS) -parse1_SOURCES = parse1.c -parse1_LDFLAGS = -parse1_DEPENDENCIES = $(DEPS) -parse1_LDADD = @RDL_LIBS@ $(LDADDS) +tree2_SOURCES = tree2.c +tree2_LDFLAGS = +tree2_DEPENDENCIES = $(DEPS) +tree2_LDADD = @RDL_LIBS@ $(LDADDS) xpath1_SOURCES = xpath1.c xpath1_LDFLAGS = xpath1_DEPENDENCIES = $(DEPS) xpath1_LDADD = @RDL_LIBS@ $(LDADDS) -io1_SOURCES = io1.c -io1_LDFLAGS = -io1_DEPENDENCIES = $(DEPS) -io1_LDADD = @RDL_LIBS@ $(LDADDS) -parse4_SOURCES = parse4.c -parse4_LDFLAGS = -parse4_DEPENDENCIES = $(DEPS) -parse4_LDADD = @RDL_LIBS@ $(LDADDS) -parse2_SOURCES = parse2.c -parse2_LDFLAGS = -parse2_DEPENDENCIES = $(DEPS) -parse2_LDADD = @RDL_LIBS@ $(LDADDS) +xpath2_SOURCES = xpath2.c +xpath2_LDFLAGS = +xpath2_DEPENDENCIES = $(DEPS) +xpath2_LDADD = @RDL_LIBS@ $(LDADDS) all: all-am .SUFFIXES: @@ -710,35 +710,35 @@ valgrind: tests: $(noinst_PROGRAMS) @(echo '## examples regression tests') @(echo > .memdump) - @($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp) + @($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse1 test1.xml) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse2 test2.xml) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse3) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse4 test3.xml) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./parse3) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./parse1 test1.xml) + @($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./parse4 test3.xml) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./parse2 test2.xml) + @($(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) # 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. diff --git a/doc/examples/examples.xml b/doc/examples/examples.xml index 91122ad..22f730c 100644 --- a/doc/examples/examples.xml +++ b/doc/examples/examples.xml @@ -1,28 +1,28 @@ - - Show how to extract subdocuments with xmlReader - Demonstrate the use of xmlTextReaderPreservePattern() to parse an XML file with the xmlReader while collecting only some subparts of the document. (Note that the XMLReader functions require libxml2 version later than 2.6.) - reader3 - reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp + + Example of custom Input/Output + Demonstrate the use of xmlRegisterInputCallbacks to build a custom I/O layer, this is used in an XInclude method context to show how dynamic document can be built in a clean way. + io1 + io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp Daniel Veillard see Copyright for the status of this software. -

              xmlReader
              +
              InputOutput
              - <libxml/xmlreader.h> + <libxml/parser.h> + <libxml/xmlIO.h> + <libxml/xinclude.h> + <libxml/tree.h> - - - - - - - - - - - - + + + + + + + + + @@ -48,6 +48,97 @@ + + Parse an XML file to a tree and free it + Demonstrate the use of xmlReadFile() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree + parse1 test1.xml + parse1 test1.xml + Daniel Veillard + see Copyright for the status of this software. +
              Parsing
              + + <libxml/tree.h> + <libxml/parser.h> + + + + + + + + + +
              + + Parse and validate an XML file to a tree and free the result + Create a parser context for an XML file, then parse and validate the file, creating a tree, check the validation result and xmlFreeDoc() to free the resulting tree. + parse2 test2.xml + parse2 test2.xml + Daniel Veillard + see Copyright for the status of this software. +
              Parsing
              + + <libxml/tree.h> + <libxml/parser.h> + + + + + + + + + + + + + +
              + + Parse an XML document in memory to a tree and free it + Demonstrate the use of xmlReadMemory() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree + parse3 + parse3 + Daniel Veillard + see Copyright for the status of this software. +
              Parsing
              + + <libxml/tree.h> + <libxml/parser.h> + + + + + + + + + +
              + + Parse an XML document chunk by chunk to a tree and free it + Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file progressively into a tree and and xmlFreeDoc() to free the resulting tree + parse4 test3.xml + parse4 test3.xml + Daniel Veillard + see Copyright for the status of this software. +
              Parsing
              + + <libxml/tree.h> + <libxml/parser.h> + + + + + + + + + + + + +
              Parse an XML file with an xmlReader Demonstrate the use of xmlReaderForFile() to parse an XML file and dump the informations about the nodes found in the process. (Note that the XMLReader functions require libxml2 version later than 2.6.) @@ -89,17 +180,14 @@ - - - @@ -108,6 +196,27 @@ + + Show how to extract subdocuments with xmlReader + Demonstrate the use of xmlTextReaderPreservePattern() to parse an XML file with the xmlReader while collecting only some subparts of the document. (Note that the XMLReader functions require libxml2 version later than 2.6.) + reader3 + reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp + Daniel Veillard + see Copyright for the status of this software. +
              xmlReader
              + + <libxml/xmlreader.h> + + + + + + + + + + +
              Parse multiple XML files reusing an xmlReader Demonstrate the use of xmlReaderForFile() and xmlReaderNewFile to parse XML files while reusing the reader object and parser context. (Note that the XMLReader functions require libxml2 version later than 2.6.) @@ -120,17 +229,12 @@ <libxml/xmlreader.h> - - - - - @@ -152,9 +256,7 @@ - - @@ -163,10 +265,8 @@ - - @@ -175,32 +275,28 @@ - - - Parse an XML document in memory to a tree and free it - Demonstrate the use of xmlReadMemory() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree - parse3 - parse3 - Daniel Veillard + + Navigates a tree to print element names + Parse a file to a tree, use xmlDocGetRootElement() to get the root element, then walk the document and print all the element name in document order. + tree1 filename_or_URL + tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp + Dodji Seketeli see Copyright for the status of this software. -
              Parsing
              +
              Tree
              <libxml/tree.h> <libxml/parser.h> - - - - - - + + +
              @@ -224,73 +320,9 @@ - - - Navigates a tree to print element names - Parse a file to a tree, use xmlDocGetRootElement() to get the root element, then walk the document and print all the element name in document order. - tree1 filename_or_URL - tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp - Dodji Seketeli - see Copyright for the status of this software. -
              Tree
              - - <libxml/tree.h> - <libxml/parser.h> - - - - - - -
              - - Load a document, locate subelements with XPath, modify said elements and save the resulting document. - Shows how to make a full round-trip from a load/edit/save - xpath2 <xml-file> <xpath-expr> <new-value> - xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp - Aleksey Sanin and Daniel Veillard - see Copyright for the status of this software. -
              XPath
              - - <libxml/parser.h> - <libxml/xpath.h> - <libxml/xpathInternals.h> - <libxml/tree.h> - - - - - - - - - - - - - - - -
              - - Parse an XML file to a tree and free it - Demonstrate the use of xmlReadFile() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree - parse1 test1.xml - parse1 test1.xml - Daniel Veillard - see Copyright for the status of this software. -
              Parsing
              - - <libxml/tree.h> - <libxml/parser.h> - - - - -
              Evaluate XPath expression and prints result node set. Shows how to evaluate XPath expression and register known namespaces in XPath context. @@ -324,74 +356,42 @@ - - Example of custom Input/Output - Demonstrate the use of xmlRegisterInputCallbacks to build a custom I/O layer, this is used in an XInclude method context to show how dynamic document can be built in a clean way. - io1 - io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp - Daniel Veillard - see Copyright for the status of this software. -
              InputOutput
              - - <libxml/parser.h> - <libxml/xmlIO.h> - <libxml/xinclude.h> - <libxml/tree.h> - - - - - - - -
              - - Parse an XML document chunk by chunk to a tree and free it - Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file progressively into a tree and and xmlFreeDoc() to free the resulting tree - parse4 test3.xml - parse4 test3.xml - Daniel Veillard + + Load a document, locate subelements with XPath, modify said elements and save the resulting document. + Shows how to make a full round-trip from a load/edit/save + xpath2 <xml-file> <xpath-expr> <new-value> + xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp + Aleksey Sanin and Daniel Veillard see Copyright for the status of this software. -
              Parsing
              +
              XPath
              - <libxml/tree.h> <libxml/parser.h> - - - - - - - -
              - - Parse and validate an XML file to a tree and free the result - Create a parser context for an XML file, then parse and validate the file, creating a tree, check the validation result and xmlFreeDoc() to free the resulting tree. - parse2 test2.xml - parse2 test2.xml - Daniel Veillard - see Copyright for the status of this software. -
              Parsing
              - + <libxml/xpath.h> + <libxml/xpathInternals.h> <libxml/tree.h> - <libxml/parser.h> - - - - - + + + + + + + + + + +
              - - - - - + + + + + @@ -401,15 +401,15 @@ - + - + @@ -430,12 +430,12 @@ - - - - - + + + + + @@ -447,9 +447,9 @@ + - @@ -458,12 +458,12 @@ - + - - + + - + @@ -479,40 +479,40 @@ - + - - + + - + - + - + - + - - - - - + + + + + @@ -566,25 +566,25 @@ - + - + - + - + - + @@ -647,15 +647,15 @@ - + - + @@ -692,28 +692,28 @@ - + - + - + - + - + - + @@ -721,27 +721,27 @@
              - +
              - - + +
              - +
              - +
              - +
              diff --git a/doc/help.html b/doc/help.html index 3148b84..a9925b2 100644 --- a/doc/help.html +++ b/doc/help.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -How to help
              Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
              Made with Libxml2 Logo

              The XML C parser and toolkit of Gnome

              How to help

              Main Menu
              Related links

              You can help the project in various ways, the best thing to do first is to +How to help
              Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
              Made with Libxml2 Logo

              The XML C parser and toolkit of Gnome

              How to help

              Main Menu
              Related links

              You can help the project in various ways, the best thing to do first is to subscribe to the mailing-list as explained before, check the archives and the Gnome bug database:

              1. Provide patches when you find problems.
              2. Provide the diffs when you port libxml2 to a new platform. They may not diff --git a/doc/html/libxml-HTMLtree.html b/doc/html/libxml-HTMLtree.html index bc9bbe9..55ff739 100644 --- a/doc/html/libxml-HTMLtree.html +++ b/doc/html/libxml-HTMLtree.html @@ -14,6 +14,7 @@ A:link, A:visited, A:active { text-decoration: underline }
                void	htmlDocContentDumpOutput	(xmlOutputBufferPtr buf, 
                xmlDocPtr cur,
                const char * encoding)
                int	htmlDocDump			(FILE * f, 
                xmlDocPtr cur)
                void	htmlDocDumpMemory		(xmlDocPtr cur, 
                xmlChar ** mem,
                int * size)
                +
                void	htmlDocDumpMemoryFormat		(xmlDocPtr cur, 
                xmlChar ** mem,
                int * size,
                int format)
                const xmlChar *	htmlGetMetaEncoding	(htmlDocPtr doc)
                int	htmlIsBooleanAttr		(const xmlChar * name)
                htmlDocPtr	htmlNewDoc		(const xmlChar * URI, 
                const xmlChar * ExternalID)
                @@ -41,7 +42,9 @@ A:link, A:visited, A:active { text-decoration: underline }

                Dump an HTML document to an open FILE.

                f:the FILE*
                cur:the document
                Returns:the number of byte written or -1 in case of failure.

                Function: htmlDocDumpMemory

                void	htmlDocDumpMemory		(xmlDocPtr cur, 
                xmlChar ** mem,
                int * size)

                Dump an HTML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory.

                -
                cur:the document
                mem:OUT: the memory pointer
                size:OUT: the memory length

                Function: htmlGetMetaEncoding

                const xmlChar *	htmlGetMetaEncoding	(htmlDocPtr doc)
                +
                cur:the document
                mem:OUT: the memory pointer
                size:OUT: the memory length

                Function: htmlDocDumpMemoryFormat

                void	htmlDocDumpMemoryFormat		(xmlDocPtr cur, 
                xmlChar ** mem,
                int * size,
                int format)
                +

                Dump an HTML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory.

                +
                cur:the document
                mem:OUT: the memory pointer
                size:OUT: the memory length
                format:should formatting spaces been added

                Function: htmlGetMetaEncoding

                const xmlChar *	htmlGetMetaEncoding	(htmlDocPtr doc)

                Encoding definition lookup in the Meta tags

                doc:the document
                Returns:the current encoding as flagged in the HTML source

                Function: htmlIsBooleanAttr

                int	htmlIsBooleanAttr		(const xmlChar * name)

                Determine if a given attribute is a boolean attribute.

                diff --git a/doc/html/libxml-pattern.html b/doc/html/libxml-pattern.html index 2415881..ac1de26 100644 --- a/doc/html/libxml-pattern.html +++ b/doc/html/libxml-pattern.html @@ -30,6 +30,8 @@ The content of this structure is not made public by the API.
                int	xmlStreamPop			(xmlStreamCtxtPtr stream)
                int	xmlStreamPush			(xmlStreamCtxtPtr stream, 
                const xmlChar * name,
                const xmlChar * ns)
                int	xmlStreamPushAttr		(xmlStreamCtxtPtr stream, 
                const xmlChar * name,
                const xmlChar * ns)
                +
                int	xmlStreamPushNode		(xmlStreamCtxtPtr stream, 
                const xmlChar * name,
                const xmlChar * ns,
                int nodeType)
                +
                int	xmlStreamWantsAnyNode		(xmlStreamCtxtPtr streamCtxt)

                Description

                Structure xmlPattern

                Structure xmlPattern
                struct _xmlPattern { The content of this structure is not made public by the API. @@ -64,7 +66,11 @@ The content of this structure is not made public by the API.
                pattern:the pattern to compile
                dict:an optional dictionary for interned strings
                flags:compilation flags, see xmlPatternFlags
                namespaces:the prefix definitions, array of [URI, prefix] or NULL
                Returns:the compiled form of the pattern or NULL in case of error

                Function: xmlStreamPop

                int	xmlStreamPop			(xmlStreamCtxtPtr stream)

                push one level from the stream.

                stream:the stream context
                Returns:-1 in case of error, 0 otherwise.

                Function: xmlStreamPush

                int	xmlStreamPush			(xmlStreamCtxtPtr stream, 
                const xmlChar * name,
                const xmlChar * ns)
                -

                Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.

                +

                Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an element-node.

                stream:the stream context
                name:the current name
                ns:the namespace name
                Returns:-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.

                Function: xmlStreamPushAttr

                int	xmlStreamPushAttr		(xmlStreamCtxtPtr stream, 
                const xmlChar * name,
                const xmlChar * ns)
                -

                Push new attribute data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.

                -
                stream:the stream context
                name:the current name
                ns:the namespace name
                Returns:-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.

                Daniel Veillard

              +

              Push new attribute data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an attribute-node.

              +
              stream:the stream context
              name:the current name
              ns:the namespace name
              Returns:-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.

              Function: xmlStreamPushNode

              int	xmlStreamPushNode		(xmlStreamCtxtPtr stream, 
              const xmlChar * name,
              const xmlChar * ns,
              int nodeType)
              +

              Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Different from xmlStreamPush() this function can be fed with nodes of type: element-, attribute-, text-, cdata-section-, comment- and processing-instruction-node.

              +
              stream:the stream context
              name:the current name
              ns:the namespace name
              nodeType:the type of the node being pushed
              Returns:-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.

              Function: xmlStreamWantsAnyNode

              int	xmlStreamWantsAnyNode		(xmlStreamCtxtPtr streamCtxt)
              +

              Query if the streaming pattern additionally needs to be fed with text-, cdata-section-, comment- and processing-instruction-nodes. If the result is 0 then only element-nodes and attribute-nodes need to be pushed.

              +
              streamCtxt:the stream context
              Returns:1 in case of need of nodes of the above described types, 0 otherwise. -1 on API errors.

              Daniel Veillard

              diff --git a/doc/html/libxml-relaxng.html b/doc/html/libxml-relaxng.html index 637f27f..fd95083 100644 --- a/doc/html/libxml-relaxng.html +++ b/doc/html/libxml-relaxng.html @@ -131,7 +131,7 @@ The content of this structure is not made public by the API.
              URL:the location of the schema
              Returns:the parser context or NULL in case of error

              Function: xmlRelaxNGNewValidCtxt

              xmlRelaxNGValidCtxtPtr	xmlRelaxNGNewValidCtxt	(xmlRelaxNGPtr schema)

              Create an XML RelaxNGs validation context based on the given schema

              schema:a precompiled XML RelaxNGs
              Returns:the validation context or NULL in case of error

              Function: xmlRelaxNGParse

              xmlRelaxNGPtr	xmlRelaxNGParse		(xmlRelaxNGParserCtxtPtr ctxt)
              -

              parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances. *WARNING* this interface is highly subject to change

              +

              parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.

              ctxt:a Relax-NG parser context
              Returns:the internal XML RelaxNG structure built from the resource or NULL in case of error

              Function: xmlRelaxNGSetParserErrors

              void	xmlRelaxNGSetParserErrors	(xmlRelaxNGParserCtxtPtr ctxt, 
              xmlRelaxNGValidityErrorFunc err,
              xmlRelaxNGValidityWarningFunc warn,
              void * ctx)

              Set the callback functions used to handle errors for a validation context

              ctxt:a Relax-NG validation context
              err:the error callback
              warn:the warning callback
              ctx:contextual data for the callbacks

              Function: xmlRelaxNGSetValidErrors

              void	xmlRelaxNGSetValidErrors	(xmlRelaxNGValidCtxtPtr ctxt, 
              xmlRelaxNGValidityErrorFunc err,
              xmlRelaxNGValidityWarningFunc warn,
              void * ctx)
              diff --git a/doc/html/libxml-schemasInternals.html b/doc/html/libxml-schemasInternals.html index 26b8df2..b25f070 100644 --- a/doc/html/libxml-schemasInternals.html +++ b/doc/html/libxml-schemasInternals.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module schemasInternals from libxml2
              Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
              Made with Libxml2 Logo

              Module schemasInternals from libxml2

              API Menu
              API Indexes
              Related links

              internal interfaces for the XML Schemas handling and schema validity checking

              Table of Contents

              #define XML_SCHEMAS_ANYATTR_LAX
              #define XML_SCHEMAS_ANYATTR_SKIP
              #define XML_SCHEMAS_ANYATTR_STRICT
              #define XML_SCHEMAS_ANY_LAX
              #define XML_SCHEMAS_ANY_SKIP
              #define XML_SCHEMAS_ANY_STRICT
              #define XML_SCHEMAS_ATTRGROUP_GLOBAL
              #define XML_SCHEMAS_ATTRGROUP_MARKED
              #define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED
              #define XML_SCHEMAS_ATTR_FIXED
              #define XML_SCHEMAS_ATTR_GLOBAL
              #define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED
              #define XML_SCHEMAS_ATTR_NSDEFAULT
              #define XML_SCHEMAS_ATTR_USE_OPTIONAL
              #define XML_SCHEMAS_ATTR_USE_PROHIBITED
              #define XML_SCHEMAS_ATTR_USE_REQUIRED
              #define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION
              #define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION
              #define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION
              #define XML_SCHEMAS_ELEM_ABSTRACT
              #define XML_SCHEMAS_ELEM_BLOCK_ABSENT
              #define XML_SCHEMAS_ELEM_BLOCK_EXTENSION
              #define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION
              #define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION
              #define XML_SCHEMAS_ELEM_CIRCULAR
              #define XML_SCHEMAS_ELEM_DEFAULT
              #define XML_SCHEMAS_ELEM_FINAL_ABSENT
              #define XML_SCHEMAS_ELEM_FINAL_EXTENSION
              #define XML_SCHEMAS_ELEM_FINAL_RESTRICTION
              #define XML_SCHEMAS_ELEM_FIXED
              #define XML_SCHEMAS_ELEM_GLOBAL
              #define XML_SCHEMAS_ELEM_INTERNAL_CHECKED
              #define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED
              #define XML_SCHEMAS_ELEM_NILLABLE
              #define XML_SCHEMAS_ELEM_NSDEFAULT
              #define XML_SCHEMAS_ELEM_REF
              #define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD
              #define XML_SCHEMAS_ELEM_TOPLEVEL
              #define XML_SCHEMAS_FACET_COLLAPSE
              #define XML_SCHEMAS_FACET_PRESERVE
              #define XML_SCHEMAS_FACET_REPLACE
              #define XML_SCHEMAS_FACET_UNKNOWN
              #define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION
              #define XML_SCHEMAS_FINAL_DEFAULT_LIST
              #define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION
              #define XML_SCHEMAS_FINAL_DEFAULT_UNION
              #define XML_SCHEMAS_INCLUDING_CONVERT_NS
              #define XML_SCHEMAS_QUALIF_ATTR
              #define XML_SCHEMAS_QUALIF_ELEM
              #define XML_SCHEMAS_TYPE_ABSTRACT
              #define XML_SCHEMAS_TYPE_BLOCK_DEFAULT
              #define XML_SCHEMAS_TYPE_BLOCK_EXTENSION
              #define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION
              #define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE
              #define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION
              #define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION
              #define XML_SCHEMAS_TYPE_FACETSNEEDVALUE
              #define XML_SCHEMAS_TYPE_FINAL_DEFAULT
              #define XML_SCHEMAS_TYPE_FINAL_EXTENSION
              #define XML_SCHEMAS_TYPE_FINAL_LIST
              #define XML_SCHEMAS_TYPE_FINAL_RESTRICTION
              #define XML_SCHEMAS_TYPE_FINAL_UNION
              #define XML_SCHEMAS_TYPE_FIXUP_1
              #define XML_SCHEMAS_TYPE_GLOBAL
              #define XML_SCHEMAS_TYPE_HAS_FACETS
              #define XML_SCHEMAS_TYPE_INTERNAL_INVALID
              #define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED
              #define XML_SCHEMAS_TYPE_MARKED
              #define XML_SCHEMAS_TYPE_MIXED
              #define XML_SCHEMAS_TYPE_NORMVALUENEEDED
              #define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD
              #define XML_SCHEMAS_TYPE_VARIETY_ABSENT
              #define XML_SCHEMAS_TYPE_VARIETY_ATOMIC
              #define XML_SCHEMAS_TYPE_VARIETY_LIST
              #define XML_SCHEMAS_TYPE_VARIETY_UNION
              #define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE
              #define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE
              #define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE
              #define XML_SCHEMAS_WILDCARD_COMPLETE
              Structure xmlSchemaAnnot
              struct _xmlSchemaAnnot + Module schemasInternals from libxml2
              Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
              Made with Libxml2 Logo

              Module schemasInternals from libxml2

              API Menu
              API Indexes
              Related links

              internal interfaces for the XML Schemas handling and schema validity checking The Schemas development is a Work In Progress. Some of those interfaces are not garanteed to be API or ABI stable !

              Table of Contents

              #define XML_SCHEMAS_ANYATTR_LAX
              #define XML_SCHEMAS_ANYATTR_SKIP
              #define XML_SCHEMAS_ANYATTR_STRICT
              #define XML_SCHEMAS_ANY_LAX
              #define XML_SCHEMAS_ANY_SKIP
              #define XML_SCHEMAS_ANY_STRICT
              #define XML_SCHEMAS_ATTRGROUP_GLOBAL
              #define XML_SCHEMAS_ATTRGROUP_HAS_REFS
              #define XML_SCHEMAS_ATTRGROUP_MARKED
              #define XML_SCHEMAS_ATTRGROUP_REDEFINED
              #define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED
              #define XML_SCHEMAS_ATTR_FIXED
              #define XML_SCHEMAS_ATTR_GLOBAL
              #define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED
              #define XML_SCHEMAS_ATTR_NSDEFAULT
              #define XML_SCHEMAS_ATTR_USE_OPTIONAL
              #define XML_SCHEMAS_ATTR_USE_PROHIBITED
              #define XML_SCHEMAS_ATTR_USE_REQUIRED
              #define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION
              #define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION
              #define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION
              #define XML_SCHEMAS_ELEM_ABSTRACT
              #define XML_SCHEMAS_ELEM_BLOCK_ABSENT
              #define XML_SCHEMAS_ELEM_BLOCK_EXTENSION
              #define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION
              #define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION
              #define XML_SCHEMAS_ELEM_CIRCULAR
              #define XML_SCHEMAS_ELEM_DEFAULT
              #define XML_SCHEMAS_ELEM_FINAL_ABSENT
              #define XML_SCHEMAS_ELEM_FINAL_EXTENSION
              #define XML_SCHEMAS_ELEM_FINAL_RESTRICTION
              #define XML_SCHEMAS_ELEM_FIXED
              #define XML_SCHEMAS_ELEM_GLOBAL
              #define XML_SCHEMAS_ELEM_INTERNAL_CHECKED
              #define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED
              #define XML_SCHEMAS_ELEM_NILLABLE
              #define XML_SCHEMAS_ELEM_NSDEFAULT
              #define XML_SCHEMAS_ELEM_REF
              #define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD
              #define XML_SCHEMAS_ELEM_TOPLEVEL
              #define XML_SCHEMAS_FACET_COLLAPSE
              #define XML_SCHEMAS_FACET_PRESERVE
              #define XML_SCHEMAS_FACET_REPLACE
              #define XML_SCHEMAS_FACET_UNKNOWN
              #define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION
              #define XML_SCHEMAS_FINAL_DEFAULT_LIST
              #define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION
              #define XML_SCHEMAS_FINAL_DEFAULT_UNION
              #define XML_SCHEMAS_INCLUDING_CONVERT_NS
              #define XML_SCHEMAS_QUALIF_ATTR
              #define XML_SCHEMAS_QUALIF_ELEM
              #define XML_SCHEMAS_TYPE_ABSTRACT
              #define XML_SCHEMAS_TYPE_BLOCK_DEFAULT
              #define XML_SCHEMAS_TYPE_BLOCK_EXTENSION
              #define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION
              #define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE
              #define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION
              #define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION
              #define XML_SCHEMAS_TYPE_FACETSNEEDVALUE
              #define XML_SCHEMAS_TYPE_FINAL_DEFAULT
              #define XML_SCHEMAS_TYPE_FINAL_EXTENSION
              #define XML_SCHEMAS_TYPE_FINAL_LIST
              #define XML_SCHEMAS_TYPE_FINAL_RESTRICTION
              #define XML_SCHEMAS_TYPE_FINAL_UNION
              #define XML_SCHEMAS_TYPE_FIXUP_1
              #define XML_SCHEMAS_TYPE_GLOBAL
              #define XML_SCHEMAS_TYPE_HAS_FACETS
              #define XML_SCHEMAS_TYPE_INTERNAL_INVALID
              #define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED
              #define XML_SCHEMAS_TYPE_MARKED
              #define XML_SCHEMAS_TYPE_MIXED
              #define XML_SCHEMAS_TYPE_NORMVALUENEEDED
              #define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD
              #define XML_SCHEMAS_TYPE_REDEFINED
              #define XML_SCHEMAS_TYPE_VARIETY_ABSENT
              #define XML_SCHEMAS_TYPE_VARIETY_ATOMIC
              #define XML_SCHEMAS_TYPE_VARIETY_LIST
              #define XML_SCHEMAS_TYPE_VARIETY_UNION
              #define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE
              #define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE
              #define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE
              #define XML_SCHEMAS_WILDCARD_COMPLETE
              Structure xmlSchemaAnnot
              struct _xmlSchemaAnnot
              Typedef xmlSchemaAnnot * xmlSchemaAnnotPtr
               
              Structure xmlSchemaAttribute
              struct _xmlSchemaAttribute
              Structure xmlSchemaAttributeGroup
              struct _xmlSchemaAttributeGroup @@ -50,7 +50,9 @@ The content of this structure is not made public by the API.

              Macro: XML_SCHEMAS_ANY_SKIP

              #define XML_SCHEMAS_ANY_SKIP

              Skip unknown attribute from validation

              Macro: XML_SCHEMAS_ANY_STRICT

              #define XML_SCHEMAS_ANY_STRICT

              Used by wildcards. Apply strict validation rules

              Macro: XML_SCHEMAS_ATTRGROUP_GLOBAL

              #define XML_SCHEMAS_ATTRGROUP_GLOBAL

              The attribute wildcard has been already builded.

              +

              Macro: XML_SCHEMAS_ATTRGROUP_HAS_REFS

              #define XML_SCHEMAS_ATTRGROUP_HAS_REFS

              Whether this attr. group contains attr. group references.

              Macro: XML_SCHEMAS_ATTRGROUP_MARKED

              #define XML_SCHEMAS_ATTRGROUP_MARKED

              Marks the attr group as marked; used for circular checks.

              +

              Macro: XML_SCHEMAS_ATTRGROUP_REDEFINED

              #define XML_SCHEMAS_ATTRGROUP_REDEFINED

              The attr group was redefined.

              Macro: XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED

              #define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED

              The attribute wildcard has been already builded.

              Macro: XML_SCHEMAS_ATTR_FIXED

              #define XML_SCHEMAS_ATTR_FIXED

              the attribute has a fixed value

              Macro: XML_SCHEMAS_ATTR_GLOBAL

              #define XML_SCHEMAS_ATTR_GLOBAL

              allow elements in no namespace

              @@ -114,7 +116,8 @@ The content of this structure is not made public by the API.

              Macro: XML_SCHEMAS_TYPE_MIXED

              #define XML_SCHEMAS_TYPE_MIXED

              the element content type is mixed

              Macro: XML_SCHEMAS_TYPE_NORMVALUENEEDED

              #define XML_SCHEMAS_TYPE_NORMVALUENEEDED

              indicates if the facets (pattern) need a normalized value

              Macro: XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD

              #define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD

              the complexType owns an attribute wildcard, i.e. it can be freed by the complexType

              -

              Macro: XML_SCHEMAS_TYPE_VARIETY_ABSENT

              #define XML_SCHEMAS_TYPE_VARIETY_ABSENT

              the simpleType has a variety of "absent".

              +

              Macro: XML_SCHEMAS_TYPE_REDEFINED

              #define XML_SCHEMAS_TYPE_REDEFINED

              The type was redefined.

              +

              Macro: XML_SCHEMAS_TYPE_VARIETY_ABSENT

              #define XML_SCHEMAS_TYPE_VARIETY_ABSENT

              the simpleType has a variety of "absent". TODO: Actually not necessary :-/, since if none of the variety flags occur then it's automatically absent.

              Macro: XML_SCHEMAS_TYPE_VARIETY_ATOMIC

              #define XML_SCHEMAS_TYPE_VARIETY_ATOMIC

              the simpleType has a variety of "union".

              Macro: XML_SCHEMAS_TYPE_VARIETY_LIST

              #define XML_SCHEMAS_TYPE_VARIETY_LIST

              the simpleType has a variety of "list".

              Macro: XML_SCHEMAS_TYPE_VARIETY_UNION

              #define XML_SCHEMAS_TYPE_VARIETY_UNION

              the simpleType has a variety of "union".

              @@ -126,40 +129,41 @@ The content of this structure is not made public by the API. struct _xmlSchemaAnnot * next xmlNodePtr content : the annotation }

              Structure xmlSchemaAttribute

              Structure xmlSchemaAttribute
              struct _xmlSchemaAttribute { - xmlSchemaTypeType type : The kind of type - struct _xmlSchemaAttribute * next : the next attribute if in a group ... - const xmlChar * name : name of the declaration or empty if par - const xmlChar * id - const xmlChar * ref : the local name of the attribute decl. i - const xmlChar * refNs : the ns URI of the attribute decl. if a + xmlSchemaTypeType type + struct _xmlSchemaAttribute * next : the next attribute (not used?) + const xmlChar * name : the name of the declaration + const xmlChar * id : Deprecated; not used + const xmlChar * ref : Deprecated; not used + const xmlChar * refNs : Deprecated; not used const xmlChar * typeName : the local name of the type definition const xmlChar * typeNs : the ns URI of the type definition xmlSchemaAnnotPtr annot - xmlSchemaTypePtr base : obsolete, not used - int occurs - const xmlChar * defValue + xmlSchemaTypePtr base : Deprecated; not used + int occurs : Deprecated; not used + const xmlChar * defValue : The initial value of the value constrai xmlSchemaTypePtr subtypes : the type definition xmlNodePtr node const xmlChar * targetNamespace int flags - const xmlChar * refPrefix - xmlSchemaValPtr defVal - xmlSchemaAttributePtr refDecl + const xmlChar * refPrefix : Deprecated; not used + xmlSchemaValPtr defVal : The compiled value constraint + xmlSchemaAttributePtr refDecl : Deprecated; not used }

              Structure xmlSchemaAttributeGroup

              Structure xmlSchemaAttributeGroup
              struct _xmlSchemaAttributeGroup { xmlSchemaTypeType type : The kind of type struct _xmlSchemaAttribute * next : the next attribute if in a group ... const xmlChar * name const xmlChar * id - const xmlChar * ref - const xmlChar * refNs + const xmlChar * ref : Deprecated; not used + const xmlChar * refNs : Deprecated; not used xmlSchemaAnnotPtr annot - xmlSchemaAttributePtr attributes + xmlSchemaAttributePtr attributes : Deprecated; not used xmlNodePtr node int flags xmlSchemaWildcardPtr attributeWildcard - const xmlChar * refPrefix - xmlSchemaAttributeGroupPtr refItem : The referenced attribute group - const xmlChar * targetNamespace : xmlSchemaAttributeGroupPtr redef Redefi + const xmlChar * refPrefix : Deprecated; not used + xmlSchemaAttributeGroupPtr refItem : Deprecated; not used + const xmlChar * targetNamespace + void * attrUses }

              Structure xmlSchemaAttributeLink

              Structure xmlSchemaAttributeLink
              struct _xmlSchemaAttributeLink { struct _xmlSchemaAttributeLink * next : the next attribute link ... struct _xmlSchemaAttribute * attr : the linked attribute @@ -169,23 +173,23 @@ The content of this structure is not made public by the API. XML_SCHEMA_CONTENT_ELEMENTS = 2 XML_SCHEMA_CONTENT_MIXED = 3 XML_SCHEMA_CONTENT_SIMPLE = 4 - XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS = 5 : obsolete, not used + XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS = 5 : Obsolete XML_SCHEMA_CONTENT_BASIC = 6 XML_SCHEMA_CONTENT_ANY = 7 }

              Structure xmlSchemaElement

              Structure xmlSchemaElement
              struct _xmlSchemaElement { xmlSchemaTypeType type : The kind of type - struct _xmlSchemaType * next : the next type if in a sequence ... + struct _xmlSchemaType * next : Not used? const xmlChar * name - const xmlChar * id - const xmlChar * ref : the local name of the element declarati - const xmlChar * refNs : the ns URI of the element declaration i + const xmlChar * id : Deprecated; not used + const xmlChar * ref : Deprecated; not used + const xmlChar * refNs : Deprecated; not used xmlSchemaAnnotPtr annot xmlSchemaTypePtr subtypes : the type definition xmlSchemaAttributePtr attributes xmlNodePtr node - int minOccurs - int maxOccurs + int minOccurs : Deprecated; not used + int maxOccurs : Deprecated; not used int flags const xmlChar * targetNamespace const xmlChar * namedType @@ -193,24 +197,24 @@ The content of this structure is not made public by the API. const xmlChar * substGroup const xmlChar * substGroupNs const xmlChar * scope - const xmlChar * value + const xmlChar * value : The original value of the value constra struct _xmlSchemaElement * refDecl : This will now be used for the substitut - xmlRegexpPtr contModel + xmlRegexpPtr contModel : Obsolete for WXS, maybe used for RelaxN xmlSchemaContentType contentType - const xmlChar * refPrefix - xmlSchemaValPtr defVal - void * idcs + const xmlChar * refPrefix : Deprecated; not used + xmlSchemaValPtr defVal : The compiled value contraint. + void * idcs : The identity-constraint defs }

              Structure xmlSchemaFacet

              Structure xmlSchemaFacet
              struct _xmlSchemaFacet { xmlSchemaTypeType type : The kind of type struct _xmlSchemaFacet * next : the next type if in a sequence ... - const xmlChar * value - const xmlChar * id + const xmlChar * value : The original value + const xmlChar * id : Obsolete xmlSchemaAnnotPtr annot xmlNodePtr node - int fixed + int fixed : XML_SCHEMAS_FACET_PRESERVE, etc. int whitespace - xmlSchemaValPtr val - xmlRegexpPtr regexp + xmlSchemaValPtr val : The compiled value + xmlRegexpPtr regexp : The regex for patterns }

              Structure xmlSchemaFacetLink

              Structure xmlSchemaFacetLink
              struct _xmlSchemaFacetLink { struct _xmlSchemaFacetLink * next : the next facet link ... xmlSchemaFacetPtr facet : the linked facet @@ -224,35 +228,36 @@ The content of this structure is not made public by the API. xmlSchemaTypeType type : The kind of type struct _xmlSchemaType * next : the next type if in a sequence ... const xmlChar * name - const xmlChar * id - const xmlChar * ref - const xmlChar * refNs + const xmlChar * id : Deprecated; not used + const xmlChar * ref : Deprecated; not used + const xmlChar * refNs : Deprecated; not used xmlSchemaAnnotPtr annot xmlSchemaTypePtr subtypes - xmlSchemaAttributePtr attributes + xmlSchemaAttributePtr attributes : Deprecated; not used xmlNodePtr node - int minOccurs - int maxOccurs + int minOccurs : Deprecated; not used + int maxOccurs : Deprecated; not used int flags xmlSchemaContentType contentType - const xmlChar * base - const xmlChar * baseNs - xmlSchemaTypePtr baseType - xmlSchemaFacetPtr facets - struct _xmlSchemaType * redef : possible redefinitions for the type - int recurse - xmlSchemaAttributeLinkPtr attributeUses + const xmlChar * base : Base type's local name + const xmlChar * baseNs : Base type's target namespace + xmlSchemaTypePtr baseType : The base type component + xmlSchemaFacetPtr facets : Local facets + struct _xmlSchemaType * redef : Deprecated; not used + int recurse : Obsolete + xmlSchemaAttributeLinkPtr * attributeUses : Deprecated; not used xmlSchemaWildcardPtr attributeWildcard - int builtInType - xmlSchemaTypeLinkPtr memberTypes - xmlSchemaFacetLinkPtr facetSet - const xmlChar * refPrefix - xmlSchemaTypePtr contentTypeDef - xmlRegexpPtr contModel + int builtInType : Type of built-in types. + xmlSchemaTypeLinkPtr memberTypes : member-types if a union type. + xmlSchemaFacetLinkPtr facetSet : All facets (incl. inherited) + const xmlChar * refPrefix : Deprecated; not used + xmlSchemaTypePtr contentTypeDef : Used for the simple content of complex + xmlRegexpPtr contModel : Holds the automaton of the content mode const xmlChar * targetNamespace + void * attrUses }

              Structure xmlSchemaTypeLink

              Structure xmlSchemaTypeLink
              struct _xmlSchemaTypeLink { struct _xmlSchemaTypeLink * next : the next type link ... - xmlSchemaTypePtr type : the linked typ + xmlSchemaTypePtr type : the linked type }

              Enum xmlSchemaTypeType

              Enum xmlSchemaTypeType {
                   XML_SCHEMA_TYPE_BASIC = 1 : A built-in datatype
                   XML_SCHEMA_TYPE_ANY = 2
              @@ -279,6 +284,7 @@ The content of this structure is not made public by the API.
                   XML_SCHEMA_TYPE_IDC_KEY = 23
                   XML_SCHEMA_TYPE_IDC_KEYREF = 24
                   XML_SCHEMA_TYPE_PARTICLE = 25
              +    XML_SCHEMA_TYPE_ATTRIBUTE_USE = 26
                   XML_SCHEMA_FACET_MININCLUSIVE = 1000
                   XML_SCHEMA_FACET_MINEXCLUSIVE = 1001
                   XML_SCHEMA_FACET_MAXINCLUSIVE = 1002
              @@ -292,6 +298,7 @@ The content of this structure is not made public by the API.
                   XML_SCHEMA_FACET_MAXLENGTH = 1010
                   XML_SCHEMA_FACET_MINLENGTH = 1011
                   XML_SCHEMA_EXTRA_QNAMEREF = 2000
              +    XML_SCHEMA_EXTRA_ATTR_USE_PROHIB = 2001
               }
               

              Structure xmlSchemaVal

              Structure xmlSchemaVal
              struct _xmlSchemaVal { The content of this structure is not made public by the API. @@ -346,11 +353,11 @@ The content of this structure is not made public by the API. }

              Structure xmlSchemaWildcard

              Structure xmlSchemaWildcard
              struct _xmlSchemaWildcard { xmlSchemaTypeType type : The kind of type - const xmlChar * id + const xmlChar * id : Deprecated; not used xmlSchemaAnnotPtr annot xmlNodePtr node - int minOccurs - int maxOccurs + int minOccurs : Deprecated; not used + int maxOccurs : Deprecated; not used int processContents int any : Indicates if the ns constraint is of ## xmlSchemaWildcardNsPtr nsSet : The list of allowed namespaces diff --git a/doc/html/libxml-tree.html b/doc/html/libxml-tree.html index 5a33b38..af8fefc 100644 --- a/doc/html/libxml-tree.html +++ b/doc/html/libxml-tree.html @@ -782,7 +782,7 @@ A:link, A:visited, A:active { text-decoration: underline }
              doc:the document
              content:the text content
              len:the text len.
              Returns:a pointer to the new node object.

              Function: xmlNewDtd

              xmlDtdPtr	xmlNewDtd		(xmlDocPtr doc, 
              const xmlChar * name,
              const xmlChar * ExternalID,
              const xmlChar * SystemID)

              Creation of a new DTD for the external subset. To create an internal subset, use xmlCreateIntSubset().

              doc:the document pointer
              name:the DTD name
              ExternalID:the external ID
              SystemID:the system ID
              Returns:a pointer to the new DTD structure

              Function: xmlNewGlobalNs

              xmlNsPtr	xmlNewGlobalNs		(xmlDocPtr doc, 
              const xmlChar * href,
              const xmlChar * prefix)
              -

              Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!! It now create a namespace on the root element of the document if found.

              +

              Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!!

              doc:the document carrying the namespace
              href:the URI associated
              prefix:the prefix for the namespace
              Returns:NULL this functionality had been removed

              Function: xmlNewNode

              xmlNodePtr	xmlNewNode		(xmlNsPtr ns, 
              const xmlChar * name)

              Creation of a new node element. @ns is optional (NULL).

              ns:namespace if any
              name:the node name
              Returns:a pointer to the new node object. Uses xmlStrdup() to make copy of @name.

              Function: xmlNewNodeEatName

              xmlNodePtr	xmlNewNodeEatName	(xmlNsPtr ns, 
              xmlChar * name)
              diff --git a/doc/html/libxml-valid.html b/doc/html/libxml-valid.html index 8ec2c68..631c49c 100644 --- a/doc/html/libxml-valid.html +++ b/doc/html/libxml-valid.html @@ -76,7 +76,7 @@ The content of this structure is not made public by the API.
              void	xmlSprintfElementContent	(char * buf, 
              xmlElementContentPtr content,
              int englob)
              int	xmlValidBuildContentModel	(xmlValidCtxtPtr ctxt, 
              xmlElementPtr elem)
              xmlChar *	xmlValidCtxtNormalizeAttributeValue	(xmlValidCtxtPtr ctxt, 
              xmlDocPtr doc,
              xmlNodePtr elem,
              const xmlChar * name,
              const xmlChar * value)
              -
              int	xmlValidGetPotentialChildren	(xmlElementContent * ctree, 
              const xmlChar ** list,
              int * len,
              int max)
              +
              int	xmlValidGetPotentialChildren	(xmlElementContent * ctree, 
              const xmlChar ** names,
              int * len,
              int max)
              int	xmlValidGetValidElements	(xmlNode * prev, 
              xmlNode * next,
              const xmlChar ** names,
              int max)
              xmlChar *	xmlValidNormalizeAttributeValue	(xmlDocPtr doc, 
              xmlNodePtr elem,
              const xmlChar * name,
              const xmlChar * value)
              int	xmlValidateAttributeDecl	(xmlValidCtxtPtr ctxt, 
              xmlDocPtr doc,
              xmlAttributePtr attr)
              @@ -232,9 +232,9 @@ The content of this structure is not made public by the API.

              (Re)Build the automata associated to the content model of this element

              ctxt:a validation context
              elem:an element declaration node
              Returns:1 in case of success, 0 in case of error

              Function: xmlValidCtxtNormalizeAttributeValue

              xmlChar *	xmlValidCtxtNormalizeAttributeValue	(xmlValidCtxtPtr ctxt, 
              xmlDocPtr doc,
              xmlNodePtr elem,
              const xmlChar * name,
              const xmlChar * value)

              Does the validation related extra step of the normalization of attribute values: If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by single space (#x20) character. Also check VC: Standalone Document Declaration in P32, and update ctxt->valid accordingly

              -
              ctxt:the validation context or NULL
              doc:the document
              elem:the parent
              name:the attribute name
              value:the attribute value
              Returns:a new normalized string if normalization is needed, NULL otherwise the caller must free the returned value.

              Function: xmlValidGetPotentialChildren

              int	xmlValidGetPotentialChildren	(xmlElementContent * ctree, 
              const xmlChar ** list,
              int * len,
              int max)
              +
              ctxt:the validation context or NULL
              doc:the document
              elem:the parent
              name:the attribute name
              value:the attribute value
              Returns:a new normalized string if normalization is needed, NULL otherwise the caller must free the returned value.

              Function: xmlValidGetPotentialChildren

              int	xmlValidGetPotentialChildren	(xmlElementContent * ctree, 
              const xmlChar ** names,
              int * len,
              int max)

              Build/extend a list of potential children allowed by the content tree

              -
              ctree:an element content tree
              list:an array to store the list of child names
              len:a pointer to the number of element in the list
              max:the size of the array
              Returns:the number of element in the list, or -1 in case of error.

              Function: xmlValidGetValidElements

              int	xmlValidGetValidElements	(xmlNode * prev, 
              xmlNode * next,
              const xmlChar ** names,
              int max)
              +
              ctree:an element content tree
              names:an array to store the list of child names
              len:a pointer to the number of element in the list
              max:the size of the array
              Returns:the number of element in the list, or -1 in case of error.

              Function: xmlValidGetValidElements

              int	xmlValidGetValidElements	(xmlNode * prev, 
              xmlNode * next,
              const xmlChar ** names,
              int max)

              This function returns the list of authorized children to insert within an existing tree while respecting the validity constraints forced by the Dtd. The insertion point is defined using @prev and @next in the following ways: to insert before 'node': xmlValidGetValidElements(node->prev, node, ... to insert next 'node': xmlValidGetValidElements(node, node->next, ... to replace 'node': xmlValidGetValidElements(node->prev, node->next, ... to prepend a child to 'node': xmlValidGetValidElements(NULL, node->childs, to append a child to 'node': xmlValidGetValidElements(node->last, NULL, ... pointers to the element names are inserted at the beginning of the array and do not need to be freed.

              prev:an element to insert after
              next:an element to insert next
              names:an array to store the list of child names
              max:the size of the array
              Returns:the number of element in the list, or -1 in case of error. If the function returns the value @max the caller is invited to grow the receiving array and retry.

              Function: xmlValidNormalizeAttributeValue

              xmlChar *	xmlValidNormalizeAttributeValue	(xmlDocPtr doc, 
              xmlNodePtr elem,
              const xmlChar * name,
              const xmlChar * value)

              Does the validation related extra step of the normalization of attribute values: If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by single space (#x20) character.

              diff --git a/doc/html/libxml-xmlIO.html b/doc/html/libxml-xmlIO.html index 76b6dcd..2edd017 100644 --- a/doc/html/libxml-xmlIO.html +++ b/doc/html/libxml-xmlIO.html @@ -45,6 +45,7 @@ int xmlInputReadCallback (void * context, <
              xmlParserInputPtr	xmlNoNetExternalEntityLoader	(const char * URL, 
              const char * ID,
              xmlParserCtxtPtr ctxt)
              xmlChar *	xmlNormalizeWindowsPath	(const xmlChar * path)
              int	xmlOutputBufferClose		(xmlOutputBufferPtr out)
              +
              xmlOutputBufferPtr	xmlOutputBufferCreateBuffer	(xmlBufferPtr buffer, 
              xmlCharEncodingHandlerPtr encoder)
              xmlOutputBufferPtr	xmlOutputBufferCreateFd	(int fd, 
              xmlCharEncodingHandlerPtr encoder)
              xmlOutputBufferPtr	xmlOutputBufferCreateFile	(FILE * file, 
              xmlCharEncodingHandlerPtr encoder)
              xmlOutputBufferPtr	xmlOutputBufferCreateFilename	(const char * URI, 
              xmlCharEncodingHandlerPtr encoder,
              int compression)
              @@ -140,7 +141,9 @@ int xmlInputReadCallback (void * context,
              char * buffer,

              This function is obsolete. Please see xmlURIFromPath in uri.c for a better solution.

              path:the input file path
              Returns:a canonicalized version of the path

              Function: xmlOutputBufferClose

              int	xmlOutputBufferClose		(xmlOutputBufferPtr out)

              flushes and close the output I/O channel and free up all the associated resources

              -
              out:a buffered output
              Returns:the number of byte written or -1 in case of error.

              Function: xmlOutputBufferCreateFd

              xmlOutputBufferPtr	xmlOutputBufferCreateFd	(int fd, 
              xmlCharEncodingHandlerPtr encoder)
              +
              out:a buffered output
              Returns:the number of byte written or -1 in case of error.

              Function: xmlOutputBufferCreateBuffer

              xmlOutputBufferPtr	xmlOutputBufferCreateBuffer	(xmlBufferPtr buffer, 
              xmlCharEncodingHandlerPtr encoder)
              +

              Create a buffered output for the progressive saving to a xmlBuffer

              +
              buffer:a xmlBufferPtr
              encoder:the encoding converter or NULL
              Returns:the new parser output or NULL

              Function: xmlOutputBufferCreateFd

              xmlOutputBufferPtr	xmlOutputBufferCreateFd	(int fd, 
              xmlCharEncodingHandlerPtr encoder)

              Create a buffered output for the progressive saving to a file descriptor

              fd:a file descriptor number
              encoder:the encoding converter or NULL
              Returns:the new parser output or NULL

              Function: xmlOutputBufferCreateFile

              xmlOutputBufferPtr	xmlOutputBufferCreateFile	(FILE * file, 
              xmlCharEncodingHandlerPtr encoder)

              Create a buffered output for the progressive saving to a FILE * buffered C I/O

              diff --git a/doc/html/libxml-xmlerror.html b/doc/html/libxml-xmlerror.html index 8f96ae4..f8f0a90 100644 --- a/doc/html/libxml-xmlerror.html +++ b/doc/html/libxml-xmlerror.html @@ -761,6 +761,11 @@ void xmlStructuredErrorFunc (void * userD XML_SCHEMAP_WARN_UNLOCATED_SCHEMA = 3084 : 3084 XML_SCHEMAP_WARN_ATTR_REDECL_PROH = 3085 : 3085 XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH = 3086 : 3085 + XML_SCHEMAP_AG_PROPS_CORRECT = 3087 : 3086 + XML_SCHEMAP_COS_CT_EXTENDS_1_2 = 3088 : 3087 + XML_SCHEMAP_AU_PROPS_CORRECT = 3089 : 3088 + XML_SCHEMAP_A_PROPS_CORRECT_3 = 3090 : 3089 + XML_SCHEMAP_COS_ALL_LIMITED = 3091 : 3090 XML_MODULE_OPEN = 4900 : 4900 XML_MODULE_CLOSE = 4901 : 4901 XML_CHECK_FOUND_ELEMENT = 5000 diff --git a/doc/html/libxml-xmlreader.html b/doc/html/libxml-xmlreader.html index 6036ccb..0ffa0a4 100644 --- a/doc/html/libxml-xmlreader.html +++ b/doc/html/libxml-xmlreader.html @@ -97,6 +97,7 @@ void xmlTextReaderErrorFunc (void * arg,
              int	xmlTextReaderRelaxNGSetSchema	(xmlTextReaderPtr reader, 
              xmlRelaxNGPtr schema)
              int	xmlTextReaderRelaxNGValidate	(xmlTextReaderPtr reader, 
              const char * rng)
              int	xmlTextReaderSchemaValidate	(xmlTextReaderPtr reader, 
              const char * xsd)
              +
              int	xmlTextReaderSchemaValidateCtxt	(xmlTextReaderPtr reader, 
              xmlSchemaValidCtxtPtr ctxt,
              int options)
              void	xmlTextReaderSetErrorHandler	(xmlTextReaderPtr reader, 
              xmlTextReaderErrorFunc f,
              void * arg)
              int	xmlTextReaderSetParserProp	(xmlTextReaderPtr reader, 
              int prop,
              int value)
              int	xmlTextReaderSetSchema		(xmlTextReaderPtr reader, 
              xmlSchemaPtr schema)
              @@ -303,8 +304,10 @@ void xmlTextReaderErrorFunc (void * arg,
              const char * msg,
              reader:the xmlTextReaderPtr used
              schema:a precompiled RelaxNG schema
              Returns:0 in case the RelaxNG validation could be (des)activated and -1 in case of error.

              Function: xmlTextReaderRelaxNGValidate

              int	xmlTextReaderRelaxNGValidate	(xmlTextReaderPtr reader, 
              const char * rng)

              Use RelaxNG to validate the document as it is processed. Activation is only possible before the first Read(). if @rng is NULL, then RelaxNG validation is desactivated.

              reader:the xmlTextReaderPtr used
              rng:the path to a RelaxNG schema or NULL
              Returns:0 in case the RelaxNG validation could be (des)activated and -1 in case of error.

              Function: xmlTextReaderSchemaValidate

              int	xmlTextReaderSchemaValidate	(xmlTextReaderPtr reader, 
              const char * xsd)
              -

              Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). if @xsd is NULL, then RelaxNG validation is desactivated.

              -
              reader:the xmlTextReaderPtr used
              xsd:the path to a W3C XSD schema or NULL
              Returns:0 in case the schemas validation could be (des)activated and -1 in case of error.

              Function: xmlTextReaderSetErrorHandler

              void	xmlTextReaderSetErrorHandler	(xmlTextReaderPtr reader, 
              xmlTextReaderErrorFunc f,
              void * arg)
              +

              Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). If @xsd is NULL, then XML Schema validation is deactivated.

              +
              reader:the xmlTextReaderPtr used
              xsd:the path to a W3C XSD schema or NULL
              Returns:0 in case the schemas validation could be (de)activated and -1 in case of error.

              Function: xmlTextReaderSchemaValidateCtxt

              int	xmlTextReaderSchemaValidateCtxt	(xmlTextReaderPtr reader, 
              xmlSchemaValidCtxtPtr ctxt,
              int options)
              +

              Use W3C XSD schema context to validate the document as it is processed. Activation is only possible before the first Read(). If @ctxt is NULL, then XML Schema validation is deactivated.

              +
              reader:the xmlTextReaderPtr used
              ctxt:the XML Schema validation context or NULL
              options:options (not used yet)
              Returns:0 in case the schemas validation could be (de)activated and -1 in case of error.

              Function: xmlTextReaderSetErrorHandler

              void	xmlTextReaderSetErrorHandler	(xmlTextReaderPtr reader, 
              xmlTextReaderErrorFunc f,
              void * arg)

              Register a callback function that will be called on error and warnings. If @f is NULL, the default error and warning handlers are restored.

              reader:the xmlTextReaderPtr used
              f:the callback function to call on error and warnings
              arg:a user argument to pass to the callback function

              Function: xmlTextReaderSetParserProp

              int	xmlTextReaderSetParserProp	(xmlTextReaderPtr reader, 
              int prop,
              int value)

              Change the parser processing behaviour by changing some of its internal properties. Note that some properties can only be changed before any read has been done.

              diff --git a/doc/html/libxml-xmlregexp.html b/doc/html/libxml-xmlregexp.html index b507f34..b36155d 100644 --- a/doc/html/libxml-xmlregexp.html +++ b/doc/html/libxml-xmlregexp.html @@ -29,8 +29,8 @@ The content of this structure is not made public by the API.
              xmlExpNodePtr	xmlExpExpDerive		(xmlExpCtxtPtr ctxt, 
              xmlExpNodePtr exp,
              xmlExpNodePtr sub)
              void	xmlExpFree			(xmlExpCtxtPtr ctxt, 
              xmlExpNodePtr exp)
              void	xmlExpFreeCtxt			(xmlExpCtxtPtr ctxt)
              -
              int	xmlExpGetLanguage		(xmlExpCtxtPtr ctxt, 
              xmlExpNodePtr exp,
              const xmlChar ** list,
              int len)
              -
              int	xmlExpGetStart			(xmlExpCtxtPtr ctxt, 
              xmlExpNodePtr exp,
              const xmlChar ** list,
              int len)
              +
              int	xmlExpGetLanguage		(xmlExpCtxtPtr ctxt, 
              xmlExpNodePtr exp,
              const xmlChar ** langList,
              int len)
              +
              int	xmlExpGetStart			(xmlExpCtxtPtr ctxt, 
              xmlExpNodePtr exp,
              const xmlChar ** tokList,
              int len)
              int	xmlExpIsNillable		(xmlExpNodePtr exp)
              int	xmlExpMaxToken			(xmlExpNodePtr expr)
              xmlExpNodePtr	xmlExpNewAtom		(xmlExpCtxtPtr ctxt, 
              const xmlChar * name,
              int len)
              @@ -89,11 +89,11 @@ The content of this structure is not made public by the API.

              Dereference the expression

              ctxt:the expression context
              exp:the expression

              Function: xmlExpFreeCtxt

              void	xmlExpFreeCtxt			(xmlExpCtxtPtr ctxt)

              Free an expression context

              -
              ctxt:an expression context

              Function: xmlExpGetLanguage

              int	xmlExpGetLanguage		(xmlExpCtxtPtr ctxt, 
              xmlExpNodePtr exp,
              const xmlChar ** list,
              int len)
              +
              ctxt:an expression context

              Function: xmlExpGetLanguage

              int	xmlExpGetLanguage		(xmlExpCtxtPtr ctxt, 
              xmlExpNodePtr exp,
              const xmlChar ** langList,
              int len)

              Find all the strings used in @exp and store them in @list

              -
              ctxt:the expression context
              exp:the expression
              list:where to store the tokens
              len:the allocated lenght of @list
              Returns:the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings

              Function: xmlExpGetStart

              int	xmlExpGetStart			(xmlExpCtxtPtr ctxt, 
              xmlExpNodePtr exp,
              const xmlChar ** list,
              int len)
              +
              ctxt:the expression context
              exp:the expression
              langList:where to store the tokens
              len:the allocated lenght of @list
              Returns:the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings

              Function: xmlExpGetStart

              int	xmlExpGetStart			(xmlExpCtxtPtr ctxt, 
              xmlExpNodePtr exp,
              const xmlChar ** tokList,
              int len)

              Find all the strings that appears at the start of the languages accepted by @exp and store them in @list. E.g. for (a, b) | c it will return the list [a, c]

              -
              ctxt:the expression context
              exp:the expression
              list:where to store the tokens
              len:the allocated lenght of @list
              Returns:the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings

              Function: xmlExpIsNillable

              int	xmlExpIsNillable		(xmlExpNodePtr exp)
              +
              ctxt:the expression context
              exp:the expression
              tokList:where to store the tokens
              len:the allocated lenght of @list
              Returns:the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings

              Function: xmlExpIsNillable

              int	xmlExpIsNillable		(xmlExpNodePtr exp)

              Finds if the expression is nillable, i.e. if it accepts the empty sequqnce

              exp:the expression
              Returns:1 if nillable, 0 if not and -1 in case of error

              Function: xmlExpMaxToken

              int	xmlExpMaxToken			(xmlExpNodePtr expr)

              Indicate the maximum number of input a expression can accept

              diff --git a/doc/html/libxml-xmlsave.html b/doc/html/libxml-xmlsave.html index 6863beb..f0e10b0 100644 --- a/doc/html/libxml-xmlsave.html +++ b/doc/html/libxml-xmlsave.html @@ -19,6 +19,7 @@ The content of this structure is not made public by the API.
              int	xmlSaveFlush			(xmlSaveCtxtPtr ctxt)
              int	xmlSaveSetAttrEscape		(xmlSaveCtxtPtr ctxt, 
              xmlCharEncodingOutputFunc escape)
              int	xmlSaveSetEscape		(xmlSaveCtxtPtr ctxt, 
              xmlCharEncodingOutputFunc escape)
              +
              xmlSaveCtxtPtr	xmlSaveToBuffer		(xmlBufferPtr buffer, 
              const char * encoding,
              int options)
              xmlSaveCtxtPtr	xmlSaveToFd		(int fd, 
              const char * encoding,
              int options)
              xmlSaveCtxtPtr	xmlSaveToFilename	(const char * filename, 
              const char * encoding,
              int options)
              xmlSaveCtxtPtr	xmlSaveToIO		(xmlOutputWriteCallback iowrite, 
              xmlOutputCloseCallback ioclose,
              void * ioctx,
              const char * encoding,
              int options)
              @@ -42,7 +43,9 @@ The content of this structure is not made public by the API.

              Set a custom escaping function to be used for text in attribute content

              ctxt:a document saving context
              escape:the escaping function
              Returns:0 if successful or -1 in case of error.

              Function: xmlSaveSetEscape

              int	xmlSaveSetEscape		(xmlSaveCtxtPtr ctxt, 
              xmlCharEncodingOutputFunc escape)

              Set a custom escaping function to be used for text in element content

              -
              ctxt:a document saving context
              escape:the escaping function
              Returns:0 if successful or -1 in case of error.

              Function: xmlSaveToFd

              xmlSaveCtxtPtr	xmlSaveToFd		(int fd, 
              const char * encoding,
              int options)
              +
              ctxt:a document saving context
              escape:the escaping function
              Returns:0 if successful or -1 in case of error.

              Function: xmlSaveToBuffer

              xmlSaveCtxtPtr	xmlSaveToBuffer		(xmlBufferPtr buffer, 
              const char * encoding,
              int options)
              +

              Create a document saving context serializing to a buffer with the encoding and the options given

              +
              buffer:a buffer
              encoding:the encoding name to use or NULL
              options:a set of xmlSaveOptions
              Returns:a new serialization context or NULL in case of error.

              Function: xmlSaveToFd

              xmlSaveCtxtPtr	xmlSaveToFd		(int fd, 
              const char * encoding,
              int options)

              Create a document saving context serializing to a file descriptor with the encoding and the options given.

              fd:a file descriptor number
              encoding:the encoding name to use or NULL
              options:a set of xmlSaveOptions
              Returns:a new serialization context or NULL in case of error.

              Function: xmlSaveToFilename

              xmlSaveCtxtPtr	xmlSaveToFilename	(const char * filename, 
              const char * encoding,
              int options)

              Create a document saving context serializing to a filename or possibly to an URL (but this is less reliable) with the encoding and the options given.

              diff --git a/doc/html/libxml-xmlschemas.html b/doc/html/libxml-xmlschemas.html index 19afcec..d919fcc 100644 --- a/doc/html/libxml-xmlschemas.html +++ b/doc/html/libxml-xmlschemas.html @@ -38,11 +38,12 @@ The content of this structure is not made public by the API.
              xmlSchemaSAXPlugPtr	xmlSchemaSAXPlug	(xmlSchemaValidCtxtPtr ctxt, 
              xmlSAXHandlerPtr * sax,
              void ** user_data)
              int	xmlSchemaSAXUnplug		(xmlSchemaSAXPlugPtr plug)
              void	xmlSchemaSetParserErrors	(xmlSchemaParserCtxtPtr ctxt, 
              xmlSchemaValidityErrorFunc err,
              xmlSchemaValidityWarningFunc warn,
              void * ctx)
              +
              void	xmlSchemaSetParserStructuredErrors	(xmlSchemaParserCtxtPtr ctxt, 
              xmlStructuredErrorFunc serror,
              void * ctx)
              void	xmlSchemaSetValidErrors		(xmlSchemaValidCtxtPtr ctxt, 
              xmlSchemaValidityErrorFunc err,
              xmlSchemaValidityWarningFunc warn,
              void * ctx)
              int	xmlSchemaSetValidOptions	(xmlSchemaValidCtxtPtr ctxt, 
              int options)
              void	xmlSchemaSetValidStructuredErrors	(xmlSchemaValidCtxtPtr ctxt, 
              xmlStructuredErrorFunc serror,
              void * ctx)
              int	xmlSchemaValidCtxtGetOptions	(xmlSchemaValidCtxtPtr ctxt)
              -
              int	xmlSchemaValidateDoc		(xmlSchemaValidCtxtPtr ctxt, 
              xmlDocPtr doc)
              +
              int	xmlSchemaValidateDoc		(xmlSchemaValidCtxtPtr ctxt, 
              xmlDocPtr instance)
              int	xmlSchemaValidateFile		(xmlSchemaValidCtxtPtr ctxt, 
              const char * filename,
              int options)
              int	xmlSchemaValidateOneElement	(xmlSchemaValidCtxtPtr ctxt, 
              xmlNodePtr elem)
              int	xmlSchemaValidateStream		(xmlSchemaValidCtxtPtr ctxt, 
              xmlParserInputBufferPtr input,
              xmlCharEncoding enc,
              xmlSAXHandlerPtr sax,
              void * user_data)
              @@ -57,7 +58,7 @@ void xmlSchemaValidityWarningFunc (v const xmlChar * name : schema name const xmlChar * targetNamespace : the target namespace const xmlChar * version - const xmlChar * id + const xmlChar * id : Obsolete xmlDocPtr doc xmlSchemaAnnotPtr annot int flags @@ -73,8 +74,8 @@ void xmlSchemaValidityWarningFunc (v void * includes : the includes, this is opaque for now int preserve : whether to free the document int counter : used to give ononymous components uniqu - xmlHashTablePtr idcDef - void * volatiles : Deprecated; not used anymore. + xmlHashTablePtr idcDef : All identity-constraint defs. + void * volatiles : Obsolete }

              Structure xmlSchemaParserCtxt

              Structure xmlSchemaParserCtxt
              struct _xmlSchemaParserCtxt { The content of this structure is not made public by the API. }

              Structure xmlSchemaSAXPlugStruct

              Structure xmlSchemaSAXPlugStruct
              struct _xmlSchemaSAXPlug { @@ -119,46 +120,48 @@ The content of this structure is not made public by the API.
              schema:a schema structure

              Function: xmlSchemaFreeParserCtxt

              void	xmlSchemaFreeParserCtxt		(xmlSchemaParserCtxtPtr ctxt)

              Free the resources associated to the schema parser context

              ctxt:the schema parser context

              Function: xmlSchemaFreeValidCtxt

              void	xmlSchemaFreeValidCtxt		(xmlSchemaValidCtxtPtr ctxt)
              -

              Free the resources associated to the schema validation context

              -
              ctxt:the schema validation context

              Function: xmlSchemaGetParserErrors

              int	xmlSchemaGetParserErrors	(xmlSchemaParserCtxtPtr ctxt, 
              xmlSchemaValidityErrorFunc * err,
              xmlSchemaValidityWarningFunc * warn,
              void ** ctx)
              +

              +
              ctxt:

              Function: xmlSchemaGetParserErrors

              int	xmlSchemaGetParserErrors	(xmlSchemaParserCtxtPtr ctxt, 
              xmlSchemaValidityErrorFunc * err,
              xmlSchemaValidityWarningFunc * warn,
              void ** ctx)

              Get the callback information used to handle errors for a parser context

              ctxt:a XMl-Schema parser context
              err:the error callback result
              warn:the warning callback result
              ctx:contextual data for the callbacks result
              Returns:-1 in case of failure, 0 otherwise

              Function: xmlSchemaGetValidErrors

              int	xmlSchemaGetValidErrors		(xmlSchemaValidCtxtPtr ctxt, 
              xmlSchemaValidityErrorFunc * err,
              xmlSchemaValidityWarningFunc * warn,
              void ** ctx)
              -

              Get the error and warning callback informations

              -
              ctxt:a XML-Schema validation context
              err:the error function result
              warn:the warning function result
              ctx:the functions context result
              Returns:-1 in case of error and 0 otherwise

              Function: xmlSchemaIsValid

              int	xmlSchemaIsValid		(xmlSchemaValidCtxtPtr ctxt)
              -

              Check if any error was detected during validation.

              -
              ctxt:the schema validation context
              Returns:1 if valid so far, 0 if errors were detected, and -1 in case of internal error.

              Function: xmlSchemaNewDocParserCtxt

              xmlSchemaParserCtxtPtr	xmlSchemaNewDocParserCtxt	(xmlDocPtr doc)
              +

              +
              ctxt:
              err:
              warn:
              ctx:
              Returns:

              Function: xmlSchemaIsValid

              int	xmlSchemaIsValid		(xmlSchemaValidCtxtPtr ctxt)
              +

              +
              ctxt:
              Returns:

              Function: xmlSchemaNewDocParserCtxt

              xmlSchemaParserCtxtPtr	xmlSchemaNewDocParserCtxt	(xmlDocPtr doc)

              Create an XML Schemas parse context for that document. NB. The document may be modified during the parsing process.

              doc:a preparsed document tree
              Returns:the parser context or NULL in case of error

              Function: xmlSchemaNewMemParserCtxt

              xmlSchemaParserCtxtPtr	xmlSchemaNewMemParserCtxt	(const char * buffer, 
              int size)

              Create an XML Schemas parse context for that memory buffer expected to contain an XML Schemas file.

              buffer:a pointer to a char array containing the schemas
              size:the size of the array
              Returns:the parser context or NULL in case of error

              Function: xmlSchemaNewParserCtxt

              xmlSchemaParserCtxtPtr	xmlSchemaNewParserCtxt	(const char * URL)

              Create an XML Schemas parse context for that file/resource expected to contain an XML Schemas file.

              URL:the location of the schema
              Returns:the parser context or NULL in case of error

              Function: xmlSchemaNewValidCtxt

              xmlSchemaValidCtxtPtr	xmlSchemaNewValidCtxt	(xmlSchemaPtr schema)
              -

              Create an XML Schemas validation context based on the given schema.

              -
              schema:a precompiled XML Schemas
              Returns:the validation context or NULL in case of error

              Function: xmlSchemaParse

              xmlSchemaPtr	xmlSchemaParse		(xmlSchemaParserCtxtPtr ctxt)
              -

              parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances. *WARNING* this interface is highly subject to change

              +

              +
              schema:
              Returns:

              Function: xmlSchemaParse

              xmlSchemaPtr	xmlSchemaParse		(xmlSchemaParserCtxtPtr ctxt)
              +

              parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.

              ctxt:a schema validation context
              Returns:the internal XML Schema structure built from the resource or NULL in case of error

              Function: xmlSchemaSAXPlug

              xmlSchemaSAXPlugPtr	xmlSchemaSAXPlug	(xmlSchemaValidCtxtPtr ctxt, 
              xmlSAXHandlerPtr * sax,
              void ** user_data)
              -

              Plug a SAX based validation layer in a SAX parsing event flow. The original @saxptr and @dataptr data are replaced by new pointers but the calls to the original will be maintained.

              -
              ctxt:a schema validation context
              sax:a pointer to the original xmlSAXHandlerPtr
              user_data:a pointer to the original SAX user data pointer
              Returns:a pointer to a data structure needed to unplug the validation layer or NULL in case of errors.

              Function: xmlSchemaSAXUnplug

              int	xmlSchemaSAXUnplug		(xmlSchemaSAXPlugPtr plug)
              -

              Unplug a SAX based validation layer in a SAX parsing event flow. The original pointers used in the call are restored.

              -
              plug:a data structure returned by xmlSchemaSAXPlug
              Returns:0 in case of success and -1 in case of failure.

              Function: xmlSchemaSetParserErrors

              void	xmlSchemaSetParserErrors	(xmlSchemaParserCtxtPtr ctxt, 
              xmlSchemaValidityErrorFunc err,
              xmlSchemaValidityWarningFunc warn,
              void * ctx)
              +

              +
              ctxt:
              sax:
              user_data:
              Returns:

              Function: xmlSchemaSAXUnplug

              int	xmlSchemaSAXUnplug		(xmlSchemaSAXPlugPtr plug)
              +

              +
              plug:
              Returns:

              Function: xmlSchemaSetParserErrors

              void	xmlSchemaSetParserErrors	(xmlSchemaParserCtxtPtr ctxt, 
              xmlSchemaValidityErrorFunc err,
              xmlSchemaValidityWarningFunc warn,
              void * ctx)

              Set the callback functions used to handle errors for a validation context

              -
              ctxt:a schema validation context
              err:the error callback
              warn:the warning callback
              ctx:contextual data for the callbacks

              Function: xmlSchemaSetValidErrors

              void	xmlSchemaSetValidErrors		(xmlSchemaValidCtxtPtr ctxt, 
              xmlSchemaValidityErrorFunc err,
              xmlSchemaValidityWarningFunc warn,
              void * ctx)
              -

              Set the error and warning callback informations

              -
              ctxt:a schema validation context
              err:the error function
              warn:the warning function
              ctx:the functions context

              Function: xmlSchemaSetValidOptions

              int	xmlSchemaSetValidOptions	(xmlSchemaValidCtxtPtr ctxt, 
              int options)
              -

              Sets the options to be used during the validation.

              -
              ctxt:a schema validation context
              options:a combination of xmlSchemaValidOption
              Returns:0 in case of success, -1 in case of an API error.

              Function: xmlSchemaSetValidStructuredErrors

              void	xmlSchemaSetValidStructuredErrors	(xmlSchemaValidCtxtPtr ctxt, 
              xmlStructuredErrorFunc serror,
              void * ctx)
              +
              ctxt:a schema validation context
              err:the error callback
              warn:the warning callback
              ctx:contextual data for the callbacks

              Function: xmlSchemaSetParserStructuredErrors

              void	xmlSchemaSetParserStructuredErrors	(xmlSchemaParserCtxtPtr ctxt, 
              xmlStructuredErrorFunc serror,
              void * ctx)

              Set the structured error callback

              -
              ctxt:a schema validation context
              serror:the structured error function
              ctx:the functions context

              Function: xmlSchemaValidCtxtGetOptions

              int	xmlSchemaValidCtxtGetOptions	(xmlSchemaValidCtxtPtr ctxt)
              -

              Get the validation context options.

              -
              ctxt:a schema validation context
              Returns:the option combination or -1 on error.

              Function: xmlSchemaValidateDoc

              int	xmlSchemaValidateDoc		(xmlSchemaValidCtxtPtr ctxt, 
              xmlDocPtr doc)
              -

              Validate a document tree in memory.

              -
              ctxt:a schema validation context
              doc:a parsed document tree
              Returns:0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.

              Function: xmlSchemaValidateFile

              int	xmlSchemaValidateFile		(xmlSchemaValidCtxtPtr ctxt, 
              const char * filename,
              int options)
              -

              Do a schemas validation of the given resource, it will use the SAX streamable validation internally.

              -
              ctxt:a schema validation context
              filename:the URI of the instance
              options:a future set of options, currently unused
              Returns:0 if the document is valid, a positive error code number otherwise and -1 in case of an internal or API error.

              Function: xmlSchemaValidateOneElement

              int	xmlSchemaValidateOneElement	(xmlSchemaValidCtxtPtr ctxt, 
              xmlNodePtr elem)
              -

              Validate a branch of a tree, starting with the given @elem.

              -
              ctxt:a schema validation context
              elem:an element node
              Returns:0 if the element and its subtree is valid, a positive error code number otherwise and -1 in case of an internal or API error.

              Function: xmlSchemaValidateStream

              int	xmlSchemaValidateStream		(xmlSchemaValidCtxtPtr ctxt, 
              xmlParserInputBufferPtr input,
              xmlCharEncoding enc,
              xmlSAXHandlerPtr sax,
              void * user_data)
              -

              Validate an input based on a flow of SAX event from the parser and forward the events to the @sax handler with the provided @user_data the user provided @sax handler must be a SAX2 one.

              -
              ctxt:a schema validation context
              input:the input to use for reading the data
              enc:an optional encoding information
              sax:a SAX handler for the resulting events
              user_data:the context to provide to the SAX handler.
              Returns:0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.

              Function type: xmlSchemaValidityErrorFunc

              Function type: xmlSchemaValidityErrorFunc
              +
              ctxt:a schema parser context
              serror:the structured error function
              ctx:the functions context

              Function: xmlSchemaSetValidErrors

              void	xmlSchemaSetValidErrors		(xmlSchemaValidCtxtPtr ctxt, 
              xmlSchemaValidityErrorFunc err,
              xmlSchemaValidityWarningFunc warn,
              void * ctx)
              +

              +
              ctxt:
              err:
              warn:
              ctx:

              Function: xmlSchemaSetValidOptions

              int	xmlSchemaSetValidOptions	(xmlSchemaValidCtxtPtr ctxt, 
              int options)
              +

              +
              ctxt:
              options:
              Returns:

              Function: xmlSchemaSetValidStructuredErrors

              void	xmlSchemaSetValidStructuredErrors	(xmlSchemaValidCtxtPtr ctxt, 
              xmlStructuredErrorFunc serror,
              void * ctx)
              +

              +
              ctxt:
              serror:
              ctx:

              Function: xmlSchemaValidCtxtGetOptions

              int	xmlSchemaValidCtxtGetOptions	(xmlSchemaValidCtxtPtr ctxt)
              +

              +
              ctxt:
              Returns:

              Function: xmlSchemaValidateDoc

              int	xmlSchemaValidateDoc		(xmlSchemaValidCtxtPtr ctxt, 
              xmlDocPtr instance)
              +

              +
              ctxt:
              instance:
              Returns:

              Function: xmlSchemaValidateFile

              int	xmlSchemaValidateFile		(xmlSchemaValidCtxtPtr ctxt, 
              const char * filename,
              int options)
              +

              +
              ctxt:
              filename:
              options:
              Returns:

              Function: xmlSchemaValidateOneElement

              int	xmlSchemaValidateOneElement	(xmlSchemaValidCtxtPtr ctxt, 
              xmlNodePtr elem)
              +

              +
              ctxt:
              elem:
              Returns:

              Function: xmlSchemaValidateStream

              int	xmlSchemaValidateStream		(xmlSchemaValidCtxtPtr ctxt, 
              xmlParserInputBufferPtr input,
              xmlCharEncoding enc,
              xmlSAXHandlerPtr sax,
              void * user_data)
              +

              +
              ctxt:
              input:
              enc:
              sax:
              user_data:
              Returns:

              Function type: xmlSchemaValidityErrorFunc

              Function type: xmlSchemaValidityErrorFunc
               void	xmlSchemaValidityErrorFunc	(void * ctx, 
              const char * msg,
              ... ...)

              ctx:
              msg:
              ...:

              Function type: xmlSchemaValidityWarningFunc

              Function type: xmlSchemaValidityWarningFunc
              diff --git a/doc/html/libxml-xmlstring.html b/doc/html/libxml-xmlstring.html
              index bbcc85f..537aaa5 100644
              --- a/doc/html/libxml-xmlstring.html
              +++ b/doc/html/libxml-xmlstring.html
              @@ -54,7 +54,7 @@ A:link, A:visited, A:active { text-decoration: underline }
               
              utf:Pointer to putative UTF-8 encoded string.
              Returns:value: true if @utf is valid.

              Function: xmlGetUTF8Char

              int	xmlGetUTF8Char			(const unsigned char * utf, 
              int * len)

              Read the first UTF8 character from @utf

              utf:a sequence of UTF-8 encoded bytes
              len:a pointer to the minimum number of bytes present in the sequence. This is used to assure the next character is completely contained within the sequence.
              Returns:the char value or -1 in case of error, and sets *len to the actual number of bytes consumed (0 in case of error)

              Function: xmlStrEqual

              int	xmlStrEqual			(const xmlChar * str1, 
              const xmlChar * str2)
              -

              Check if both string are equal of have same content Should be a bit more readable and faster than xmlStrEqual()

              +

              Check if both strings are equal of have same content. Should be a bit more readable and faster than xmlStrcmp()

              str1:the first xmlChar *
              str2:the second xmlChar *
              Returns:1 if they are equal, 0 if they are different

              Function: xmlStrPrintf

              int	xmlStrPrintf			(xmlChar * buf, 
              int len,
              const xmlChar * msg,
              ... ...)

              Formats @msg and places result into @buf.

              buf:the result buffer.
              len:the result buffer length.
              msg:the message with printf formatting.
              ...:extra parameters for the message.
              Returns:the number of characters written to @buf or -1 if an error occurs.

              Function: xmlStrQEqual

              int	xmlStrQEqual			(const xmlChar * pref, 
              const xmlChar * name,
              const xmlChar * str)
              @@ -78,10 +78,10 @@ A:link, A:visited, A:active { text-decoration: underline }
              str:the xmlChar * array
              Returns:the number of xmlChar contained in the ARRAY.

              Function: xmlStrncasecmp

              int	xmlStrncasecmp			(const xmlChar * str1, 
              const xmlChar * str2,
              int len)

              a strncasecmp for xmlChar's

              str1:the first xmlChar *
              str2:the second xmlChar *
              len:the max comparison length
              Returns:the integer result of the comparison

              Function: xmlStrncat

              xmlChar *	xmlStrncat		(xmlChar * cur, 
              const xmlChar * add,
              int len)
              -

              a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add.

              +

              a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add. Note that if @len < 0 then this is an API error and NULL will be returned.

              cur:the original xmlChar * array
              add:the xmlChar * array added
              len:the length of @add
              Returns:a new xmlChar *, the original @cur is reallocated if needed and should not be freed

              Function: xmlStrncatNew

              xmlChar *	xmlStrncatNew		(const xmlChar * str1, 
              const xmlChar * str2,
              int len)
              -

              same as xmlStrncat, but creates a new string. The original two strings are not freed.

              -
              str1:first xmlChar string
              str2:second xmlChar string
              len:the len of @str2
              Returns:a new xmlChar * or NULL

              Function: xmlStrncmp

              int	xmlStrncmp			(const xmlChar * str1, 
              const xmlChar * str2,
              int len)
              +

              same as xmlStrncat, but creates a new string. The original two strings are not freed. If @len is < 0 then the length will be calculated automatically.

              +
              str1:first xmlChar string
              str2:second xmlChar string
              len:the len of @str2 or < 0
              Returns:a new xmlChar * or NULL

              Function: xmlStrncmp

              int	xmlStrncmp			(const xmlChar * str1, 
              const xmlChar * str2,
              int len)

              a strncmp for xmlChar's

              str1:the first xmlChar *
              str2:the second xmlChar *
              len:the max comparison length
              Returns:the integer result of the comparison

              Function: xmlStrndup

              xmlChar *	xmlStrndup		(const xmlChar * cur, 
              int len)

              a strndup for array of xmlChar's

              diff --git a/doc/index.html b/doc/index.html index e5cdd04..b4cfbcb 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1,7 +1,8 @@ - + + Introduction
              Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
              Made with Libxml2 Logo

              The XML C parser and toolkit of Gnome

              Introduction

              Main Menu
              Related links

              This document describes libxml, the XML C parser and toolkit developed for the +Introduction
              Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
              Made with Libxml2 Logo

              The XML C parser and toolkit of Gnome

              Introduction

              Main Menu
              Related links

              This document describes libxml, the XML C parser and toolkit developed for the Gnome project. XML is a standard for building tag-based structured documents/data.

              Here are some key points about libxml:

              • Libxml2 exports Push (progressive) and Pull (blocking) type parser interfaces for both XML and HTML.
              • diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml index 2522c21..088d0ae 100644 --- a/doc/libxml2-api.xml +++ b/doc/libxml2-api.xml @@ -110,9 +110,10 @@ - + + @@ -122,7 +123,7 @@ - + @@ -1003,11 +1004,13 @@ + + @@ -1093,7 +1096,7 @@ internal interfaces for XML Schemas - internal interfaces for the XML Schemas handling and schema validity checking + internal interfaces for the XML Schemas handling and schema validity checking The Schemas development is a Work In Progress. Some of those interfaces are not garanteed to be API or ABI stable ! Daniel Veillard @@ -1118,11 +1121,12 @@ - + + @@ -1142,7 +1146,9 @@ + + @@ -1151,7 +1157,7 @@ - + @@ -1160,7 +1166,7 @@ - + @@ -1223,6 +1229,7 @@ + @@ -1230,6 +1237,7 @@ + @@ -1853,9 +1861,10 @@ + - + @@ -1927,7 +1936,7 @@ - + @@ -2064,6 +2073,7 @@ + @@ -2083,6 +2093,7 @@ + @@ -2220,7 +2231,7 @@ - + @@ -2230,6 +2241,7 @@ + @@ -2333,6 +2345,7 @@ + @@ -2521,6 +2534,7 @@ + @@ -2864,6 +2878,7 @@ + @@ -2943,6 +2958,7 @@ + @@ -3014,6 +3030,7 @@ + @@ -4063,9 +4080,15 @@ The attribute wildcard has been already builded. + + Whether this attr. group contains attr. group references. + Marks the attr group as marked; used for circular checks. + + The attr group was redefined. + The attribute wildcard has been already builded. @@ -4255,8 +4278,11 @@ the complexType owns an attribute wildcard, i.e. it can be freed by the complexType + + The type was redefined. + - the simpleType has a variety of "absent". + the simpleType has a variety of "absent". TODO: Actually not necessary :-/, since if none of the variety flags occur then it's automatically absent. the simpleType has a variety of "union". @@ -5155,13 +5181,18 @@ + + + + + @@ -5505,9 +5536,10 @@ - + + @@ -5526,6 +5558,7 @@ + @@ -6343,7 +6376,7 @@ actually an xmlCharEncoding'/> - + @@ -6359,8 +6392,8 @@ actually an xmlCharEncoding'/> - - + + @@ -6368,41 +6401,42 @@ actually an xmlCharEncoding'/> - - - - - - + + + + + + - - - + + + - - - + + + - - + + - + - - - + + + + @@ -6414,17 +6448,17 @@ actually an xmlCharEncoding'/> - + - - - + + + - - + + @@ -6432,26 +6466,27 @@ actually an xmlCharEncoding'/> - - - + + + - - - + + + - - + + - + - - + + @@ -6476,36 +6511,38 @@ actually an xmlCharEncoding'/> - - - + + + - + - - + + - - - - - - - + + + + + + + - - - - - - + + + + + + + - + @@ -6520,11 +6557,11 @@ actually an xmlCharEncoding'/> - + - - + + @@ -7288,6 +7325,15 @@ actually an xmlCharEncoding'/> + + defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) + Dump an HTML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory. + + + + + + defined(LIBXML_HTML_ENABLED) Checks whether an HTML element may be a direct child of a parent element. Note - doesn't check for deprecated elements @@ -9412,7 +9458,7 @@ actually an xmlCharEncoding'/> - + @@ -9421,7 +9467,7 @@ actually an xmlCharEncoding'/> - + @@ -11139,7 +11185,7 @@ actually an xmlCharEncoding'/> defined(LIBXML_LEGACY_ENABLED) - Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!! It now create a namespace on the root element of the document if found. + Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!! @@ -11467,6 +11513,13 @@ actually an xmlCharEncoding'/> + + defined(LIBXML_OUTPUT_ENABLED) + Create a buffered output for the progressive saving to a xmlBuffer + + + + defined(LIBXML_OUTPUT_ENABLED) Create a buffered output for the progressive saving to a file descriptor @@ -12611,7 +12664,7 @@ actually an xmlCharEncoding'/> defined(LIBXML_SCHEMAS_ENABLED) - parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances. *WARNING* this interface is highly subject to change + parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances. @@ -13133,6 +13186,14 @@ actually an xmlCharEncoding'/> + + defined(LIBXML_OUTPUT_ENABLED) + Create a document saving context serializing to a buffer with the encoding and the options given + + + + + defined(LIBXML_OUTPUT_ENABLED) Create a document saving context serializing to a file descriptor with the encoding and the options given. @@ -13252,9 +13313,9 @@ actually an xmlCharEncoding'/> defined(LIBXML_SCHEMAS_ENABLED) - Free the resources associated to the schema validation context + - + defined(LIBXML_SCHEMAS_ENABLED) @@ -13325,12 +13386,12 @@ actually an xmlCharEncoding'/> defined(LIBXML_SCHEMAS_ENABLED) - Get the error and warning callback informations - - - - - + + + + + + defined(LIBXML_SCHEMAS_ENABLED) @@ -13346,9 +13407,9 @@ actually an xmlCharEncoding'/> defined(LIBXML_SCHEMAS_ENABLED) - Check if any error was detected during validation. - - + + + defined(LIBXML_SCHEMAS_ENABLED) @@ -13397,29 +13458,29 @@ actually an xmlCharEncoding'/> defined(LIBXML_SCHEMAS_ENABLED) - Create an XML Schemas validation context based on the given schema. - - + + + defined(LIBXML_SCHEMAS_ENABLED) - parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances. *WARNING* this interface is highly subject to change + parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances. defined(LIBXML_SCHEMAS_ENABLED) - Plug a SAX based validation layer in a SAX parsing event flow. The original @saxptr and @dataptr data are replaced by new pointers but the calls to the original will be maintained. - - - - + + + + + defined(LIBXML_SCHEMAS_ENABLED) - Unplug a SAX based validation layer in a SAX parsing event flow. The original pointers used in the call are restored. - - + + + defined(LIBXML_SCHEMAS_ENABLED) @@ -13430,29 +13491,37 @@ actually an xmlCharEncoding'/> - + defined(LIBXML_SCHEMAS_ENABLED) - Set the error and warning callback informations + Set the structured error callback - - - + + + + defined(LIBXML_SCHEMAS_ENABLED) + + + + + + + defined(LIBXML_SCHEMAS_ENABLED) - Sets the options to be used during the validation. - - - + + + + defined(LIBXML_SCHEMAS_ENABLED) - Set the structured error callback + - - - + + + defined(LIBXML_SCHEMAS_ENABLED) @@ -13474,16 +13543,16 @@ actually an xmlCharEncoding'/> defined(LIBXML_SCHEMAS_ENABLED) - Get the validation context options. - - + + + defined(LIBXML_SCHEMAS_ENABLED) - Validate a document tree in memory. - - - + + + + defined(LIBXML_SCHEMAS_ENABLED) @@ -13507,11 +13576,11 @@ actually an xmlCharEncoding'/> defined(LIBXML_SCHEMAS_ENABLED) - Do a schemas validation of the given resource, it will use the SAX streamable validation internally. - - - - + + + + + defined(LIBXML_SCHEMAS_ENABLED) @@ -13545,10 +13614,10 @@ actually an xmlCharEncoding'/> defined(LIBXML_SCHEMAS_ENABLED) - Validate a branch of a tree, starting with the given @elem. - - - + + + + defined(LIBXML_SCHEMAS_ENABLED) @@ -13560,13 +13629,13 @@ actually an xmlCharEncoding'/> defined(LIBXML_SCHEMAS_ENABLED) - Validate an input based on a flow of SAX event from the parser and forward the events to the @sax handler with the provided @user_data the user provided @sax handler must be a SAX2 one. - - - - - - + + + + + + + defined(LIBXML_SCHEMAS_ENABLED) @@ -13971,7 +14040,7 @@ actually an xmlCharEncoding'/> - Check if both string are equal of have same content Should be a bit more readable and faster than xmlStrEqual() + Check if both strings are equal of have same content. Should be a bit more readable and faster than xmlStrcmp() @@ -14047,7 +14116,7 @@ actually an xmlCharEncoding'/> defined(LIBXML_PATTERN_ENABLED) - Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. + Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an element-node. @@ -14055,12 +14124,27 @@ actually an xmlCharEncoding'/> defined(LIBXML_PATTERN_ENABLED) - Push new attribute data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. + Push new attribute data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an attribute-node. + + defined(LIBXML_PATTERN_ENABLED) + Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Different from xmlStreamPush() this function can be fed with nodes of type: element-, attribute-, text-, cdata-section-, comment- and processing-instruction-node. + + + + + + + + defined(LIBXML_PATTERN_ENABLED) + Query if the streaming pattern additionally needs to be fed with text-, cdata-section-, comment- and processing-instruction-nodes. If the result is 0 then only element-nodes and attribute-nodes need to be pushed. + + + The current char value, if using UTF-8 this may actually span multiple bytes in the input buffer. @@ -14115,18 +14199,18 @@ actually an xmlCharEncoding'/> - a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add. + a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add. Note that if @len < 0 then this is an API error and NULL will be returned. - same as xmlStrncat, but creates a new string. The original two strings are not freed. + same as xmlStrncat, but creates a new string. The original two strings are not freed. If @len is < 0 then the length will be calculated automatically. - + a strncmp for xmlChar's @@ -14546,13 +14630,13 @@ actually an xmlCharEncoding'/> - defined(LIBXML_READER_ENABLED) + defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) Reads the contents of the current node, including child nodes and markup. - defined(LIBXML_READER_ENABLED) + defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) Reads the contents of the current node, including child nodes and markup. @@ -14585,11 +14669,19 @@ actually an xmlCharEncoding'/> defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) - Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). if @xsd is NULL, then RelaxNG validation is desactivated. - + Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). If @xsd is NULL, then XML Schema validation is deactivated. + + + defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) + Use W3C XSD schema context to validate the document as it is processed. Activation is only possible before the first Read(). If @ctxt is NULL, then XML Schema validation is deactivated. + + + + + defined(LIBXML_READER_ENABLED) Register a callback function that will be called on error and warnings. If @f is NULL, the default error and warning handlers are restored. @@ -16436,7 +16528,7 @@ actually an xmlCharEncoding'/> Build/extend a list of potential children allowed by the content tree - + diff --git a/doc/libxml2.xsa b/doc/libxml2.xsa index e09ad85..0b6082a 100644 --- a/doc/libxml2.xsa +++ b/doc/libxml2.xsa @@ -8,45 +8,21 @@ libxml2 - 2.6.21 - Sep 4 2005 + 2.6.22 + Sep 12 2005 http://xmlsoft.org/ - - build fixes: Cygwin portability fixes (Gerrit P. Haase), calling - convention problems on Windows (Marcus Boerger), cleanups based on - Linus' sparse tool, update of win32/configure.js (Rob Richards), - remove warnings on Windows(Marcus Boerger), compilation without SAX1, - detection of the Python binary, use $GCC inestad of $CC = 'gcc' (Andrew - W. Nosenko), compilation/link with threads and old gcc, compile - problem by C370 on Z/OS, - - bug fixes: http_proxy environments (Peter Breitenlohner), HTML UTF-8 - bug (Jiri Netolicky), XPath NaN compare bug (William Brack), - htmlParseScript potential bug, Schemas regexp handling of spaces, - Base64 Schemas comparisons NIST passes, automata build error xsd:all, - xmlGetNodePath for namespaced attributes (Alexander Pohoyda), - xmlSchemas foreign namespaces handling, XML Schemas facet comparison - (Kupriyanov Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier - Buchcik), xml: namespace ahndling in Schemas (Kasimier), empty model - group in Schemas (Kasimier), wilcard in Schemas (Kasimier), URI - composition (William), xs:anyType in Schemas (Kasimier), Python resolver - emmitting error messages directly, Python xmlAttr.parent (Jakub Piotr - Clapa), trying to fix the file path/URI conversion, - xmlTextReaderGetAttribute fix (Rob Richards), xmlSchemaFreeAnnot memleak - (Kasimier), HTML UTF-8 serialization, streaming XPath, Schemas determinism - detection problem, XInclude bug, Schemas context type (Dean Hill), - validation fix (Derek Poon), xmlTextReaderGetAttribute[Ns] namespaces - (Rob Richards), Schemas type fix (Kuba Nowakowski), UTF-8 parser bug, - error in encoding handling, xmlGetLineNo fixes, bug on entities handling, - entity name extraction in error handling with XInclude, text nodes - in HTML body tags (Gary Coady), xml:id and IDness at the treee level - fixes, XPath streaming patterns bugs. - - improvements: structured interfaces for schemas and RNG error reports - (Marcus Boerger), optimization of the char data inner loop parsing - (thanks to Behdad Esfahbod for the idea), schematron validation - though not finished yet, xmlSaveOption to omit XML declaration, - keyref match error reports (Kasimier), formal expression handling - code not plugged yet, more lax mode for the HTML parser, - parser XML_PARSE_COMPACT option for text nodes allocation. - - documentation: xmllint man page had --nonet duplicated + - build fixes: compile without schematron (Stéphane Bidoul) + - bug fixes: xmlDebugDumpNode on namespace node (Oleg Paraschenko)i, + CDATA push parser bug, xmlElemDump problem with XHTML1 doc, + XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, fix some + output formatting for meta element (Rob Richards), script and style + XHTML1 serialization (David Madore), Attribute derivation fixups in XSD + (Kasimier Buchcik), better IDC error reports (Kasimier Buchcik) + - improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), add + XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements preparing for + derive (Kasimier Buchcik). + - documentation: generation of gtk-doc like docs, integration with + devhelp. diff --git a/doc/namespaces.html b/doc/namespaces.html index d2c9be3..b4936c7 100644 --- a/doc/namespaces.html +++ b/doc/namespaces.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Namespaces
                Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                Made with Libxml2 Logo

                The XML C parser and toolkit of Gnome

                Namespaces

                Main Menu
                Related links

                The libxml2 library implements XML namespaces support by +Namespaces
                Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                Made with Libxml2 Logo

                The XML C parser and toolkit of Gnome

                Namespaces

                Main Menu
                Related links

                The libxml2 library implements XML namespaces support by recognizing namespace constructs in the input, and does namespace lookup automatically when building the DOM tree. A namespace declaration is associated with an in-memory structure and all elements or attributes within diff --git a/doc/news.html b/doc/news.html index 8916d49..29af068 100644 --- a/doc/news.html +++ b/doc/news.html @@ -7,164 +7,202 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Releases
                Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                Made with Libxml2 Logo

                The XML C parser and toolkit of Gnome

                Releases

                Main Menu
                Related links

                Items not finished and worked on, get in touch with the list if you want +Releases
                Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                Made with Libxml2 Logo

                The XML C parser and toolkit of Gnome

                Releases

                Main Menu
                Related links

                Items not finished and worked on, get in touch with the list if you want to help those

                The change log describes the recents commits -to the CVS code base.

                There is the list of public releases:

                2.6.22: Sep 12 2005

                • build fixes: compile without schematron (Stéphane Bidoul)
                • +to the CVS code base.

                  There is the list of public releases:

                  2.6.23: Jan 5 2006

                  • portability fixes: Windows (Rob Richards), getaddrinfo on Windows + (Kolja Nowak, Rob Richards), icc warnings (Kjartan Maraas), + --with-minimum compilation fixes (William Brack), error case handling fix + on Solaris (Albert Chin), don't use 'list' as parameter name reported by + Samuel Diaz Garcia, more old Unices portability fixes (Albert Chin), + MinGW compilation (Mark Junker), HP-UX compiler warnings (Rick Jones), +
                  • +
                  • code cleanup: xmlReportError (Adrian Mouat), remove xmlBufferClose + (Geert Jansen), unreachable code (Oleksandr Kononenko), refactoring + parsing code (Bjorn Reese)
                  • +
                  • bug fixes: xmlBuildRelativeURI and empty path (William Brack), + combinatory explosion and performances in regexp code, leak in + xmlTextReaderReadString(), xmlStringLenDecodeEntities problem (Massimo + Morara), Identity Constraints bugs and a segfault (Kasimier Buchcik), + XPath pattern based evaluation bugs (DV & Kasimier), + xmlSchemaContentModelDump() memory leak (Kasimier), potential leak in + xmlSchemaCheckCSelectorXPath(), xmlTextWriterVSprintf() misuse of + vsnprintf (William Brack), XHTML serialization fix (Rob Richards), CRLF + split problem (William), issues with non-namespaced attributes in + xmlAddChild() xmlAddNextSibling() and xmlAddPrevSibling() (Rob Richards), + HTML parsing of script, Python must not output to stdout (Nic Ferrier), + exclusive C14N namespace visibility (Aleksey Sanin), XSD dataype + totalDigits bug (Kasimier Buchcik), error handling when writing to an + xmlBuffer (Rob Richards), runtest schemas error not reported (Hisashi + Fujinaka), signed/unsigned problem in date/time code (Albert Chin), fix + XSI driven XSD validation (Kasimier), parsing of xs:decimal (Kasimier), + fix DTD writer output (Rob Richards), leak in xmlTextReaderReadInnerXml + (Gary Coady), regexp bug affecting schemas (Kasimier), configuration of + runtime debugging (Kasimier), xmlNodeBufGetContent bug on entity refs + (Oleksandr Kononenko), xmlRegExecPushString2 bug (Sreeni Nair), + compilation and build fixes (Michael Day), removed dependancies on + xmlSchemaValidError (Kasimier), bug with <xml:foo/>, more XPath + pattern based evaluation fixes (Kasimier)
                  • +
                  • improvements: XSD Schemas redefinitions/restrictions (Kasimier + Buchcik), node copy checks and fix for attribute (Rob Richards), counted + transition bug in regexps, ctxt->standalone = -2 to indicate no + standalone attribute was found, add xmlSchemaSetParserStructuredErrors() + (Kasimier Buchcik), add xmlTextReaderSchemaValidateCtxt() to API + (Kasimier), handle gzipped HTTP resources (Gary Coady), add + htmlDocDumpMemoryFormat. (Rob Richards),
                  • +
                  • documentation: typo (Michael Day), libxml man page (Albert Chin), save + function to XML buffer (Geert Jansen), small doc fix (Aron Stansvik), +
                  • +

                  2.6.22: Sep 12 2005

                  • build fixes: compile without schematron (Stéphane Bidoul)
                  • bug fixes: xmlDebugDumpNode on namespace node (Oleg Paraschenko)i, - CDATA push parser bug, xmlElemDump problem with XHTML1 doc, - XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, - fix some output formatting for meta element (Rob Richards), - script and style XHTML1 serialization (David Madore), Attribute - derivation fixups in XSD (Kasimier Buchcik), better IDC error - reports (Kasimier Buchcik) -
                  • -
                  • improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), - add XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements - preparing for derive (Kasimier Buchcik).
                  • + CDATA push parser bug, xmlElemDump problem with XHTML1 doc, + XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, fix some + output formatting for meta element (Rob Richards), script and style + XHTML1 serialization (David Madore), Attribute derivation fixups in XSD + (Kasimier Buchcik), better IDC error reports (Kasimier Buchcik) +
                  • improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), add + XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements preparing for + derive (Kasimier Buchcik).
                  • documentation: generation of gtk-doc like docs, integration with - devhelp.
                  • + devhelp.

                  2.6.21: Sep 4 2005

                  • build fixes: Cygwin portability fixes (Gerrit P. Haase), calling - convention problems on Windows (Marcus Boerger), cleanups based on - Linus' sparse tool, update of win32/configure.js (Rob Richards), - remove warnings on Windows(Marcus Boerger), compilation without SAX1, - detection of the Python binary, use $GCC inestad of $CC = 'gcc' (Andrew - W. Nosenko), compilation/link with threads and old gcc, compile - problem by C370 on Z/OS,
                  • + convention problems on Windows (Marcus Boerger), cleanups based on Linus' + sparse tool, update of win32/configure.js (Rob Richards), remove warnings + on Windows(Marcus Boerger), compilation without SAX1, detection of the + Python binary, use $GCC inestad of $CC = 'gcc' (Andrew W. Nosenko), + compilation/link with threads and old gcc, compile problem by C370 on + Z/OS,
                  • bug fixes: http_proxy environments (Peter Breitenlohner), HTML UTF-8 - bug (Jiri Netolicky), XPath NaN compare bug (William Brack), - htmlParseScript potential bug, Schemas regexp handling of spaces, - Base64 Schemas comparisons NIST passes, automata build error xsd:all, - xmlGetNodePath for namespaced attributes (Alexander Pohoyda), - xmlSchemas foreign namespaces handling, XML Schemas facet comparison - (Kupriyanov Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier - Buchcik), xml: namespace ahndling in Schemas (Kasimier), empty model - group in Schemas (Kasimier), wilcard in Schemas (Kasimier), URI - composition (William), xs:anyType in Schemas (Kasimier), Python resolver - emmitting error messages directly, Python xmlAttr.parent (Jakub Piotr - Clapa), trying to fix the file path/URI conversion, - xmlTextReaderGetAttribute fix (Rob Richards), xmlSchemaFreeAnnot memleak - (Kasimier), HTML UTF-8 serialization, streaming XPath, Schemas determinism - detection problem, XInclude bug, Schemas context type (Dean Hill), - validation fix (Derek Poon), xmlTextReaderGetAttribute[Ns] namespaces - (Rob Richards), Schemas type fix (Kuba Nowakowski), UTF-8 parser bug, - error in encoding handling, xmlGetLineNo fixes, bug on entities handling, - entity name extraction in error handling with XInclude, text nodes - in HTML body tags (Gary Coady), xml:id and IDness at the treee level - fixes, XPath streaming patterns bugs.
                  • + bug (Jiri Netolicky), XPath NaN compare bug (William Brack), + htmlParseScript potential bug, Schemas regexp handling of spaces, Base64 + Schemas comparisons NIST passes, automata build error xsd:all, + xmlGetNodePath for namespaced attributes (Alexander Pohoyda), xmlSchemas + foreign namespaces handling, XML Schemas facet comparison (Kupriyanov + Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier Buchcik), xml: + namespace ahndling in Schemas (Kasimier), empty model group in Schemas + (Kasimier), wilcard in Schemas (Kasimier), URI composition (William), + xs:anyType in Schemas (Kasimier), Python resolver emmitting error + messages directly, Python xmlAttr.parent (Jakub Piotr Clapa), trying to + fix the file path/URI conversion, xmlTextReaderGetAttribute fix (Rob + Richards), xmlSchemaFreeAnnot memleak (Kasimier), HTML UTF-8 + serialization, streaming XPath, Schemas determinism detection problem, + XInclude bug, Schemas context type (Dean Hill), validation fix (Derek + Poon), xmlTextReaderGetAttribute[Ns] namespaces (Rob Richards), Schemas + type fix (Kuba Nowakowski), UTF-8 parser bug, error in encoding handling, + xmlGetLineNo fixes, bug on entities handling, entity name extraction in + error handling with XInclude, text nodes in HTML body tags (Gary Coady), + xml:id and IDness at the treee level fixes, XPath streaming patterns + bugs.
                  • improvements: structured interfaces for schemas and RNG error reports - (Marcus Boerger), optimization of the char data inner loop parsing - (thanks to Behdad Esfahbod for the idea), schematron validation - though not finished yet, xmlSaveOption to omit XML declaration, - keyref match error reports (Kasimier), formal expression handling - code not plugged yet, more lax mode for the HTML parser, - parser XML_PARSE_COMPACT option for text nodes allocation.
                  • + (Marcus Boerger), optimization of the char data inner loop parsing + (thanks to Behdad Esfahbod for the idea), schematron validation though + not finished yet, xmlSaveOption to omit XML declaration, keyref match + error reports (Kasimier), formal expression handling code not plugged + yet, more lax mode for the HTML parser, parser XML_PARSE_COMPACT option + for text nodes allocation.
                  • documentation: xmllint man page had --nonet duplicated
                  • -

                  2.6.20: Jul 10 2005

                  • build fixes: Windows build (Rob Richards), Mingw compilation (Igor - Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and - andriy@google.com), use gcc weak references to pthread to avoid the - pthread dependancy on Linux, compilation problem (Steve Nairn), - compiling of subset (Morten Welinder), IPv6/ss_family compilation - (William Brack), compilation when disabling parts of the library, - standalone test distribution. -
                  • -
                  • bug fixes: bug in lang(), memory cleanup on errors (William Brack), - HTTP query strings (Aron Stansvik), memory leak in DTD (William), - integer overflow in XPath (William), nanoftp buffer size, pattern - "." apth fixup (Kasimier), leak in tree reported by Malcolm Rowe, - replaceNode patch (Brent Hendricks), CDATA with NULL content - (Mark Vakoc), xml:base fixup on XInclude (William), pattern - fixes (William), attribute bug in exclusive c14n (Aleksey Sanin), - xml:space and xml:lang with SAX2 (Rob Richards), namespace - trouble in complex parsing (Malcolm Rowe), XSD type QNames fixes - (Kasimier), XPath streaming fixups (William), RelaxNG bug (Rob Richards), - Schemas for Schemas fixes (Kasimier), removal of ID (Rob Richards), - a small RelaxNG leak, HTML parsing in push mode bug (James Bursa), - failure to detect UTF-8 parsing bugs in CDATA sections, areBlanks() - heuristic failure, duplicate attributes in DTD bug (William). -
                  • -
                  • improvements: lot of work on Schemas by Kasimier Buchcik both on - conformance and streaming, Schemas validation messages (Kasimier - Buchcik, Matthew Burgess), namespace removal at the python level - (Brent Hendricks), Update to new Schemas regression tests from - W3C/Nist (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation - of xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert), - standalone test framework and programs, new DOM import APIs - xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and - xmlDOMWrapRemoveNode(), extension of xmllint capabilities for - SAX and Schemas regression tests, xmlStopParser() available in - pull mode too, ienhancement to xmllint --shell namespaces support, - Windows port of the standalone testing tools (Kasimier and William), - xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() - SAX Schemas APIs, Schemas xmlReader support. -
                  • -

                  2.6.19: Apr 02 2005

                  • build fixes: drop .la from RPMs, --with-minimum build fix (William - Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with - AIX 5.3 compiler, fixed elfgcchack.h generation and PLT reduction - code on Linux/ELF/gcc4
                  • -
                  • bug fixes: schemas type decimal fixups (William Brack), xmmlint return - code (Gerry Murphy), small schemas fixes (Matthew Burgess and - GUY Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey - Sanin), segfault in Schemas (Kasimier Buchcik), Schemas attribute - validation (Kasimier), Prop related functions and xmlNewNodeEatName - (Rob Richards), HTML serialization of name attribute on a elements, - Python error handlers leaks and improvement (Brent Hendricks), - uninitialized variable in encoding code, Relax-NG validation bug, - potential crash if gnorableWhitespace is NULL, xmlSAXParseDoc and - xmlParseDoc signatures, switched back to assuming UTF-8 in case - no encoding is given at serialization time
                  • -
                  • improvements: lot of work on Schemas by Kasimier Buchcik on facets - checking and also mixed handling.
                  • +

                  2.6.20: Jul 10 2005

                  • build fixes: Windows build (Rob Richards), Mingw compilation (Igor + Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and + andriy@google.com), use gcc weak references to pthread to avoid the + pthread dependancy on Linux, compilation problem (Steve Nairn), compiling + of subset (Morten Welinder), IPv6/ss_family compilation (William Brack), + compilation when disabling parts of the library, standalone test + distribution.
                  • +
                  • bug fixes: bug in lang(), memory cleanup on errors (William Brack), + HTTP query strings (Aron Stansvik), memory leak in DTD (William), integer + overflow in XPath (William), nanoftp buffer size, pattern "." apth fixup + (Kasimier), leak in tree reported by Malcolm Rowe, replaceNode patch + (Brent Hendricks), CDATA with NULL content (Mark Vakoc), xml:base fixup + on XInclude (William), pattern fixes (William), attribute bug in + exclusive c14n (Aleksey Sanin), xml:space and xml:lang with SAX2 (Rob + Richards), namespace trouble in complex parsing (Malcolm Rowe), XSD type + QNames fixes (Kasimier), XPath streaming fixups (William), RelaxNG bug + (Rob Richards), Schemas for Schemas fixes (Kasimier), removal of ID (Rob + Richards), a small RelaxNG leak, HTML parsing in push mode bug (James + Bursa), failure to detect UTF-8 parsing bugs in CDATA sections, + areBlanks() heuristic failure, duplicate attributes in DTD bug + (William).
                  • +
                  • improvements: lot of work on Schemas by Kasimier Buchcik both on + conformance and streaming, Schemas validation messages (Kasimier Buchcik, + Matthew Burgess), namespace removal at the python level (Brent + Hendricks), Update to new Schemas regression tests from W3C/Nist + (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation of + xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert), + standalone test framework and programs, new DOM import APIs + xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and + xmlDOMWrapRemoveNode(), extension of xmllint capabilities for SAX and + Schemas regression tests, xmlStopParser() available in pull mode too, + ienhancement to xmllint --shell namespaces support, Windows port of the + standalone testing tools (Kasimier and William), + xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() SAX + Schemas APIs, Schemas xmlReader support.
                  • +

                  2.6.19: Apr 02 2005

                  • build fixes: drop .la from RPMs, --with-minimum build fix (William + Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with AIX + 5.3 compiler, fixed elfgcchack.h generation and PLT reduction code on + Linux/ELF/gcc4
                  • +
                  • bug fixes: schemas type decimal fixups (William Brack), xmmlint return + code (Gerry Murphy), small schemas fixes (Matthew Burgess and GUY + Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey Sanin), + segfault in Schemas (Kasimier Buchcik), Schemas attribute validation + (Kasimier), Prop related functions and xmlNewNodeEatName (Rob Richards), + HTML serialization of name attribute on a elements, Python error handlers + leaks and improvement (Brent Hendricks), uninitialized variable in + encoding code, Relax-NG validation bug, potential crash if + gnorableWhitespace is NULL, xmlSAXParseDoc and xmlParseDoc signatures, + switched back to assuming UTF-8 in case no encoding is given at + serialization time
                  • +
                  • improvements: lot of work on Schemas by Kasimier Buchcik on facets + checking and also mixed handling.
                  • -

                  2.6.18: Mar 13 2005

                  • build fixes: warnings (Peter Breitenlohner), testapi.c generation, - Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed), - some gcc4 fixes, HP-UX portability fixes (Rick Jones).
                  • -
                  • bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and - xmlreader stopping on non-fatal errors, thread support for dictionnaries - reference counting (Gary Coady), internal subset and push problem, - URL saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python - paths fixup (Stephane Bidoul), xmlGetNodePath and namespaces, - xmlSetNsProp fix (Mike Hommey), warning should not count as error - (William Brack), xmlCreatePushParser empty chunk, XInclude parser - flags (William), cleanup FTP and HTTP code to reuse the uri parsing - and IPv6 (William), xmlTextWriterStartAttributeNS fix (Rob Richards), - XMLLINT_INDENT being empty (William), xmlWriter bugs (Rob Richards), - multithreading on Windows (Rich Salz), xmlSearchNsByHref fix (Kasimier), - Python binding leak (Brent Hendricks), aliasing bug exposed by gcc4 - on s390, xmlTextReaderNext bug (Rob Richards), Schemas decimal type - fixes (William Brack), xmlByteConsumed static buffer (Ben Maurer).
                  • -
                  • improvement: speedup parsing comments and DTDs, dictionnary support for - hash tables, Schemas Identity constraints (Kasimier), streaming XPath - subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical - values handling (Kasimier), add xmlTextReaderByteConsumed (Aron - Stansvik),
                  • -
                  • Documentation: Wiki support (Joel Reed) -

                  2.6.17: Jan 16 2005

                  • build fixes: Windows, warnings removal (William Brack), - maintainer-clean dependency(William), build in a different directory - (William), fixing --with-minimum configure build (William), BeOS - build (Marcin Konicki), Python-2.4 detection (William), compilation - on AIX (Dan McNichol)
                  • +

                  2.6.18: Mar 13 2005

                  • build fixes: warnings (Peter Breitenlohner), testapi.c generation, + Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed), + some gcc4 fixes, HP-UX portability fixes (Rick Jones).
                  • +
                  • bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and + xmlreader stopping on non-fatal errors, thread support for dictionnaries + reference counting (Gary Coady), internal subset and push problem, URL + saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python paths + fixup (Stephane Bidoul), xmlGetNodePath and namespaces, xmlSetNsProp fix + (Mike Hommey), warning should not count as error (William Brack), + xmlCreatePushParser empty chunk, XInclude parser flags (William), cleanup + FTP and HTTP code to reuse the uri parsing and IPv6 (William), + xmlTextWriterStartAttributeNS fix (Rob Richards), XMLLINT_INDENT being + empty (William), xmlWriter bugs (Rob Richards), multithreading on Windows + (Rich Salz), xmlSearchNsByHref fix (Kasimier), Python binding leak (Brent + Hendricks), aliasing bug exposed by gcc4 on s390, xmlTextReaderNext bug + (Rob Richards), Schemas decimal type fixes (William Brack), + xmlByteConsumed static buffer (Ben Maurer).
                  • +
                  • improvement: speedup parsing comments and DTDs, dictionnary support for + hash tables, Schemas Identity constraints (Kasimier), streaming XPath + subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical + values handling (Kasimier), add xmlTextReaderByteConsumed (Aron + Stansvik),
                  • +
                  • Documentation: Wiki support (Joel Reed)
                  • +

                  2.6.17: Jan 16 2005

                  • build fixes: Windows, warnings removal (William Brack), + maintainer-clean dependency(William), build in a different directory + (William), fixing --with-minimum configure build (William), BeOS build + (Marcin Konicki), Python-2.4 detection (William), compilation on AIX (Dan + McNichol)
                  • bug fixes: xmlTextReaderHasAttributes (Rob Richards), xmlCtxtReadFile() - to use the catalog(s), loop on output (William Brack), XPath memory leak, - ID deallocation problem (Steve Shepard), debugDumpNode crash (William), - warning not using error callback (William), xmlStopParser bug (William), - UTF-16 with BOM on DTDs (William), namespace bug on empty elements - in push mode (Rob Richards), line and col computations fixups (Aleksey - Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William), - patterns with too many steps, bug in RNG choice optimization, line - number sometimes missing. -
                  • -
                  • improvements: XSD Schemas (Kasimier Buchcik), python generator (William), - xmlUTF8Strpos speedup (William), unicode Python strings (William), - XSD error reports (Kasimier Buchcik), Python __str__ call serialize(). -
                  • -
                  • new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber - for the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs - (mostly Joel Reed), error extraction API from regexps, new XMLSave - option for format (Phil Shafer)
                  • -
                  • documentation: site improvement (John Fleck), FAQ entries (William).
                  • + to use the catalog(s), loop on output (William Brack), XPath memory leak, + ID deallocation problem (Steve Shepard), debugDumpNode crash (William), + warning not using error callback (William), xmlStopParser bug (William), + UTF-16 with BOM on DTDs (William), namespace bug on empty elements in + push mode (Rob Richards), line and col computations fixups (Aleksey + Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William), + patterns with too many steps, bug in RNG choice optimization, line number + sometimes missing. +
                  • improvements: XSD Schemas (Kasimier Buchcik), python generator + (William), xmlUTF8Strpos speedup (William), unicode Python strings + (William), XSD error reports (Kasimier Buchcik), Python __str__ call + serialize().
                  • +
                  • new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber for + the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs (mostly Joel + Reed), error extraction API from regexps, new XMLSave option for format + (Phil Shafer)
                  • +
                  • documentation: site improvement (John Fleck), FAQ entries + (William).

                  2.6.16: Nov 10 2004

                  • general hardening and bug fixing crossing all the API based on new automated regression testing
                  • build fix: IPv6 build and test on AIX (Dodji Seketeli)
                  • @@ -174,7 +212,7 @@ to the CVS code base.

                  • documentation: fix to xmllint man page, some API function descritpion were updated.
                  • improvements: DTD validation APIs provided at the Python level (Brent - Hendricks)
                  • + Hendricks)

                  2.6.15: Oct 27 2004

                  • security fixes on the nanoftp and nanohttp modules
                  • build fixes: xmllint detection bug in configure, building outside the source tree (Thomas Fitzsimmons)
                  • diff --git a/doc/python.html b/doc/python.html index e16ca53..1659122 100644 --- a/doc/python.html +++ b/doc/python.html @@ -33,8 +33,9 @@ or libxslt wrappers or bindings:

                    • idom2, a DOM2 implementation for Kylix2/D5/D6 from Borland.
                    • -
                    • There is bindings for Ruby and - libxml2 bindings are also available in Ruby through the libgdome-ruby module +
                    • There is bindings + for Ruby and libxml2 bindings are also available in Ruby through the + libgdome-ruby module maintained by Tobias Peters.
                    • Steve Ball and contributors maintains libxml2 and libxslt bindings for Tcl.
                    • @@ -49,17 +50,15 @@ or libxslt wrappers or bindings:

                      • wxXml2 +
                      • Francesco Montorsi developped wxXml2 wrappers that interface libxml2, allowing wxWidgets applications to load/save/edit XML instances.

                      The distribution includes a set of Python bindings, which are guaranteed to be maintained as part of the library in the future, though the Python interface have not yet reached the completeness of the C API.

                      Note that some of the Python purist dislike the default set of Python -bindings, rather than complaining I suggest they have a look at -lxml the more pythonic bindings for libxml2 and libxslt and -help Martijn Faassen -complete those.

                      Stéphane Bidoul +bindings, rather than complaining I suggest they have a look at lxml the more pythonic bindings for libxml2 +and libxslt and help Martijn +Faassen complete those.

                      Stéphane Bidoul maintains a Windows port of the Python bindings.

                      Note to people interested in building bindings, the API is formalized as an XML API description file which allows to diff --git a/doc/site.xsl b/doc/site.xsl index 29e8aaf..8368a73 100644 --- a/doc/site.xsl +++ b/doc/site.xsl @@ -318,7 +318,7 @@

                      • Home
                      • -
                      • Wiki
                      • +
                      • Reference Manual
                      • diff --git a/doc/xml.html b/doc/xml.html index 638d1c9..6ecd81c 100644 --- a/doc/xml.html +++ b/doc/xml.html @@ -3,7 +3,7 @@ The XML C parser and toolkit of Gnome - + @@ -124,7 +124,6 @@ benchmark on sourceforge February 2004 (smaller is better):

                        alt="benchmark results for Expat Xerces libxml2 Oracle and Sun toolkits">

                        --------------> -

                        Logo designed by Marc Liyanage.

                        Introduction

                        @@ -315,41 +314,49 @@ libxml2

                        CFLAGS=`xml2-config --cflags`

                        LIBS=`xml2-config --libs`

                        -
                      • I want to install my own copy of libxml2 in my home directory and link - my programs against it, but it doesn't work +
                      • I want to install my own copy of libxml2 in my home directory and + link my programs against it, but it doesn't work

                        There are many different ways to accomplish this. Here is one way to - do this under Linux. Suppose your home directory is /home/user. - Then:

                        -
                        • Create a subdirectory, let's call it myxml
                        • + do this under Linux. Suppose your home directory is /home/user. + Then:

                          +
                            +
                          • Create a subdirectory, let's call it myxml
                          • unpack the libxml2 distribution into that subdirectory
                          • -
                          • chdir into the unpacked distribution (/home/user/myxml/libxml2 - )
                          • +
                          • chdir into the unpacked distribution + (/home/user/myxml/libxml2 )
                          • configure the library using the "--prefix" switch, - specifying an installation subdirectory in /home/user/myxml, - e.g. -

                            ./configure --prefix /home/user/myxml/xmlinst {other - configuration options}

                          • + specifying an installation subdirectory in + /home/user/myxml, e.g. +

                            ./configure --prefix /home/user/myxml/xmlinst {other + configuration options}

                            +
                          • now run make followed by make install
                          • At this point, the installation subdirectory contains the complete - "private" include files, library files and binary program files (e.g. - xmllint), located in -

                            /home/user/myxml/xmlinst/lib, /home/user/myxml/xmlinst/include - and /home/user/myxml/xmlinst/bin

                            - respectively.
                          • -
                          • In order to use this "private" library, you should first add it - to the beginning of your default PATH (so that your own private - program files such as xmllint will be used instead of the normal - system ones). To do this, the Bash command would be -

                            export PATH=/home/user/myxml/xmlinst/bin:$PATH

                          • + "private" include files, library files and binary program files (e.g. + xmllint), located in +

                            /home/user/myxml/xmlinst/lib, + /home/user/myxml/xmlinst/include and + /home/user/myxml/xmlinst/bin

                            + respectively. +
                          • In order to use this "private" library, you should first add it to + the beginning of your default PATH (so that your own private program + files such as xmllint will be used instead of the normal system + ones). To do this, the Bash command would be +

                            export PATH=/home/user/myxml/xmlinst/bin:$PATH

                            +
                          • Now suppose you have a program test1.c that you would - like to compile with your "private" library. Simply compile it - using the command

                            gcc `xml2-config --cflags --libs` -o test - test.c

                            Note that, because your PATH has been set with - /home/user/myxml/xmlinst/bin at the beginning, the - xml2-config program which you just installed will be used instead of - the system default one, and this will automatically get the - correct libraries linked with your program.
                          -

                          + like to compile with your "private" library. Simply compile it using + the command +

                          gcc `xml2-config --cflags --libs` -o test test.c

                          + Note that, because your PATH has been set with + /home/user/myxml/xmlinst/bin at the beginning, the xml2-config + program which you just installed will be used instead of the system + default one, and this will automatically get the correct + libraries linked with your program. +
                        +
                      • + +

                      • xmlDocDump() generates output on one line.

                        Libxml2 will not invent spaces in the content of a document since all spaces in the content of a document are @@ -663,14 +670,17 @@ href="http://xmlsoft.org/sources/win32/">win32 directory.

                        maintainer of the Windows port, he provides binaries.
                      • -
                      • Blastwave provides - Solaris binaries.
                      • +
                      • Blastwave provides Solaris + binaries.
                      • Steve Ball provides Mac Os X binaries.
                      • The HP-UX porting center provides HP-UX binaries
                      • -
                      • Bull provides precompiled RPMs for AIX as patr of their GNOME packages
                      • +
                      • Bull provides precompiled RPMs for AIX as + patr of their GNOME packages

                      If you know other supported binary ports, please CVS code base.

                      There is the list of public releases:

                      +

                      2.6.23: Jan 5 2006

                      +
                        +
                      • portability fixes: Windows (Rob Richards), getaddrinfo on Windows + (Kolja Nowak, Rob Richards), icc warnings (Kjartan Maraas), + --with-minimum compilation fixes (William Brack), error case handling fix + on Solaris (Albert Chin), don't use 'list' as parameter name reported by + Samuel Diaz Garcia, more old Unices portability fixes (Albert Chin), + MinGW compilation (Mark Junker), HP-UX compiler warnings (Rick Jones), +
                      • +
                      • code cleanup: xmlReportError (Adrian Mouat), remove xmlBufferClose + (Geert Jansen), unreachable code (Oleksandr Kononenko), refactoring + parsing code (Bjorn Reese)
                      • +
                      • bug fixes: xmlBuildRelativeURI and empty path (William Brack), + combinatory explosion and performances in regexp code, leak in + xmlTextReaderReadString(), xmlStringLenDecodeEntities problem (Massimo + Morara), Identity Constraints bugs and a segfault (Kasimier Buchcik), + XPath pattern based evaluation bugs (DV & Kasimier), + xmlSchemaContentModelDump() memory leak (Kasimier), potential leak in + xmlSchemaCheckCSelectorXPath(), xmlTextWriterVSprintf() misuse of + vsnprintf (William Brack), XHTML serialization fix (Rob Richards), CRLF + split problem (William), issues with non-namespaced attributes in + xmlAddChild() xmlAddNextSibling() and xmlAddPrevSibling() (Rob Richards), + HTML parsing of script, Python must not output to stdout (Nic Ferrier), + exclusive C14N namespace visibility (Aleksey Sanin), XSD dataype + totalDigits bug (Kasimier Buchcik), error handling when writing to an + xmlBuffer (Rob Richards), runtest schemas error not reported (Hisashi + Fujinaka), signed/unsigned problem in date/time code (Albert Chin), fix + XSI driven XSD validation (Kasimier), parsing of xs:decimal (Kasimier), + fix DTD writer output (Rob Richards), leak in xmlTextReaderReadInnerXml + (Gary Coady), regexp bug affecting schemas (Kasimier), configuration of + runtime debugging (Kasimier), xmlNodeBufGetContent bug on entity refs + (Oleksandr Kononenko), xmlRegExecPushString2 bug (Sreeni Nair), + compilation and build fixes (Michael Day), removed dependancies on + xmlSchemaValidError (Kasimier), bug with <xml:foo/>, more XPath + pattern based evaluation fixes (Kasimier)
                      • +
                      • improvements: XSD Schemas redefinitions/restrictions (Kasimier + Buchcik), node copy checks and fix for attribute (Rob Richards), counted + transition bug in regexps, ctxt->standalone = -2 to indicate no + standalone attribute was found, add xmlSchemaSetParserStructuredErrors() + (Kasimier Buchcik), add xmlTextReaderSchemaValidateCtxt() to API + (Kasimier), handle gzipped HTTP resources (Gary Coady), add + htmlDocDumpMemoryFormat. (Rob Richards),
                      • +
                      • documentation: typo (Michael Day), libxml man page (Albert Chin), save + function to XML buffer (Geert Jansen), small doc fix (Aron Stansvik), +
                      • +
                      +

                      2.6.22: Sep 12 2005

                      • build fixes: compile without schematron (Stéphane Bidoul)
                      • bug fixes: xmlDebugDumpNode on namespace node (Oleg Paraschenko)i, - CDATA push parser bug, xmlElemDump problem with XHTML1 doc, - XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, - fix some output formatting for meta element (Rob Richards), - script and style XHTML1 serialization (David Madore), Attribute - derivation fixups in XSD (Kasimier Buchcik), better IDC error - reports (Kasimier Buchcik) -
                      • -
                      • improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), - add XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements - preparing for derive (Kasimier Buchcik).
                      • + CDATA push parser bug, xmlElemDump problem with XHTML1 doc, + XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, fix some + output formatting for meta element (Rob Richards), script and style + XHTML1 serialization (David Madore), Attribute derivation fixups in XSD + (Kasimier Buchcik), better IDC error reports (Kasimier Buchcik) +
                      • improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), add + XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements preparing for + derive (Kasimier Buchcik).
                      • documentation: generation of gtk-doc like docs, integration with - devhelp.
                      • + devhelp.
                      +

                      2.6.21: Sep 4 2005

                      • build fixes: Cygwin portability fixes (Gerrit P. Haase), calling - convention problems on Windows (Marcus Boerger), cleanups based on - Linus' sparse tool, update of win32/configure.js (Rob Richards), - remove warnings on Windows(Marcus Boerger), compilation without SAX1, - detection of the Python binary, use $GCC inestad of $CC = 'gcc' (Andrew - W. Nosenko), compilation/link with threads and old gcc, compile - problem by C370 on Z/OS,
                      • + convention problems on Windows (Marcus Boerger), cleanups based on Linus' + sparse tool, update of win32/configure.js (Rob Richards), remove warnings + on Windows(Marcus Boerger), compilation without SAX1, detection of the + Python binary, use $GCC inestad of $CC = 'gcc' (Andrew W. Nosenko), + compilation/link with threads and old gcc, compile problem by C370 on + Z/OS,
                      • bug fixes: http_proxy environments (Peter Breitenlohner), HTML UTF-8 - bug (Jiri Netolicky), XPath NaN compare bug (William Brack), - htmlParseScript potential bug, Schemas regexp handling of spaces, - Base64 Schemas comparisons NIST passes, automata build error xsd:all, - xmlGetNodePath for namespaced attributes (Alexander Pohoyda), - xmlSchemas foreign namespaces handling, XML Schemas facet comparison - (Kupriyanov Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier - Buchcik), xml: namespace ahndling in Schemas (Kasimier), empty model - group in Schemas (Kasimier), wilcard in Schemas (Kasimier), URI - composition (William), xs:anyType in Schemas (Kasimier), Python resolver - emmitting error messages directly, Python xmlAttr.parent (Jakub Piotr - Clapa), trying to fix the file path/URI conversion, - xmlTextReaderGetAttribute fix (Rob Richards), xmlSchemaFreeAnnot memleak - (Kasimier), HTML UTF-8 serialization, streaming XPath, Schemas determinism - detection problem, XInclude bug, Schemas context type (Dean Hill), - validation fix (Derek Poon), xmlTextReaderGetAttribute[Ns] namespaces - (Rob Richards), Schemas type fix (Kuba Nowakowski), UTF-8 parser bug, - error in encoding handling, xmlGetLineNo fixes, bug on entities handling, - entity name extraction in error handling with XInclude, text nodes - in HTML body tags (Gary Coady), xml:id and IDness at the treee level - fixes, XPath streaming patterns bugs.
                      • + bug (Jiri Netolicky), XPath NaN compare bug (William Brack), + htmlParseScript potential bug, Schemas regexp handling of spaces, Base64 + Schemas comparisons NIST passes, automata build error xsd:all, + xmlGetNodePath for namespaced attributes (Alexander Pohoyda), xmlSchemas + foreign namespaces handling, XML Schemas facet comparison (Kupriyanov + Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier Buchcik), xml: + namespace ahndling in Schemas (Kasimier), empty model group in Schemas + (Kasimier), wilcard in Schemas (Kasimier), URI composition (William), + xs:anyType in Schemas (Kasimier), Python resolver emmitting error + messages directly, Python xmlAttr.parent (Jakub Piotr Clapa), trying to + fix the file path/URI conversion, xmlTextReaderGetAttribute fix (Rob + Richards), xmlSchemaFreeAnnot memleak (Kasimier), HTML UTF-8 + serialization, streaming XPath, Schemas determinism detection problem, + XInclude bug, Schemas context type (Dean Hill), validation fix (Derek + Poon), xmlTextReaderGetAttribute[Ns] namespaces (Rob Richards), Schemas + type fix (Kuba Nowakowski), UTF-8 parser bug, error in encoding handling, + xmlGetLineNo fixes, bug on entities handling, entity name extraction in + error handling with XInclude, text nodes in HTML body tags (Gary Coady), + xml:id and IDness at the treee level fixes, XPath streaming patterns + bugs.
                      • improvements: structured interfaces for schemas and RNG error reports - (Marcus Boerger), optimization of the char data inner loop parsing - (thanks to Behdad Esfahbod for the idea), schematron validation - though not finished yet, xmlSaveOption to omit XML declaration, - keyref match error reports (Kasimier), formal expression handling - code not plugged yet, more lax mode for the HTML parser, - parser XML_PARSE_COMPACT option for text nodes allocation.
                      • + (Marcus Boerger), optimization of the char data inner loop parsing + (thanks to Behdad Esfahbod for the idea), schematron validation though + not finished yet, xmlSaveOption to omit XML declaration, keyref match + error reports (Kasimier), formal expression handling code not plugged + yet, more lax mode for the HTML parser, parser XML_PARSE_COMPACT option + for text nodes allocation.
                      • documentation: xmllint man page had --nonet duplicated
                      +

                      2.6.20: Jul 10 2005

                        -
                      • build fixes: Windows build (Rob Richards), Mingw compilation (Igor - Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and - andriy@google.com), use gcc weak references to pthread to avoid the - pthread dependancy on Linux, compilation problem (Steve Nairn), - compiling of subset (Morten Welinder), IPv6/ss_family compilation - (William Brack), compilation when disabling parts of the library, - standalone test distribution. -
                      • -
                      • bug fixes: bug in lang(), memory cleanup on errors (William Brack), - HTTP query strings (Aron Stansvik), memory leak in DTD (William), - integer overflow in XPath (William), nanoftp buffer size, pattern - "." apth fixup (Kasimier), leak in tree reported by Malcolm Rowe, - replaceNode patch (Brent Hendricks), CDATA with NULL content - (Mark Vakoc), xml:base fixup on XInclude (William), pattern - fixes (William), attribute bug in exclusive c14n (Aleksey Sanin), - xml:space and xml:lang with SAX2 (Rob Richards), namespace - trouble in complex parsing (Malcolm Rowe), XSD type QNames fixes - (Kasimier), XPath streaming fixups (William), RelaxNG bug (Rob Richards), - Schemas for Schemas fixes (Kasimier), removal of ID (Rob Richards), - a small RelaxNG leak, HTML parsing in push mode bug (James Bursa), - failure to detect UTF-8 parsing bugs in CDATA sections, areBlanks() - heuristic failure, duplicate attributes in DTD bug (William). -
                      • -
                      • improvements: lot of work on Schemas by Kasimier Buchcik both on - conformance and streaming, Schemas validation messages (Kasimier - Buchcik, Matthew Burgess), namespace removal at the python level - (Brent Hendricks), Update to new Schemas regression tests from - W3C/Nist (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation - of xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert), - standalone test framework and programs, new DOM import APIs - xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and - xmlDOMWrapRemoveNode(), extension of xmllint capabilities for - SAX and Schemas regression tests, xmlStopParser() available in - pull mode too, ienhancement to xmllint --shell namespaces support, - Windows port of the standalone testing tools (Kasimier and William), - xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() - SAX Schemas APIs, Schemas xmlReader support. -
                      • +
                      • build fixes: Windows build (Rob Richards), Mingw compilation (Igor + Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and + andriy@google.com), use gcc weak references to pthread to avoid the + pthread dependancy on Linux, compilation problem (Steve Nairn), compiling + of subset (Morten Welinder), IPv6/ss_family compilation (William Brack), + compilation when disabling parts of the library, standalone test + distribution.
                      • +
                      • bug fixes: bug in lang(), memory cleanup on errors (William Brack), + HTTP query strings (Aron Stansvik), memory leak in DTD (William), integer + overflow in XPath (William), nanoftp buffer size, pattern "." apth fixup + (Kasimier), leak in tree reported by Malcolm Rowe, replaceNode patch + (Brent Hendricks), CDATA with NULL content (Mark Vakoc), xml:base fixup + on XInclude (William), pattern fixes (William), attribute bug in + exclusive c14n (Aleksey Sanin), xml:space and xml:lang with SAX2 (Rob + Richards), namespace trouble in complex parsing (Malcolm Rowe), XSD type + QNames fixes (Kasimier), XPath streaming fixups (William), RelaxNG bug + (Rob Richards), Schemas for Schemas fixes (Kasimier), removal of ID (Rob + Richards), a small RelaxNG leak, HTML parsing in push mode bug (James + Bursa), failure to detect UTF-8 parsing bugs in CDATA sections, + areBlanks() heuristic failure, duplicate attributes in DTD bug + (William).
                      • +
                      • improvements: lot of work on Schemas by Kasimier Buchcik both on + conformance and streaming, Schemas validation messages (Kasimier Buchcik, + Matthew Burgess), namespace removal at the python level (Brent + Hendricks), Update to new Schemas regression tests from W3C/Nist + (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation of + xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert), + standalone test framework and programs, new DOM import APIs + xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and + xmlDOMWrapRemoveNode(), extension of xmllint capabilities for SAX and + Schemas regression tests, xmlStopParser() available in pull mode too, + ienhancement to xmllint --shell namespaces support, Windows port of the + standalone testing tools (Kasimier and William), + xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() SAX + Schemas APIs, Schemas xmlReader support.
                      +

                      2.6.19: Apr 02 2005

                        -
                      • build fixes: drop .la from RPMs, --with-minimum build fix (William - Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with - AIX 5.3 compiler, fixed elfgcchack.h generation and PLT reduction - code on Linux/ELF/gcc4
                      • -
                      • bug fixes: schemas type decimal fixups (William Brack), xmmlint return - code (Gerry Murphy), small schemas fixes (Matthew Burgess and - GUY Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey - Sanin), segfault in Schemas (Kasimier Buchcik), Schemas attribute - validation (Kasimier), Prop related functions and xmlNewNodeEatName - (Rob Richards), HTML serialization of name attribute on a elements, - Python error handlers leaks and improvement (Brent Hendricks), - uninitialized variable in encoding code, Relax-NG validation bug, - potential crash if gnorableWhitespace is NULL, xmlSAXParseDoc and - xmlParseDoc signatures, switched back to assuming UTF-8 in case - no encoding is given at serialization time
                      • -
                      • improvements: lot of work on Schemas by Kasimier Buchcik on facets - checking and also mixed handling.
                      • +
                      • build fixes: drop .la from RPMs, --with-minimum build fix (William + Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with AIX + 5.3 compiler, fixed elfgcchack.h generation and PLT reduction code on + Linux/ELF/gcc4
                      • +
                      • bug fixes: schemas type decimal fixups (William Brack), xmmlint return + code (Gerry Murphy), small schemas fixes (Matthew Burgess and GUY + Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey Sanin), + segfault in Schemas (Kasimier Buchcik), Schemas attribute validation + (Kasimier), Prop related functions and xmlNewNodeEatName (Rob Richards), + HTML serialization of name attribute on a elements, Python error handlers + leaks and improvement (Brent Hendricks), uninitialized variable in + encoding code, Relax-NG validation bug, potential crash if + gnorableWhitespace is NULL, xmlSAXParseDoc and xmlParseDoc signatures, + switched back to assuming UTF-8 in case no encoding is given at + serialization time
                      • +
                      • improvements: lot of work on Schemas by Kasimier Buchcik on facets + checking and also mixed handling.
                      +

                      2.6.18: Mar 13 2005

                        -
                      • build fixes: warnings (Peter Breitenlohner), testapi.c generation, - Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed), - some gcc4 fixes, HP-UX portability fixes (Rick Jones).
                      • -
                      • bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and - xmlreader stopping on non-fatal errors, thread support for dictionnaries - reference counting (Gary Coady), internal subset and push problem, - URL saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python - paths fixup (Stephane Bidoul), xmlGetNodePath and namespaces, - xmlSetNsProp fix (Mike Hommey), warning should not count as error - (William Brack), xmlCreatePushParser empty chunk, XInclude parser - flags (William), cleanup FTP and HTTP code to reuse the uri parsing - and IPv6 (William), xmlTextWriterStartAttributeNS fix (Rob Richards), - XMLLINT_INDENT being empty (William), xmlWriter bugs (Rob Richards), - multithreading on Windows (Rich Salz), xmlSearchNsByHref fix (Kasimier), - Python binding leak (Brent Hendricks), aliasing bug exposed by gcc4 - on s390, xmlTextReaderNext bug (Rob Richards), Schemas decimal type - fixes (William Brack), xmlByteConsumed static buffer (Ben Maurer).
                      • -
                      • improvement: speedup parsing comments and DTDs, dictionnary support for - hash tables, Schemas Identity constraints (Kasimier), streaming XPath - subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical - values handling (Kasimier), add xmlTextReaderByteConsumed (Aron - Stansvik),
                      • -
                      • Documentation: Wiki support (Joel Reed) +
                      • build fixes: warnings (Peter Breitenlohner), testapi.c generation, + Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed), + some gcc4 fixes, HP-UX portability fixes (Rick Jones).
                      • +
                      • bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and + xmlreader stopping on non-fatal errors, thread support for dictionnaries + reference counting (Gary Coady), internal subset and push problem, URL + saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python paths + fixup (Stephane Bidoul), xmlGetNodePath and namespaces, xmlSetNsProp fix + (Mike Hommey), warning should not count as error (William Brack), + xmlCreatePushParser empty chunk, XInclude parser flags (William), cleanup + FTP and HTTP code to reuse the uri parsing and IPv6 (William), + xmlTextWriterStartAttributeNS fix (Rob Richards), XMLLINT_INDENT being + empty (William), xmlWriter bugs (Rob Richards), multithreading on Windows + (Rich Salz), xmlSearchNsByHref fix (Kasimier), Python binding leak (Brent + Hendricks), aliasing bug exposed by gcc4 on s390, xmlTextReaderNext bug + (Rob Richards), Schemas decimal type fixes (William Brack), + xmlByteConsumed static buffer (Ben Maurer).
                      • +
                      • improvement: speedup parsing comments and DTDs, dictionnary support for + hash tables, Schemas Identity constraints (Kasimier), streaming XPath + subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical + values handling (Kasimier), add xmlTextReaderByteConsumed (Aron + Stansvik),
                      • +
                      • Documentation: Wiki support (Joel Reed)
                      +

                      2.6.17: Jan 16 2005

                        -
                      • build fixes: Windows, warnings removal (William Brack), - maintainer-clean dependency(William), build in a different directory - (William), fixing --with-minimum configure build (William), BeOS - build (Marcin Konicki), Python-2.4 detection (William), compilation - on AIX (Dan McNichol)
                      • +
                      • build fixes: Windows, warnings removal (William Brack), + maintainer-clean dependency(William), build in a different directory + (William), fixing --with-minimum configure build (William), BeOS build + (Marcin Konicki), Python-2.4 detection (William), compilation on AIX (Dan + McNichol)
                      • bug fixes: xmlTextReaderHasAttributes (Rob Richards), xmlCtxtReadFile() - to use the catalog(s), loop on output (William Brack), XPath memory leak, - ID deallocation problem (Steve Shepard), debugDumpNode crash (William), - warning not using error callback (William), xmlStopParser bug (William), - UTF-16 with BOM on DTDs (William), namespace bug on empty elements - in push mode (Rob Richards), line and col computations fixups (Aleksey - Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William), - patterns with too many steps, bug in RNG choice optimization, line - number sometimes missing. -
                      • -
                      • improvements: XSD Schemas (Kasimier Buchcik), python generator (William), - xmlUTF8Strpos speedup (William), unicode Python strings (William), - XSD error reports (Kasimier Buchcik), Python __str__ call serialize(). -
                      • -
                      • new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber - for the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs - (mostly Joel Reed), error extraction API from regexps, new XMLSave - option for format (Phil Shafer)
                      • -
                      • documentation: site improvement (John Fleck), FAQ entries (William).
                      • + to use the catalog(s), loop on output (William Brack), XPath memory leak, + ID deallocation problem (Steve Shepard), debugDumpNode crash (William), + warning not using error callback (William), xmlStopParser bug (William), + UTF-16 with BOM on DTDs (William), namespace bug on empty elements in + push mode (Rob Richards), line and col computations fixups (Aleksey + Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William), + patterns with too many steps, bug in RNG choice optimization, line number + sometimes missing. +
                      • improvements: XSD Schemas (Kasimier Buchcik), python generator + (William), xmlUTF8Strpos speedup (William), unicode Python strings + (William), XSD error reports (Kasimier Buchcik), Python __str__ call + serialize().
                      • +
                      • new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber for + the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs (mostly Joel + Reed), error extraction API from regexps, new XMLSave option for format + (Phil Shafer)
                      • +
                      • documentation: site improvement (John Fleck), FAQ entries + (William).

                      2.6.16: Nov 10 2004

                      @@ -899,7 +956,7 @@ to the CVS code base.

                    • documentation: fix to xmllint man page, some API function descritpion were updated.
                    • improvements: DTD validation APIs provided at the Python level (Brent - Hendricks)
                    • + Hendricks)

                    2.6.15: Oct 27 2004

                    @@ -2443,10 +2500,9 @@ or libxslt wrappers or bindings:

                  • Uwe Fechner also provides idom2, a DOM2 implementation for Kylix2/D5/D6 from Borland.
                  • -
                  • There is bindings for Ruby and - libxml2 bindings are also available in Ruby through the libgdome-ruby module +
                  • There is bindings + for Ruby and libxml2 bindings are also available in Ruby through the + libgdome-ruby module maintained by Tobias Peters.
                  • Steve Ball and contributors maintains libxml2 and libxslt bindings for @@ -2457,14 +2513,15 @@ or libxslt wrappers or bindings:

                    libxslt as part of GNU ClasspathX project.
                  • Patrick McPhee provides Rexx bindings fof libxml2 and libxslt, look for RexxXML.
                  • -
                  • Satimage +
                  • Satimage provides XMLLib osax. This is an osax for Mac OS X with a set of commands to implement in AppleScript the XML DOM, XPATH and XSLT. Also includes commands for Property-lists (Apple's fast lookup table XML format.)
                  • -
                  • Francesco Montorsi developped -wxXml2 +
                  • Francesco Montorsi developped wxXml2 wrappers that interface libxml2, allowing wxWidgets applications to load/save/edit XML instances.
                  @@ -2474,10 +2531,11 @@ to be maintained as part of the library in the future, though the Python interface have not yet reached the completeness of the C API.

                  Note that some of the Python purist dislike the default set of Python -bindings, rather than complaining I suggest they have a look at -lxml the more pythonic bindings for libxml2 and libxslt and -help Martijn Faassen -complete those.

                  +bindings, rather than complaining I suggest they have a look at lxml the more pythonic bindings for libxml2 +and libxslt and help Martijn +Faassen complete those.

                  Stéphane Bidoul maintains a Windows port @@ -3251,12 +3309,13 @@ of a number of things:

                  is I18N) , Unicode, characters and glyphs, I suggest you read a presentation by Tim Bray on Unicode and why you should care about it.

                  +

                  If you don't understand why it does not make sense to have a string -without knowing what encoding it uses, then as Joel Spolsky said -please do -not write another line of code until you finish reading that article.. -It is a prerequisite to understand this page, and avoid a lot of problems -with libxml2, XML or text processing in general.

                  +without knowing what encoding it uses, then as Joel Spolsky said please do not +write another line of code until you finish reading that article.. It is +a prerequisite to understand this page, and avoid a lot of problems with +libxml2, XML or text processing in general.

                  Table of Content:

                    @@ -3452,7 +3511,7 @@ encoding:

                    <très>là</très> ~/XML -> ./xmllint --encode UTF-8 isolat1 <?xml version="1.0" encoding="UTF-8"?> -<très>là  </très> +<très>là  </très> ~/XML ->

                    The same processing is applied (and reuse most of the code) for HTML I18N @@ -3482,6 +3541,14 @@ linux machine with glibc-2.1 the list of supported encodings and aliases fill 3 full pages, and include UCS-4, the full set of ISO-Latin encodings, and the various Japanese ones.

                    +

                    To convert from the UTF-8 values returned from the API to another encoding +then it is possible to use the function provided from the encoding module like UTF8Toisolat1, or use the +POSIX iconv() +API directly.

                    +

                    Encoding aliases

                    From 2.2.3, libxml2 has support to register encoding names aliases. The @@ -3666,19 +3733,19 @@ new output handler with the closing call deactivated:

                    the file:
                    xmlOutputBufferPtr
                     xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) {
                    -    xmlOutputBufferPtr ret;
                    -    
                    -    if (xmlOutputCallbackInitialized == 0)
                    -        xmlRegisterDefaultOutputCallbacks();
                    -
                    -    if (file == NULL) return(NULL);
                    -    ret = xmlAllocOutputBuffer(encoder);
                    -    if (ret != NULL) {
                    -        ret->context = file;
                    -        ret->writecallback = xmlFileWrite;
                    -        ret->closecallback = NULL;  /* No close callback */
                    -    }
                    -    return(ret);
                    +    xmlOutputBufferPtr ret;
                    +    
                    +    if (xmlOutputCallbackInitialized == 0)
                    +        xmlRegisterDefaultOutputCallbacks();
                    +
                    +    if (file == NULL) return(NULL);
                    +    ret = xmlAllocOutputBuffer(encoder);
                    +    if (ret != NULL) {
                    +        ret->context = file;
                    +        ret->writecallback = xmlFileWrite;
                    +        ret->closecallback = NULL;  /* No close callback */
                    +    }
                    +    return(ret);
                     } 
                  1. And then use it to save the document: @@ -4844,10 +4911,9 @@ Gnome CVS base under gnome-xml/example

                    XML Canonicalization and XML Digital Signature implementations for libxml2
                  2. -
                  3. Steve Ball - and contributors maintain tcl bindings for libxml2 and - libxslt, as well as Steve Ball and + contributors maintain tcl + bindings for libxml2 and libxslt, as well as tkxmllint a GUI for xmllint and tkxsltproc a GUI for xsltproc.
                  4. diff --git a/doc/xmldtd.html b/doc/xmldtd.html index 45eb249..2e0caf9 100644 --- a/doc/xmldtd.html +++ b/doc/xmldtd.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Validation & DTDs
                    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                    Made with Libxml2 Logo

                    The XML C parser and toolkit of Gnome

                    Validation & DTDs

                    Main Menu
                    Related links

                    Table of Content:

                    1. General overview
                    2. +Validation & DTDs
                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                      Made with Libxml2 Logo

                      The XML C parser and toolkit of Gnome

                      Validation & DTDs

                      Main Menu
                      Related links

                      Table of Content:

                      1. General overview
                      2. The definition
                      3. Simple rules
                        1. How to reference a DTD from a document
                        2. diff --git a/doc/xmlreader.html b/doc/xmlreader.html index db711b8..b8382a8 100644 --- a/doc/xmlreader.html +++ b/doc/xmlreader.html @@ -466,9 +466,9 @@ affects the Read() ones, however usually once processed the full subtree is not useful anymore, and the Next() operation allows to skip it completely and process to the successor or return 0 if the document end is reached.

                          -

                          Daniel Veillard

                          +

                          Daniel Veillard

                          -

                          $Id: xmlreader.html,v 1.8 2003/11/05 04:15:16 jfleck Exp $

                          +

                          $Id: xmlreader.html,v 1.9 2005/10/18 19:11:54 veillard Exp $

                          diff --git a/elfgcchack.h b/elfgcchack.h index 44ab139..66e056c 100644 --- a/elfgcchack.h +++ b/elfgcchack.h @@ -301,6 +301,18 @@ extern __typeof (htmlDocDumpMemory) htmlDocDumpMemory__internal_alias __attribut #endif #endif +#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) +#ifdef bottom_HTMLtree +#undef htmlDocDumpMemoryFormat +extern __typeof (htmlDocDumpMemoryFormat) htmlDocDumpMemoryFormat __attribute((alias("htmlDocDumpMemoryFormat__internal_alias"))); +#else +#ifndef htmlDocDumpMemoryFormat +extern __typeof (htmlDocDumpMemoryFormat) htmlDocDumpMemoryFormat__internal_alias __attribute((visibility("hidden"))); +#define htmlDocDumpMemoryFormat htmlDocDumpMemoryFormat__internal_alias +#endif +#endif +#endif + #if defined(LIBXML_HTML_ENABLED) #ifdef bottom_HTMLparser #undef htmlElementAllowedHere @@ -6571,6 +6583,18 @@ extern __typeof (xmlOutputBufferClose) xmlOutputBufferClose__internal_alias __at #endif #endif +#if defined(LIBXML_OUTPUT_ENABLED) +#ifdef bottom_xmlIO +#undef xmlOutputBufferCreateBuffer +extern __typeof (xmlOutputBufferCreateBuffer) xmlOutputBufferCreateBuffer __attribute((alias("xmlOutputBufferCreateBuffer__internal_alias"))); +#else +#ifndef xmlOutputBufferCreateBuffer +extern __typeof (xmlOutputBufferCreateBuffer) xmlOutputBufferCreateBuffer__internal_alias __attribute((visibility("hidden"))); +#define xmlOutputBufferCreateBuffer xmlOutputBufferCreateBuffer__internal_alias +#endif +#endif +#endif + #if defined(LIBXML_OUTPUT_ENABLED) #ifdef bottom_xmlIO #undef xmlOutputBufferCreateFd @@ -9153,6 +9177,18 @@ extern __typeof (xmlSaveSetEscape) xmlSaveSetEscape__internal_alias __attribute( #endif #endif +#if defined(LIBXML_OUTPUT_ENABLED) +#ifdef bottom_xmlsave +#undef xmlSaveToBuffer +extern __typeof (xmlSaveToBuffer) xmlSaveToBuffer __attribute((alias("xmlSaveToBuffer__internal_alias"))); +#else +#ifndef xmlSaveToBuffer +extern __typeof (xmlSaveToBuffer) xmlSaveToBuffer__internal_alias __attribute((visibility("hidden"))); +#define xmlSaveToBuffer xmlSaveToBuffer__internal_alias +#endif +#endif +#endif + #if defined(LIBXML_OUTPUT_ENABLED) #ifdef bottom_xmlsave #undef xmlSaveToFd @@ -9679,6 +9715,18 @@ extern __typeof (xmlSchemaSetParserErrors) xmlSchemaSetParserErrors__internal_al #endif #endif +#if defined(LIBXML_SCHEMAS_ENABLED) +#ifdef bottom_xmlschemas +#undef xmlSchemaSetParserStructuredErrors +extern __typeof (xmlSchemaSetParserStructuredErrors) xmlSchemaSetParserStructuredErrors __attribute((alias("xmlSchemaSetParserStructuredErrors__internal_alias"))); +#else +#ifndef xmlSchemaSetParserStructuredErrors +extern __typeof (xmlSchemaSetParserStructuredErrors) xmlSchemaSetParserStructuredErrors__internal_alias __attribute((visibility("hidden"))); +#define xmlSchemaSetParserStructuredErrors xmlSchemaSetParserStructuredErrors__internal_alias +#endif +#endif +#endif + #if defined(LIBXML_SCHEMAS_ENABLED) #ifdef bottom_xmlschemas #undef xmlSchemaSetValidErrors @@ -11423,7 +11471,7 @@ extern __typeof (xmlTextReaderReadAttributeValue) xmlTextReaderReadAttributeValu #endif #endif -#if defined(LIBXML_READER_ENABLED) +#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) #ifdef bottom_xmlreader #undef xmlTextReaderReadInnerXml extern __typeof (xmlTextReaderReadInnerXml) xmlTextReaderReadInnerXml __attribute((alias("xmlTextReaderReadInnerXml__internal_alias"))); @@ -11435,7 +11483,7 @@ extern __typeof (xmlTextReaderReadInnerXml) xmlTextReaderReadInnerXml__internal_ #endif #endif -#if defined(LIBXML_READER_ENABLED) +#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) #ifdef bottom_xmlreader #undef xmlTextReaderReadOuterXml extern __typeof (xmlTextReaderReadOuterXml) xmlTextReaderReadOuterXml __attribute((alias("xmlTextReaderReadOuterXml__internal_alias"))); @@ -11507,6 +11555,18 @@ extern __typeof (xmlTextReaderSchemaValidate) xmlTextReaderSchemaValidate__inter #endif #endif +#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) +#ifdef bottom_xmlreader +#undef xmlTextReaderSchemaValidateCtxt +extern __typeof (xmlTextReaderSchemaValidateCtxt) xmlTextReaderSchemaValidateCtxt __attribute((alias("xmlTextReaderSchemaValidateCtxt__internal_alias"))); +#else +#ifndef xmlTextReaderSchemaValidateCtxt +extern __typeof (xmlTextReaderSchemaValidateCtxt) xmlTextReaderSchemaValidateCtxt__internal_alias __attribute((visibility("hidden"))); +#define xmlTextReaderSchemaValidateCtxt xmlTextReaderSchemaValidateCtxt__internal_alias +#endif +#endif +#endif + #if defined(LIBXML_READER_ENABLED) #ifdef bottom_xmlreader #undef xmlTextReaderSetErrorHandler diff --git a/error.c b/error.c index ce63071..722ffbb 100644 --- a/error.c +++ b/error.c @@ -21,7 +21,7 @@ void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED, ...); #define XML_GET_VAR_STR(msg, str) { \ - int size; \ + int size, prev_size = -1; \ int chars; \ char *larger; \ va_list ap; \ @@ -35,8 +35,13 @@ void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED, va_start(ap, msg); \ chars = vsnprintf(str, size, msg, ap); \ va_end(ap); \ - if ((chars > -1) && (chars < size)) \ - break; \ + if ((chars > -1) && (chars < size)) { \ + if (prev_size == chars) { \ + break; \ + } else { \ + prev_size = chars; \ + } \ + } \ if (chars > -1) \ size += chars + 1; \ else \ @@ -293,8 +298,6 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str, if (name != NULL) { channel(data, "element %s: ", name); } - if (code == XML_ERR_OK) - return; switch (domain) { case XML_FROM_PARSER: channel(data, "parser "); @@ -360,8 +363,6 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str, default: break; } - if (code == XML_ERR_OK) - return; switch (level) { case XML_ERR_NONE: channel(data, ": "); @@ -376,8 +377,6 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str, channel(data, "error : "); break; } - if (code == XML_ERR_OK) - return; if (str != NULL) { int len; len = xmlStrlen((const xmlChar *)str); @@ -388,8 +387,6 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str, } else { channel(data, "%s\n", "out of memory error"); } - if (code == XML_ERR_OK) - return; if (ctxt != NULL) { xmlParserPrintFileContextInternal(input, channel, data); diff --git a/gentest.py b/gentest.py index af76b04..8c143af 100755 --- a/gentest.py +++ b/gentest.py @@ -46,6 +46,7 @@ modules_defines = { "DOCBparser" : "LIBXML_DOCB_ENABLED", "xmlmodule" : "LIBXML_MODULES_ENABLED", "pattern" : "LIBXML_PATTERN_ENABLED", + "schematron" : "LIBXML_SCHEMATRON_ENABLED", } # diff --git a/include/libxml/HTMLtree.h b/include/libxml/HTMLtree.h index 50b8544..6ea8207 100644 --- a/include/libxml/HTMLtree.h +++ b/include/libxml/HTMLtree.h @@ -75,6 +75,11 @@ XMLPUBFUN void XMLCALL htmlDocDumpMemory (xmlDocPtr cur, xmlChar **mem, int *size); +XMLPUBFUN void XMLCALL + htmlDocDumpMemoryFormat (xmlDocPtr cur, + xmlChar **mem, + int *size, + int format); XMLPUBFUN int XMLCALL htmlDocDump (FILE *f, xmlDocPtr cur); diff --git a/include/libxml/pattern.h b/include/libxml/pattern.h index 1aa6704..97d2cd2 100644 --- a/include/libxml/pattern.h +++ b/include/libxml/pattern.h @@ -74,6 +74,11 @@ XMLPUBFUN xmlStreamCtxtPtr XMLCALL xmlPatternGetStreamCtxt (xmlPatternPtr comp); XMLPUBFUN void XMLCALL xmlFreeStreamCtxt (xmlStreamCtxtPtr stream); +XMLPUBFUN int XMLCALL + xmlStreamPushNode (xmlStreamCtxtPtr stream, + const xmlChar *name, + const xmlChar *ns, + int nodeType); XMLPUBFUN int XMLCALL xmlStreamPush (xmlStreamCtxtPtr stream, const xmlChar *name, @@ -84,6 +89,8 @@ XMLPUBFUN int XMLCALL const xmlChar *ns); XMLPUBFUN int XMLCALL xmlStreamPop (xmlStreamCtxtPtr stream); +XMLPUBFUN int XMLCALL + xmlStreamWantsAnyNode (xmlStreamCtxtPtr stream); #ifdef __cplusplus } #endif diff --git a/include/libxml/schemasInternals.h b/include/libxml/schemasInternals.h index 384758d..b68a6e1 100644 --- a/include/libxml/schemasInternals.h +++ b/include/libxml/schemasInternals.h @@ -2,6 +2,8 @@ * Summary: internal interfaces for XML Schemas * Description: internal interfaces for the XML Schemas handling * and schema validity checking + * The Schemas development is a Work In Progress. + * Some of those interfaces are not garanteed to be API or ABI stable ! * * Copy: See Copyright for the status of this software. * @@ -103,6 +105,7 @@ typedef enum { XML_SCHEMA_TYPE_IDC_KEY, XML_SCHEMA_TYPE_IDC_KEYREF, XML_SCHEMA_TYPE_PARTICLE = 25, + XML_SCHEMA_TYPE_ATTRIBUTE_USE, XML_SCHEMA_FACET_MININCLUSIVE = 1000, XML_SCHEMA_FACET_MINEXCLUSIVE, XML_SCHEMA_FACET_MAXINCLUSIVE, @@ -115,7 +118,8 @@ typedef enum { XML_SCHEMA_FACET_LENGTH, XML_SCHEMA_FACET_MAXLENGTH, XML_SCHEMA_FACET_MINLENGTH, - XML_SCHEMA_EXTRA_QNAMEREF = 2000 + XML_SCHEMA_EXTRA_QNAMEREF = 2000, + XML_SCHEMA_EXTRA_ATTR_USE_PROHIB } xmlSchemaTypeType; typedef enum { @@ -124,7 +128,7 @@ typedef enum { XML_SCHEMA_CONTENT_ELEMENTS, XML_SCHEMA_CONTENT_MIXED, XML_SCHEMA_CONTENT_SIMPLE, - XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* obsolete, not used */ + XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* Obsolete */ XML_SCHEMA_CONTENT_BASIC, XML_SCHEMA_CONTENT_ANY } xmlSchemaContentType; @@ -242,31 +246,32 @@ struct _xmlSchemaAnnot { typedef struct _xmlSchemaAttribute xmlSchemaAttribute; typedef xmlSchemaAttribute *xmlSchemaAttributePtr; struct _xmlSchemaAttribute { - xmlSchemaTypeType type; /* The kind of type */ - struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */ - const xmlChar *name; /* name of the declaration or empty if particle */ - const xmlChar *id; - const xmlChar *ref; /* the local name of the attribute decl. if a particle */ - const xmlChar *refNs; /* the ns URI of the attribute decl. if a particle */ + xmlSchemaTypeType type; + struct _xmlSchemaAttribute *next; /* the next attribute (not used?) */ + const xmlChar *name; /* the name of the declaration */ + const xmlChar *id; /* Deprecated; not used */ + const xmlChar *ref; /* Deprecated; not used */ + const xmlChar *refNs; /* Deprecated; not used */ const xmlChar *typeName; /* the local name of the type definition */ const xmlChar *typeNs; /* the ns URI of the type definition */ xmlSchemaAnnotPtr annot; - xmlSchemaTypePtr base; /* obsolete, not used */ - int occurs; - const xmlChar *defValue; + xmlSchemaTypePtr base; /* Deprecated; not used */ + int occurs; /* Deprecated; not used */ + const xmlChar *defValue; /* The initial value of the value constraint */ xmlSchemaTypePtr subtypes; /* the type definition */ xmlNodePtr node; const xmlChar *targetNamespace; int flags; - const xmlChar *refPrefix; - xmlSchemaValPtr defVal; - xmlSchemaAttributePtr refDecl; + const xmlChar *refPrefix; /* Deprecated; not used */ + xmlSchemaValPtr defVal; /* The compiled value constraint */ + xmlSchemaAttributePtr refDecl; /* Deprecated; not used */ }; /** * xmlSchemaAttributeLink: * Used to build a list of attribute uses on complexType definitions. + * WARNING: Deprecated; not used. */ typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink; typedef xmlSchemaAttributeLink *xmlSchemaAttributeLinkPtr; @@ -301,11 +306,11 @@ typedef struct _xmlSchemaWildcard xmlSchemaWildcard; typedef xmlSchemaWildcard *xmlSchemaWildcardPtr; struct _xmlSchemaWildcard { xmlSchemaTypeType type; /* The kind of type */ - const xmlChar *id; + const xmlChar *id; /* Deprecated; not used */ xmlSchemaAnnotPtr annot; xmlNodePtr node; - int minOccurs; - int maxOccurs; + int minOccurs; /* Deprecated; not used */ + int maxOccurs; /* Deprecated; not used */ int processContents; int any; /* Indicates if the ns constraint is of ##any */ xmlSchemaWildcardNsPtr nsSet; /* The list of allowed namespaces */ @@ -332,6 +337,19 @@ struct _xmlSchemaWildcard { */ #define XML_SCHEMAS_ATTRGROUP_MARKED 1 << 2 +/** + * XML_SCHEMAS_ATTRGROUP_REDEFINED: + * + * The attr group was redefined. + */ +#define XML_SCHEMAS_ATTRGROUP_REDEFINED 1 << 3 +/** + * XML_SCHEMAS_ATTRGROUP_HAS_REFS: + * + * Whether this attr. group contains attr. group references. + */ +#define XML_SCHEMAS_ATTRGROUP_HAS_REFS 1 << 4 + /** * An attribute group definition. * @@ -345,18 +363,18 @@ struct _xmlSchemaAttributeGroup { struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */ const xmlChar *name; const xmlChar *id; - const xmlChar *ref; - const xmlChar *refNs; + const xmlChar *ref; /* Deprecated; not used */ + const xmlChar *refNs; /* Deprecated; not used */ xmlSchemaAnnotPtr annot; - xmlSchemaAttributePtr attributes; + xmlSchemaAttributePtr attributes; /* Deprecated; not used */ xmlNodePtr node; int flags; xmlSchemaWildcardPtr attributeWildcard; - const xmlChar *refPrefix; - xmlSchemaAttributeGroupPtr refItem; /* The referenced attribute group */ + const xmlChar *refPrefix; /* Deprecated; not used */ + xmlSchemaAttributeGroupPtr refItem; /* Deprecated; not used */ const xmlChar *targetNamespace; - /* xmlSchemaAttributeGroupPtr redef;*/ /* Redefinitions */ + void *attrUses; }; /** @@ -368,7 +386,7 @@ typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink; typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr; struct _xmlSchemaTypeLink { struct _xmlSchemaTypeLink *next;/* the next type link ... */ - xmlSchemaTypePtr type;/* the linked type*/ + xmlSchemaTypePtr type;/* the linked type */ }; /** @@ -417,6 +435,9 @@ struct _xmlSchemaFacetLink { * XML_SCHEMAS_TYPE_VARIETY_ABSENT: * * the simpleType has a variety of "absent". + * TODO: Actually not necessary :-/, since if + * none of the variety flags occur then it's + * automatically absent. */ #define XML_SCHEMAS_TYPE_VARIETY_ABSENT 1 << 5 /** @@ -560,42 +581,57 @@ struct _xmlSchemaFacetLink { */ #define XML_SCHEMAS_TYPE_FIXUP_1 1 << 29 +/** + * XML_SCHEMAS_TYPE_REDEFINED: + * + * The type was redefined. + */ +#define XML_SCHEMAS_TYPE_REDEFINED 1 << 30 +/** + * XML_SCHEMAS_TYPE_REDEFINING: + * + * The type redefines an other type. + */ +/* #define XML_SCHEMAS_TYPE_REDEFINING 1 << 31 */ + /** * _xmlSchemaType: * * Schemas type definition. */ struct _xmlSchemaType { - xmlSchemaTypeType type; /* The kind of type */ - struct _xmlSchemaType *next;/* the next type if in a sequence ... */ + xmlSchemaTypeType type; /* The kind of type */ + struct _xmlSchemaType *next; /* the next type if in a sequence ... */ const xmlChar *name; - const xmlChar *id; - const xmlChar *ref; - const xmlChar *refNs; + const xmlChar *id ; /* Deprecated; not used */ + const xmlChar *ref; /* Deprecated; not used */ + const xmlChar *refNs; /* Deprecated; not used */ xmlSchemaAnnotPtr annot; xmlSchemaTypePtr subtypes; - xmlSchemaAttributePtr attributes; + xmlSchemaAttributePtr attributes; /* Deprecated; not used */ xmlNodePtr node; - int minOccurs; - int maxOccurs; + int minOccurs; /* Deprecated; not used */ + int maxOccurs; /* Deprecated; not used */ int flags; xmlSchemaContentType contentType; - const xmlChar *base; - const xmlChar *baseNs; - xmlSchemaTypePtr baseType; - xmlSchemaFacetPtr facets; - struct _xmlSchemaType *redef;/* possible redefinitions for the type */ - int recurse; - xmlSchemaAttributeLinkPtr attributeUses; + const xmlChar *base; /* Base type's local name */ + const xmlChar *baseNs; /* Base type's target namespace */ + xmlSchemaTypePtr baseType; /* The base type component */ + xmlSchemaFacetPtr facets; /* Local facets */ + struct _xmlSchemaType *redef; /* Deprecated; not used */ + int recurse; /* Obsolete */ + xmlSchemaAttributeLinkPtr *attributeUses; /* Deprecated; not used */ xmlSchemaWildcardPtr attributeWildcard; - int builtInType; - xmlSchemaTypeLinkPtr memberTypes; - xmlSchemaFacetLinkPtr facetSet; - const xmlChar *refPrefix; - xmlSchemaTypePtr contentTypeDef; - xmlRegexpPtr contModel; + int builtInType; /* Type of built-in types. */ + xmlSchemaTypeLinkPtr memberTypes; /* member-types if a union type. */ + xmlSchemaFacetLinkPtr facetSet; /* All facets (incl. inherited) */ + const xmlChar *refPrefix; /* Deprecated; not used */ + xmlSchemaTypePtr contentTypeDef; /* Used for the simple content of complex types. + Could we use @subtypes for this? */ + xmlRegexpPtr contModel; /* Holds the automaton of the content model */ const xmlChar *targetNamespace; + void *attrUses; }; /* @@ -727,18 +763,18 @@ struct _xmlSchemaType { typedef struct _xmlSchemaElement xmlSchemaElement; typedef xmlSchemaElement *xmlSchemaElementPtr; struct _xmlSchemaElement { - xmlSchemaTypeType type; /* The kind of type */ - struct _xmlSchemaType *next;/* the next type if in a sequence ... */ + xmlSchemaTypeType type; /* The kind of type */ + struct _xmlSchemaType *next; /* Not used? */ const xmlChar *name; - const xmlChar *id; - const xmlChar *ref; /* the local name of the element declaration if a particle */ - const xmlChar *refNs; /* the ns URI of the element declaration if a particle */ + const xmlChar *id; /* Deprecated; not used */ + const xmlChar *ref; /* Deprecated; not used */ + const xmlChar *refNs; /* Deprecated; not used */ xmlSchemaAnnotPtr annot; xmlSchemaTypePtr subtypes; /* the type definition */ xmlSchemaAttributePtr attributes; xmlNodePtr node; - int minOccurs; - int maxOccurs; + int minOccurs; /* Deprecated; not used */ + int maxOccurs; /* Deprecated; not used */ int flags; const xmlChar *targetNamespace; @@ -747,13 +783,14 @@ struct _xmlSchemaElement { const xmlChar *substGroup; const xmlChar *substGroupNs; const xmlChar *scope; - const xmlChar *value; - struct _xmlSchemaElement *refDecl; /* This will now be used for the substitution group affiliation */ - xmlRegexpPtr contModel; + const xmlChar *value; /* The original value of the value constraint. */ + struct _xmlSchemaElement *refDecl; /* This will now be used for the + substitution group affiliation */ + xmlRegexpPtr contModel; /* Obsolete for WXS, maybe used for RelaxNG */ xmlSchemaContentType contentType; - const xmlChar *refPrefix; - xmlSchemaValPtr defVal; - void *idcs; + const xmlChar *refPrefix; /* Deprecated; not used */ + xmlSchemaValPtr defVal; /* The compiled value contraint. */ + void *idcs; /* The identity-constraint defs */ }; /* @@ -786,14 +823,14 @@ struct _xmlSchemaElement { struct _xmlSchemaFacet { xmlSchemaTypeType type; /* The kind of type */ struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */ - const xmlChar *value; - const xmlChar *id; + const xmlChar *value; /* The original value */ + const xmlChar *id; /* Obsolete */ xmlSchemaAnnotPtr annot; xmlNodePtr node; - int fixed; + int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */ int whitespace; - xmlSchemaValPtr val; - xmlRegexpPtr regexp; + xmlSchemaValPtr val; /* The compiled value */ + xmlRegexpPtr regexp; /* The regex for patterns */ }; /** @@ -802,7 +839,7 @@ struct _xmlSchemaFacet { typedef struct _xmlSchemaNotation xmlSchemaNotation; typedef xmlSchemaNotation *xmlSchemaNotationPtr; struct _xmlSchemaNotation { - xmlSchemaTypeType type; /* The kind of type */ + xmlSchemaTypeType type; /* The kind of type */ const xmlChar *name; xmlSchemaAnnotPtr annot; const xmlChar *identifier; @@ -810,7 +847,7 @@ struct _xmlSchemaNotation { }; /* -* Actually all those flags used for the schema should sit +* TODO: Actually all those flags used for the schema should sit * on the schema parser context, since they are used only * during parsing an XML schema document, and not available * on the component level as per spec. @@ -884,10 +921,10 @@ struct _xmlSchemaNotation { * A Schemas definition */ struct _xmlSchema { - const xmlChar *name; /* schema name */ - const xmlChar *targetNamespace; /* the target namespace */ + const xmlChar *name; /* schema name */ + const xmlChar *targetNamespace; /* the target namespace */ const xmlChar *version; - const xmlChar *id; + const xmlChar *id; /* Obsolete */ xmlDocPtr doc; xmlSchemaAnnotPtr annot; int flags; @@ -906,8 +943,8 @@ struct _xmlSchema { void *includes; /* the includes, this is opaque for now */ int preserve; /* whether to free the document */ int counter; /* used to give ononymous components unique names */ - xmlHashTablePtr idcDef; - void *volatiles; /* Deprecated; not used anymore. */ + xmlHashTablePtr idcDef; /* All identity-constraint defs. */ + void *volatiles; /* Obsolete */ }; XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type); diff --git a/include/libxml/valid.h b/include/libxml/valid.h index d13e4eb..7492d28 100644 --- a/include/libxml/valid.h +++ b/include/libxml/valid.h @@ -410,7 +410,7 @@ XMLPUBFUN xmlElementPtr XMLCALL XMLPUBFUN int XMLCALL xmlValidGetPotentialChildren(xmlElementContent *ctree, - const xmlChar **list, + const xmlChar **names, int *len, int max); diff --git a/include/libxml/xmlIO.h b/include/libxml/xmlIO.h index e67b6e5..eea9ed6 100644 --- a/include/libxml/xmlIO.h +++ b/include/libxml/xmlIO.h @@ -231,6 +231,10 @@ XMLPUBFUN xmlOutputBufferPtr XMLCALL xmlOutputBufferCreateFile (FILE *file, xmlCharEncodingHandlerPtr encoder); +XMLPUBFUN xmlOutputBufferPtr XMLCALL + xmlOutputBufferCreateBuffer (xmlBufferPtr buffer, + xmlCharEncodingHandlerPtr encoder); + XMLPUBFUN xmlOutputBufferPtr XMLCALL xmlOutputBufferCreateFd (int fd, xmlCharEncodingHandlerPtr encoder); diff --git a/include/libxml/xmlerror.h b/include/libxml/xmlerror.h index bfe3c24..c83dc95 100644 --- a/include/libxml/xmlerror.h +++ b/include/libxml/xmlerror.h @@ -767,6 +767,11 @@ typedef enum { XML_SCHEMAP_WARN_UNLOCATED_SCHEMA, /* 3084 */ XML_SCHEMAP_WARN_ATTR_REDECL_PROH, /* 3085 */ XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, /* 3085 */ + XML_SCHEMAP_AG_PROPS_CORRECT, /* 3086 */ + XML_SCHEMAP_COS_CT_EXTENDS_1_2, /* 3087 */ + XML_SCHEMAP_AU_PROPS_CORRECT, /* 3088 */ + XML_SCHEMAP_A_PROPS_CORRECT_3, /* 3089 */ + XML_SCHEMAP_COS_ALL_LIMITED, /* 3090 */ XML_MODULE_OPEN = 4900, /* 4900 */ XML_MODULE_CLOSE, /* 4901 */ XML_CHECK_FOUND_ELEMENT = 5000, diff --git a/include/libxml/xmlreader.h b/include/libxml/xmlreader.h index f016546..1d12988 100644 --- a/include/libxml/xmlreader.h +++ b/include/libxml/xmlreader.h @@ -121,10 +121,15 @@ XMLPUBFUN void XMLCALL */ XMLPUBFUN int XMLCALL xmlTextReaderRead (xmlTextReaderPtr reader); + +#ifdef LIBXML_WRITER_ENABLED XMLPUBFUN xmlChar * XMLCALL xmlTextReaderReadInnerXml (xmlTextReaderPtr reader); + XMLPUBFUN xmlChar * XMLCALL xmlTextReaderReadOuterXml (xmlTextReaderPtr reader); +#endif + XMLPUBFUN xmlChar * XMLCALL xmlTextReaderReadString (xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL @@ -279,6 +284,10 @@ XMLPUBFUN int XMLCALL XMLPUBFUN int XMLCALL xmlTextReaderSchemaValidate (xmlTextReaderPtr reader, const char *xsd); +XMLPUBFUN int XMLCALL + xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader, + xmlSchemaValidCtxtPtr ctxt, + int options); XMLPUBFUN int XMLCALL xmlTextReaderSetSchema (xmlTextReaderPtr reader, xmlSchemaPtr schema); diff --git a/include/libxml/xmlregexp.h b/include/libxml/xmlregexp.h index a257bb4..022cd6a 100644 --- a/include/libxml/xmlregexp.h +++ b/include/libxml/xmlregexp.h @@ -183,12 +183,12 @@ XMLPUBFUN int XMLCALL XMLPUBFUN int XMLCALL xmlExpGetLanguage(xmlExpCtxtPtr ctxt, xmlExpNodePtr expr, - const xmlChar**list, + const xmlChar**langList, int len); XMLPUBFUN int XMLCALL xmlExpGetStart (xmlExpCtxtPtr ctxt, xmlExpNodePtr expr, - const xmlChar**list, + const xmlChar**tokList, int len); XMLPUBFUN xmlExpNodePtr XMLCALL xmlExpStringDerive(xmlExpCtxtPtr ctxt, diff --git a/include/libxml/xmlsave.h b/include/libxml/xmlsave.h index 766a2ac..c71c71a 100644 --- a/include/libxml/xmlsave.h +++ b/include/libxml/xmlsave.h @@ -45,14 +45,12 @@ XMLPUBFUN xmlSaveCtxtPtr XMLCALL xmlSaveToFilename (const char *filename, const char *encoding, int options); -/****** - Not yet implemented. XMLPUBFUN xmlSaveCtxtPtr XMLCALL xmlSaveToBuffer (xmlBufferPtr buffer, const char *encoding, int options); - ******/ + XMLPUBFUN xmlSaveCtxtPtr XMLCALL xmlSaveToIO (xmlOutputWriteCallback iowrite, xmlOutputCloseCallback ioclose, diff --git a/include/libxml/xmlschemas.h b/include/libxml/xmlschemas.h index ab47091..15faef5 100644 --- a/include/libxml/xmlschemas.h +++ b/include/libxml/xmlschemas.h @@ -113,6 +113,10 @@ XMLPUBFUN void XMLCALL xmlSchemaValidityErrorFunc err, xmlSchemaValidityWarningFunc warn, void *ctx); +XMLPUBFUN void XMLCALL + xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt, + xmlStructuredErrorFunc serror, + void *ctx); XMLPUBFUN int XMLCALL xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt, xmlSchemaValidityErrorFunc * err, @@ -140,7 +144,8 @@ XMLPUBFUN void XMLCALL void *ctx); XMLPUBFUN void XMLCALL xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt, - xmlStructuredErrorFunc serror, void *ctx); + xmlStructuredErrorFunc serror, + void *ctx); XMLPUBFUN int XMLCALL xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt, xmlSchemaValidityErrorFunc *err, diff --git a/include/libxml/xmlversion.h b/include/libxml/xmlversion.h index 77d6659..867c94d 100644 --- a/include/libxml/xmlversion.h +++ b/include/libxml/xmlversion.h @@ -29,28 +29,28 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); * * the version string like "1.2.3" */ -#define LIBXML_DOTTED_VERSION "2.6.22" +#define LIBXML_DOTTED_VERSION "2.6.23" /** * LIBXML_VERSION: * * the version number: 1.2.3 value is 1002003 */ -#define LIBXML_VERSION 20622 +#define LIBXML_VERSION 20623 /** * LIBXML_VERSION_STRING: * * the version number string, 1.2.3 value is "1002003" */ -#define LIBXML_VERSION_STRING "20622" +#define LIBXML_VERSION_STRING "20623" /** * LIBXML_VERSION_EXTRA: * * extra version information, used to show a CVS compilation */ -#define LIBXML_VERSION_EXTRA "-CVS2634" +#define LIBXML_VERSION_EXTRA "-CVS2717" /** * LIBXML_TEST_VERSION: @@ -58,7 +58,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); * Macro to check that the libxml version in use is compatible with * the version the software has been compiled against */ -#define LIBXML_TEST_VERSION xmlCheckVersion(20622); +#define LIBXML_TEST_VERSION xmlCheckVersion(20623); #ifndef VMS #if 0 diff --git a/include/libxml/xmlversion.h.in b/include/libxml/xmlversion.h.in index a628741..cf547dd 100644 --- a/include/libxml/xmlversion.h.in +++ b/include/libxml/xmlversion.h.in @@ -299,7 +299,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); * * Whether the runtime debugging is configured in */ -#if @WITH_MEM_DEBUG@ +#if @WITH_RUN_DEBUG@ #define LIBXML_DEBUG_RUNTIME #endif diff --git a/include/win32config.h b/include/win32config.h index 9c75afd..c61dfa9 100644 --- a/include/win32config.h +++ b/include/win32config.h @@ -84,10 +84,12 @@ static int isnan (double d) { #endif #endif /* _MSC_VER */ -#if defined(_MSC_VER) || defined(__MINGW32__) +#if defined(_MSC_VER) #define mkdir(p,m) _mkdir(p) #define snprintf _snprintf #define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a) +#elif defined(__MINGW32__) +#define mkdir(p,m) _mkdir(p) #endif /* Threading API to use should be specified here for compatibility reasons. diff --git a/include/wsockcompat.h b/include/wsockcompat.h index 690048c..a898b05 100644 --- a/include/wsockcompat.h +++ b/include/wsockcompat.h @@ -10,6 +10,18 @@ #else #undef HAVE_ERRNO_H #include +#include +/* Check if ws2tcpip.h is a recent version which provides getaddrinfo() */ +#if defined(GetAddrInfo) +#define HAVE_GETADDRINFO +#endif +#endif + +#ifdef __MINGW32__ +/* Include here to ensure that it doesn't get included later + * (e.g. by iconv.h) and overwrites the definition of EWOULDBLOCK. */ +#include +#undef EWOULDBLOCK #endif #if !defined SOCKLEN_T diff --git a/legacy.c b/legacy.c index bbbd2c9..e75178a 100644 --- a/legacy.c +++ b/legacy.c @@ -673,7 +673,6 @@ xmlHandleEntity(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED, * * Creation of a Namespace, the old way using PI and without scoping * DEPRECATED !!! - * It now create a namespace on the root element of the document if found. * Returns NULL this functionality had been removed */ xmlNsPtr diff --git a/libxml.3 b/libxml.3 index d46756f..88d3eee 100644 --- a/libxml.3 +++ b/libxml.3 @@ -53,7 +53,7 @@ library exports Push and Pull type parser interfaces for both XML and static library .TP .B /depot/lib/libxml_2.0.0/libxml.so -shareable library +shared library .TP .B /depot/package/libxml_2.0.0/bin/xmllint binary application for parsing XML files diff --git a/libxml.spec.in b/libxml.spec.in index 16c9888..bf5dd5f 100644 --- a/libxml.spec.in +++ b/libxml.spec.in @@ -60,36 +60,6 @@ at parse time or later once the document has been modified. %setup -q %build -# -# try to use compiler profiling, based on Arjan van de Ven -# initial test spec. This really doesn't work okay for most tests done. -# -# Well except it's just broken most of the time. -#GCC_VERSION=`gcc --version | grep "^gcc" | awk '{ print $3 }' | sed 's+\([0-9]\)\.\([0-9]\)\..*+\1\2+'` -#if [ $GCC_VERSION -ge 34 ] -#then -# PROF_GEN='-fprofile-generate' -# PROF_USE='-fprofile-use' -#fi -# -#if [ "$PROF_GEN" != "" ] -#then -# # First generate a profiling version -# CFLAGS="${RPM_OPT_FLAGS} ${PROF_GEN}" %configure -# make -# # Run a few sampling -# make dba100000.xml -# ./xmllint --noout dba100000.xml -# ./xmllint --stream dba100000.xml -# ./xmllint --noout --valid test/valid/REC-xml-19980210.xml -# ./xmllint --stream --valid test/valid/REC-xml-19980210.xml -# # Then generate code based on profile -# CFLAGS="${RPM_OPT_FLAGS} ${PROF_USE}" %configure -# make -#else -# %configure -# make -#fi %configure make gzip -9 ChangeLog diff --git a/libxml2.spec b/libxml2.spec index f3256d6..1df9897 100644 --- a/libxml2.spec +++ b/libxml2.spec @@ -1,6 +1,6 @@ Summary: Library providing XML and HTML support Name: libxml2 -Version: 2.6.22 +Version: 2.6.23 Release: 1 License: MIT Group: Development/Libraries @@ -60,36 +60,6 @@ at parse time or later once the document has been modified. %setup -q %build -# -# try to use compiler profiling, based on Arjan van de Ven -# initial test spec. This really doesn't work okay for most tests done. -# -# Well except it's just broken most of the time. -#GCC_VERSION=`gcc --version | grep "^gcc" | awk '{ print $3 }' | sed 's+\([0-9]\)\.\([0-9]\)\..*+\1\2+'` -#if [ $GCC_VERSION -ge 34 ] -#then -# PROF_GEN='-fprofile-generate' -# PROF_USE='-fprofile-use' -#fi -# -#if [ "$PROF_GEN" != "" ] -#then -# # First generate a profiling version -# CFLAGS="${RPM_OPT_FLAGS} ${PROF_GEN}" %configure -# make -# # Run a few sampling -# make dba100000.xml -# ./xmllint --noout dba100000.xml -# ./xmllint --stream dba100000.xml -# ./xmllint --noout --valid test/valid/REC-xml-19980210.xml -# ./xmllint --stream --valid test/valid/REC-xml-19980210.xml -# # Then generate code based on profile -# CFLAGS="${RPM_OPT_FLAGS} ${PROF_USE}" %configure -# make -#else -# %configure -# make -#fi %configure make gzip -9 ChangeLog @@ -157,8 +127,8 @@ rm -fr %{buildroot} %doc doc/python.html %changelog -* Mon Sep 12 2005 Daniel Veillard -- upstream release 2.6.22 see http://xmlsoft.org/news.html +* Thu Jan 5 2006 Daniel Veillard +- upstream release 2.6.23 see http://xmlsoft.org/news.html * Thu Jan 2 2003 Daniel Veillard - integrated drv_libxml2 xml.sax driver from Stéphane Bidoul diff --git a/macos/src/config-mac.h b/macos/src/config-mac.h index 7281426..e9a8f9d 100644 --- a/macos/src/config-mac.h +++ b/macos/src/config-mac.h @@ -177,15 +177,6 @@ /* Define if you have the header file. */ #undef HAVE_ZLIB_H -/* Define if you have the inet library (-linet). */ -#undef HAVE_LIBINET - -/* Define if you have the nsl library (-lnsl). */ -#undef HAVE_LIBNSL - -/* Define if you have the socket library (-lsocket). */ -#undef HAVE_LIBSOCKET - /* Name of package */ #define PACKAGE diff --git a/nanohttp.c b/nanohttp.c index 1244fe7..ae7923f 100644 --- a/nanohttp.c +++ b/nanohttp.c @@ -11,9 +11,6 @@ * daniel@veillard.com */ -/* TODO add compression support, Send the Accept- , and decompress on the - fly with ZLIB if found at compile-time */ - #define NEED_SOCKETS #define IN_LIBXML #include "libxml.h" @@ -66,6 +63,10 @@ #ifdef SUPPORT_IP6 #include #endif +#ifdef HAVE_ZLIB_H +#include +#endif + #ifdef VMS #include @@ -152,6 +153,10 @@ typedef struct xmlNanoHTTPCtxt { char *authHeader; /* contents of {WWW,Proxy}-Authenticate header */ char *encoding; /* encoding extracted from the contentType */ char *mimeType; /* Mime-Type extracted from the contentType */ +#ifdef HAVE_ZLIB_H + z_stream *strm; /* Zlib stream object */ + int usesGzip; /* "Content-Encoding: gzip" was detected */ +#endif } xmlNanoHTTPCtxt, *xmlNanoHTTPCtxtPtr; static int initialized = 0; @@ -413,6 +418,13 @@ xmlNanoHTTPFreeCtxt(xmlNanoHTTPCtxtPtr ctxt) { if (ctxt->mimeType != NULL) xmlFree(ctxt->mimeType); if (ctxt->location != NULL) xmlFree(ctxt->location); if (ctxt->authHeader != NULL) xmlFree(ctxt->authHeader); +#ifdef HAVE_ZLIB_H + if (ctxt->strm != NULL) { + inflateEnd(ctxt->strm); + xmlFree(ctxt->strm); + } +#endif + ctxt->state = XML_NANO_HTTP_NONE; if (ctxt->fd >= 0) closesocket(ctxt->fd); ctxt->fd = -1; @@ -752,6 +764,26 @@ xmlNanoHTTPScanAnswer(xmlNanoHTTPCtxtPtr ctxt, const char *line) { if (ctxt->authHeader != NULL) xmlFree(ctxt->authHeader); ctxt->authHeader = xmlMemStrdup(cur); +#ifdef HAVE_ZLIB_H + } else if ( !xmlStrncasecmp( BAD_CAST line, BAD_CAST"Content-Encoding:", 17) ) { + cur += 17; + while ((*cur == ' ') || (*cur == '\t')) cur++; + if ( !xmlStrncasecmp( BAD_CAST cur, BAD_CAST"gzip", 4) ) { + ctxt->usesGzip = 1; + + ctxt->strm = xmlMalloc(sizeof(z_stream)); + + if (ctxt->strm != NULL) { + ctxt->strm->zalloc = Z_NULL; + ctxt->strm->zfree = Z_NULL; + ctxt->strm->opaque = Z_NULL; + ctxt->strm->avail_in = 0; + ctxt->strm->next_in = Z_NULL; + + inflateInit2( ctxt->strm, 31 ); + } + } +#endif } else if ( !xmlStrncasecmp( BAD_CAST line, BAD_CAST"Content-Length:", 15) ) { cur += 15; ctxt->ContentLength = strtol( cur, NULL, 10 ); @@ -946,14 +978,21 @@ xmlNanoHTTPConnectHost(const char *host, int port) memset (&sockin, 0, sizeof(sockin)); #ifdef SUPPORT_IP6 memset (&sockin6, 0, sizeof(sockin6)); +#endif + +#if !defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && defined(RES_USE_INET6) if (have_ipv6 ()) -#if !defined(HAVE_GETADDRINFO) && defined(RES_USE_INET6) { if (!(_res.options & RES_INIT)) res_init(); _res.options |= RES_USE_INET6; } -#elif defined(HAVE_GETADDRINFO) +#endif + +#if defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && !defined(_WIN32) + if (have_ipv6 ()) +#endif +#if defined(HAVE_GETADDRINFO) && (defined(SUPPORT_IP6) || defined(_WIN32)) { int status; struct addrinfo hints, *res, *result; @@ -969,42 +1008,45 @@ xmlNanoHTTPConnectHost(const char *host, int port) } for (res = result; res; res = res->ai_next) { - if (res->ai_family == AF_INET || res->ai_family == AF_INET6) { - if (res->ai_family == AF_INET6) { - if (res->ai_addrlen > sizeof(sockin6)) { - __xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n"); - freeaddrinfo (result); - return (-1); - } - memcpy (&sockin6, res->ai_addr, res->ai_addrlen); - sockin6.sin6_port = htons (port); - addr = (struct sockaddr *)&sockin6; - } - else { - if (res->ai_addrlen > sizeof(sockin)) { - __xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n"); - freeaddrinfo (result); - return (-1); - } - memcpy (&sockin, res->ai_addr, res->ai_addrlen); - sockin.sin_port = htons (port); - addr = (struct sockaddr *)&sockin; + if (res->ai_family == AF_INET) { + if (res->ai_addrlen > sizeof(sockin)) { + __xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n"); + freeaddrinfo (result); + return (-1); } - - s = xmlNanoHTTPConnectAttempt (addr); - if (s != -1) { + memcpy (&sockin, res->ai_addr, res->ai_addrlen); + sockin.sin_port = htons (port); + addr = (struct sockaddr *)&sockin; +#ifdef SUPPORT_IP6 + } else if (have_ipv6 () && (res->ai_family == AF_INET6)) { + if (res->ai_addrlen > sizeof(sockin6)) { + __xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n"); freeaddrinfo (result); - return (s); + return (-1); } + memcpy (&sockin6, res->ai_addr, res->ai_addrlen); + sockin6.sin6_port = htons (port); + addr = (struct sockaddr *)&sockin6; +#endif + } else + continue; /* for */ + + s = xmlNanoHTTPConnectAttempt (addr); + if (s != -1) { + freeaddrinfo (result); + return (s); } } + if (result) freeaddrinfo (result); - return (-1); - } else + } #endif +#if defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && !defined(_WIN32) + else #endif - { +#if !defined(HAVE_GETADDRINFO) || !defined(_WIN32) + { h = gethostbyname (host); if (h == NULL) { @@ -1080,6 +1122,8 @@ xmlNanoHTTPConnectHost(const char *host, int port) return (s); } } +#endif + #ifdef DEBUG_HTTP xmlGenericError(xmlGenericErrorContext, "xmlNanoHTTPConnectHost: unable to connect to '%s'.\n", @@ -1144,11 +1188,38 @@ xmlNanoHTTPOpenRedir(const char *URL, char **contentType, char **redir) { int xmlNanoHTTPRead(void *ctx, void *dest, int len) { xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr) ctx; +#ifdef HAVE_ZLIB_H + int bytes_read = 0; + int orig_avail_in; + int z_ret; +#endif if (ctx == NULL) return(-1); if (dest == NULL) return(-1); if (len <= 0) return(0); +#ifdef HAVE_ZLIB_H + if (ctxt->usesGzip == 1) { + if (ctxt->strm == NULL) return(0); + + ctxt->strm->next_out = dest; + ctxt->strm->avail_out = len; + + do { + orig_avail_in = ctxt->strm->avail_in = ctxt->inptr - ctxt->inrptr - bytes_read; + ctxt->strm->next_in = BAD_CAST (ctxt->inrptr + bytes_read); + + z_ret = inflate(ctxt->strm, Z_NO_FLUSH); + bytes_read += orig_avail_in - ctxt->strm->avail_in; + + if (z_ret != Z_OK) break; + } while (ctxt->strm->avail_out > 0 && xmlNanoHTTPRecv(ctxt) > 0); + + ctxt->inrptr += bytes_read; + return(len - ctxt->strm->avail_out); + } +#endif + while (ctxt->inptr - ctxt->inrptr < len) { if (xmlNanoHTTPRecv(ctxt) <= 0) break; } @@ -1263,6 +1334,9 @@ retry: if (ctxt->query != NULL) blen += strlen(ctxt->query) + 1; blen += strlen(method) + strlen(ctxt->path) + 24; +#ifdef HAVE_ZLIB_H + blen += 23; +#endif bp = (char*)xmlMallocAtomic(blen); if ( bp == NULL ) { xmlNanoHTTPFreeCtxt( ctxt ); @@ -1291,6 +1365,10 @@ retry: p += snprintf( p, blen - (p - bp), " HTTP/1.0\r\nHost: %s\r\n", ctxt->hostname); +#ifdef HAVE_ZLIB_H + p += snprintf(p, blen - (p - bp), "Accept-Encoding: gzip\r\n"); +#endif + if (contentType != NULL && *contentType) p += snprintf(p, blen - (p - bp), "Content-Type: %s\r\n", *contentType); diff --git a/parser.c b/parser.c index ce6e003..ec7fb53 100644 --- a/parser.c +++ b/parser.c @@ -2177,6 +2177,9 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, if (val != 0) { COPY_BUF(0,buffer,nbchars,val); } + if (nbchars > buffer_size - XML_PARSER_BUFFER_SIZE) { + growBuffer(buffer); + } } else if ((c == '&') && (what & XML_SUBSTITUTE_REF)) { if (xmlParserDebugEntities) xmlGenericError(xmlGenericErrorContext, @@ -2187,6 +2190,9 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) { if (ent->content != NULL) { COPY_BUF(0,buffer,nbchars,ent->content[0]); + if (nbchars > buffer_size - XML_PARSER_BUFFER_SIZE) { + growBuffer(buffer); + } } else { xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR, "predefined entity has no content\n"); @@ -3449,12 +3455,10 @@ xmlParseCharData(xmlParserCtxtPtr ctxt, int cdata) { get_more_space: while (*in == 0x20) in++; if (*in == 0xA) { - ctxt->input->line++; ctxt->input->col = 1; - in++; - while (*in == 0xA) { + do { ctxt->input->line++; ctxt->input->col = 1; in++; - } + } while (*in == 0xA); goto get_more_space; } if (*in == '<') { @@ -3490,12 +3494,10 @@ get_more: } ctxt->input->col = ccol; if (*in == 0xA) { - ctxt->input->line++; ctxt->input->col = 1; - in++; - while (*in == 0xA) { + do { ctxt->input->line++; ctxt->input->col = 1; in++; - } + } while (*in == 0xA); goto get_more; } if (*in == ']') { @@ -3537,12 +3539,16 @@ get_more: ctxt->input->cur = in; if (*in == 0xD) { in++; + if (!*in) /* if end of current chunk return */ + return; if (*in == 0xA) { ctxt->input->cur = in; in++; ctxt->input->line++; ctxt->input->col = 1; continue; /* while */ } + if (!*in) /* if end of current chunk return */ + return; in--; } if (*in == '<') { @@ -3856,12 +3862,10 @@ xmlParseComment(xmlParserCtxtPtr ctxt) { in = ctxt->input->cur; do { if (*in == 0xA) { - ctxt->input->line++; ctxt->input->col = 1; - in++; - while (*in == 0xA) { + do { ctxt->input->line++; ctxt->input->col = 1; in++; - } + } while (*in == 0xA); } get_more: ccol = ctxt->input->col; @@ -3873,12 +3877,10 @@ get_more: } ctxt->input->col = ccol; if (*in == 0xA) { - ctxt->input->line++; ctxt->input->col = 1; - in++; - while (*in == 0xA) { + do { ctxt->input->line++; ctxt->input->col = 1; in++; - } + } while (*in == 0xA); goto get_more; } nbchar = in - ctxt->input->cur; @@ -3929,6 +3931,8 @@ get_more: ctxt->input->line++; ctxt->input->col = 1; continue; /* while */ } + if (!*in) /* if end of current chunk return */ + return; in--; } SHRINK; @@ -8888,6 +8892,13 @@ void xmlParseXMLDecl(xmlParserCtxtPtr ctxt) { xmlChar *version; + /* + * This value for standalone indicates that the document has an + * XML declaration but it does not have a standalone attribute. + * It will be overwritten later if a standalone attribute is found. + */ + ctxt->input->standalone = -2; + /* * We know that 'length == 0) || (input->buf == NULL)) { - /* - * When parsing a static memory array one must know the - * size to be able to convert the buffer. - */ - xmlErrInternal(ctxt, "switching encoding : no input\n", NULL); - return (-1); - } else { - int processed; - - /* - * Shrink the current input buffer. - * Move it as the raw buffer and create a new input buffer - */ - processed = input->cur - input->base; - - input->buf->raw = xmlBufferCreate(); - xmlBufferAdd(input->buf->raw, input->cur, - input->length - processed); - input->buf->buffer = xmlBufferCreate(); - - /* - * convert as much as possible of the raw input - * to the parser reading buffer. - */ - nbchars = xmlCharEncInFunc(input->buf->encoder, - input->buf->buffer, - input->buf->raw); - if (nbchars < 0) { - xmlErrInternal(ctxt, - "switching encoding: encoder error\n", - NULL); - return (-1); - } - - /* - * Conversion succeeded, get rid of the old buffer - */ - if ((input->free != NULL) && (input->base != NULL)) - input->free((xmlChar *) input->base); - input->base = input->cur = input->buf->buffer->content; - input->end = &input->base[input->buf->buffer->use]; - } + } else if (input->length == 0) { + /* + * When parsing a static memory array one must know the + * size to be able to convert the buffer. + */ + xmlErrInternal(ctxt, "switching encoding : no input\n", NULL); + return (-1); } return (0); } @@ -1492,8 +1455,13 @@ xmlNewInputFromFile(xmlParserCtxtPtr ctxt, const char *filename) { if (ctxt == NULL) return(NULL); buf = xmlParserInputBufferCreateFilename(filename, XML_CHAR_ENCODING_NONE); if (buf == NULL) { - __xmlLoaderErr(ctxt, "failed to load external entity \"%s\"\n", - (const char *) filename); + if (filename == NULL) + __xmlLoaderErr(ctxt, + "failed to load external entity: NULL filename \n", + NULL); + else + __xmlLoaderErr(ctxt, "failed to load external entity \"%s\"\n", + (const char *) filename); return(NULL); } @@ -1912,7 +1880,7 @@ xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq, int found = 0; if ((seq == NULL) || (node == NULL)) - return (-1); + return ((unsigned long) -1); /* Do a binary search for the key */ lower = 1; diff --git a/pattern.c b/pattern.c index a76a58c..7b3e508 100644 --- a/pattern.c +++ b/pattern.c @@ -46,26 +46,43 @@ #define XML_STREAM_STEP_FINAL 2 #define XML_STREAM_STEP_ROOT 4 #define XML_STREAM_STEP_ATTR 8 +#define XML_STREAM_STEP_NODE 16 +#define XML_STREAM_STEP_IN_SET 32 /* -* TODO: This is used on _xmlStreamCtxt, so don't use any values -* from xmlPatternFlags. +* NOTE: Those private flags (XML_STREAM_xxx) are used +* in _xmlStreamCtxt->flag. They extend the public +* xmlPatternFlags, so be carefull not to interfere with the +* reserved values for xmlPatternFlags. */ +#define XML_STREAM_FINAL_IS_ANY_NODE 1<<14 +#define XML_STREAM_FROM_ROOT 1<<15 #define XML_STREAM_DESC 1<<16 +/* +* XML_STREAM_ANY_NODE is used for comparison against +* xmlElementType enums, to indicate a node of any type. +*/ +#define XML_STREAM_ANY_NODE 100 + #define XML_PATTERN_NOTPATTERN (XML_PATTERN_XPATH | \ XML_PATTERN_XSSEL | \ XML_PATTERN_XSFIELD) -#define XML_STREAM_XS_IDC(item) (item->flags & \ +#define XML_STREAM_XS_IDC(c) ((c)->flags & \ (XML_PATTERN_XSSEL | XML_PATTERN_XSFIELD)) +#define XML_STREAM_XS_IDC_SEL(c) ((c)->flags & XML_PATTERN_XSSEL) + +#define XML_STREAM_XS_IDC_FIELD(c) ((c)->flags & XML_PATTERN_XSFIELD) + typedef struct _xmlStreamStep xmlStreamStep; typedef xmlStreamStep *xmlStreamStepPtr; struct _xmlStreamStep { int flags; /* properties of that step */ const xmlChar *name; /* first string value if NULL accept all */ const xmlChar *ns; /* second string value */ + int nodeType; /* type of node */ }; typedef struct _xmlStreamComp xmlStreamComp; @@ -690,6 +707,7 @@ rollback: #define CUR (*ctxt->cur) #define SKIP(val) ctxt->cur += (val) #define NXT(val) ctxt->cur[(val)] +#define PEEKPREV(val) ctxt->cur[-(val)] #define CUR_PTR ctxt->cur #define SKIP_BLANKS \ @@ -884,6 +902,7 @@ xmlCompileAttributeTest(xmlPatParserContextPtr ctxt) { xmlChar *name = NULL; xmlChar *URL = NULL; + SKIP_BLANKS; name = xmlPatScanNCName(ctxt); if (name == NULL) { if (CUR == '*') { @@ -901,6 +920,13 @@ xmlCompileAttributeTest(xmlPatParserContextPtr ctxt) { xmlChar *prefix = name; NEXT; + + if (IS_BLANK_CH(CUR)) { + ERROR5(NULL, NULL, NULL, "Invalid QName.\n", NULL); + xmlFree(prefix); + ctxt->error = 1; + goto error; + } /* * This is a namespace match */ @@ -967,25 +993,39 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) { xmlChar *token = NULL; xmlChar *name = NULL; xmlChar *URL = NULL; + int hasBlanks = 0; SKIP_BLANKS; if (CUR == '.') { + /* + * Context node. + */ NEXT; PUSH(XML_OP_ELEM, NULL, NULL); return; } + if (CUR == '@') { + /* + * Attribute test. + */ + if (XML_STREAM_XS_IDC_SEL(ctxt->comp)) { + ERROR5(NULL, NULL, NULL, + "Unexpected attribute axis in '%s'.\n", ctxt->base); + ctxt->error = 1; + return; + } + NEXT; + xmlCompileAttributeTest(ctxt); + if (ctxt->error != 0) + goto error; + return; + } name = xmlPatScanNCName(ctxt); if (name == NULL) { if (CUR == '*') { NEXT; PUSH(XML_OP_ALL, NULL, NULL); return; - } else if (CUR == '@') { - NEXT; - xmlCompileAttributeTest(ctxt); - if (ctxt->error != 0) - goto error; - return; } else { ERROR(NULL, NULL, NULL, "xmlCompileStepPattern : Name expected\n"); @@ -993,13 +1033,21 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) { return; } } - SKIP_BLANKS; + if (IS_BLANK_CH(CUR)) { + hasBlanks = 1; + SKIP_BLANKS; + } if (CUR == ':') { NEXT; if (CUR != ':') { xmlChar *prefix = name; - int i; + int i; + if (hasBlanks || IS_BLANK_CH(CUR)) { + ERROR5(NULL, NULL, NULL, "Invalid QName.\n", NULL); + ctxt->error = 1; + goto error; + } /* * This is a namespace match */ @@ -1060,6 +1108,11 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) { int i; NEXT; + if (IS_BLANK_CH(CUR)) { + ERROR5(NULL, NULL, NULL, "Invalid QName.\n", NULL); + ctxt->error = 1; + goto error; + } /* * This is a namespace match */ @@ -1104,13 +1157,19 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) { } else if (xmlStrEqual(name, (const xmlChar *) "attribute")) { xmlFree(name); name = NULL; + if (XML_STREAM_XS_IDC_SEL(ctxt->comp)) { + ERROR5(NULL, NULL, NULL, + "Unexpected attribute axis in '%s'.\n", ctxt->base); + ctxt->error = 1; + goto error; + } xmlCompileAttributeTest(ctxt); if (ctxt->error != 0) goto error; return; } else { - ERROR(NULL, NULL, NULL, - "xmlCompileStepPattern : 'child' or 'attribute' expected\n"); + ERROR5(NULL, NULL, NULL, + "The 'element' or 'attribute' axis is expected.\n", NULL); ctxt->error = 1; goto error; } @@ -1167,20 +1226,41 @@ xmlCompilePathPattern(xmlPatParserContextPtr ctxt) { NEXT; NEXT; NEXT; + /* Check for incompleteness. */ + SKIP_BLANKS; + if (CUR == 0) { + ERROR5(NULL, NULL, NULL, + "Incomplete expression '%s'.\n", ctxt->base); + ctxt->error = 1; + goto error; + } } if (CUR == '@') { NEXT; xmlCompileAttributeTest(ctxt); SKIP_BLANKS; + /* TODO: check for incompleteness */ if (CUR != 0) { xmlCompileStepPattern(ctxt); + if (ctxt->error != 0) + goto error; } } else { if (CUR == '/') { PUSH(XML_OP_ROOT, NULL, NULL); NEXT; + /* Check for incompleteness. */ + SKIP_BLANKS; + if (CUR == 0) { + ERROR5(NULL, NULL, NULL, + "Incomplete expression '%s'.\n", ctxt->base); + ctxt->error = 1; + goto error; + } } xmlCompileStepPattern(ctxt); + if (ctxt->error != 0) + goto error; SKIP_BLANKS; while (CUR == '/') { if (NXT(1) == '/') { @@ -1189,13 +1269,21 @@ xmlCompilePathPattern(xmlPatParserContextPtr ctxt) { NEXT; SKIP_BLANKS; xmlCompileStepPattern(ctxt); + if (ctxt->error != 0) + goto error; } else { PUSH(XML_OP_PARENT, NULL, NULL); NEXT; SKIP_BLANKS; - if (CUR != 0) { - xmlCompileStepPattern(ctxt); + if (CUR == 0) { + ERROR5(NULL, NULL, NULL, + "Incomplete expression '%s'.\n", ctxt->base); + ctxt->error = 1; + goto error; } + xmlCompileStepPattern(ctxt); + if (ctxt->error != 0) + goto error; } } } @@ -1208,6 +1296,107 @@ error: return; } +/** + * xmlCompileIDCXPathPath: + * @ctxt: the compilation context + * + * Compile the Path Pattern and generates a precompiled + * form suitable for fast matching. + * + * [5] Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest ) + */ +static void +xmlCompileIDCXPathPath(xmlPatParserContextPtr ctxt) { + SKIP_BLANKS; + if (CUR == '/') { + ERROR5(NULL, NULL, NULL, + "Unexpected selection of the document root in '%s'.\n", + ctxt->base); + goto error; + } + ctxt->comp->flags |= PAT_FROM_CUR; + + if (CUR == '.') { + /* "." - "self::node()" */ + NEXT; + SKIP_BLANKS; + if (CUR == 0) { + /* + * Selection of the context node. + */ + PUSH(XML_OP_ELEM, NULL, NULL); + return; + } + if (CUR != '/') { + /* TODO: A more meaningful error message. */ + ERROR5(NULL, NULL, NULL, + "Unexpected token after '.' in '%s'.\n", ctxt->base); + goto error; + } + /* "./" - "self::node()/" */ + NEXT; + SKIP_BLANKS; + if (CUR == '/') { + if (IS_BLANK_CH(PEEKPREV(1))) { + /* + * Disallow "./ /" + */ + ERROR5(NULL, NULL, NULL, + "Unexpected '/' token in '%s'.\n", ctxt->base); + goto error; + } + /* ".//" - "self:node()/descendant-or-self::node()/" */ + PUSH(XML_OP_ANCESTOR, NULL, NULL); + NEXT; + SKIP_BLANKS; + } + if (CUR == 0) + goto error_unfinished; + } + /* + * Process steps. + */ + do { + xmlCompileStepPattern(ctxt); + if (ctxt->error != 0) + goto error; + SKIP_BLANKS; + if (CUR != '/') + break; + PUSH(XML_OP_PARENT, NULL, NULL); + NEXT; + SKIP_BLANKS; + if (CUR == '/') { + /* + * Disallow subsequent '//'. + */ + ERROR5(NULL, NULL, NULL, + "Unexpected subsequent '//' in '%s'.\n", + ctxt->base); + goto error; + } + if (CUR == 0) + goto error_unfinished; + + } while (CUR != 0); + + if (CUR != 0) { + ERROR5(NULL, NULL, NULL, + "Failed to compile expression '%s'.\n", ctxt->base); + ctxt->error = 1; + } + return; +error: + ctxt->error = 1; + return; + +error_unfinished: + ctxt->error = 1; + ERROR5(NULL, NULL, NULL, + "Unfinished expression '%s'.\n", ctxt->base); + return; +} + /************************************************************************ * * * The streaming code * @@ -1334,7 +1523,7 @@ xmlFreeStreamComp(xmlStreamCompPtr comp) { */ static int xmlStreamCompAddStep(xmlStreamCompPtr comp, const xmlChar *name, - const xmlChar *ns, int flags) { + const xmlChar *ns, int nodeType, int flags) { xmlStreamStepPtr cur; if (comp->nbStep >= comp->maxStep) { @@ -1352,6 +1541,7 @@ xmlStreamCompAddStep(xmlStreamCompPtr comp, const xmlChar *name, cur->flags = flags; cur->name = name; cur->ns = ns; + cur->nodeType = nodeType; return(comp->nbStep - 1); } @@ -1366,7 +1556,8 @@ xmlStreamCompAddStep(xmlStreamCompPtr comp, const xmlChar *name, static int xmlStreamCompile(xmlPatternPtr comp) { xmlStreamCompPtr stream; - int i, s = 0, root = 0, flags = 0; + int i, s = 0, root = 0, flags = 0, prevs = -1; + xmlStepOp step; if ((comp == NULL) || (comp->steps == NULL)) return(-1); @@ -1380,6 +1571,8 @@ xmlStreamCompile(xmlPatternPtr comp) { stream = xmlNewStreamComp(0); if (stream == NULL) return(-1); + /* Note that the stream will have no steps in this case. */ + stream->flags |= XML_STREAM_FINAL_IS_ANY_NODE; comp->stream = stream; return(0); } @@ -1392,19 +1585,13 @@ xmlStreamCompile(xmlPatternPtr comp) { xmlDictReference(stream->dict); } - /* - * Skip leading ./ on relative paths - */ - i = 0; - while ((comp->flags & PAT_FROM_CUR) && (comp->nbStep > i + 2) && - (comp->steps[i].op == XML_OP_ELEM) && - (comp->steps[i].value == NULL) && - (comp->steps[i].value2 == NULL) && - (comp->steps[i + 1].op == XML_OP_PARENT)) { - i += 2; - } + i = 0; + if (comp->flags & PAT_FROM_ROOT) + stream->flags |= XML_STREAM_FROM_ROOT; + for (;i < comp->nbStep;i++) { - switch (comp->steps[i].op) { + step = comp->steps[i]; + switch (step.op) { case XML_OP_END: break; case XML_OP_ROOT: @@ -1413,51 +1600,95 @@ xmlStreamCompile(xmlPatternPtr comp) { root = 1; break; case XML_OP_NS: - s = xmlStreamCompAddStep(stream, NULL, - comp->steps[i].value, flags); - flags = 0; + s = xmlStreamCompAddStep(stream, NULL, step.value, + XML_ELEMENT_NODE, flags); if (s < 0) goto error; + prevs = s; + flags = 0; break; case XML_OP_ATTR: flags |= XML_STREAM_STEP_ATTR; - s = xmlStreamCompAddStep(stream, comp->steps[i].value, - comp->steps[i].value2, flags); + prevs = -1; + s = xmlStreamCompAddStep(stream, + step.value, step.value2, XML_ATTRIBUTE_NODE, flags); flags = 0; if (s < 0) goto error; break; - case XML_OP_ELEM: - if ((comp->steps[i].value == NULL) && - (comp->steps[i].value2 == NULL) && - (comp->nbStep > i + 2) && - (comp->steps[i + 1].op == XML_OP_PARENT)) { - i++; - continue; - } + case XML_OP_ELEM: + if ((step.value == NULL) && (step.value2 == NULL)) { + /* + * We have a "." or "self::node()" here. + * Eliminate redundant self::node() tests like in "/./." + * or "//./" + * The only case we won't eliminate is "//.", i.e. if + * self::node() is the last node test and we had + * continuation somewhere beforehand. + */ + if ((comp->nbStep == i + 1) && + (flags & XML_STREAM_STEP_DESC)) { + /* + * Mark the special case where the expression resolves + * to any type of node. + */ + if (comp->nbStep == i + 1) { + stream->flags |= XML_STREAM_FINAL_IS_ANY_NODE; + } + flags |= XML_STREAM_STEP_NODE; + s = xmlStreamCompAddStep(stream, NULL, NULL, + XML_STREAM_ANY_NODE, flags); + if (s < 0) + goto error; + flags = 0; + /* + * If there was a previous step, mark it to be added to + * the result node-set; this is needed since only + * the last step will be marked as "final" and only + * "final" nodes are added to the resulting set. + */ + if (prevs != -1) { + stream->steps[prevs].flags |= XML_STREAM_STEP_IN_SET; + prevs = -1; + } + break; + + } else { + /* Just skip this one. */ + continue; + } + } + /* An element node. */ + s = xmlStreamCompAddStep(stream, step.value, step.value2, + XML_ELEMENT_NODE, flags); + if (s < 0) + goto error; + prevs = s; + flags = 0; + break; case XML_OP_CHILD: - s = xmlStreamCompAddStep(stream, comp->steps[i].value, - comp->steps[i].value2, flags); - flags = 0; + /* An element node child. */ + s = xmlStreamCompAddStep(stream, step.value, step.value2, + XML_ELEMENT_NODE, flags); if (s < 0) goto error; + prevs = s; + flags = 0; break; case XML_OP_ALL: - s = xmlStreamCompAddStep(stream, NULL, NULL, flags); - flags = 0; + s = xmlStreamCompAddStep(stream, NULL, NULL, + XML_ELEMENT_NODE, flags); if (s < 0) goto error; + prevs = s; + flags = 0; break; - case XML_OP_PARENT: - if ((comp->nbStep > i + 1) && - (comp->steps[i + 1].op == XML_OP_ELEM) && - (comp->steps[i + 1].value == NULL) && - (comp->steps[i + 1].value2 == NULL)) { - i++; - continue; - } + case XML_OP_PARENT: break; case XML_OP_ANCESTOR: + /* Skip redundant continuations. */ + if (flags & XML_STREAM_STEP_DESC) + break; flags |= XML_STREAM_STEP_DESC; /* * Mark the expression as having "//". @@ -1481,6 +1712,8 @@ xmlStreamCompile(xmlPatternPtr comp) { stream->steps[0].flags |= XML_STREAM_STEP_DESC; } } + if (stream->nbStep <= s) + goto error; stream->steps[s].flags |= XML_STREAM_STEP_FINAL; if (root) stream->steps[0].flags |= XML_STREAM_STEP_ROOT; @@ -1603,7 +1836,7 @@ xmlStreamCtxtAddState(xmlStreamCtxtPtr comp, int idx, int level) { static int xmlStreamPushInternal(xmlStreamCtxtPtr stream, const xmlChar *name, const xmlChar *ns, - xmlElementType nodeType) { + int nodeType) { int ret = 0, err = 0, final = 0, tmp, i, m, match, step, desc; xmlStreamCompPtr comp; #ifdef DEBUG_STREAMING @@ -1615,16 +1848,34 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream, while (stream != NULL) { comp = stream->comp; - if ((name == NULL) && (ns == NULL)) { + + if ((nodeType == XML_ELEMENT_NODE) && + (name == NULL) && (ns == NULL)) { + /* We have a document node here (or a reset). */ stream->nbState = 0; stream->level = 0; stream->blockLevel = -1; - if (comp->steps[0].flags & XML_STREAM_STEP_ROOT) { - tmp = xmlStreamCtxtAddState(stream, 0, 0); - if (tmp < 0) - err++; - if (comp->nbStep == 0) + if (comp->flags & XML_STREAM_FROM_ROOT) { + if (comp->nbStep == 0) { + /* TODO: We have a "/." here? */ ret = 1; + } else { + if ((comp->nbStep == 1) && + (comp->steps[0].nodeType == XML_STREAM_ANY_NODE) && + (comp->steps[0].flags & XML_STREAM_STEP_DESC)) + { + /* + * In the case of "//." the document node will match + * as well. + */ + ret = 1; + } else if (comp->steps[0].flags & XML_STREAM_STEP_ROOT) { + /* TODO: Do we need this ? */ + tmp = xmlStreamCtxtAddState(stream, 0, 0); + if (tmp < 0) + err++; + } + } } stream = stream->next; continue; /* while */ @@ -1647,7 +1898,7 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream, * or traditional XPath expressions, this will match if * we are at the first level only, otherwise on every level. */ - if ((nodeType == XML_ELEMENT_NODE) && + if ((nodeType != XML_ATTRIBUTE_NODE) && (((stream->flags & XML_PATTERN_NOTPATTERN) == 0) || (stream->level == 0))) { ret = 1; @@ -1662,6 +1913,19 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream, stream->level++; goto stream_next; } + + if ((nodeType != XML_ELEMENT_NODE) && + (nodeType != XML_ATTRIBUTE_NODE) && + ((comp->flags & XML_STREAM_FINAL_IS_ANY_NODE) == 0)) { + /* + * No need to process nodes of other types if we don't + * resolve to those types. + * TODO: Do we need to block the context here? + */ + stream->level++; + goto stream_next; + } + /* * Check evolution of existing states */ @@ -1710,14 +1974,24 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream, /* * Check for correct node-type. */ - if ((nodeType == XML_ATTRIBUTE_NODE) && - ((comp->steps[step].flags & XML_STREAM_STEP_ATTR) == 0)) - goto next_state; + if (comp->steps[step].nodeType != nodeType) { + if (comp->steps[step].nodeType == XML_ATTRIBUTE_NODE) { + /* + * Block this expression for deeper evaluation. + */ + if ((comp->flags & XML_STREAM_DESC) == 0) + stream->blockLevel = stream->level +1; + goto next_state; + } else if (comp->steps[step].nodeType != XML_STREAM_ANY_NODE) + goto next_state; + } /* * Compare local/namespace-name. */ match = 0; - if (comp->dict) { + if (comp->steps[step].nodeType == XML_STREAM_ANY_NODE) { + match = 1; + } else if (comp->dict) { if (comp->steps[step].name == NULL) { if (comp->steps[step].ns == NULL) match = 1; @@ -1756,7 +2030,15 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream, stream->level + 1); } } - } + if ((ret != 1) && + (comp->steps[step].flags & XML_STREAM_STEP_IN_SET)) { + /* + * Check if we have a special case like "foo/bar//.", where + * "foo" is selected as well. + */ + ret = 1; + } + } if (((comp->flags & XML_STREAM_DESC) == 0) && ((! match) || final)) { /* @@ -1774,6 +2056,8 @@ next_state: /* * Re/enter the expression. + * Don't reenter if it's an absolute expression like "/foo", + * except "//foo". */ if (comp->steps[0].flags & XML_STREAM_STEP_ROOT) goto stream_next; @@ -1816,14 +2100,19 @@ compare: /* * Check expected node-type. */ - if ((nodeType == XML_ATTRIBUTE_NODE) && - ((comp->steps[0].flags & XML_STREAM_STEP_ATTR) == 0)) - goto stream_next; + if (comp->steps[0].nodeType != nodeType) { + if (nodeType == XML_ATTRIBUTE_NODE) + goto stream_next; + else if (comp->steps[0].nodeType != XML_STREAM_ANY_NODE) + goto stream_next; + } /* * Compare local/namespace-name. */ match = 0; - if (comp->steps[0].name == NULL) { + if (comp->steps[0].nodeType == XML_STREAM_ANY_NODE) { + match = 1; + } else if (comp->steps[0].name == NULL) { if (comp->steps[0].ns == NULL) match = 1; else { @@ -1840,12 +2129,20 @@ compare: match = ((xmlStrEqual(comp->steps[0].name, name)) && (xmlStrEqual(comp->steps[0].ns, ns))); } - if (match) { - final = comp->steps[0].flags & XML_STREAM_STEP_FINAL; + final = comp->steps[0].flags & XML_STREAM_STEP_FINAL; + if (match) { if (final) ret = 1; else xmlStreamCtxtAddState(stream, 1, stream->level); + if ((ret != 1) && + (comp->steps[0].flags & XML_STREAM_STEP_IN_SET)) { + /* + * Check if we have a special case like "foo//.", where + * "foo" is selected as well. + */ + ret = 1; + } } if (((comp->flags & XML_STREAM_DESC) == 0) && ((! match) || final)) { @@ -1855,7 +2152,7 @@ compare: */ stream->blockLevel = stream->level; } - + stream_next: stream = stream->next; } /* while stream != NULL */ @@ -1879,6 +2176,7 @@ stream_next: * to come from the dictionary. * Both @name and @ns being NULL means the / i.e. the root of the document. * This can also act as a reset. + * Otherwise the function will act as if it has been given an element-node. * * Returns: -1 in case of error, 1 if the current state in the stream is a * match and 0 otherwise. @@ -1886,7 +2184,35 @@ stream_next: int xmlStreamPush(xmlStreamCtxtPtr stream, const xmlChar *name, const xmlChar *ns) { - return (xmlStreamPushInternal(stream, name, ns, XML_ELEMENT_NODE)); + return (xmlStreamPushInternal(stream, name, ns, (int) XML_ELEMENT_NODE)); +} + +/** + * xmlStreamPushNode: + * @stream: the stream context + * @name: the current name + * @ns: the namespace name + * @nodeType: the type of the node being pushed + * + * Push new data onto the stream. NOTE: if the call xmlPatterncompile() + * indicated a dictionary, then strings for name and ns will be expected + * to come from the dictionary. + * Both @name and @ns being NULL means the / i.e. the root of the document. + * This can also act as a reset. + * Different from xmlStreamPush() this function can be fed with nodes of type: + * element-, attribute-, text-, cdata-section-, comment- and + * processing-instruction-node. + * + * Returns: -1 in case of error, 1 if the current state in the stream is a + * match and 0 otherwise. + */ +int +xmlStreamPushNode(xmlStreamCtxtPtr stream, + const xmlChar *name, const xmlChar *ns, + int nodeType) +{ + return (xmlStreamPushInternal(stream, name, ns, + nodeType)); } /** @@ -1900,6 +2226,7 @@ xmlStreamPush(xmlStreamCtxtPtr stream, * to come from the dictionary. * Both @name and @ns being NULL means the / i.e. the root of the document. * This can also act as a reset. +* Otherwise the function will act as if it has been given an attribute-node. * * Returns: -1 in case of error, 1 if the current state in the stream is a * match and 0 otherwise. @@ -1907,7 +2234,7 @@ xmlStreamPush(xmlStreamCtxtPtr stream, int xmlStreamPushAttr(xmlStreamCtxtPtr stream, const xmlChar *name, const xmlChar *ns) { - return (xmlStreamPushInternal(stream, name, ns, XML_ATTRIBUTE_NODE)); + return (xmlStreamPushInternal(stream, name, ns, (int) XML_ATTRIBUTE_NODE)); } /** @@ -1921,11 +2248,9 @@ xmlStreamPushAttr(xmlStreamCtxtPtr stream, int xmlStreamPop(xmlStreamCtxtPtr stream) { int i, lev; - int ret; - + if (stream == NULL) return(-1); - ret = 0; while (stream != NULL) { /* * Reset block-level. @@ -1935,7 +2260,7 @@ xmlStreamPop(xmlStreamCtxtPtr stream) { stream->level--; if (stream->level < 0) - ret = -1; + return(-1); /* * Check evolution of existing states */ @@ -1952,6 +2277,31 @@ xmlStreamPop(xmlStreamCtxtPtr stream) { return(0); } +/** + * xmlStreamWantsAnyNode: + * @streamCtxt: the stream context + * + * Query if the streaming pattern additionally needs to be fed with + * text-, cdata-section-, comment- and processing-instruction-nodes. + * If the result is 0 then only element-nodes and attribute-nodes + * need to be pushed. + * + * Returns: 1 in case of need of nodes of the above described types, + * 0 otherwise. -1 on API errors. + */ +int +xmlStreamWantsAnyNode(xmlStreamCtxtPtr streamCtxt) +{ + if (streamCtxt == NULL) + return(-1); + while (streamCtxt != NULL) { + if (streamCtxt->comp->flags & XML_STREAM_FINAL_IS_ANY_NODE) + return(1); + streamCtxt = streamCtxt->next; + } + return(0); +} + /************************************************************************ * * * The public interfaces * @@ -2008,7 +2358,10 @@ xmlPatterncompile(const xmlChar *pattern, xmlDict *dict, int flags, cur->flags = flags; ctxt->comp = cur; - xmlCompilePathPattern(ctxt); + if (XML_STREAM_XS_IDC(cur)) + xmlCompileIDCXPathPath(ctxt); + else + xmlCompilePathPattern(ctxt); if (ctxt->error != 0) goto error; xmlFreePatParserContext(ctxt); diff --git a/python/libxml.py b/python/libxml.py index 86bdd92..0c2a19a 100644 --- a/python/libxml.py +++ b/python/libxml.py @@ -211,7 +211,8 @@ class SAXCallback: pass def warning(self, msg): - print msg + #print msg + pass def error(self, msg): raise parserError(msg) diff --git a/python/libxml2-py.c b/python/libxml2-py.c index b656d7f..b5bf52f 100644 --- a/python/libxml2-py.c +++ b/python/libxml2-py.c @@ -1497,15 +1497,15 @@ libxml_xmlSchemaValidateDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { int c_retval; xmlSchemaValidCtxtPtr ctxt; PyObject *pyobj_ctxt; - xmlDocPtr doc; - PyObject *pyobj_doc; + xmlDocPtr instance; + PyObject *pyobj_instance; - if (!PyArg_ParseTuple(args, (char *)"OO:xmlSchemaValidateDoc", &pyobj_ctxt, &pyobj_doc)) + if (!PyArg_ParseTuple(args, (char *)"OO:xmlSchemaValidateDoc", &pyobj_ctxt, &pyobj_instance)) return(NULL); ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt); - doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc); + instance = (xmlDocPtr) PyxmlNode_Get(pyobj_instance); - c_retval = xmlSchemaValidateDoc(ctxt, doc); + c_retval = xmlSchemaValidateDoc(ctxt, instance); py_retval = libxml_intWrap((int) c_retval); return(py_retval); } @@ -5874,6 +5874,21 @@ libxml_xmlUCSIsTibetan(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { } #endif /* defined(LIBXML_UNICODE_ENABLED) */ +PyObject * +libxml_xmlUTF8Strndup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + PyObject *py_retval; + xmlChar * c_retval; + xmlChar * utf; + int len; + + if (!PyArg_ParseTuple(args, (char *)"zi:xmlUTF8Strndup", &utf, &len)) + return(NULL); + + c_retval = xmlUTF8Strndup(utf, len); + py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval); + return(py_retval); +} + #if defined(LIBXML_LEGACY_ENABLED) PyObject * libxml_xmlNewGlobalNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { @@ -7689,6 +7704,28 @@ libxml_xmlReaderNewMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { } #endif /* defined(LIBXML_READER_ENABLED) */ +#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) +PyObject * +libxml_xmlTextReaderSchemaValidateCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + PyObject *py_retval; + int c_retval; + xmlTextReaderPtr reader; + PyObject *pyobj_reader; + xmlSchemaValidCtxtPtr ctxt; + PyObject *pyobj_ctxt; + int options; + + if (!PyArg_ParseTuple(args, (char *)"OOi:xmlTextReaderSchemaValidateCtxt", &pyobj_reader, &pyobj_ctxt, &options)) + return(NULL); + reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader); + ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt); + + c_retval = xmlTextReaderSchemaValidateCtxt(reader, ctxt, options); + py_retval = libxml_intWrap((int) c_retval); + return(py_retval); +} + +#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */ #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) PyObject * libxml_xmlNewProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { @@ -7783,7 +7820,7 @@ libxml_htmlInitAutoClose(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBU } #endif /* defined(LIBXML_HTML_ENABLED) */ -#if defined(LIBXML_READER_ENABLED) +#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) PyObject * libxml_xmlTextReaderReadOuterXml(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; @@ -7800,7 +7837,7 @@ libxml_xmlTextReaderReadOuterXml(PyObject *self ATTRIBUTE_UNUSED, PyObject *args return(py_retval); } -#endif /* defined(LIBXML_READER_ENABLED) */ +#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) */ #if defined(LIBXML_UNICODE_ENABLED) PyObject * libxml_xmlUCSIsTamil(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { @@ -10749,21 +10786,6 @@ libxml_xmlIsRef(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { return(py_retval); } -PyObject * -libxml_xmlUTF8Strndup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { - PyObject *py_retval; - xmlChar * c_retval; - xmlChar * utf; - int len; - - if (!PyArg_ParseTuple(args, (char *)"zi:xmlUTF8Strndup", &utf, &len)) - return(NULL); - - c_retval = xmlUTF8Strndup(utf, len); - py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval); - return(py_retval); -} - #if defined(LIBXML_XPATH_ENABLED) PyObject * libxml_xmlXPathGetContextDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { @@ -12028,20 +12050,6 @@ libxml_xmlNodeSetContent(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { return(Py_None); } -PyObject * -libxml_xmlUnlinkNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { - xmlNodePtr cur; - PyObject *pyobj_cur; - - if (!PyArg_ParseTuple(args, (char *)"O:xmlUnlinkNode", &pyobj_cur)) - return(NULL); - cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur); - - xmlUnlinkNode(cur); - Py_INCREF(Py_None); - return(Py_None); -} - #if defined(LIBXML_DEBUG_ENABLED) PyObject * libxml_xmlBoolToText(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { @@ -13675,7 +13683,7 @@ libxml_xmlDictCleanup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_ return(Py_None); } -#if defined(LIBXML_READER_ENABLED) +#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) PyObject * libxml_xmlTextReaderReadInnerXml(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; @@ -13692,7 +13700,7 @@ libxml_xmlTextReaderReadInnerXml(PyObject *self ATTRIBUTE_UNUSED, PyObject *args return(py_retval); } -#endif /* defined(LIBXML_READER_ENABLED) */ +#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) */ PyObject * libxml_xmlThrDefKeepBlanksDefaultValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; @@ -14075,6 +14083,20 @@ libxml_xmlURISetUser(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { return(Py_None); } +PyObject * +libxml_xmlUnlinkNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + xmlNodePtr cur; + PyObject *pyobj_cur; + + if (!PyArg_ParseTuple(args, (char *)"O:xmlUnlinkNode", &pyobj_cur)) + return(NULL); + cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur); + + xmlUnlinkNode(cur); + Py_INCREF(Py_None); + return(Py_None); +} + PyObject * libxml_xmlCreateEntityParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; diff --git a/python/setup.py b/python/setup.py index ff06a9c..a41ab3f 100755 --- a/python/setup.py +++ b/python/setup.py @@ -226,7 +226,7 @@ else: setup (name = "libxml2-python", # On *nix, the version number is created from setup.py.in # On windows, it is set by configure.js - version = "2.6.22", + version = "2.6.23", description = descr, author = "Daniel Veillard", author_email = "veillard@redhat.com", diff --git a/relaxng.c b/relaxng.c index be5ee99..7e92057 100644 --- a/relaxng.c +++ b/relaxng.c @@ -7331,7 +7331,6 @@ xmlRelaxNGCleanupDoc(xmlRelaxNGParserCtxtPtr ctxt, xmlDocPtr doc) * * parse a schema definition resource and build an internal * XML Shema struture which can be used to validate instances. - * *WARNING* this interface is highly subject to change * * Returns the internal XML RelaxNG structure built from the resource or * NULL in case of error diff --git a/result/HTML/53867.html b/result/HTML/53867.html new file mode 100644 index 0000000..acdad7c --- /dev/null +++ b/result/HTML/53867.html @@ -0,0 +1,66 @@ + + diff --git a/result/HTML/53867.html.err b/result/HTML/53867.html.err new file mode 100644 index 0000000..e69de29 diff --git a/result/HTML/53867.html.sax b/result/HTML/53867.html.sax new file mode 100644 index 0000000..81a9f15 --- /dev/null +++ b/result/HTML/53867.html.sax @@ -0,0 +1,26 @@ +SAX.setDocumentLocator() +SAX.startDocument() +SAX.startElement(html) +SAX.ignorableWhitespace( +, 1) +SAX.startElement(head) +SAX.ignorableWhitespace( +, 1) +SAX.startElement(style) +SAX.cdata( +....... +....................., 1000) +SAX.cdata(.............................., 1000) +SAX.cdata(.............................., 1000) +SAX.cdata(................ +............., 977) +SAX.endElement(style) +SAX.ignorableWhitespace( +, 1) +SAX.endElement(head) +SAX.ignorableWhitespace( +, 1) +SAX.endElement(html) +SAX.ignorableWhitespace( +, 1) +SAX.endDocument() diff --git a/result/XPath/tests/nodespat b/result/XPath/tests/nodespat new file mode 100644 index 0000000..1efd87f --- /dev/null +++ b/result/XPath/tests/nodespat @@ -0,0 +1,94 @@ + +======================== +Expression: /. +Object is a Node Set : +Set contains 1 nodes: +1 / + +======================== +Expression: //. +Object is a Node Set : +Set contains 12 nodes: +1 / +2 ELEMENT root +3 ELEMENT foo +4 TEXT + content=txt +5 COMMENT + content=hello +6 CDATA_SECTION + content=data +7 PI target + content=data +8 ELEMENT bar +9 TEXT + content=txt +10 COMMENT + content=hello +11 CDATA_SECTION + content=data +12 PI target + content=data + +======================== +Expression: /root//. +Object is a Node Set : +Set contains 11 nodes: +1 ELEMENT root +2 ELEMENT foo +3 TEXT + content=txt +4 COMMENT + content=hello +5 CDATA_SECTION + content=data +6 PI target + content=data +7 ELEMENT bar +8 TEXT + content=txt +9 COMMENT + content=hello +10 CDATA_SECTION + content=data +11 PI target + content=data + +======================== +Expression: //.//./././/. +Object is a Node Set : +Set contains 12 nodes: +1 / +2 ELEMENT root +3 ELEMENT foo +4 TEXT + content=txt +5 COMMENT + content=hello +6 CDATA_SECTION + content=data +7 PI target + content=data +8 ELEMENT bar +9 TEXT + content=txt +10 COMMENT + content=hello +11 CDATA_SECTION + content=data +12 PI target + content=data + +======================== +Expression: /root//././/bar//. +Object is a Node Set : +Set contains 5 nodes: +1 ELEMENT bar +2 TEXT + content=txt +3 COMMENT + content=hello +4 CDATA_SECTION + content=data +5 PI target + content=data diff --git a/result/c14n/exc-without-comments/test-2 b/result/c14n/exc-without-comments/test-2 new file mode 100644 index 0000000..0b8a0cb --- /dev/null +++ b/result/c14n/exc-without-comments/test-2 @@ -0,0 +1,11 @@ + + + + + + + + + sj1VXDB2VMCU5qmva2OtDw3kKOs= + + \ No newline at end of file diff --git a/result/noent/ns7 b/result/noent/ns7 new file mode 100644 index 0000000..b5089e1 --- /dev/null +++ b/result/noent/ns7 @@ -0,0 +1,2 @@ + + diff --git a/result/ns7 b/result/ns7 new file mode 100644 index 0000000..b5089e1 --- /dev/null +++ b/result/ns7 @@ -0,0 +1,2 @@ + + diff --git a/result/ns7.rde b/result/ns7.rde new file mode 100644 index 0000000..16f5351 --- /dev/null +++ b/result/ns7.rde @@ -0,0 +1 @@ +0 1 xml:test 1 0 diff --git a/result/ns7.rdr b/result/ns7.rdr new file mode 100644 index 0000000..16f5351 --- /dev/null +++ b/result/ns7.rdr @@ -0,0 +1 @@ +0 1 xml:test 1 0 diff --git a/result/ns7.sax b/result/ns7.sax new file mode 100644 index 0000000..6020be9 --- /dev/null +++ b/result/ns7.sax @@ -0,0 +1,5 @@ +SAX.setDocumentLocator() +SAX.startDocument() +SAX.startElement(xml:test) +SAX.endElement(xml:test) +SAX.endDocument() diff --git a/result/ns7.sax2 b/result/ns7.sax2 new file mode 100644 index 0000000..2a2c714 --- /dev/null +++ b/result/ns7.sax2 @@ -0,0 +1,5 @@ +SAX.setDocumentLocator() +SAX.startDocument() +SAX.startElementNs(test, xml, 'http://www.w3.org/XML/1998/namespace', 0, 0, 0) +SAX.endElementNs(test, xml, 'http://www.w3.org/XML/1998/namespace') +SAX.endDocument() diff --git a/result/regexp/* b/result/regexp/* deleted file mode 100644 index b730347..0000000 --- a/result/regexp/* +++ /dev/null @@ -1 +0,0 @@ -Ops: 0 nodes, 0 cons diff --git a/result/regexp/hard b/result/regexp/hard index f348c08..28d6164 100644 --- a/result/regexp/hard +++ b/result/regexp/hard @@ -5,3 +5,8 @@ aaabbbb: Ok a0b: Ok aa0aaa: Fail b0aaa: Ok +Regexp: (\d{1,3}\.){3}\d{1,3} +1.2.3.4: Ok +1.22.333.44: Ok +1.2.3: Fail +1..2.3: Fail diff --git a/result/schemas/bug303566_1_1.err b/result/schemas/bug303566_1_1.err index 43515ea..9156981 100644 --- a/result/schemas/bug303566_1_1.err +++ b/result/schemas/bug303566_1_1.err @@ -1 +1 @@ -./test/schemas/bug303566_1.xml:9: Schemas validity error : Element 'Part': No match found for key-sequence ['B'] of key reference 'PartRefCountryDummy'. +./test/schemas/bug303566_1.xml:9: Schemas validity error : Element 'Part': No match found for key-sequence ['B'] of keyref 'PartRefCountryDummy'. diff --git a/result/schemas/bug312957_1_0.err b/result/schemas/bug312957_1_0.err index 5ab33fb..5ea089b 100644 --- a/result/schemas/bug312957_1_0.err +++ b/result/schemas/bug312957_1_0.err @@ -1 +1 @@ -./test/schemas/bug312957_0.xml:11: Schemas validity error : Element 'sister': No match found for key-sequence ['annie'] of key reference 'sibling_key_ref'. +./test/schemas/bug312957_0.xml:11: Schemas validity error : Element 'sister': No match found for key-sequence ['annie'] of keyref 'sibling_key_ref'. diff --git a/result/schemas/bug321475_1_0 b/result/schemas/bug321475_1_0 new file mode 100644 index 0000000..f943041 --- /dev/null +++ b/result/schemas/bug321475_1_0 @@ -0,0 +1 @@ +./test/schemas/bug321475_0.xml validates diff --git a/result/schemas/bug321475_1_0.err b/result/schemas/bug321475_1_0.err new file mode 100644 index 0000000..e69de29 diff --git a/result/schemas/bug322411_1_0 b/result/schemas/bug322411_1_0 new file mode 100644 index 0000000..79560fb --- /dev/null +++ b/result/schemas/bug322411_1_0 @@ -0,0 +1 @@ +./test/schemas/bug322411_0.xml validates diff --git a/result/schemas/bug322411_1_0.err b/result/schemas/bug322411_1_0.err new file mode 100644 index 0000000..e69de29 diff --git a/result/schemas/bug323510_1_0 b/result/schemas/bug323510_1_0 new file mode 100644 index 0000000..c33d685 --- /dev/null +++ b/result/schemas/bug323510_1_0 @@ -0,0 +1 @@ +./test/schemas/bug323510_0.xml fails to validate diff --git a/result/schemas/bug323510_1_0.err b/result/schemas/bug323510_1_0.err new file mode 100644 index 0000000..1655070 --- /dev/null +++ b/result/schemas/bug323510_1_0.err @@ -0,0 +1 @@ +./test/schemas/bug323510_0.xml:2: element foo: Schemas validity error : Element 'foo': Missing child element(s). Expected is ( bar ). diff --git a/result/schemas/decimal-1_1_0 b/result/schemas/decimal-1_1_0 new file mode 100644 index 0000000..041b31d --- /dev/null +++ b/result/schemas/decimal-1_1_0 @@ -0,0 +1 @@ +./test/schemas/decimal-1_0.xml fails to validate diff --git a/result/schemas/decimal-1_1_0.err b/result/schemas/decimal-1_1_0.err new file mode 100644 index 0000000..7f4fa9c --- /dev/null +++ b/result/schemas/decimal-1_1_0.err @@ -0,0 +1,8 @@ +./test/schemas/decimal-1_0.xml:16: element val: Schemas validity error : Element 'val': '.' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-1_0.xml:17: element val: Schemas validity error : Element 'val': '-' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-1_0.xml:18: element val: Schemas validity error : Element 'val': '+' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-1_0.xml:19: element val: Schemas validity error : Element 'val': '*' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-1_0.xml:20: element val: Schemas validity error : Element 'val': '- 1' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-1_0.xml:21: element val: Schemas validity error : Element 'val': '+ 1' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-1_0.xml:22: element val: Schemas validity error : Element 'val': '+ 0' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-1_0.xml:23: element val: Schemas validity error : Element 'val': '- 0' is not a valid value of the atomic type 'myDecimal'. diff --git a/result/schemas/decimal-2_1_0 b/result/schemas/decimal-2_1_0 new file mode 100644 index 0000000..f68ca92 --- /dev/null +++ b/result/schemas/decimal-2_1_0 @@ -0,0 +1 @@ +./test/schemas/decimal-2_0.xml fails to validate diff --git a/result/schemas/decimal-2_1_0.err b/result/schemas/decimal-2_1_0.err new file mode 100644 index 0000000..fe663c2 --- /dev/null +++ b/result/schemas/decimal-2_1_0.err @@ -0,0 +1,4 @@ +./test/schemas/decimal-2_0.xml:12: element val: Schemas validity error : Element 'val': [facet 'minInclusive'] The value '-0.1' is less than the minimum value allowed ('0'). +./test/schemas/decimal-2_0.xml:12: element val: Schemas validity error : Element 'val': '-0.1' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-2_0.xml:13: element val: Schemas validity error : Element 'val': [facet 'minInclusive'] The value '-1' is less than the minimum value allowed ('0'). +./test/schemas/decimal-2_0.xml:13: element val: Schemas validity error : Element 'val': '-1' is not a valid value of the atomic type 'myDecimal'. diff --git a/result/schemas/decimal-3_1_0 b/result/schemas/decimal-3_1_0 new file mode 100644 index 0000000..5601535 --- /dev/null +++ b/result/schemas/decimal-3_1_0 @@ -0,0 +1 @@ +./test/schemas/decimal-3_0.xml fails to validate diff --git a/result/schemas/decimal-3_1_0.err b/result/schemas/decimal-3_1_0.err new file mode 100644 index 0000000..bba8cf9 --- /dev/null +++ b/result/schemas/decimal-3_1_0.err @@ -0,0 +1,8 @@ +./test/schemas/decimal-3_0.xml:12: element val: Schemas validity error : Element 'val': [facet 'totalDigits'] The value '0.123' has more digits than are allowed ('2'). +./test/schemas/decimal-3_0.xml:12: element val: Schemas validity error : Element 'val': '0.123' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-3_0.xml:13: element val: Schemas validity error : Element 'val': [facet 'totalDigits'] The value '0.023' has more digits than are allowed ('2'). +./test/schemas/decimal-3_0.xml:13: element val: Schemas validity error : Element 'val': '0.023' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-3_0.xml:14: element val: Schemas validity error : Element 'val': [facet 'totalDigits'] The value '123' has more digits than are allowed ('2'). +./test/schemas/decimal-3_0.xml:14: element val: Schemas validity error : Element 'val': '123' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-3_0.xml:15: element val: Schemas validity error : Element 'val': [facet 'totalDigits'] The value '12.3' has more digits than are allowed ('2'). +./test/schemas/decimal-3_0.xml:15: element val: Schemas validity error : Element 'val': '12.3' is not a valid value of the atomic type 'myDecimal'. diff --git a/result/schemas/derivation-ok-extension-err_0_0.err b/result/schemas/derivation-ok-extension-err_0_0.err index 164c1f3..a0fba52 100644 --- a/result/schemas/derivation-ok-extension-err_0_0.err +++ b/result/schemas/derivation-ok-extension-err_0_0.err @@ -1 +1 @@ -./test/schemas/derivation-ok-extension-err_0.xsd:9: element attribute: Schemas parser error : local complex type, attribute decl. 'barA_1': Duplicate attribute use specified. +./test/schemas/derivation-ok-extension-err_0.xsd:6: element complexType: Schemas parser error : local complex type: Duplicate attribute use 'barA_1'. diff --git a/result/schemas/derivation-ok-extension_0_0.err b/result/schemas/derivation-ok-extension_0_0.err index e07739e..1314232 100644 --- a/result/schemas/derivation-ok-extension_0_0.err +++ b/result/schemas/derivation-ok-extension_0_0.err @@ -1 +1 @@ -./test/schemas/derivation-ok-extension_0.xsd:10: element attribute: Schemas parser warning : Element '{http://www.w3.org/2001/XMLSchema}attribute': Attribute use prohibitions are pointless when extending a type. +./test/schemas/derivation-ok-extension_0.xsd:10: element attribute: Schemas parser warning : Element '{http://www.w3.org/2001/XMLSchema}attribute': Skipping attribute use prohibition, since it is pointless when extending a type. diff --git a/result/schemas/derivation-ok-restriction-2-1-1_0_0.err b/result/schemas/derivation-ok-restriction-2-1-1_0_0.err index 49977e4..bd38dd2 100644 --- a/result/schemas/derivation-ok-restriction-2-1-1_0_0.err +++ b/result/schemas/derivation-ok-restriction-2-1-1_0_0.err @@ -1,6 +1,6 @@ -./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type: A matching attribute use for the 'required' attribute use 'barB_3' of the base type is missing. -./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:16: element attribute: Schemas parser error : local complex type, attribute decl. 'barB_1': The 'optional' use is inconsistent with a matching 'required' use of the base type. -./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:23: element attribute: Schemas parser error : local complex type, attribute decl. 'barC_1': Neither a matching attribute use, nor a matching wildcard in the base type does exist. -./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:25: element attribute: Schemas parser error : local complex type, attribute decl. 'barC_2': Neither a matching attribute use, nor a matching wildcard in the base type does exist. -./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:30: element attribute: Schemas parser error : local complex type, attribute decl. 'barD_1': Neither a matching attribute use, nor a matching wildcard in the base type does exist. -./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:32: element attribute: Schemas parser error : local complex type, attribute decl. 'barD_2': Neither a matching attribute use, nor a matching wildcard in the base type does exist. +./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type, attribute use 'barB_1': The 'optional' attribute use is inconsistent with the corresponding 'required' attribute use of the base complex type definition '{http://FOO}typeA'. +./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type, attribute use 'barC_1': Neither a matching attribute use, nor a matching wildcard exists in the base complex type definition '{http://FOO}typeA'. +./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type, attribute use 'barC_2': Neither a matching attribute use, nor a matching wildcard exists in the base complex type definition '{http://FOO}typeA'. +./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type, attribute use 'barD_1': Neither a matching attribute use, nor a matching wildcard exists in the base complex type definition '{http://FOO}typeA'. +./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type, attribute use 'barD_2': Neither a matching attribute use, nor a matching wildcard exists in the base complex type definition '{http://FOO}typeA'. +./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type: A matching attribute use for the 'required' attribute use 'barB_3' of the base complex type definition '{http://FOO}typeA' is missing. diff --git a/result/schemas/derivation-ok-restriction-4-1-err_0_0.err b/result/schemas/derivation-ok-restriction-4-1-err_0_0.err index 8cacb07..72283fb 100644 --- a/result/schemas/derivation-ok-restriction-4-1-err_0_0.err +++ b/result/schemas/derivation-ok-restriction-4-1-err_0_0.err @@ -1,3 +1,3 @@ -./test/schemas/derivation-ok-restriction-4-1-err_0.xsd:33: element complexType: Schemas parser error : complex type 'type.A': The type has an attribute wildcard, but the base type complex type 'base.type.A' does not have one. -./test/schemas/derivation-ok-restriction-4-1-err_0.xsd:45: element complexType: Schemas parser error : complex type 'type.B': The attribute wildcard is not a valid subset of the wildcard in the base type complex type 'base.type.B'. -./test/schemas/derivation-ok-restriction-4-1-err_0.xsd:57: element complexType: Schemas parser error : complex type 'type.C': The 'process contents' of the attribute wildcard is weaker than the one in the base type complex type 'base.type.C'. +./test/schemas/derivation-ok-restriction-4-1-err_0.xsd:33: element complexType: Schemas parser error : complex type 'type.A': The complex type definition has an attribute wildcard, but the base complex type definition '{http://FOO}base.type.A' does not have one. +./test/schemas/derivation-ok-restriction-4-1-err_0.xsd:45: element complexType: Schemas parser error : complex type 'type.B': The attribute wildcard is not a valid subset of the wildcard in the base complex type definition '{http://FOO}base.type.B'. +./test/schemas/derivation-ok-restriction-4-1-err_0.xsd:65: element complexType: Schemas parser error : complex type 'base.type.C': The {process contents} of the attribute wildcard is weaker than the one in the base complex type definition '{http://FOO}base.type.C'. diff --git a/result/schemas/element-err_0_0.err b/result/schemas/element-err_0_0.err index 575102c..70524f6 100644 --- a/result/schemas/element-err_0_0.err +++ b/result/schemas/element-err_0_0.err @@ -1,20 +1,20 @@ ./test/schemas/element-err_0.xsd:8: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'name' is required but missing. -./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : element decl. '{http://FOO}foo': The attribute 'ref' is not allowed. -./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : element decl. '{http://FOO}foo': The attribute 'minOccurs' is not allowed. -./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : element decl. '{http://FOO}foo': The attribute 'maxOccurs' is not allowed. -./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : element decl. '{http://FOO}foo': The attribute 'form' is not allowed. +./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'ref' is not allowed. +./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'minOccurs' is not allowed. +./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'maxOccurs' is not allowed. +./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'form' is not allowed. ./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'final': The value 'fantasy' is not valid. Expected is '(#all | List of (extension | restriction))'. ./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'block': The value 'flute' is not valid. Expected is '(#all | List of (extension | restriction | substitution))'. -./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : element decl. '{http://FOO}foo': The attributes 'default' and 'fixed' are mutually exclusive. +./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attributes 'default' and 'fixed' are mutually exclusive. ./test/schemas/element-err_0.xsd:22: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'minOccurs': The value must not be greater than the value of 'maxOccurs'. ./test/schemas/element-err_0.xsd:22: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attributes 'ref' and 'name' are mutually exclusive. ./test/schemas/element-err_0.xsd:22: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'abstract': Only the attributes 'minOccurs', 'maxOccurs' and 'id' are allowed in addition to 'ref'. ./test/schemas/element-err_0.xsd:23: element complexType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The content is not valid. Expected is (annotation?). ./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'maxOccurs': The value must be greater than or equal to 1. -./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : element decl. '{http://FOO}myomy': The attribute 'abstract' is not allowed. -./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : element decl. '{http://FOO}myomy': The attribute 'substitutionGroup' is not allowed. -./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : element decl. '{http://FOO}myomy': The attribute 'final' is not allowed. +./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'abstract' is not allowed. +./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'substitutionGroup' is not allowed. +./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'final' is not allowed. ./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'block': The value 'flute' is not valid. Expected is '(#all | List of (extension | restriction | substitution))'. -./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : element decl. '{http://FOO}myomy': The attributes 'default' and 'fixed' are mutually exclusive. -./test/schemas/element-err_0.xsd:31: element complexType: Schemas parser error : element decl. '{http://FOO}myomy': The attribute 'type' and the child are mutually exclusive. -./test/schemas/element-err_0.xsd:32: element simpleType: Schemas parser error : element decl. '{http://FOO}myomy': The content is not valid. Expected is (annotation?, ((simpleType | complexType)?, (unique | key | keyref)*)). +./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attributes 'default' and 'fixed' are mutually exclusive. +./test/schemas/element-err_0.xsd:31: element complexType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'type' and the child are mutually exclusive. +./test/schemas/element-err_0.xsd:32: element simpleType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The content is not valid. Expected is (annotation?, ((simpleType | complexType)?, (unique | key | keyref)*)). diff --git a/result/schemas/idc-keyref-err1_1_0 b/result/schemas/idc-keyref-err1_1_0 new file mode 100644 index 0000000..d4333a9 --- /dev/null +++ b/result/schemas/idc-keyref-err1_1_0 @@ -0,0 +1 @@ +./test/schemas/idc-keyref-err1_0.xml fails to validate diff --git a/result/schemas/idc-keyref-err1_1_0.err b/result/schemas/idc-keyref-err1_1_0.err new file mode 100644 index 0000000..8e9cb20 --- /dev/null +++ b/result/schemas/idc-keyref-err1_1_0.err @@ -0,0 +1 @@ +./test/schemas/idc-keyref-err1_0.xml:12: Schemas validity error : Element '{urn:test:foo}Ref': No match found for key-sequence ['L4'] of keyref '{urn:test:foo}LinkKeyRef'. diff --git a/result/schemas/include3_0_0.err b/result/schemas/include3_0_0.err index 59d7d1d..27bb5d0 100644 --- a/result/schemas/include3_0_0.err +++ b/result/schemas/include3_0_0.err @@ -1 +1 @@ -./test/schemas/include3_0.xsd:7: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': A global element declaration with the name 'bar' does already exist. +test/schemas/include3_0.inc:4: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': A global element declaration '{http://FOO}bar' does already exist. diff --git a/result/schemas/restriction-attr1_0_0.err b/result/schemas/restriction-attr1_0_0.err index c08d41d..cdf003d 100644 --- a/result/schemas/restriction-attr1_0_0.err +++ b/result/schemas/restriction-attr1_0_0.err @@ -1 +1 @@ -./test/schemas/restriction-attr1_0.xsd:8: element attribute: Schemas parser error : local complex type, attribute decl. 'barA': The 'optional' use is inconsistent with a matching 'required' use of the base type. +./test/schemas/restriction-attr1_0.xsd:5: element complexType: Schemas parser error : local complex type, attribute use 'barA': The 'optional' attribute use is inconsistent with the corresponding 'required' attribute use of the base complex type definition '{http://FOO}typeA'. diff --git a/result/schemas/scc-no-xmlns_0_0.err b/result/schemas/scc-no-xmlns_0_0.err index fe882be..aad2b68 100644 --- a/result/schemas/scc-no-xmlns_0_0.err +++ b/result/schemas/scc-no-xmlns_0_0.err @@ -1 +1 @@ -./test/schemas/scc-no-xmlns_0.xsd:7: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute', attribute 'name': The value of type 'xs:NCName' must not match 'xmlns'. +./test/schemas/scc-no-xmlns_0.xsd:7: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute', attribute 'name': The value of the attribute must not match 'xmlns'. diff --git a/result/schemas/scc-no-xsi_0_0.err b/result/schemas/scc-no-xsi_0_0.err index a57132c..e04e3e4 100644 --- a/result/schemas/scc-no-xsi_0_0.err +++ b/result/schemas/scc-no-xsi_0_0.err @@ -1 +1 @@ -./test/schemas/scc-no-xsi_0.xsd:7: element attribute: Schemas parser error : attribute decl. '{http://www.w3.org/2001/XMLSchema-instance}bar': The target namespace must not match 'http://www.w3.org/2001/XMLSchema-instance'. +./test/schemas/scc-no-xsi_0.xsd:7: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The target namespace must not match 'http://www.w3.org/2001/XMLSchema-instance'. diff --git a/result/schemas/src-attribute1_0_0.err b/result/schemas/src-attribute1_0_0.err index ceafdbe..368d97c 100644 --- a/result/schemas/src-attribute1_0_0.err +++ b/result/schemas/src-attribute1_0_0.err @@ -1 +1 @@ -./test/schemas/src-attribute1_0.xsd:9: element attribute: Schemas parser error : attribute decl. 'bar': The attributes 'default' and 'fixed' are mutually exclusive. +./test/schemas/src-attribute1_0.xsd:9: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The attributes 'default' and 'fixed' are mutually exclusive. diff --git a/result/schemas/src-attribute2_0_0.err b/result/schemas/src-attribute2_0_0.err index 7206544..ac6df6f 100644 --- a/result/schemas/src-attribute2_0_0.err +++ b/result/schemas/src-attribute2_0_0.err @@ -1 +1 @@ -./test/schemas/src-attribute2_0.xsd:9: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute', attribute 'use': The value must be 'optional' if the attribute 'default' is present as well. +./test/schemas/src-attribute2_0.xsd:9: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The value of the attribute 'use' must be 'optional' if the attribute 'default' is present. diff --git a/result/schemas/src-attribute3-1_0_0.err b/result/schemas/src-attribute3-1_0_0.err index 6cf4404..3345b3c 100644 --- a/result/schemas/src-attribute3-1_0_0.err +++ b/result/schemas/src-attribute3-1_0_0.err @@ -1 +1 @@ -./test/schemas/src-attribute3-1_0.xsd:9: element attribute: Schemas parser error : attribute use '{http://foo}bar': The attributes 'ref' and 'name' are mutually exclusive. +./test/schemas/src-attribute3-1_0.xsd:9: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The attribute 'name' is not allowed. diff --git a/result/schemas/src-attribute3-2-form_0_0.err b/result/schemas/src-attribute3-2-form_0_0.err index 5b3c7db..ad3667b 100644 --- a/result/schemas/src-attribute3-2-form_0_0.err +++ b/result/schemas/src-attribute3-2-form_0_0.err @@ -1 +1 @@ -./test/schemas/src-attribute3-2-form_0.xsd:10: element attribute: Schemas parser error : attribute use '{http://foo}bar': The attribute 'form' is not allowed. +./test/schemas/src-attribute3-2-form_0.xsd:10: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The attribute 'form' is not allowed. diff --git a/result/schemas/src-attribute3-2-st_0_0.err b/result/schemas/src-attribute3-2-st_0_0.err index 797b8c1..ae85e0a 100644 --- a/result/schemas/src-attribute3-2-st_0_0.err +++ b/result/schemas/src-attribute3-2-st_0_0.err @@ -1 +1 @@ -./test/schemas/src-attribute3-2-st_0.xsd:11: element simpleType: Schemas parser error : attribute use '{http://foo}bar': The content is not valid. Expected is (annotation?). +./test/schemas/src-attribute3-2-st_0.xsd:11: element simpleType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The content is not valid. Expected is (annotation?). diff --git a/result/schemas/src-attribute3-2-type_0_0.err b/result/schemas/src-attribute3-2-type_0_0.err index 3a43d47..50016d8 100644 --- a/result/schemas/src-attribute3-2-type_0_0.err +++ b/result/schemas/src-attribute3-2-type_0_0.err @@ -1 +1 @@ -./test/schemas/src-attribute3-2-type_0.xsd:10: element attribute: Schemas parser error : attribute use '{http://foo}bar': The attribute 'type' is not allowed. +./test/schemas/src-attribute3-2-type_0.xsd:10: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The attribute 'type' is not allowed. diff --git a/result/schemas/src-attribute4_0_0.err b/result/schemas/src-attribute4_0_0.err index a401799..cac6718 100644 --- a/result/schemas/src-attribute4_0_0.err +++ b/result/schemas/src-attribute4_0_0.err @@ -1 +1 @@ -./test/schemas/src-attribute4_0.xsd:8: element simpleType: Schemas parser error : attribute decl. '{http://foo}bar': The attribute 'type' and the child are mutually exclusive. +./test/schemas/src-attribute4_0.xsd:8: element simpleType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The attribute 'type' and the child are mutually exclusive. diff --git a/result/schemas/src-element1_0_0.err b/result/schemas/src-element1_0_0.err index ab39e7a..9d8b198 100644 --- a/result/schemas/src-element1_0_0.err +++ b/result/schemas/src-element1_0_0.err @@ -1 +1 @@ -./test/schemas/src-element1_0.xsd:7: element element: Schemas parser error : element decl. '{http://foo}foo': The attributes 'default' and 'fixed' are mutually exclusive. +./test/schemas/src-element1_0.xsd:7: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attributes 'default' and 'fixed' are mutually exclusive. diff --git a/result/schemas/src-element3_0_0.err b/result/schemas/src-element3_0_0.err index fc60d9d..b8bd817 100644 --- a/result/schemas/src-element3_0_0.err +++ b/result/schemas/src-element3_0_0.err @@ -1,2 +1,2 @@ -./test/schemas/src-element3_0.xsd:8: element complexType: Schemas parser error : element decl. '{http://foo}foo': The attribute 'type' and the child are mutually exclusive. -./test/schemas/src-element3_0.xsd:16: element simpleType: Schemas parser error : element decl. '{http://foo}bar': The attribute 'type' and the child are mutually exclusive. +./test/schemas/src-element3_0.xsd:8: element complexType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'type' and the child are mutually exclusive. +./test/schemas/src-element3_0.xsd:16: element simpleType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'type' and the child are mutually exclusive. diff --git a/runsuite.c b/runsuite.c index aecd6ae..4e9858a 100644 --- a/runsuite.c +++ b/runsuite.c @@ -6,11 +6,16 @@ * daniel@veillard.com */ +#ifdef HAVE_CONFIG_H +#include "libxml.h" +#else +#include +#endif + #if !defined(_WIN32) || defined(__CYGWIN__) #include #endif #include -#include #include #include #include @@ -31,11 +36,16 @@ #define LOGFILE "runsuite.log" static FILE *logfile = NULL; -static int verbose = 0; - -#if defined(_WIN32) && !defined(__CYGWIN__) -#define vsnprintf _vsnprintf -#define snprintf _snprintf +static int verbose = 0; + + + +#if defined(_WIN32) && !defined(__CYGWIN__) + +#define vsnprintf _vsnprintf + +#define snprintf _snprintf + #endif /************************************************************************ @@ -83,7 +93,6 @@ static int nb_internals = 0; static int nb_schematas = 0; static int nb_unimplemented = 0; static int nb_leaks = 0; -static long libxmlMemoryAllocatedBase = 0; static int extraMemoryFromResolver = 0; static int @@ -225,7 +234,6 @@ initializeLibxml2(void) { xmlSchemaInitTypes(); xmlRelaxNGInitTypes(); #endif - libxmlMemoryAllocatedBase = xmlMemUsed(); } static xmlNodePtr @@ -931,9 +939,17 @@ xstcTestGroup(xmlNodePtr cur, const char *base) { } instance = getNext(cur, "./ts:instanceTest[1]"); while (instance != NULL) { - xstcTestInstance(instance, schemas, path, base); + if (schemas != NULL) { + xstcTestInstance(instance, schemas, path, base); + } else { + /* + * We'll automatically mark the instances as failed + * if the schema was broken. + */ + nb_errors++; + } instance = getNext(instance, - "following-sibling::ts:instanceTest[1]"); + "following-sibling::ts:instanceTest[1]"); } } else if (xmlStrEqual(validity, BAD_CAST "invalid")) { nb_schematas++; @@ -1033,7 +1049,7 @@ done: int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { - int res, ret = 0; + int ret = 0; int old_errors, old_tests, old_leaks; logfile = fopen(LOGFILE, "w"); @@ -1051,7 +1067,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { old_errors = nb_errors; old_tests = nb_tests; old_leaks = nb_leaks; - res = xsdTest(); + xsdTest(); if ((nb_errors == old_errors) && (nb_leaks == old_leaks)) printf("Ran %d tests, no errors\n", nb_tests - old_tests); else @@ -1062,7 +1078,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { old_errors = nb_errors; old_tests = nb_tests; old_leaks = nb_leaks; - res = rngTest1(); + rngTest1(); if ((nb_errors == old_errors) && (nb_leaks == old_leaks)) printf("Ran %d tests, no errors\n", nb_tests - old_tests); else @@ -1073,7 +1089,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { old_errors = nb_errors; old_tests = nb_tests; old_leaks = nb_leaks; - res = rngTest2(); + rngTest2(); if ((nb_errors == old_errors) && (nb_leaks == old_leaks)) printf("Ran %d tests, no errors\n", nb_tests - old_tests); else @@ -1086,8 +1102,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { old_leaks = nb_leaks; nb_internals = 0; nb_schematas = 0; - res = xstcMetadata( - "xstc/Tests/Metadata/NISTXMLSchemaDatatypes.testSet", + xstcMetadata("xstc/Tests/Metadata/NISTXMLSchemaDatatypes.testSet", "xstc/Tests/Metadata/"); if ((nb_errors == old_errors) && (nb_leaks == old_leaks)) printf("Ran %d tests (%d schemata), no errors\n", @@ -1104,8 +1119,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { old_leaks = nb_leaks; nb_internals = 0; nb_schematas = 0; - res = xstcMetadata( - "xstc/Tests/Metadata/SunXMLSchema1-0-20020116.testSet", + xstcMetadata("xstc/Tests/Metadata/SunXMLSchema1-0-20020116.testSet", "xstc/Tests/"); if ((nb_errors == old_errors) && (nb_leaks == old_leaks)) printf("Ran %d tests (%d schemata), no errors\n", @@ -1122,8 +1136,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { old_leaks = nb_leaks; nb_internals = 0; nb_schematas = 0; - res = xstcMetadata( - "xstc/Tests/Metadata/MSXMLSchema1-0-20020116.testSet", + xstcMetadata("xstc/Tests/Metadata/MSXMLSchema1-0-20020116.testSet", "xstc/Tests/"); if ((nb_errors == old_errors) && (nb_leaks == old_leaks)) printf("Ran %d tests (%d schemata), no errors\n", diff --git a/runtest.c b/runtest.c index 897cb9b..02fc159 100644 --- a/runtest.c +++ b/runtest.c @@ -11,11 +11,16 @@ * daniel@veillard.com */ +#ifdef HAVE_CONFIG_H +#include "libxml.h" +#else +#include +#endif + #if !defined(_WIN32) || defined(__CYGWIN__) #include #endif #include -#include #include #include #include @@ -204,7 +209,6 @@ static void globfree(glob_t *pglob) { static int nb_tests = 0; static int nb_errors = 0; static int nb_leaks = 0; -static long libxmlMemoryAllocatedBase = 0; static int extraMemoryFromResolver = 0; static int @@ -536,7 +540,6 @@ initializeLibxml2(void) { xmlSchemaInitTypes(); xmlRelaxNGInitTypes(); #endif - libxmlMemoryAllocatedBase = xmlMemUsed(); } @@ -2926,14 +2929,15 @@ schemasOneTest(const char *sch, unlink(temp); free(temp); - if (err != NULL) { + if ((ret != 0) && (err != NULL)) { if (compareFileMem(err, testErrors, testErrorsSize)) { fprintf(stderr, "Error for %s on %s failed\n", filename, sch); ret = 1; + } else { + ret = 0; } } - xmlSchemaFreeValidCtxt(ctxt); xmlFreeDoc(doc); return(ret); @@ -3029,8 +3033,8 @@ schemasTest(const char *filename, nb_tests++; ret = schemasOneTest(filename, instance, result, err, options, schemas); - if (res != 0) - ret = res; + if (ret != 0) + res = ret; } } globfree(&globbuf); diff --git a/schematron.c b/schematron.c index 9cb5027..98184ac 100644 --- a/schematron.c +++ b/schematron.c @@ -562,7 +562,7 @@ xmlSchematronFree(xmlSchematronPtr schema) xmlFreeDoc(schema->doc); if (schema->namespaces != NULL) - xmlFree(schema->namespaces); + xmlFree((char **) schema->namespaces); xmlSchematronFreeRules(schema->rules); xmlSchematronFreePatterns(schema->patterns); @@ -709,7 +709,7 @@ xmlSchematronFreeParserCtxt(xmlSchematronParserCtxtPtr ctxt) xmlXPathFreeContext(ctxt->xctxt); } if (ctxt->namespaces != NULL) - xmlFree(ctxt->namespaces); + xmlFree((char **) ctxt->namespaces); xmlDictFree(ctxt->dict); xmlFree(ctxt); } @@ -809,7 +809,7 @@ xmlSchematronAddNamespace(xmlSchematronParserCtxtPtr ctxt, const xmlChar **tmp; tmp = (const xmlChar **) - xmlRealloc(ctxt->namespaces, ctxt->maxNamespaces * 4 * + xmlRealloc((xmlChar **) ctxt->namespaces, ctxt->maxNamespaces * 4 * sizeof(const xmlChar *)); if (tmp == NULL) { xmlSchematronPErrMemory(NULL, "allocating parser namespaces", diff --git a/test/HTML/53867.html b/test/HTML/53867.html new file mode 100644 index 0000000..ac27999 --- /dev/null +++ b/test/HTML/53867.html @@ -0,0 +1,69 @@ + + + + + diff --git a/test/XPath/docs/nodes b/test/XPath/docs/nodes new file mode 100644 index 0000000..a863df0 --- /dev/null +++ b/test/XPath/docs/nodes @@ -0,0 +1,2 @@ + +txttxt \ No newline at end of file diff --git a/test/XPath/tests/nodespat b/test/XPath/tests/nodespat new file mode 100644 index 0000000..c157a3e --- /dev/null +++ b/test/XPath/tests/nodespat @@ -0,0 +1,5 @@ +/. +//. +/root//. +//.//./././/. +/root//././/bar//. \ No newline at end of file diff --git a/test/c14n/exc-without-comments/test-2.xml b/test/c14n/exc-without-comments/test-2.xml new file mode 100644 index 0000000..83d15a7 --- /dev/null +++ b/test/c14n/exc-without-comments/test-2.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + sj1VXDB2VMCU5qmva2OtDw3kKOs= + + + ... + + + ... + + + diff --git a/test/c14n/exc-without-comments/test-2.xpath b/test/c14n/exc-without-comments/test-2.xpath new file mode 100644 index 0000000..e57652f --- /dev/null +++ b/test/c14n/exc-without-comments/test-2.xpath @@ -0,0 +1,6 @@ + +(//. | //@* | //namespace::*) +[ + ancestor-or-self::ds:SignedInfo +] + \ No newline at end of file diff --git a/test/ns7 b/test/ns7 new file mode 100644 index 0000000..d32b3b4 --- /dev/null +++ b/test/ns7 @@ -0,0 +1 @@ + diff --git a/test/regexp/hard b/test/regexp/hard index 40c6d2d..ddb4cfd 100644 --- a/test/regexp/hard +++ b/test/regexp/hard @@ -5,3 +5,8 @@ aaabbbb a0b aa0aaa b0aaa +=>(\d{1,3}\.){3}\d{1,3} +1.2.3.4 +1.22.333.44 +1.2.3 +1..2.3 diff --git a/test/schemas/bug321475_0.xml b/test/schemas/bug321475_0.xml new file mode 100644 index 0000000..6190231 --- /dev/null +++ b/test/schemas/bug321475_0.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/test/schemas/bug321475_1.xsd b/test/schemas/bug321475_1.xsd new file mode 100644 index 0000000..b714a0d --- /dev/null +++ b/test/schemas/bug321475_1.xsd @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/schemas/bug322411_0.xml b/test/schemas/bug322411_0.xml new file mode 100644 index 0000000..f883648 --- /dev/null +++ b/test/schemas/bug322411_0.xml @@ -0,0 +1,93 @@ + + + + + 1 + 2 + 3 + 4 + 5 + + dupl1 + dupl2 + dupl3 + dupl4 + dupl5 + dupl6 + dupl7 + dupl8 + dupl9 + dupl10 + dupl11 + + 6 + 7 + 8 + 9 + 10 + 11 + + 12 + 13 + 14 + 15 + + dupl1 + dupl2 + dupl3 + dupl4 + dupl5 + dupl6 + dupl7 + dupl8 + dupl9 + dupl10 + dupl11 + + 16 + 17 + 18 + 19 + 20 + 21 + + + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + + dupl1 + dupl2 + dupl3 + dupl4 + dupl5 + dupl6 + dupl7 + dupl8 + dupl9 + dupl10 + dupl11 + + + + 41 + + + diff --git a/test/schemas/bug322411_1.xsd b/test/schemas/bug322411_1.xsd new file mode 100644 index 0000000..383dee6 --- /dev/null +++ b/test/schemas/bug322411_1.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/schemas/bug323510_0.xml b/test/schemas/bug323510_0.xml new file mode 100644 index 0000000..ce7647d --- /dev/null +++ b/test/schemas/bug323510_0.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/schemas/bug323510_1.xsd b/test/schemas/bug323510_1.xsd new file mode 100644 index 0000000..8b047ce --- /dev/null +++ b/test/schemas/bug323510_1.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/test/schemas/decimal-1.xml b/test/schemas/decimal-1.xml new file mode 100644 index 0000000..4568ff1 --- /dev/null +++ b/test/schemas/decimal-1.xml @@ -0,0 +1,37 @@ + + + + + 0. + .0 + .10 + 01. + 000 + 123456789012345678 + -123456789012345678 + 0.123456789012345678 + -0.123456789012345678 + + . + - + + + * + - 1 + + 1 + + 0 + - 0 + + diff --git a/test/schemas/decimal-1.xsd b/test/schemas/decimal-1.xsd new file mode 100644 index 0000000..830ca3e --- /dev/null +++ b/test/schemas/decimal-1.xsd @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/test/schemas/decimal-1_0.xml b/test/schemas/decimal-1_0.xml new file mode 100644 index 0000000..7bf3719 --- /dev/null +++ b/test/schemas/decimal-1_0.xml @@ -0,0 +1,24 @@ + + + + 0. + .0 + .10 + 01. + 000 + 123456789012345678 + -123456789012345678 + 0.123456789012345678 + -0.123456789012345678 + + . + - + + + * + - 1 + + 1 + + 0 + - 0 + diff --git a/test/schemas/decimal-1_1.xsd b/test/schemas/decimal-1_1.xsd new file mode 100644 index 0000000..f598c86 --- /dev/null +++ b/test/schemas/decimal-1_1.xsd @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/test/schemas/decimal-2_0.xml b/test/schemas/decimal-2_0.xml new file mode 100644 index 0000000..166f781 --- /dev/null +++ b/test/schemas/decimal-2_0.xml @@ -0,0 +1,14 @@ + + + + 0.1 + 0.001 + 0.0 + -0.0 + 1 + + -0.1 + -1 + diff --git a/test/schemas/decimal-2_1.xsd b/test/schemas/decimal-2_1.xsd new file mode 100644 index 0000000..cc71670 --- /dev/null +++ b/test/schemas/decimal-2_1.xsd @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/test/schemas/decimal-3_0.xml b/test/schemas/decimal-3_0.xml new file mode 100644 index 0000000..fec1ed3 --- /dev/null +++ b/test/schemas/decimal-3_0.xml @@ -0,0 +1,17 @@ + + + + 0.12 + 0.0 + 0.02 + 12 + 1.2 + + 0.123 + 0.023 + 123 + 12.3 + + diff --git a/test/schemas/decimal-3_1.xsd b/test/schemas/decimal-3_1.xsd new file mode 100644 index 0000000..23ae8f7 --- /dev/null +++ b/test/schemas/decimal-3_1.xsd @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/test/schemas/idc-keyref-err1_0.xml b/test/schemas/idc-keyref-err1_0.xml new file mode 100644 index 0000000..64a1d0b --- /dev/null +++ b/test/schemas/idc-keyref-err1_0.xml @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/test/schemas/idc-keyref-err1_1.xsd b/test/schemas/idc-keyref-err1_1.xsd new file mode 100644 index 0000000..43c769f --- /dev/null +++ b/test/schemas/idc-keyref-err1_1.xsd @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testapi.c b/testapi.c index fe2d4c8..298a3f1 100644 --- a/testapi.c +++ b/testapi.c @@ -8,7 +8,12 @@ * daniel@veillard.com */ +#ifdef HAVE_CONFIG_H +#include "libxml.h" +#else #include +#endif + #include #include #include @@ -278,7 +283,7 @@ static void des_long(int no ATTRIBUTE_UNUSED, long val ATTRIBUTE_UNUSED, int nr static xmlChar gen_xmlChar(int no, int nr ATTRIBUTE_UNUSED) { if (no == 0) return('a'); if (no == 1) return(' '); - if (no == 2) return('ø'); + if (no == 2) return((xmlChar) 'ø'); return(0); } @@ -291,7 +296,7 @@ static unsigned int gen_unsigned_int(int no, int nr ATTRIBUTE_UNUSED) { if (no == 0) return(0); if (no == 1) return(1); if (no == 2) return(122); - return(-1); + return((unsigned int) -1); } static void des_unsigned_int(int no ATTRIBUTE_UNUSED, unsigned int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { @@ -303,7 +308,7 @@ static unsigned long gen_unsigned_long(int no, int nr ATTRIBUTE_UNUSED) { if (no == 0) return(0); if (no == 1) return(1); if (no == 2) return(122); - return(-1); + return((unsigned long) -1); } static void des_unsigned_long(int no ATTRIBUTE_UNUSED, unsigned long val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { @@ -689,6 +694,24 @@ static xmlCharEncoding gen_xmlCharEncoding(int no, int nr ATTRIBUTE_UNUSED) { static void des_xmlCharEncoding(int no ATTRIBUTE_UNUSED, xmlCharEncoding val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { } +#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED) + +#define gen_nb_xmlExpCtxtPtr 1 +static xmlExpCtxtPtr gen_xmlExpCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { + return(NULL); +} +static void des_xmlExpCtxtPtr(int no ATTRIBUTE_UNUSED, xmlExpCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { +} + +#define gen_nb_xmlExpNodePtr 1 +static xmlExpNodePtr gen_xmlExpNodePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { + return(NULL); +} +static void des_xmlExpNodePtr(int no ATTRIBUTE_UNUSED, xmlExpNodePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { +} + +#endif + #define gen_nb_xmlHashDeallocator 2 static void test_xmlHashDeallocator(void *payload ATTRIBUTE_UNUSED, xmlChar *name ATTRIBUTE_UNUSED) { @@ -2928,6 +2951,59 @@ test_htmlDocDumpMemory(void) { } +static int +test_htmlDocDumpMemoryFormat(void) { + int test_ret = 0; + +#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) + int mem_base; + xmlDocPtr cur; /* the document */ + int n_cur; + xmlChar ** mem; /* OUT: the memory pointer */ + int n_mem; + int * size; /* OUT: the memory length */ + int n_size; + int format; /* should formatting spaces been added */ + int n_format; + + for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) { + for (n_mem = 0;n_mem < gen_nb_xmlChar_ptr_ptr;n_mem++) { + for (n_size = 0;n_size < gen_nb_int_ptr;n_size++) { + for (n_format = 0;n_format < gen_nb_int;n_format++) { + mem_base = xmlMemBlocks(); + cur = gen_xmlDocPtr(n_cur, 0); + mem = gen_xmlChar_ptr_ptr(n_mem, 1); + size = gen_int_ptr(n_size, 2); + format = gen_int(n_format, 3); + + htmlDocDumpMemoryFormat(cur, mem, size, format); + call_tests++; + des_xmlDocPtr(n_cur, cur, 0); + des_xmlChar_ptr_ptr(n_mem, mem, 1); + des_int_ptr(n_size, size, 2); + des_int(n_format, format, 3); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in htmlDocDumpMemoryFormat", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_cur); + printf(" %d", n_mem); + printf(" %d", n_size); + printf(" %d", n_format); + printf("\n"); + } + } + } + } + } + function_tests++; +#endif + + return(test_ret); +} + + static int test_htmlGetMetaEncoding(void) { int test_ret = 0; @@ -3535,11 +3611,12 @@ static int test_HTMLtree(void) { int test_ret = 0; - if (quiet == 0) printf("Testing HTMLtree : 17 of 17 functions ...\n"); + if (quiet == 0) printf("Testing HTMLtree : 18 of 18 functions ...\n"); test_ret += test_htmlDocContentDumpFormatOutput(); test_ret += test_htmlDocContentDumpOutput(); test_ret += test_htmlDocDump(); test_ret += test_htmlDocDumpMemory(); + test_ret += test_htmlDocDumpMemoryFormat(); test_ret += test_htmlGetMetaEncoding(); test_ret += test_htmlIsBooleanAttr(); test_ret += test_htmlNewDoc(); @@ -16960,11 +17037,100 @@ test_xmlStreamPushAttr(void) { return(test_ret); } + +static int +test_xmlStreamPushNode(void) { + int test_ret = 0; + +#if defined(LIBXML_PATTERN_ENABLED) + int mem_base; + int ret_val; + xmlStreamCtxtPtr stream; /* the stream context */ + int n_stream; + xmlChar * name; /* the current name */ + int n_name; + xmlChar * ns; /* the namespace name */ + int n_ns; + int nodeType; /* the type of the node being pushed */ + int n_nodeType; + + for (n_stream = 0;n_stream < gen_nb_xmlStreamCtxtPtr;n_stream++) { + for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) { + for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) { + for (n_nodeType = 0;n_nodeType < gen_nb_int;n_nodeType++) { + mem_base = xmlMemBlocks(); + stream = gen_xmlStreamCtxtPtr(n_stream, 0); + name = gen_const_xmlChar_ptr(n_name, 1); + ns = gen_const_xmlChar_ptr(n_ns, 2); + nodeType = gen_int(n_nodeType, 3); + + ret_val = xmlStreamPushNode(stream, (const xmlChar *)name, (const xmlChar *)ns, nodeType); + desret_int(ret_val); + call_tests++; + des_xmlStreamCtxtPtr(n_stream, stream, 0); + des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1); + des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 2); + des_int(n_nodeType, nodeType, 3); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlStreamPushNode", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_stream); + printf(" %d", n_name); + printf(" %d", n_ns); + printf(" %d", n_nodeType); + printf("\n"); + } + } + } + } + } + function_tests++; +#endif + + return(test_ret); +} + + +static int +test_xmlStreamWantsAnyNode(void) { + int test_ret = 0; + +#if defined(LIBXML_PATTERN_ENABLED) + int mem_base; + int ret_val; + xmlStreamCtxtPtr streamCtxt; /* the stream context */ + int n_streamCtxt; + + for (n_streamCtxt = 0;n_streamCtxt < gen_nb_xmlStreamCtxtPtr;n_streamCtxt++) { + mem_base = xmlMemBlocks(); + streamCtxt = gen_xmlStreamCtxtPtr(n_streamCtxt, 0); + + ret_val = xmlStreamWantsAnyNode(streamCtxt); + desret_int(ret_val); + call_tests++; + des_xmlStreamCtxtPtr(n_streamCtxt, streamCtxt, 0); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlStreamWantsAnyNode", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_streamCtxt); + printf("\n"); + } + } + function_tests++; +#endif + + return(test_ret); +} + static int test_pattern(void) { int test_ret = 0; - if (quiet == 0) printf("Testing pattern : 8 of 13 functions ...\n"); + if (quiet == 0) printf("Testing pattern : 10 of 15 functions ...\n"); test_ret += test_xmlPatternFromRoot(); test_ret += test_xmlPatternGetStreamCtxt(); test_ret += test_xmlPatternMatch(); @@ -16975,6 +17141,8 @@ test_pattern(void) { test_ret += test_xmlStreamPop(); test_ret += test_xmlStreamPush(); test_ret += test_xmlStreamPushAttr(); + test_ret += test_xmlStreamPushNode(); + test_ret += test_xmlStreamWantsAnyNode(); if (test_ret != 0) printf("Module pattern: %d errors\n", test_ret); @@ -17757,6 +17925,7 @@ test_xmlSchematronNewParserCtxt(void) { return(test_ret); } +#ifdef LIBXML_SCHEMATRON_ENABLED #define gen_nb_xmlSchematronPtr 1 static xmlSchematronPtr gen_xmlSchematronPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { @@ -17764,6 +17933,8 @@ static xmlSchematronPtr gen_xmlSchematronPtr(int no ATTRIBUTE_UNUSED, int nr ATT } static void des_xmlSchematronPtr(int no ATTRIBUTE_UNUSED, xmlSchematronPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { } +#endif + static int test_xmlSchematronNewValidCtxt(void) { @@ -17774,6 +17945,7 @@ test_xmlSchematronNewValidCtxt(void) { return(test_ret); } +#ifdef LIBXML_SCHEMATRON_ENABLED #define gen_nb_xmlSchematronParserCtxtPtr 1 static xmlSchematronParserCtxtPtr gen_xmlSchematronParserCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { @@ -17781,6 +17953,8 @@ static xmlSchematronParserCtxtPtr gen_xmlSchematronParserCtxtPtr(int no ATTRIBUT } static void des_xmlSchematronParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchematronParserCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { } +#endif + static int test_xmlSchematronParse(void) { @@ -17791,6 +17965,7 @@ test_xmlSchematronParse(void) { return(test_ret); } +#ifdef LIBXML_SCHEMATRON_ENABLED #define gen_nb_xmlSchematronValidCtxtPtr 1 static xmlSchematronValidCtxtPtr gen_xmlSchematronValidCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { @@ -17798,6 +17973,8 @@ static xmlSchematronValidCtxtPtr gen_xmlSchematronValidCtxtPtr(int no ATTRIBUTE_ } static void des_xmlSchematronValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchematronValidCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { } +#endif + static int test_xmlSchematronValidateDoc(void) { @@ -25337,28 +25514,28 @@ test_xmlValidGetPotentialChildren(void) { int ret_val; xmlElementContent * ctree; /* an element content tree */ int n_ctree; - xmlChar ** list; /* an array to store the list of child names */ - int n_list; + xmlChar ** names; /* an array to store the list of child names */ + int n_names; int * len; /* a pointer to the number of element in the list */ int n_len; int max; /* the size of the array */ int n_max; for (n_ctree = 0;n_ctree < gen_nb_xmlElementContent_ptr;n_ctree++) { - for (n_list = 0;n_list < gen_nb_const_xmlChar_ptr_ptr;n_list++) { + for (n_names = 0;n_names < gen_nb_const_xmlChar_ptr_ptr;n_names++) { for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) { for (n_max = 0;n_max < gen_nb_int;n_max++) { mem_base = xmlMemBlocks(); ctree = gen_xmlElementContent_ptr(n_ctree, 0); - list = gen_const_xmlChar_ptr_ptr(n_list, 1); + names = gen_const_xmlChar_ptr_ptr(n_names, 1); len = gen_int_ptr(n_len, 2); max = gen_int(n_max, 3); - ret_val = xmlValidGetPotentialChildren(ctree, (const xmlChar **)list, len, max); + ret_val = xmlValidGetPotentialChildren(ctree, (const xmlChar **)names, len, max); desret_int(ret_val); call_tests++; des_xmlElementContent_ptr(n_ctree, ctree, 0); - des_const_xmlChar_ptr_ptr(n_list, (const xmlChar **)list, 1); + des_const_xmlChar_ptr_ptr(n_names, (const xmlChar **)names, 1); des_int_ptr(n_len, len, 2); des_int(n_max, max, 3); xmlResetLastError(); @@ -25367,7 +25544,7 @@ test_xmlValidGetPotentialChildren(void) { xmlMemBlocks() - mem_base); test_ret++; printf(" %d", n_ctree); - printf(" %d", n_list); + printf(" %d", n_names); printf(" %d", n_len); printf(" %d", n_max); printf("\n"); @@ -27507,6 +27684,47 @@ test_xmlNormalizeWindowsPath(void) { } +static int +test_xmlOutputBufferCreateBuffer(void) { + int test_ret = 0; + +#if defined(LIBXML_OUTPUT_ENABLED) + int mem_base; + xmlOutputBufferPtr ret_val; + xmlBufferPtr buffer; /* a xmlBufferPtr */ + int n_buffer; + xmlCharEncodingHandlerPtr encoder; /* the encoding converter or NULL */ + int n_encoder; + + for (n_buffer = 0;n_buffer < gen_nb_xmlBufferPtr;n_buffer++) { + for (n_encoder = 0;n_encoder < gen_nb_xmlCharEncodingHandlerPtr;n_encoder++) { + mem_base = xmlMemBlocks(); + buffer = gen_xmlBufferPtr(n_buffer, 0); + encoder = gen_xmlCharEncodingHandlerPtr(n_encoder, 1); + + ret_val = xmlOutputBufferCreateBuffer(buffer, encoder); + desret_xmlOutputBufferPtr(ret_val); + call_tests++; + des_xmlBufferPtr(n_buffer, buffer, 0); + des_xmlCharEncodingHandlerPtr(n_encoder, encoder, 1); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlOutputBufferCreateBuffer", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_buffer); + printf(" %d", n_encoder); + printf("\n"); + } + } + } + function_tests++; +#endif + + return(test_ret); +} + + static int test_xmlOutputBufferCreateFd(void) { int test_ret = 0; @@ -28215,7 +28433,7 @@ static int test_xmlIO(void) { int test_ret = 0; - if (quiet == 0) printf("Testing xmlIO : 38 of 47 functions ...\n"); + if (quiet == 0) printf("Testing xmlIO : 39 of 48 functions ...\n"); test_ret += test_xmlAllocOutputBuffer(); test_ret += test_xmlAllocParserInputBuffer(); test_ret += test_xmlCheckFilename(); @@ -28236,6 +28454,7 @@ test_xmlIO(void) { test_ret += test_xmlIOHTTPRead(); test_ret += test_xmlNoNetExternalEntityLoader(); test_ret += test_xmlNormalizeWindowsPath(); + test_ret += test_xmlOutputBufferCreateBuffer(); test_ret += test_xmlOutputBufferCreateFd(); test_ret += test_xmlOutputBufferCreateFile(); test_ret += test_xmlOutputBufferCreateFilename(); @@ -31629,6 +31848,64 @@ test_xmlTextReaderSchemaValidate(void) { return(test_ret); } +#ifdef LIBXML_READER_ENABLED + +#define gen_nb_xmlSchemaValidCtxtPtr 1 +static xmlSchemaValidCtxtPtr gen_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { + return(NULL); +} +static void des_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchemaValidCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { +} +#endif + + +static int +test_xmlTextReaderSchemaValidateCtxt(void) { + int test_ret = 0; + +#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) + int mem_base; + int ret_val; + xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */ + int n_reader; + xmlSchemaValidCtxtPtr ctxt; /* the XML Schema validation context or NULL */ + int n_ctxt; + int options; /* options (not used yet) */ + int n_options; + + for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) { + for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) { + for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) { + mem_base = xmlMemBlocks(); + reader = gen_xmlTextReaderPtr(n_reader, 0); + ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 1); + options = gen_parseroptions(n_options, 2); + + ret_val = xmlTextReaderSchemaValidateCtxt(reader, ctxt, options); + desret_int(ret_val); + call_tests++; + des_xmlTextReaderPtr(n_reader, reader, 0); + des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 1); + des_parseroptions(n_options, options, 2); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlTextReaderSchemaValidateCtxt", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_reader); + printf(" %d", n_ctxt); + printf(" %d", n_options); + printf("\n"); + } + } + } + } + function_tests++; +#endif + + return(test_ret); +} + static int test_xmlTextReaderSetErrorHandler(void) { @@ -31854,7 +32131,7 @@ static int test_xmlreader(void) { int test_ret = 0; - if (quiet == 0) printf("Testing xmlreader : 73 of 83 functions ...\n"); + if (quiet == 0) printf("Testing xmlreader : 74 of 84 functions ...\n"); test_ret += test_xmlNewTextReader(); test_ret += test_xmlNewTextReaderFilename(); test_ret += test_xmlReaderForDoc(); @@ -31923,6 +32200,7 @@ test_xmlreader(void) { test_ret += test_xmlTextReaderRelaxNGSetSchema(); test_ret += test_xmlTextReaderRelaxNGValidate(); test_ret += test_xmlTextReaderSchemaValidate(); + test_ret += test_xmlTextReaderSchemaValidateCtxt(); test_ret += test_xmlTextReaderSetErrorHandler(); test_ret += test_xmlTextReaderSetParserProp(); test_ret += test_xmlTextReaderSetSchema(); @@ -31935,16 +32213,6 @@ test_xmlreader(void) { printf("Module xmlreader: %d errors\n", test_ret); return(test_ret); } -#ifdef LIBXML_REGEXP_ENABLED - -#define gen_nb_xmlExpCtxtPtr 1 -static xmlExpCtxtPtr gen_xmlExpCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { - return(NULL); -} -static void des_xmlExpCtxtPtr(int no ATTRIBUTE_UNUSED, xmlExpCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { -} -#endif - static int test_xmlExpCtxtNbCons(void) { @@ -32013,16 +32281,6 @@ test_xmlExpCtxtNbNodes(void) { return(test_ret); } -#ifdef LIBXML_REGEXP_ENABLED - -#define gen_nb_xmlExpNodePtr 1 -static xmlExpNodePtr gen_xmlExpNodePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { - return(NULL); -} -static void des_xmlExpNodePtr(int no ATTRIBUTE_UNUSED, xmlExpNodePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { -} -#endif - static int test_xmlExpDump(void) { @@ -32084,27 +32342,27 @@ test_xmlExpGetLanguage(void) { int n_ctxt; xmlExpNodePtr exp; /* the expression */ int n_exp; - xmlChar ** list; /* where to store the tokens */ - int n_list; + xmlChar ** langList; /* where to store the tokens */ + int n_langList; int len; /* the allocated lenght of @list */ int n_len; for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) { for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) { - for (n_list = 0;n_list < gen_nb_const_xmlChar_ptr_ptr;n_list++) { + for (n_langList = 0;n_langList < gen_nb_const_xmlChar_ptr_ptr;n_langList++) { for (n_len = 0;n_len < gen_nb_int;n_len++) { mem_base = xmlMemBlocks(); ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0); exp = gen_xmlExpNodePtr(n_exp, 1); - list = gen_const_xmlChar_ptr_ptr(n_list, 2); + langList = gen_const_xmlChar_ptr_ptr(n_langList, 2); len = gen_int(n_len, 3); - ret_val = xmlExpGetLanguage(ctxt, exp, (const xmlChar **)list, len); + ret_val = xmlExpGetLanguage(ctxt, exp, (const xmlChar **)langList, len); desret_int(ret_val); call_tests++; des_xmlExpCtxtPtr(n_ctxt, ctxt, 0); des_xmlExpNodePtr(n_exp, exp, 1); - des_const_xmlChar_ptr_ptr(n_list, (const xmlChar **)list, 2); + des_const_xmlChar_ptr_ptr(n_langList, (const xmlChar **)langList, 2); des_int(n_len, len, 3); xmlResetLastError(); if (mem_base != xmlMemBlocks()) { @@ -32113,7 +32371,7 @@ test_xmlExpGetLanguage(void) { test_ret++; printf(" %d", n_ctxt); printf(" %d", n_exp); - printf(" %d", n_list); + printf(" %d", n_langList); printf(" %d", n_len); printf("\n"); } @@ -32139,27 +32397,27 @@ test_xmlExpGetStart(void) { int n_ctxt; xmlExpNodePtr exp; /* the expression */ int n_exp; - xmlChar ** list; /* where to store the tokens */ - int n_list; + xmlChar ** tokList; /* where to store the tokens */ + int n_tokList; int len; /* the allocated lenght of @list */ int n_len; for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) { for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) { - for (n_list = 0;n_list < gen_nb_const_xmlChar_ptr_ptr;n_list++) { + for (n_tokList = 0;n_tokList < gen_nb_const_xmlChar_ptr_ptr;n_tokList++) { for (n_len = 0;n_len < gen_nb_int;n_len++) { mem_base = xmlMemBlocks(); ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0); exp = gen_xmlExpNodePtr(n_exp, 1); - list = gen_const_xmlChar_ptr_ptr(n_list, 2); + tokList = gen_const_xmlChar_ptr_ptr(n_tokList, 2); len = gen_int(n_len, 3); - ret_val = xmlExpGetStart(ctxt, exp, (const xmlChar **)list, len); + ret_val = xmlExpGetStart(ctxt, exp, (const xmlChar **)tokList, len); desret_int(ret_val); call_tests++; des_xmlExpCtxtPtr(n_ctxt, ctxt, 0); des_xmlExpNodePtr(n_exp, exp, 1); - des_const_xmlChar_ptr_ptr(n_list, (const xmlChar **)list, 2); + des_const_xmlChar_ptr_ptr(n_tokList, (const xmlChar **)tokList, 2); des_int(n_len, len, 3); xmlResetLastError(); if (mem_base != xmlMemBlocks()) { @@ -32168,7 +32426,7 @@ test_xmlExpGetStart(void) { test_ret++; printf(" %d", n_ctxt); printf(" %d", n_exp); - printf(" %d", n_list); + printf(" %d", n_tokList); printf(" %d", n_len); printf("\n"); } @@ -32964,6 +33222,16 @@ test_xmlSaveSetEscape(void) { } +static int +test_xmlSaveToBuffer(void) { + int test_ret = 0; + + + /* missing type support */ + return(test_ret); +} + + static int test_xmlSaveToFd(void) { int test_ret = 0; @@ -33028,12 +33296,13 @@ static int test_xmlsave(void) { int test_ret = 0; - if (quiet == 0) printf("Testing xmlsave : 4 of 9 functions ...\n"); + if (quiet == 0) printf("Testing xmlsave : 4 of 10 functions ...\n"); test_ret += test_xmlSaveClose(); test_ret += test_xmlSaveDoc(); test_ret += test_xmlSaveFlush(); test_ret += test_xmlSaveSetAttrEscape(); test_ret += test_xmlSaveSetEscape(); + test_ret += test_xmlSaveToBuffer(); test_ret += test_xmlSaveToFd(); test_ret += test_xmlSaveToFilename(); test_ret += test_xmlSaveTree(); @@ -33166,16 +33435,6 @@ test_xmlSchemaGetParserErrors(void) { return(test_ret); } -#ifdef LIBXML_SCHEMAS_ENABLED - -#define gen_nb_xmlSchemaValidCtxtPtr 1 -static xmlSchemaValidCtxtPtr gen_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { - return(NULL); -} -static void des_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchemaValidCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { -} -#endif - static int test_xmlSchemaGetValidErrors(void) { @@ -33184,13 +33443,13 @@ test_xmlSchemaGetValidErrors(void) { #if defined(LIBXML_SCHEMAS_ENABLED) int mem_base; int ret_val; - xmlSchemaValidCtxtPtr ctxt; /* a XML-Schema validation context */ + xmlSchemaValidCtxtPtr ctxt; /* */ int n_ctxt; - xmlSchemaValidityErrorFunc * err; /* the error function result */ + xmlSchemaValidityErrorFunc * err; /* */ int n_err; - xmlSchemaValidityWarningFunc * warn; /* the warning function result */ + xmlSchemaValidityWarningFunc * warn; /* */ int n_warn; - void ** ctx; /* the functions context result */ + void ** ctx; /* */ int n_ctx; for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) { @@ -33239,7 +33498,7 @@ test_xmlSchemaIsValid(void) { #if defined(LIBXML_SCHEMAS_ENABLED) int mem_base; int ret_val; - xmlSchemaValidCtxtPtr ctxt; /* the schema validation context */ + xmlSchemaValidCtxtPtr ctxt; /* */ int n_ctxt; for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) { @@ -33432,7 +33691,7 @@ test_xmlSchemaSAXUnplug(void) { #if defined(LIBXML_SCHEMAS_ENABLED) int mem_base; int ret_val; - xmlSchemaSAXPlugPtr plug; /* a data structure returned by xmlSchemaSAXPlug */ + xmlSchemaSAXPlugPtr plug; /* */ int n_plug; for (n_plug = 0;n_plug < gen_nb_xmlSchemaSAXPlugPtr;n_plug++) { @@ -33469,6 +33728,16 @@ test_xmlSchemaSetParserErrors(void) { } +static int +test_xmlSchemaSetParserStructuredErrors(void) { + int test_ret = 0; + + + /* missing type support */ + return(test_ret); +} + + static int test_xmlSchemaSetValidErrors(void) { int test_ret = 0; @@ -33486,9 +33755,9 @@ test_xmlSchemaSetValidOptions(void) { #if defined(LIBXML_SCHEMAS_ENABLED) int mem_base; int ret_val; - xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */ + xmlSchemaValidCtxtPtr ctxt; /* */ int n_ctxt; - int options; /* a combination of xmlSchemaValidOption */ + int options; /* */ int n_options; for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) { @@ -33537,7 +33806,7 @@ test_xmlSchemaValidCtxtGetOptions(void) { #if defined(LIBXML_SCHEMAS_ENABLED) int mem_base; int ret_val; - xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */ + xmlSchemaValidCtxtPtr ctxt; /* */ int n_ctxt; for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) { @@ -33571,29 +33840,29 @@ test_xmlSchemaValidateDoc(void) { #if defined(LIBXML_SCHEMAS_ENABLED) int mem_base; int ret_val; - xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */ + xmlSchemaValidCtxtPtr ctxt; /* */ int n_ctxt; - xmlDocPtr doc; /* a parsed document tree */ - int n_doc; + xmlDocPtr instance; /* */ + int n_instance; for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) { - for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) { + for (n_instance = 0;n_instance < gen_nb_xmlDocPtr;n_instance++) { mem_base = xmlMemBlocks(); ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0); - doc = gen_xmlDocPtr(n_doc, 1); + instance = gen_xmlDocPtr(n_instance, 1); - ret_val = xmlSchemaValidateDoc(ctxt, doc); + ret_val = xmlSchemaValidateDoc(ctxt, instance); desret_int(ret_val); call_tests++; des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0); - des_xmlDocPtr(n_doc, doc, 1); + des_xmlDocPtr(n_instance, instance, 1); xmlResetLastError(); if (mem_base != xmlMemBlocks()) { printf("Leak of %d blocks found in xmlSchemaValidateDoc", xmlMemBlocks() - mem_base); test_ret++; printf(" %d", n_ctxt); - printf(" %d", n_doc); + printf(" %d", n_instance); printf("\n"); } } @@ -33612,11 +33881,11 @@ test_xmlSchemaValidateFile(void) { #if defined(LIBXML_SCHEMAS_ENABLED) int mem_base; int ret_val; - xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */ + xmlSchemaValidCtxtPtr ctxt; /* */ int n_ctxt; - const char * filename; /* the URI of the instance */ + const char * filename; /* */ int n_filename; - int options; /* a future set of options, currently unused */ + int options; /* */ int n_options; for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) { @@ -33660,9 +33929,9 @@ test_xmlSchemaValidateOneElement(void) { #if defined(LIBXML_SCHEMAS_ENABLED) int mem_base; int ret_val; - xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */ + xmlSchemaValidCtxtPtr ctxt; /* */ int n_ctxt; - xmlNodePtr elem; /* an element node */ + xmlNodePtr elem; /* */ int n_elem; for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) { @@ -33701,15 +33970,15 @@ test_xmlSchemaValidateStream(void) { #if defined(LIBXML_SCHEMAS_ENABLED) int mem_base; int ret_val; - xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */ + xmlSchemaValidCtxtPtr ctxt; /* */ int n_ctxt; - xmlParserInputBufferPtr input; /* the input to use for reading the data */ + xmlParserInputBufferPtr input; /* */ int n_input; - xmlCharEncoding enc; /* an optional encoding information */ + xmlCharEncoding enc; /* */ int n_enc; - xmlSAXHandlerPtr sax; /* a SAX handler for the resulting events */ + xmlSAXHandlerPtr sax; /* */ int n_sax; - void * user_data; /* the context to provide to the SAX handler. */ + void * user_data; /* */ int n_user_data; for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) { @@ -33759,7 +34028,7 @@ static int test_xmlschemas(void) { int test_ret = 0; - if (quiet == 0) printf("Testing xmlschemas : 14 of 23 functions ...\n"); + if (quiet == 0) printf("Testing xmlschemas : 14 of 24 functions ...\n"); test_ret += test_xmlSchemaDump(); test_ret += test_xmlSchemaGetParserErrors(); test_ret += test_xmlSchemaGetValidErrors(); @@ -33772,6 +34041,7 @@ test_xmlschemas(void) { test_ret += test_xmlSchemaSAXPlug(); test_ret += test_xmlSchemaSAXUnplug(); test_ret += test_xmlSchemaSetParserErrors(); + test_ret += test_xmlSchemaSetParserStructuredErrors(); test_ret += test_xmlSchemaSetValidErrors(); test_ret += test_xmlSchemaSetValidOptions(); test_ret += test_xmlSchemaSetValidStructuredErrors(); @@ -35579,7 +35849,7 @@ test_xmlStrncatNew(void) { int n_str1; xmlChar * str2; /* second xmlChar string */ int n_str2; - int len; /* the len of @str2 */ + int len; /* the len of @str2 or < 0 */ int n_len; for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) { diff --git a/tree.c b/tree.c index 3031d50..f607688 100644 --- a/tree.c +++ b/tree.c @@ -2012,6 +2012,8 @@ xmlRemoveProp(xmlAttrPtr cur) { tmp = cur->parent->properties; if (tmp == cur) { cur->parent->properties = cur->next; + if (cur->next != NULL) + cur->next->prev = NULL; xmlFreeProp(cur); return(0); } @@ -2831,6 +2833,14 @@ xmlAddNextSibling(xmlNodePtr cur, xmlNodePtr elem) { return(NULL); } + if (cur == elem) { +#ifdef DEBUG_TREE + xmlGenericError(xmlGenericErrorContext, + "xmlAddNextSibling : cur == elem\n"); +#endif + return(NULL); + } + xmlUnlinkNode(elem); if (elem->type == XML_TEXT_NODE) { @@ -2854,12 +2864,16 @@ xmlAddNextSibling(xmlNodePtr cur, xmlNodePtr elem) { /* check if an attribute with the same name exists */ xmlAttrPtr attr; + if (cur->type != XML_ATTRIBUTE_NODE) + return(NULL); if (elem->ns == NULL) - attr = xmlHasProp(cur->parent, elem->name); + attr = xmlHasNsProp(cur->parent, elem->name, NULL); else attr = xmlHasNsProp(cur->parent, elem->name, elem->ns->href); - if ((attr != NULL) && (attr != (xmlAttrPtr) elem)) { + /* elem has already been unlinked so can never be attr */ + if ((attr != NULL) && (attr->type != XML_ATTRIBUTE_DECL)) { /* different instance, destroy it (attributes must be unique) */ + xmlUnlinkNode((xmlNodePtr) attr); xmlFreeProp(attr); } } @@ -2911,6 +2925,14 @@ xmlAddPrevSibling(xmlNodePtr cur, xmlNodePtr elem) { return(NULL); } + if (cur == elem) { +#ifdef DEBUG_TREE + xmlGenericError(xmlGenericErrorContext, + "xmlAddPrevSibling : cur == elem\n"); +#endif + return(NULL); + } + xmlUnlinkNode(elem); if (elem->type == XML_TEXT_NODE) { @@ -2934,12 +2956,16 @@ xmlAddPrevSibling(xmlNodePtr cur, xmlNodePtr elem) { /* check if an attribute with the same name exists */ xmlAttrPtr attr; + if (cur->type != XML_ATTRIBUTE_NODE) + return(NULL); if (elem->ns == NULL) - attr = xmlHasProp(cur->parent, elem->name); + attr = xmlHasNsProp(cur->parent, elem->name, NULL); else attr = xmlHasNsProp(cur->parent, elem->name, elem->ns->href); - if ((attr != NULL) && (attr != (xmlAttrPtr) elem)) { + /* elem has already been unlinked so can never be attr */ + if ((attr != NULL) && (attr->type != XML_ATTRIBUTE_DECL)) { /* different instance, destroy it (attributes must be unique) */ + xmlUnlinkNode((xmlNodePtr) attr); xmlFreeProp(attr); } } @@ -3149,6 +3175,13 @@ xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) { return(NULL); } + if (parent == cur) { +#ifdef DEBUG_TREE + xmlGenericError(xmlGenericErrorContext, + "xmlAddChild : parent == cur\n"); +#endif + return(NULL); + } /* * If cur is a TEXT node, merge its content with adjacent TEXT nodes * cur is then freed. @@ -3156,8 +3189,7 @@ xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) { if (cur->type == XML_TEXT_NODE) { if ((parent->type == XML_TEXT_NODE) && (parent->content != NULL) && - (parent->name == cur->name) && - (parent != cur)) { + (parent->name == cur->name)) { xmlNodeAddContent(parent, cur->content); xmlFreeNode(cur); return(parent); @@ -3196,6 +3228,8 @@ xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) { return(parent); } if (cur->type == XML_ATTRIBUTE_NODE) { + if (parent->type != XML_ELEMENT_NODE) + return(NULL); if (parent->properties == NULL) { parent->properties = (xmlAttrPtr) cur; } else { @@ -3203,13 +3237,16 @@ xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) { xmlAttrPtr lastattr; if (cur->ns == NULL) - lastattr = xmlHasProp(parent, cur->name); + lastattr = xmlHasNsProp(parent, cur->name, NULL); else lastattr = xmlHasNsProp(parent, cur->name, cur->ns->href); - if ((lastattr != NULL) && (lastattr != (xmlAttrPtr) cur)) { + if ((lastattr != NULL) && (lastattr != (xmlAttrPtr) cur) && (lastattr->type != XML_ATTRIBUTE_DECL)) { /* different instance, destroy it (attributes must be unique) */ + xmlUnlinkNode((xmlNodePtr) lastattr); xmlFreeProp(lastattr); } + if (lastattr == (xmlAttrPtr) cur) + return(cur); /* find the end */ lastattr = parent->properties; while (lastattr->next != NULL) { @@ -3575,22 +3612,16 @@ xmlCopyNamespaceList(xmlNsPtr cur) { static xmlNodePtr xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent); -/** - * xmlCopyProp: - * @target: the element where the attribute will be grafted - * @cur: the attribute - * - * Do a copy of the attribute. - * - * Returns: a new #xmlAttrPtr, or NULL in case of error. - */ -xmlAttrPtr -xmlCopyProp(xmlNodePtr target, xmlAttrPtr cur) { + +static xmlAttrPtr +xmlCopyPropInternal(xmlDocPtr doc, xmlNodePtr target, xmlAttrPtr cur) { xmlAttrPtr ret; if (cur == NULL) return(NULL); if (target != NULL) ret = xmlNewDocProp(target->doc, cur->name, NULL); + else if (doc != NULL) + ret = xmlNewDocProp(doc, cur->name, NULL); else if (cur->parent != NULL) ret = xmlNewDocProp(cur->parent->doc, cur->name, NULL); else if (cur->children != NULL) @@ -3678,6 +3709,20 @@ xmlCopyProp(xmlNodePtr target, xmlAttrPtr cur) { return(ret); } +/** + * xmlCopyProp: + * @target: the element where the attribute will be grafted + * @cur: the attribute + * + * Do a copy of the attribute. + * + * Returns: a new #xmlAttrPtr, or NULL in case of error. + */ +xmlAttrPtr +xmlCopyProp(xmlNodePtr target, xmlAttrPtr cur) { + return xmlCopyPropInternal(NULL, target, cur); +} + /** * xmlCopyPropList: * @target: the element where the attributes will be grafted @@ -3746,7 +3791,7 @@ xmlStaticCopyNode(const xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent, case XML_XINCLUDE_END: break; case XML_ATTRIBUTE_NODE: - return((xmlNodePtr) xmlCopyProp(parent, (xmlAttrPtr) node)); + return((xmlNodePtr) xmlCopyPropInternal(doc, parent, (xmlAttrPtr) node)); case XML_NAMESPACE_DECL: return((xmlNodePtr) xmlCopyNamespaceList((xmlNsPtr) node)); @@ -4861,8 +4906,8 @@ xmlNodeBufGetContent(xmlBufferPtr buffer, xmlNodePtr cur) xmlBufferCat(buffer, tmp->content); break; case XML_ENTITY_REF_NODE: - xmlNodeBufGetContent(buffer, tmp->children); - break; + xmlNodeBufGetContent(buffer, tmp); + break; default: break; } @@ -6258,7 +6303,7 @@ xmlGetNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace) { */ int xmlUnsetProp(xmlNodePtr node, const xmlChar *name) { - xmlAttrPtr prop, prev = NULL;; + xmlAttrPtr prop; if ((node == NULL) || (node->type != XML_ELEMENT_NODE) || (name == NULL)) return(-1); @@ -6270,7 +6315,6 @@ xmlUnsetProp(xmlNodePtr node, const xmlChar *name) { xmlFreeProp(prop); return(0); } - prev = prop; prop = prop->next; } return(-1); @@ -6287,7 +6331,7 @@ xmlUnsetProp(xmlNodePtr node, const xmlChar *name) { */ int xmlUnsetNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name) { - xmlAttrPtr prop, prev = NULL;; + xmlAttrPtr prop; if ((node == NULL) || (node->type != XML_ELEMENT_NODE) || (name == NULL)) return(-1); @@ -6303,7 +6347,6 @@ xmlUnsetNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name) { xmlFreeProp(prop); return(0); } - prev = prop; prop = prop->next; } return(-1); diff --git a/uri.c b/uri.c index a00415c..3722311 100644 --- a/uri.c +++ b/uri.c @@ -2130,9 +2130,11 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base) int ix; int pos = 0; int nbslash = 0; + int len; xmlURIPtr ref = NULL; xmlURIPtr bas = NULL; xmlChar *bptr, *uptr, *vptr; + int remove_path = 0; if ((URI == NULL) || (*URI == 0)) return NULL; @@ -2173,63 +2175,101 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base) * just return the URI */ if ((ref->scheme != NULL) && - ((bas->scheme == NULL) || - xmlStrcmp ((xmlChar *)bas->scheme, (xmlChar *)ref->scheme) || - xmlStrcmp ((xmlChar *)bas->server, (xmlChar *)ref->server))) { + ((bas->scheme == NULL) || + (xmlStrcmp ((xmlChar *)bas->scheme, (xmlChar *)ref->scheme)) || + (xmlStrcmp ((xmlChar *)bas->server, (xmlChar *)ref->server)))) { val = xmlStrdup (URI); goto done; } + if (xmlStrEqual((xmlChar *)bas->path, (xmlChar *)ref->path)) { + val = xmlStrdup(BAD_CAST ""); + goto done; + } + if (bas->path == NULL) { + val = xmlStrdup((xmlChar *)ref->path); + goto done; + } + if (ref->path == NULL) { + ref->path = (char *) "/"; + remove_path = 1; + } /* * At this point (at last!) we can compare the two paths * - * First we compare the two strings and find where they first differ + * First we take care of the special case where either of the + * two path components may be missing (bug 316224) */ - bptr = (xmlChar *)bas->path; - if ((ref->path[pos] == '.') && (ref->path[pos+1] == '/')) - pos += 2; - if ((*bptr == '.') && (bptr[1] == '/')) - bptr += 2; - else if ((*bptr == '/') && (ref->path[pos] != '/')) - bptr++; - while ((bptr[pos] == ref->path[pos]) && (bptr[pos] != 0)) - pos++; - - if (bptr[pos] == ref->path[pos]) { - val = NULL; /* if no differences, return NULL */ - goto done; /* (I can't imagine why anyone would do this) */ - } - - /* - * In URI, "back up" to the last '/' encountered. This will be the - * beginning of the "unique" suffix of URI - */ - ix = pos; - if ((ref->path[ix] == '/') && (ix > 0)) - ix--; - for (; ix > 0; ix--) { - if (ref->path[ix] == '/') - break; + if (bas->path == NULL) { + if (ref->path != NULL) { + uptr = (xmlChar *) ref->path; + if (*uptr == '/') + uptr++; + val = xmlStrdup(uptr); + } + goto done; } - if (ix == 0) { - uptr = (xmlChar *)ref->path; + bptr = (xmlChar *)bas->path; + if (ref->path == NULL) { + for (ix = 0; bptr[ix] != 0; ix++) { + if (bptr[ix] == '/') + nbslash++; + } + uptr = NULL; + len = 1; /* this is for a string terminator only */ } else { - ix++; - uptr = (xmlChar *)&ref->path[ix]; - } - /* - * In base, count the number of '/' from the differing point + * Next we compare the two strings and find where they first differ */ - if (bptr[pos] != ref->path[pos]) { /* check for trivial URI == base */ - for (; bptr[ix] != 0; ix++) { - if (bptr[ix] == '/') - nbslash++; + if ((ref->path[pos] == '.') && (ref->path[pos+1] == '/')) + pos += 2; + if ((*bptr == '.') && (bptr[1] == '/')) + bptr += 2; + else if ((*bptr == '/') && (ref->path[pos] != '/')) + bptr++; + while ((bptr[pos] == ref->path[pos]) && (bptr[pos] != 0)) + pos++; + + if (bptr[pos] == ref->path[pos]) { + val = xmlStrdup(BAD_CAST ""); + goto done; /* (I can't imagine why anyone would do this) */ } - } + /* + * In URI, "back up" to the last '/' encountered. This will be the + * beginning of the "unique" suffix of URI + */ + ix = pos; + if ((ref->path[ix] == '/') && (ix > 0)) + ix--; + else if ((ref->path[ix] == 0) && (ix > 1) && (ref->path[ix - 1] == '/')) + ix -= 2; + for (; ix > 0; ix--) { + if (ref->path[ix] == '/') + break; + } + if (ix == 0) { + uptr = (xmlChar *)ref->path; + } else { + ix++; + uptr = (xmlChar *)&ref->path[ix]; + } + + /* + * In base, count the number of '/' from the differing point + */ + if (bptr[pos] != ref->path[pos]) {/* check for trivial URI == base */ + for (; bptr[ix] != 0; ix++) { + if (bptr[ix] == '/') + nbslash++; + } + } + len = xmlStrlen (uptr) + 1; + } + if (nbslash == 0) { - val = xmlStrdup (uptr); + if (uptr != NULL) + val = xmlStrdup (uptr); goto done; } @@ -2238,8 +2278,7 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base) * length of the remainder of the URI, plus enough space * for the "../" groups, plus one for the terminator */ - ix = xmlStrlen (uptr) + 1; - val = (xmlChar *) xmlMalloc (ix + 3 * nbslash); + val = (xmlChar *) xmlMalloc (len + 3 * nbslash); if (val == NULL) { xmlGenericError(xmlGenericErrorContext, "xmlBuildRelativeURI: out of memory\n"); @@ -2257,12 +2296,25 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base) /* * Finish up with the end of the URI */ - memcpy (vptr, uptr, ix); + if (uptr != NULL) { + if ((vptr > val) && (len > 0) && + (uptr[0] == '/') && (vptr[-1] == '/')) { + memcpy (vptr, uptr + 1, len - 1); + vptr[len - 2] = 0; + } else { + memcpy (vptr, uptr, len); + vptr[len - 1] = 0; + } + } else { + vptr[len - 1] = 0; + } - done: +done: /* * Free the working variables */ + if (remove_path != 0) + ref->path = NULL; if (ref != NULL) xmlFreeURI (ref); if (bas != NULL) diff --git a/valid.c b/valid.c index 3ee5630..4fcf447 100644 --- a/valid.c +++ b/valid.c @@ -6760,7 +6760,7 @@ xmlValidateDocument(xmlValidCtxtPtr ctxt, xmlDocPtr doc) { /** * xmlValidGetPotentialChildren: * @ctree: an element content tree - * @list: an array to store the list of child names + * @names: an array to store the list of child names * @len: a pointer to the number of element in the list * @max: the size of the array * @@ -6770,32 +6770,33 @@ xmlValidateDocument(xmlValidCtxtPtr ctxt, xmlDocPtr doc) { */ int -xmlValidGetPotentialChildren(xmlElementContent *ctree, const xmlChar **list, +xmlValidGetPotentialChildren(xmlElementContent *ctree, + const xmlChar **names, int *len, int max) { int i; - if ((ctree == NULL) || (list == NULL) || (len == NULL)) + if ((ctree == NULL) || (names == NULL) || (len == NULL)) return(-1); if (*len >= max) return(*len); switch (ctree->type) { case XML_ELEMENT_CONTENT_PCDATA: for (i = 0; i < *len;i++) - if (xmlStrEqual(BAD_CAST "#PCDATA", list[i])) return(*len); - list[(*len)++] = BAD_CAST "#PCDATA"; + if (xmlStrEqual(BAD_CAST "#PCDATA", names[i])) return(*len); + names[(*len)++] = BAD_CAST "#PCDATA"; break; case XML_ELEMENT_CONTENT_ELEMENT: for (i = 0; i < *len;i++) - if (xmlStrEqual(ctree->name, list[i])) return(*len); - list[(*len)++] = ctree->name; + if (xmlStrEqual(ctree->name, names[i])) return(*len); + names[(*len)++] = ctree->name; break; case XML_ELEMENT_CONTENT_SEQ: - xmlValidGetPotentialChildren(ctree->c1, list, len, max); - xmlValidGetPotentialChildren(ctree->c2, list, len, max); + xmlValidGetPotentialChildren(ctree->c1, names, len, max); + xmlValidGetPotentialChildren(ctree->c2, names, len, max); break; case XML_ELEMENT_CONTENT_OR: - xmlValidGetPotentialChildren(ctree->c1, list, len, max); - xmlValidGetPotentialChildren(ctree->c2, list, len, max); + xmlValidGetPotentialChildren(ctree->c1, names, len, max); + xmlValidGetPotentialChildren(ctree->c2, names, len, max); break; } diff --git a/vms/config.vms b/vms/config.vms index b898bf1..6ecfa47 100755 --- a/vms/config.vms +++ b/vms/config.vms @@ -151,15 +151,6 @@ /* Define if you have the header file. */ #undef HAVE_ZLIB_H -/* Define if you have the inet library (-linet). */ -#undef HAVE_LIBINET - -/* Define if you have the nsl library (-lnsl). */ -#undef HAVE_LIBNSL - -/* Define if you have the socket library (-lsocket). */ -#undef HAVE_LIBSOCKET - /* Name of package */ #undef PACKAGE diff --git a/win32/Makefile.mingw b/win32/Makefile.mingw index 61d15ab..4c3d018 100644 --- a/win32/Makefile.mingw +++ b/win32/Makefile.mingw @@ -126,6 +126,7 @@ XML_OBJS = $(XML_INTDIR)/c14n.o\ $(XML_INTDIR)/relaxng.o\ $(XML_INTDIR)/SAX.o\ $(XML_INTDIR)/SAX2.o\ + $(XML_INTDIR)/schematron.o\ $(XML_INTDIR)/threads.o\ $(XML_INTDIR)/tree.o\ $(XML_INTDIR)/uri.o\ @@ -172,6 +173,7 @@ XML_OBJS_A = $(XML_INTDIR_A)/c14n.o\ $(XML_INTDIR_A)/relaxng.o\ $(XML_INTDIR_A)/SAX.o\ $(XML_INTDIR_A)/SAX2.o\ + $(XML_INTDIR_A)/schematron.o\ $(XML_INTDIR_A)/threads.o\ $(XML_INTDIR_A)/tree.o\ $(XML_INTDIR_A)/uri.o\ @@ -209,7 +211,7 @@ UTILS = $(BINDIR)/xmllint.exe\ $(BINDIR)/testSchemas.exe\ $(BINDIR)/testURI.exe\ $(BINDIR)/testXPath.exe\ - $(BINDIR)/runtest.exe\ + $(BINDIR)/runtest.exe\ $(BINDIR)/runsuite.exe ifeq ($(WITH_THREADS),yes) UTILS += $(BINDIR)/testThreadsWin32.exe diff --git a/win32/Makefile.mingw.orig b/win32/Makefile.mingw.orig new file mode 100644 index 0000000..61d15ab --- /dev/null +++ b/win32/Makefile.mingw.orig @@ -0,0 +1,336 @@ +# Makefile for libxml2, specific for Windows, GCC (mingw) and GNU make. +# +# Take a look at the beginning and modify the variables to suit your +# environment. Having done that, you can do a +# +# nmake [all] to build the libxml and the accompanying utilities. +# nmake clean to remove all compiler output files and return to a +# clean state. +# nmake rebuild to rebuild everything from scratch. This basically does +# a 'nmake clean' and then a 'nmake all'. +# nmake install to install the library and its header files. +# +# November 2002, Igor Zlatkovic + +# There should never be a need to modify anything below this line. +# ---------------------------------------------------------------- + +AUTOCONF = .\config.mingw +include $(AUTOCONF) + +# Names of various input and output components. +XML_NAME = xml2 +XML_BASENAME = lib$(XML_NAME) +XML_SO = $(XML_BASENAME).dll +XML_IMP = $(XML_BASENAME).lib +XML_A = $(XML_BASENAME).a + +# Place where we let the compiler put its output. +BINDIR = bin.mingw +XML_INTDIR = int.mingw +XML_INTDIR_A = int.a.mingw +UTILS_INTDIR = int.utils.mingw + +# The preprocessor and its options. +CPP = gcc.exe -E +CPPFLAGS += -I$(XML_SRCDIR)/include +ifeq ($(WITH_THREADS),1) +CPPFLAGS += -D_REENTRANT +endif + +# The compiler and its options. +CC = gcc.exe +CFLAGS += -DWIN32 -D_WINDOWS -D_MBCS +CFLAGS += -I$(XML_SRCDIR) -I$(XML_SRCDIR)/include -I$(INCPREFIX) +ifneq ($(WITH_THREADS),no) +CFLAGS += -D_REENTRANT +endif +ifeq ($(WITH_THREADS),yes) +CFLAGS += -DHAVE_WIN32_THREADS -DHAVE_COMPILER_TLS +endif +ifeq ($(WITH_THREADS),ctls) +CFLAGS += -DHAVE_WIN32_THREADS -DHAVE_COMPILER_TLS +endif +ifeq ($(WITH_THREADS),native) +CFLAGS += -DHAVE_WIN32_THREADS +endif +ifeq ($(WITH_THREADS),posix) +CFLAGS += -DHAVE_PTHREAD_H +endif +ifeq ($(WITH_ZLIB),1) +CFLAGS += -DHAVE_ZLIB_H +endif + +# The linker and its options. +LD = gcc.exe +LDFLAGS += -Wl,--major-image-version,$(LIBXML_MAJOR_VERSION) +LDFLAGS += -Wl,--minor-image-version,$(LIBXML_MINOR_VERSION) +LDFLAGS += -Wl,-L,$(BINDIR) -Wl,-L,$(LIBPREFIX) +LIBS = +ifeq ($(WITH_FTP),1) +CFLAGS += -D_WINSOCKAPI_ +LIBS += -lwsock32 +endif +ifeq ($(WITH_HTTP),1) +CFLAGS += -D_WINSOCKAPI_ +LIBS += -lwsock32 +endif +ifeq ($(WITH_ICONV),1) +LIBS += -liconv +endif +ifeq ($(WITH_ZLIB),1) +LIBS += -lzdll +endif +ifeq ($(WITH_THREADS),posix) +LIBS += -lpthreadGC +endif +ifeq ($(WITH_MODULES),1) +LIBS += -lkernel32 +endif + +# The archiver and its options. +AR = ar.exe +ARFLAGS = -r + +# Optimisation and debug symbols. +ifeq ($(DEBUG),1) +CFLAGS += -D_DEBUG -g +LDFLAGS += +else +CFLAGS += -DNDEBUG -O2 +LDFLAGS += +endif + + +# Libxml object files. +XML_OBJS = $(XML_INTDIR)/c14n.o\ + $(XML_INTDIR)/catalog.o\ + $(XML_INTDIR)/chvalid.o\ + $(XML_INTDIR)/debugXML.o\ + $(XML_INTDIR)/dict.o\ + $(XML_INTDIR)/DOCBparser.o\ + $(XML_INTDIR)/encoding.o\ + $(XML_INTDIR)/entities.o\ + $(XML_INTDIR)/error.o\ + $(XML_INTDIR)/globals.o\ + $(XML_INTDIR)/hash.o\ + $(XML_INTDIR)/HTMLparser.o\ + $(XML_INTDIR)/HTMLtree.o\ + $(XML_INTDIR)/legacy.o\ + $(XML_INTDIR)/list.o\ + $(XML_INTDIR)/nanoftp.o\ + $(XML_INTDIR)/nanohttp.o\ + $(XML_INTDIR)/parser.o\ + $(XML_INTDIR)/parserInternals.o\ + $(XML_INTDIR)/pattern.o\ + $(XML_INTDIR)/relaxng.o\ + $(XML_INTDIR)/SAX.o\ + $(XML_INTDIR)/SAX2.o\ + $(XML_INTDIR)/threads.o\ + $(XML_INTDIR)/tree.o\ + $(XML_INTDIR)/uri.o\ + $(XML_INTDIR)/valid.o\ + $(XML_INTDIR)/xinclude.o\ + $(XML_INTDIR)/xlink.o\ + $(XML_INTDIR)/xmlIO.o\ + $(XML_INTDIR)/xmlmemory.o\ + $(XML_INTDIR)/xmlreader.o\ + $(XML_INTDIR)/xmlregexp.o\ + $(XML_INTDIR)/xmlmodule.o\ + $(XML_INTDIR)/xmlsave.o\ + $(XML_INTDIR)/xmlschemas.o\ + $(XML_INTDIR)/xmlschemastypes.o\ + $(XML_INTDIR)/xmlunicode.o\ + $(XML_INTDIR)/xmlwriter.o\ + $(XML_INTDIR)/xpath.o\ + $(XML_INTDIR)/xpointer.o\ + $(XML_INTDIR)/xmlstring.o + +XML_SRCS = $(subst .o,.c,$(subst $(XML_INTDIR)/,$(XML_SRCDIR)/,$(XML_OBJS))) + +# Static libxml object files. +XML_OBJS_A = $(XML_INTDIR_A)/c14n.o\ + $(XML_INTDIR_A)/catalog.o\ + $(XML_INTDIR_A)/chvalid.o\ + $(XML_INTDIR_A)/debugXML.o\ + $(XML_INTDIR_A)/dict.o\ + $(XML_INTDIR_A)/DOCBparser.o\ + $(XML_INTDIR_A)/encoding.o\ + $(XML_INTDIR_A)/entities.o\ + $(XML_INTDIR_A)/error.o\ + $(XML_INTDIR_A)/globals.o\ + $(XML_INTDIR_A)/hash.o\ + $(XML_INTDIR_A)/HTMLparser.o\ + $(XML_INTDIR_A)/HTMLtree.o\ + $(XML_INTDIR_A)/legacy.o\ + $(XML_INTDIR_A)/list.o\ + $(XML_INTDIR_A)/nanoftp.o\ + $(XML_INTDIR_A)/nanohttp.o\ + $(XML_INTDIR_A)/parser.o\ + $(XML_INTDIR_A)/parserInternals.o\ + $(XML_INTDIR_A)/pattern.o\ + $(XML_INTDIR_A)/relaxng.o\ + $(XML_INTDIR_A)/SAX.o\ + $(XML_INTDIR_A)/SAX2.o\ + $(XML_INTDIR_A)/threads.o\ + $(XML_INTDIR_A)/tree.o\ + $(XML_INTDIR_A)/uri.o\ + $(XML_INTDIR_A)/valid.o\ + $(XML_INTDIR_A)/xinclude.o\ + $(XML_INTDIR_A)/xlink.o\ + $(XML_INTDIR_A)/xmlIO.o\ + $(XML_INTDIR_A)/xmlmemory.o\ + $(XML_INTDIR_A)/xmlreader.o\ + $(XML_INTDIR_A)/xmlregexp.o\ + $(XML_INTDIR_A)/xmlmodule.o\ + $(XML_INTDIR_A)/xmlsave.o\ + $(XML_INTDIR_A)/xmlschemas.o\ + $(XML_INTDIR_A)/xmlschemastypes.o\ + $(XML_INTDIR_A)/xmlunicode.o\ + $(XML_INTDIR_A)/xmlwriter.o\ + $(XML_INTDIR_A)/xpath.o\ + $(XML_INTDIR_A)/xpointer.o\ + $(XML_INTDIR_A)/xmlstring.o + +XML_SRCS_A = $(subst .o,.c,$(subst $(XML_INTDIR_A)/,$(XML_SRCDIR)/,$(XML_OBJS_A))) + +# Xmllint and friends executables. +UTILS = $(BINDIR)/xmllint.exe\ + $(BINDIR)/xmlcatalog.exe\ + $(BINDIR)/testAutomata.exe\ + $(BINDIR)/testC14N.exe\ + $(BINDIR)/testDocbook.exe\ + $(BINDIR)/testHTML.exe\ + $(BINDIR)/testReader.exe\ + $(BINDIR)/testRegexp.exe\ + $(BINDIR)/testModule.exe\ + $(BINDIR)/testRelax.exe\ + $(BINDIR)/testSAX.exe\ + $(BINDIR)/testSchemas.exe\ + $(BINDIR)/testURI.exe\ + $(BINDIR)/testXPath.exe\ + $(BINDIR)/runtest.exe\ + $(BINDIR)/runsuite.exe +ifeq ($(WITH_THREADS),yes) +UTILS += $(BINDIR)/testThreadsWin32.exe +endif +ifeq ($(WITH_THREADS),ctls) +UTILS += $(BINDIR)/testThreadsWin32.exe +endif +ifeq ($(WITH_THREADS),native) +UTILS += $(BINDIR)/testThreadsWin32.exe +endif +ifeq ($(WITH_THREADS),posix) +UTILS += $(BINDIR)/testThreads.exe +endif + +all : dep libxml libxmla utils + +libxml : $(BINDIR)/$(XML_SO) + +libxmla : $(BINDIR)/$(XML_A) + +utils : $(UTILS) + +clean : + cmd.exe /C if exist $(XML_INTDIR) rmdir /S /Q $(XML_INTDIR) + cmd.exe /C if exist $(XML_INTDIR_A) rmdir /S /Q $(XML_INTDIR_A) + cmd.exe /C if exist $(UTILS_INTDIR) rmdir /S /Q $(UTILS_INTDIR) + cmd.exe /C if exist $(BINDIR) rmdir /S /Q $(BINDIR) + cmd.exe /C if exist depends.mingw del depends.mingw + +distclean : clean + cmd.exe /C if exist config.* del config.* + cmd.exe /C if exist Makefile del Makefile + +rebuild : clean all + +install-libs : all + cmd.exe /C if not exist $(INCPREFIX)\libxml mkdir $(INCPREFIX)\libxml + cmd.exe /C if not exist $(BINPREFIX) mkdir $(BINPREFIX) + cmd.exe /C if not exist $(LIBPREFIX) mkdir $(LIBPREFIX) + cmd.exe /C copy $(XML_SRCDIR)\include\libxml\*.h $(INCPREFIX)\libxml + cmd.exe /C copy $(BINDIR)\$(XML_SO) $(SOPREFIX) + cmd.exe /C copy $(BINDIR)\$(XML_A) $(LIBPREFIX) + cmd.exe /C copy $(BINDIR)\$(XML_IMP) $(LIBPREFIX) + cmd.exe /C copy $(BINDIR)\xml*.exe $(BINPREFIX) + +install : install-libs + cmd.exe /C copy $(BINDIR)\*.exe $(BINPREFIX) + +install-dist : install-libs + cmd.exe /C copy $(BINDIR)\xml*.exe $(BINPREFIX) + +# This is a target for me, to make a binary distribution. Not for the public use, +# keep your hands off :-) +BDVERSION = $(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION).$(LIBXML_MICRO_VERSION) +BDPREFIX = $(XML_BASENAME)-$(BDVERSION).win32 +bindist : all + $(MAKE) PREFIX=$(BDPREFIX) SOPREFIX=$(BDPREFIX)/bin install-dist + cscript //NoLogo configure.js genreadme $(XML_BASENAME) $(BDVERSION) $(BDPREFIX)\readme.txt + + +# Creates the dependency file +dep : + $(CC) $(CFLAGS) -M $(XML_SRCS) > depends.mingw + + +# Makes the output directory. +$(BINDIR) : + cmd.exe /C if not exist $(BINDIR) mkdir $(BINDIR) + + +# Makes the libxml intermediate directory. +$(XML_INTDIR) : + cmd.exe /C if not exist $(XML_INTDIR) mkdir $(XML_INTDIR) + +# Makes the static libxml intermediate directory. +$(XML_INTDIR_A) : + cmd.exe /C if not exist $(XML_INTDIR_A) mkdir $(XML_INTDIR_A) + +# An implicit rule for libxml compilation. +$(XML_INTDIR)/%.o : $(XML_SRCDIR)/%.c + $(CC) $(CFLAGS) -o $@ -c $< + +# An implicit rule for static libxml compilation. +$(XML_INTDIR_A)/%.o : $(XML_SRCDIR)/%.c + $(CC) $(CFLAGS) -DLIBXML_STATIC -o $@ -c $< + + +# Compiles libxml source. Uses the implicit rule for commands. +$(XML_OBJS) : $(XML_INTDIR) + +# Compiles static libxml source. Uses the implicit rule for commands. +$(XML_OBJS_A) : $(XML_INTDIR_A) + +# Creates the libxml shared object. +XMLSO_LDFLAGS = $(LDFLAGS) -shared -Wl,--dll -Wl,--out-implib,$(BINDIR)/$(XML_IMP) +$(BINDIR)/$(XML_SO) : $(BINDIR) $(XML_OBJS) + $(LD) $(XMLSO_LDFLAGS) -o $(BINDIR)/$(XML_SO) $(XML_OBJS) $(LIBS) + +# Creates the libxml archive. +$(BINDIR)/$(XML_A) : $(BINDIR) $(XML_OBJS_A) + $(AR) $(ARFLAGS) $(BINDIR)\$(XML_A) $(XML_OBJS_A) + + +# Makes the utils intermediate directory. +$(UTILS_INTDIR) : + cmd.exe /C if not exist $(UTILS_INTDIR) mkdir $(UTILS_INTDIR) + +# An implicit rule for xmllint and friends. +ifeq ($(STATIC),1) +$(BINDIR)/%.exe : $(UTILS_SRCDIR)/%.c + $(CC) -DLIBXML_STATIC $(CFLAGS) -o $(subst .c,.o,$(UTILS_INTDIR)/$( 0) { + ret = write((int) (long) context, &buffer[0], len); + if (ret < 0) xmlIOErr(0, "write()"); + } return(ret); } #endif /* LIBXML_OUTPUT_ENABLED */ @@ -860,6 +862,28 @@ xmlFileFlush (void * context) { return(ret); } +#ifdef LIBXML_OUTPUT_ENABLED +/** + * xmlBufferWrite: + * @context: the xmlBuffer + * @buffer: the data to write + * @len: number of bytes to write + * + * Write @len bytes from @buffer to the xml buffer + * + * Returns the number of bytes written + */ +static int +xmlBufferWrite (void * context, const char * buffer, int len) { + int ret; + + ret = xmlBufferAdd((xmlBufferPtr) context, (const xmlChar *) buffer, len); + if (ret != 0) + return(-1); + return(len); +} +#endif + #ifdef HAVE_ZLIB_H /************************************************************************ * * @@ -2436,6 +2460,31 @@ xmlOutputBufferCreateFile(FILE *file, xmlCharEncodingHandlerPtr encoder) { return(ret); } + +/** + * xmlOutputBufferCreateBuffer: + * @buffer: a xmlBufferPtr + * @encoder: the encoding converter or NULL + * + * Create a buffered output for the progressive saving to a xmlBuffer + * + * Returns the new parser output or NULL + */ +xmlOutputBufferPtr +xmlOutputBufferCreateBuffer(xmlBufferPtr buffer, + xmlCharEncodingHandlerPtr encoder) { + xmlOutputBufferPtr ret; + + if (buffer == NULL) return(NULL); + + ret = xmlOutputBufferCreateIO((xmlOutputWriteCallback) + xmlBufferWrite, + (xmlOutputCloseCallback) + NULL, (void *) buffer, encoder); + + return(ret); +} + #endif /* LIBXML_OUTPUT_ENABLED */ /** diff --git a/xmlmodule.c b/xmlmodule.c index 6cc86ee..15bcf07 100644 --- a/xmlmodule.c +++ b/xmlmodule.c @@ -195,6 +195,10 @@ xmlModuleFree(xmlModulePtr module) #include #endif +#ifndef RTLD_GLOBAL /* For Tru64 UNIX 4.0 */ +#define RTLD_GLOBAL 0 +#endif + /** * xmlModulePlatformOpen: * @name: path to the module @@ -277,10 +281,7 @@ xmlModulePlatformSymbol(void *handle, const char *name, void **symbol) int rc; errno = 0; - rc = shl_findsym(handle, name, TYPE_PROCEDURE, symbol); - if ((-1 == rc) && (0 == errno)) { - rc = shl_findsym(handle, name, TYPE_DATA, symbol); - } + rc = shl_findsym(&handle, name, TYPE_UNDEFINED, symbol); return rc; } diff --git a/xmlreader.c b/xmlreader.c index 7efa273..0bdf071 100644 --- a/xmlreader.c +++ b/xmlreader.c @@ -131,12 +131,13 @@ struct _xmlTextReader { /* Handling of RelaxNG validation */ xmlRelaxNGPtr rngSchemas; /* The Relax NG schemas */ xmlRelaxNGValidCtxtPtr rngValidCtxt;/* The Relax NG validation context */ - int rngValidErrors;/* The number of errors detected */ + int rngValidErrors;/* The number of errors detected */ xmlNodePtr rngFullNode; /* the node if RNG not progressive */ /* Handling of Schemas validation */ xmlSchemaPtr xsdSchemas; /* The Schemas schemas */ xmlSchemaValidCtxtPtr xsdValidCtxt;/* The Schemas validation context */ - int xsdValidErrors;/* The number of errors detected */ + int xsdPreserveCtxt; /* 1 if the context was provided by the user */ + int xsdValidErrors;/* The number of errors detected */ xmlSchemaSAXPlugPtr xsdPlug; /* the schemas plug in SAX pipeline */ #endif #ifdef LIBXML_XINCLUDE_ENABLED @@ -1200,8 +1201,14 @@ xmlTextReaderCollectSiblings(xmlNodePtr node) case XML_CDATA_SECTION_NODE: xmlBufferCat(buffer, node->content); break; - case XML_ELEMENT_NODE: - xmlBufferCat(buffer, xmlTextReaderCollectSiblings(node->children)); + case XML_ELEMENT_NODE: { + xmlChar *tmp; + + tmp = xmlTextReaderCollectSiblings(node->children); + xmlBufferCat(buffer, tmp); + xmlFree(tmp); + break; + } default: break; } @@ -1619,6 +1626,7 @@ xmlTextReaderNext(xmlTextReaderPtr reader) { return(xmlTextReaderRead(reader)); } +#ifdef LIBXML_WRITER_ENABLED /** * xmlTextReaderReadInnerXml: * @reader: the xmlTextReaderPtr used @@ -1657,9 +1665,14 @@ xmlTextReaderReadInnerXml(xmlTextReaderPtr reader ATTRIBUTE_UNUSED) xmlBufferFree(buff2); } resbuf = buff->content; + buff->content = NULL; + + xmlBufferFree(buff); return resbuf; } +#endif +#ifdef LIBXML_WRITER_ENABLED /** * xmlTextReaderReadOuterXml: * @reader: the xmlTextReaderPtr used @@ -1698,6 +1711,7 @@ xmlTextReaderReadOuterXml(xmlTextReaderPtr reader ATTRIBUTE_UNUSED) xmlBufferFree(buff); return resbuf; } +#endif /** * xmlTextReaderReadString: @@ -2141,7 +2155,8 @@ xmlFreeTextReader(xmlTextReaderPtr reader) { reader->xsdPlug = NULL; } if (reader->xsdValidCtxt != NULL) { - xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); + if (! reader->xsdPreserveCtxt) + xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); reader->xsdValidCtxt = NULL; } if (reader->xsdSchemas != NULL) { @@ -4086,15 +4101,17 @@ xmlTextReaderSetSchema(xmlTextReaderPtr reader, xmlSchemaPtr schema) { reader->xsdPlug = NULL; } if (reader->xsdValidCtxt != NULL) { - xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); - reader->xsdValidCtxt = NULL; + if (! reader->xsdPreserveCtxt) + xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); + reader->xsdValidCtxt = NULL; } + reader->xsdPreserveCtxt = 0; if (reader->xsdSchemas != NULL) { xmlSchemaFree(reader->xsdSchemas); reader->xsdSchemas = NULL; - } + } return(0); - } + } if (reader->mode != XML_TEXTREADER_MODE_INITIAL) return(-1); if (reader->xsdPlug != NULL) { @@ -4102,9 +4119,11 @@ xmlTextReaderSetSchema(xmlTextReaderPtr reader, xmlSchemaPtr schema) { reader->xsdPlug = NULL; } if (reader->xsdValidCtxt != NULL) { - xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); + if (! reader->xsdPreserveCtxt) + xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); reader->xsdValidCtxt = NULL; } + reader->xsdPreserveCtxt = 0; if (reader->xsdSchemas != NULL) { xmlSchemaFree(reader->xsdSchemas); reader->xsdSchemas = NULL; @@ -4221,81 +4240,106 @@ xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader, const char *rng) { } /** - * xmlTextReaderSchemaValidate: + * xmlTextReaderSchemaValidateInternal: * @reader: the xmlTextReaderPtr used * @xsd: the path to a W3C XSD schema or NULL + * @ctxt: the XML Schema validation context or NULL + * @options: options (not used yet) * - * Use W3C XSD schema to validate the document as it is processed. + * Validate the document as it is processed using XML Schema. * Activation is only possible before the first Read(). - * if @xsd is NULL, then RelaxNG validation is desactivated. + * If both @xsd and @ctxt are NULL then XML Schema validation is deactivated. * - * Returns 0 in case the schemas validation could be (des)activated and + * Returns 0 in case the schemas validation could be (de)activated and * -1 in case of error. */ -int -xmlTextReaderSchemaValidate(xmlTextReaderPtr reader, const char *xsd) { - xmlSchemaParserCtxtPtr ctxt; - +static int +xmlTextReaderSchemaValidateInternal(xmlTextReaderPtr reader, + const char *xsd, + xmlSchemaValidCtxtPtr ctxt, + int options ATTRIBUTE_UNUSED) +{ if (reader == NULL) return(-1); - - if (xsd == NULL) { - if (reader->xsdPlug != NULL) { - xmlSchemaSAXUnplug(reader->xsdPlug); - reader->xsdPlug = NULL; - } - if (reader->xsdSchemas != NULL) { - xmlSchemaFree(reader->xsdSchemas); - reader->xsdSchemas = NULL; - } - if (reader->xsdValidCtxt != NULL) { - xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); - reader->xsdValidCtxt = NULL; - } - return(0); - } - if ((reader->mode != XML_TEXTREADER_MODE_INITIAL) || - (reader->ctxt == NULL)) + + if ((xsd != NULL) && (ctxt != NULL)) + return(-1); + + if (((xsd != NULL) || (ctxt != NULL)) && + ((reader->mode != XML_TEXTREADER_MODE_INITIAL) || + (reader->ctxt == NULL))) return(-1); + + /* Cleanup previous validation stuff. */ if (reader->xsdPlug != NULL) { xmlSchemaSAXUnplug(reader->xsdPlug); reader->xsdPlug = NULL; } if (reader->xsdValidCtxt != NULL) { - xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); + if (! reader->xsdPreserveCtxt) + xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); reader->xsdValidCtxt = NULL; } + reader->xsdPreserveCtxt = 0; if (reader->xsdSchemas != NULL) { xmlSchemaFree(reader->xsdSchemas); reader->xsdSchemas = NULL; + } + + if ((xsd == NULL) && (ctxt == NULL)) { + /* We just want to deactivate the validation, so get out. */ + return(0); + } + + if (xsd != NULL) { + xmlSchemaParserCtxtPtr pctxt; + /* Parse the schema and create validation environment. */ + pctxt = xmlSchemaNewParserCtxt(xsd); + if (reader->errorFunc != NULL) { + xmlSchemaSetParserErrors(pctxt, + xmlTextReaderValidityErrorRelay, + xmlTextReaderValidityWarningRelay, + reader); + } + reader->xsdSchemas = xmlSchemaParse(pctxt); + xmlSchemaFreeParserCtxt(pctxt); + if (reader->xsdSchemas == NULL) + return(-1); + reader->xsdValidCtxt = xmlSchemaNewValidCtxt(reader->xsdSchemas); + if (reader->xsdValidCtxt == NULL) { + xmlSchemaFree(reader->xsdSchemas); + reader->xsdSchemas = NULL; + return(-1); + } + reader->xsdPlug = xmlSchemaSAXPlug(reader->xsdValidCtxt, + &(reader->ctxt->sax), + &(reader->ctxt->userData)); + if (reader->xsdPlug == NULL) { + xmlSchemaFree(reader->xsdSchemas); + reader->xsdSchemas = NULL; + xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); + reader->xsdValidCtxt = NULL; + return(-1); + } + } else { + /* Use the given validation context. */ + reader->xsdValidCtxt = ctxt; + reader->xsdPreserveCtxt = 1; + reader->xsdPlug = xmlSchemaSAXPlug(reader->xsdValidCtxt, + &(reader->ctxt->sax), + &(reader->ctxt->userData)); + if (reader->xsdPlug == NULL) { + reader->xsdValidCtxt = NULL; + reader->xsdPreserveCtxt = 0; + return(-1); + } } - ctxt = xmlSchemaNewParserCtxt(xsd); - if (reader->errorFunc != NULL) { - xmlSchemaSetParserErrors(ctxt, - xmlTextReaderValidityErrorRelay, - xmlTextReaderValidityWarningRelay, - reader); - } - reader->xsdSchemas = xmlSchemaParse(ctxt); - xmlSchemaFreeParserCtxt(ctxt); - if (reader->xsdSchemas == NULL) - return(-1); - reader->xsdValidCtxt = xmlSchemaNewValidCtxt(reader->xsdSchemas); - if (reader->xsdValidCtxt == NULL) { - xmlSchemaFree(reader->xsdSchemas); - reader->xsdSchemas = NULL; - return(-1); - } - reader->xsdPlug = xmlSchemaSAXPlug(reader->xsdValidCtxt, - &(reader->ctxt->sax), - &(reader->ctxt->userData)); - if (reader->xsdPlug == NULL) { - xmlSchemaFree(reader->xsdSchemas); - reader->xsdSchemas = NULL; - xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); - reader->xsdValidCtxt = NULL; - return(-1); - } + /* + * Redirect the validation context's error channels to use + * the reader channels. + * TODO: In case the user provides the validation context we + * could make this redirection optional. + */ if (reader->errorFunc != NULL) { xmlSchemaSetValidErrors(reader->xsdValidCtxt, xmlTextReaderValidityErrorRelay, @@ -4311,6 +4355,45 @@ xmlTextReaderSchemaValidate(xmlTextReaderPtr reader, const char *xsd) { reader->validate = XML_TEXTREADER_VALIDATE_XSD; return(0); } + +/** + * xmlTextReaderSchemaValidateCtxt: + * @reader: the xmlTextReaderPtr used + * @ctxt: the XML Schema validation context or NULL + * @options: options (not used yet) + * + * Use W3C XSD schema context to validate the document as it is processed. + * Activation is only possible before the first Read(). + * If @ctxt is NULL, then XML Schema validation is deactivated. + * + * Returns 0 in case the schemas validation could be (de)activated and + * -1 in case of error. + */ +int +xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader, + xmlSchemaValidCtxtPtr ctxt, + int options) +{ + return(xmlTextReaderSchemaValidateInternal(reader, NULL, ctxt, options)); +} + +/** + * xmlTextReaderSchemaValidate: + * @reader: the xmlTextReaderPtr used + * @xsd: the path to a W3C XSD schema or NULL + * + * Use W3C XSD schema to validate the document as it is processed. + * Activation is only possible before the first Read(). + * If @xsd is NULL, then XML Schema validation is deactivated. + * + * Returns 0 in case the schemas validation could be (de)activated and + * -1 in case of error. + */ +int +xmlTextReaderSchemaValidate(xmlTextReaderPtr reader, const char *xsd) +{ + return(xmlTextReaderSchemaValidateInternal(reader, xsd, NULL, 0)); +} #endif /** diff --git a/xmlregexp.c b/xmlregexp.c index 45b917b..de581f0 100644 --- a/xmlregexp.c +++ b/xmlregexp.c @@ -42,6 +42,8 @@ /* #define DEBUG_PUSH */ /* #define DEBUG_COMPACTION */ +#define MAX_PUSH 10000000 + #define ERROR(str) \ ctxt->error = XML_REGEXP_COMPILE_ERROR; \ xmlRegexpErrCompile(ctxt, str); @@ -73,20 +75,20 @@ typedef enum { XML_REGEXP_EPSILON = 1, XML_REGEXP_CHARVAL, XML_REGEXP_RANGES, - XML_REGEXP_SUBREG, + XML_REGEXP_SUBREG, /* used for () sub regexps */ XML_REGEXP_STRING, XML_REGEXP_ANYCHAR, /* . */ XML_REGEXP_ANYSPACE, /* \s */ XML_REGEXP_NOTSPACE, /* \S */ XML_REGEXP_INITNAME, /* \l */ - XML_REGEXP_NOTINITNAME, /* \l */ + XML_REGEXP_NOTINITNAME, /* \L */ XML_REGEXP_NAMECHAR, /* \c */ XML_REGEXP_NOTNAMECHAR, /* \C */ XML_REGEXP_DECIMAL, /* \d */ - XML_REGEXP_NOTDECIMAL, /* \d */ + XML_REGEXP_NOTDECIMAL, /* \D */ XML_REGEXP_REALCHAR, /* \w */ - XML_REGEXP_NOTREALCHAR, /* \w */ - XML_REGEXP_LETTER, + XML_REGEXP_NOTREALCHAR, /* \W */ + XML_REGEXP_LETTER = 100, XML_REGEXP_LETTER_UPPERCASE, XML_REGEXP_LETTER_LOWERCASE, XML_REGEXP_LETTER_TITLECASE, @@ -201,6 +203,7 @@ struct _xmlRegTrans { int to; int counter; int count; + int nd; }; struct _xmlAutomataState { @@ -326,6 +329,7 @@ struct _xmlRegExecCtxt { xmlRegStatePtr errState; /* the error state */ xmlChar *errString; /* the string raising the error */ int *errCounts; /* counters at the error state */ + int nbPush; }; #define REGEXP_ALL_COUNTER 0x123456 @@ -335,6 +339,9 @@ static void xmlFAParseRegExp(xmlRegParserCtxtPtr ctxt, int top); static void xmlRegFreeState(xmlRegStatePtr state); static void xmlRegFreeAtom(xmlRegAtomPtr atom); static int xmlRegStrEqualWildcard(const xmlChar *expStr, const xmlChar *valStr); +static int xmlRegCheckCharacter(xmlRegAtomPtr atom, int codepoint); +static int xmlRegCheckCharacterRange(xmlRegAtomType type, int codepoint, + int neg, int start, int end, const xmlChar *blockName); /************************************************************************ * * @@ -417,6 +424,9 @@ xmlRegEpxFromParse(xmlRegParserCtxtPtr ctxt) { ret->nbCounters = ctxt->nbCounters; ret->counters = ctxt->counters; ret->determinist = ctxt->determinist; + if (ret->determinist == -1) { + xmlRegexpIsDeterminist(ret); + } if ((ret->determinist != 0) && (ret->nbCounters == 0) && @@ -569,7 +579,6 @@ xmlRegEpxFromParse(xmlRegParserCtxtPtr ctxt) { i, j, trans->atom->no, trans->to, atomno, targetno); printf(" previous to is %d\n", prev); #endif - ret->determinist = 0; if (transdata != NULL) xmlFree(transdata); xmlFree(transitions); @@ -1016,6 +1025,12 @@ xmlRegPrintTrans(FILE *output, xmlRegTransPtr trans) { fprintf(output, "removed\n"); return; } + if (trans->nd != 0) { + if (trans->nd == 2) + fprintf(output, "last not determinist, "); + else + fprintf(output, "not determinist, "); + } if (trans->counter >= 0) { fprintf(output, "counted %d, ", trans->counter); } @@ -1235,7 +1250,7 @@ xmlRegStateAddTransTo(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr target, static void xmlRegStateAddTrans(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state, xmlRegAtomPtr atom, xmlRegStatePtr target, - int counter, int count, int nchk) { + int counter, int count) { int nrtrans; @@ -1253,19 +1268,17 @@ xmlRegStateAddTrans(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state, * so, silently ignore this request. */ - if (nchk == 0) { - for (nrtrans = state->nbTrans - 1; nrtrans >= 0; nrtrans--) { - xmlRegTransPtr trans = &(state->trans[nrtrans]); - if ((trans->atom == atom) && - (trans->to == target->no) && - (trans->counter == counter) && - (trans->count == count)) { + for (nrtrans = state->nbTrans - 1; nrtrans >= 0; nrtrans--) { + xmlRegTransPtr trans = &(state->trans[nrtrans]); + if ((trans->atom == atom) && + (trans->to == target->no) && + (trans->counter == counter) && + (trans->count == count)) { #ifdef DEBUG_REGEXP_GRAPH - printf("Ignoring duplicate transition from %d to %d\n", - state->no, target->no); + printf("Ignoring duplicate transition from %d to %d\n", + state->no, target->no); #endif - return; - } + return; } } @@ -1308,6 +1321,7 @@ xmlRegStateAddTrans(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state, state->trans[state->nbTrans].to = target->no; state->trans[state->nbTrans].counter = counter; state->trans[state->nbTrans].count = count; + state->trans[state->nbTrans].nd = 0; state->nbTrans++; xmlRegStateAddTransTo(ctxt, target, state->no); } @@ -1359,9 +1373,9 @@ xmlFAGenerateAllTransition(xmlRegParserCtxtPtr ctxt, ctxt->state = to; } if (lax) - xmlRegStateAddTrans(ctxt, from, NULL, to, -1, REGEXP_ALL_LAX_COUNTER, 0); + xmlRegStateAddTrans(ctxt, from, NULL, to, -1, REGEXP_ALL_LAX_COUNTER); else - xmlRegStateAddTrans(ctxt, from, NULL, to, -1, REGEXP_ALL_COUNTER, 0); + xmlRegStateAddTrans(ctxt, from, NULL, to, -1, REGEXP_ALL_COUNTER); } /** @@ -1379,7 +1393,7 @@ xmlFAGenerateEpsilonTransition(xmlRegParserCtxtPtr ctxt, xmlRegStatePush(ctxt, to); ctxt->state = to; } - xmlRegStateAddTrans(ctxt, from, NULL, to, -1, -1, 0); + xmlRegStateAddTrans(ctxt, from, NULL, to, -1, -1); } /** @@ -1398,7 +1412,7 @@ xmlFAGenerateCountedEpsilonTransition(xmlRegParserCtxtPtr ctxt, xmlRegStatePush(ctxt, to); ctxt->state = to; } - xmlRegStateAddTrans(ctxt, from, NULL, to, counter, -1, 0); + xmlRegStateAddTrans(ctxt, from, NULL, to, counter, -1); } /** @@ -1417,7 +1431,7 @@ xmlFAGenerateCountedTransition(xmlRegParserCtxtPtr ctxt, xmlRegStatePush(ctxt, to); ctxt->state = to; } - xmlRegStateAddTrans(ctxt, from, NULL, to, -1, counter, 0); + xmlRegStateAddTrans(ctxt, from, NULL, to, -1, counter); } /** @@ -1450,6 +1464,14 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from, * Generate an epsilon transition to link to the target */ xmlFAGenerateEpsilonTransition(ctxt, atom->stop, to); +#ifdef DV + } else if ((to == NULL) && (atom->quant != XML_REGEXP_QUANT_RANGE) && + (atom->quant != XML_REGEXP_QUANT_ONCE)) { + to = xmlRegNewState(ctxt); + xmlRegStatePush(ctxt, to); + ctxt->state = to; + xmlFAGenerateEpsilonTransition(ctxt, atom->stop, to); +#endif } switch (atom->quant) { case XML_REGEXP_QUANT_OPT: @@ -1504,8 +1526,8 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from, } else { newstate = xmlRegNewState(ctxt); xmlRegStatePush(ctxt, newstate); - ctxt->state = newstate; } + ctxt->state = newstate; xmlFAGenerateCountedTransition(ctxt, atom->stop, newstate, counter); } @@ -1513,7 +1535,8 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from, break; } return(0); - } else if ((atom->min == 0) && (atom->max == 0) && + } + if ((atom->min == 0) && (atom->max == 0) && (atom->quant == XML_REGEXP_QUANT_RANGE)) { /* * we can discard the atom and generate an epsilon transition instead @@ -1530,21 +1553,20 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from, ctxt->state = to; xmlRegFreeAtom(atom); return(0); - } else { - if (to == NULL) { - to = xmlRegNewState(ctxt); - if (to != NULL) - xmlRegStatePush(ctxt, to); - else { - return(-1); - } - } - if (xmlRegAtomPush(ctxt, atom) < 0) { + } + if (to == NULL) { + to = xmlRegNewState(ctxt); + if (to != NULL) + xmlRegStatePush(ctxt, to); + else { return(-1); } - xmlRegStateAddTrans(ctxt, from, atom, to, -1, -1, 0); - ctxt->state = to; } + if (xmlRegAtomPush(ctxt, atom) < 0) { + return(-1); + } + xmlRegStateAddTrans(ctxt, from, atom, to, -1, -1); + ctxt->state = to; switch (atom->quant) { case XML_REGEXP_QUANT_OPT: atom->quant = XML_REGEXP_QUANT_ONCE; @@ -1553,11 +1575,11 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from, case XML_REGEXP_QUANT_MULT: atom->quant = XML_REGEXP_QUANT_ONCE; xmlFAGenerateEpsilonTransition(ctxt, from, to); - xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1, 0); + xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1); break; case XML_REGEXP_QUANT_PLUS: atom->quant = XML_REGEXP_QUANT_ONCE; - xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1, 0); + xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1); break; default: break; @@ -1614,7 +1636,7 @@ xmlFAReduceEpsilonTransitions(xmlRegParserCtxtPtr ctxt, int fromnr, xmlRegStateAddTrans(ctxt, from, NULL, ctxt->states[newto], - -1, to->trans[transnr].count, 0); + -1, to->trans[transnr].count); } else { #ifdef DEBUG_REGEXP_GRAPH printf("Found epsilon trans %d from %d to %d\n", @@ -1637,10 +1659,10 @@ xmlFAReduceEpsilonTransitions(xmlRegParserCtxtPtr ctxt, int fromnr, if (to->trans[transnr].counter >= 0) { xmlRegStateAddTrans(ctxt, from, to->trans[transnr].atom, ctxt->states[newto], - to->trans[transnr].counter, -1, 1); + to->trans[transnr].counter, -1); } else { xmlRegStateAddTrans(ctxt, from, to->trans[transnr].atom, - ctxt->states[newto], counter, -1, 1); + ctxt->states[newto], counter, -1); } } } @@ -1869,12 +1891,175 @@ xmlFAEliminateEpsilonTransitions(xmlRegParserCtxtPtr ctxt) { } +static int +xmlFACompareRanges(xmlRegRangePtr range1, xmlRegRangePtr range2) { + int ret = 0; + + if ((range1->type == XML_REGEXP_RANGES) || + (range2->type == XML_REGEXP_RANGES) || + (range2->type == XML_REGEXP_SUBREG) || + (range1->type == XML_REGEXP_SUBREG) || + (range1->type == XML_REGEXP_STRING) || + (range2->type == XML_REGEXP_STRING)) + return(-1); + + /* put them in order */ + if (range1->type > range2->type) { + xmlRegRangePtr tmp; + + tmp = range1; + range1 = range2; + range2 = tmp; + } + if ((range1->type == XML_REGEXP_ANYCHAR) || + (range2->type == XML_REGEXP_ANYCHAR)) { + ret = 1; + } else if ((range1->type == XML_REGEXP_EPSILON) || + (range2->type == XML_REGEXP_EPSILON)) { + return(0); + } else if (range1->type == range2->type) { + if ((range1->type != XML_REGEXP_CHARVAL) || + (range1->end < range2->start) || + (range2->end < range1->start)) + ret = 1; + else + ret = 0; + } else if (range1->type == XML_REGEXP_CHARVAL) { + int codepoint; + int neg = 0; + + /* + * just check all codepoints in the range for acceptance, + * this is usually way cheaper since done only once at + * compilation than testing over and over at runtime or + * pushing too many states when evaluating. + */ + if (((range1->neg == 0) && (range2->neg != 0)) || + ((range1->neg != 0) && (range2->neg == 0))) + neg = 1; + + for (codepoint = range1->start;codepoint <= range1->end ;codepoint++) { + ret = xmlRegCheckCharacterRange(range2->type, codepoint, + 0, range2->start, range2->end, + range2->blockName); + if (ret < 0) + return(-1); + if (((neg == 1) && (ret == 0)) || + ((neg == 0) && (ret == 1))) + return(1); + } + return(0); + } else if ((range1->type == XML_REGEXP_BLOCK_NAME) || + (range2->type == XML_REGEXP_BLOCK_NAME)) { + if (range1->type == range2->type) { + ret = xmlStrEqual(range1->blockName, range2->blockName); + } else { + /* + * comparing a block range with anything else is way + * too costly, and maintining the table is like too much + * memory too, so let's force the automata to save state + * here. + */ + return(1); + } + } else if ((range1->type < XML_REGEXP_LETTER) || + (range2->type < XML_REGEXP_LETTER)) { + if ((range1->type == XML_REGEXP_ANYSPACE) && + (range2->type == XML_REGEXP_NOTSPACE)) + ret = 0; + else if ((range1->type == XML_REGEXP_INITNAME) && + (range2->type == XML_REGEXP_NOTINITNAME)) + ret = 0; + else if ((range1->type == XML_REGEXP_NAMECHAR) && + (range2->type == XML_REGEXP_NOTNAMECHAR)) + ret = 0; + else if ((range1->type == XML_REGEXP_DECIMAL) && + (range2->type == XML_REGEXP_NOTDECIMAL)) + ret = 0; + else if ((range1->type == XML_REGEXP_REALCHAR) && + (range2->type == XML_REGEXP_NOTREALCHAR)) + ret = 0; + else { + /* same thing to limit complexity */ + return(1); + } + } else { + ret = 0; + /* range1->type < range2->type here */ + switch (range1->type) { + case XML_REGEXP_LETTER: + /* all disjoint except in the subgroups */ + if ((range2->type == XML_REGEXP_LETTER_UPPERCASE) || + (range2->type == XML_REGEXP_LETTER_LOWERCASE) || + (range2->type == XML_REGEXP_LETTER_TITLECASE) || + (range2->type == XML_REGEXP_LETTER_MODIFIER) || + (range2->type == XML_REGEXP_LETTER_OTHERS)) + ret = 1; + break; + case XML_REGEXP_MARK: + if ((range2->type == XML_REGEXP_MARK_NONSPACING) || + (range2->type == XML_REGEXP_MARK_SPACECOMBINING) || + (range2->type == XML_REGEXP_MARK_ENCLOSING)) + ret = 1; + break; + case XML_REGEXP_NUMBER: + if ((range2->type == XML_REGEXP_NUMBER_DECIMAL) || + (range2->type == XML_REGEXP_NUMBER_LETTER) || + (range2->type == XML_REGEXP_NUMBER_OTHERS)) + ret = 1; + break; + case XML_REGEXP_PUNCT: + if ((range2->type == XML_REGEXP_PUNCT_CONNECTOR) || + (range2->type == XML_REGEXP_PUNCT_DASH) || + (range2->type == XML_REGEXP_PUNCT_OPEN) || + (range2->type == XML_REGEXP_PUNCT_CLOSE) || + (range2->type == XML_REGEXP_PUNCT_INITQUOTE) || + (range2->type == XML_REGEXP_PUNCT_FINQUOTE) || + (range2->type == XML_REGEXP_PUNCT_OTHERS)) + ret = 1; + break; + case XML_REGEXP_SEPAR: + if ((range2->type == XML_REGEXP_SEPAR_SPACE) || + (range2->type == XML_REGEXP_SEPAR_LINE) || + (range2->type == XML_REGEXP_SEPAR_PARA)) + ret = 1; + break; + case XML_REGEXP_SYMBOL: + if ((range2->type == XML_REGEXP_SYMBOL_MATH) || + (range2->type == XML_REGEXP_SYMBOL_CURRENCY) || + (range2->type == XML_REGEXP_SYMBOL_MODIFIER) || + (range2->type == XML_REGEXP_SYMBOL_OTHERS)) + ret = 1; + break; + case XML_REGEXP_OTHER: + if ((range2->type == XML_REGEXP_OTHER_CONTROL) || + (range2->type == XML_REGEXP_OTHER_FORMAT) || + (range2->type == XML_REGEXP_OTHER_PRIVATE)) + ret = 1; + break; + default: + if ((range2->type >= XML_REGEXP_LETTER) && + (range2->type < XML_REGEXP_BLOCK_NAME)) + ret = 0; + else { + /* safety net ! */ + return(1); + } + } + } + if (((range1->neg == 0) && (range2->neg != 0)) || + ((range1->neg != 0) && (range2->neg == 0))) + ret = !ret; + return(1); +} + /** * xmlFACompareAtoms: * @atom1: an atom * @atom2: an atom * - * Compares two atoms to check whether they are equivalents + * Compares two atoms to check whether they intersect in some ways, + * this is used by xmlFAComputesDeterminism only * * Returns 1 if yes and 0 otherwise */ @@ -1887,28 +2072,65 @@ xmlFACompareAtoms(xmlRegAtomPtr atom1, xmlRegAtomPtr atom2) { if ((atom1 == NULL) || (atom2 == NULL)) return(0); - if (atom1->type != atom2->type) + if ((atom1->type == XML_REGEXP_RANGES) && + (atom2->type == XML_REGEXP_CHARVAL)) { + } else if ((atom1->type == XML_REGEXP_CHARVAL) && + (atom2->type == XML_REGEXP_RANGES)) { + xmlRegAtomPtr tmp; + tmp = atom1; + atom1 = atom2; + atom2 = tmp; + } else if (atom1->type != atom2->type) { return(0); + } switch (atom1->type) { case XML_REGEXP_STRING: ret = xmlRegStrEqualWildcard((xmlChar *)atom1->valuep, (xmlChar *)atom2->valuep); break; case XML_REGEXP_EPSILON: - return(1); + goto not_determinist; case XML_REGEXP_CHARVAL: - ret = atom1->codepoint == atom2->codepoint; + ret = (atom1->codepoint == atom2->codepoint); break; case XML_REGEXP_RANGES: - TODO; - return(0); + if (atom2->type == XML_REGEXP_CHARVAL) { + ret = xmlRegCheckCharacter(atom1, atom2->codepoint); + if (ret < 0) + return(-1); + break; + } else { + int i, j, res; + xmlRegRangePtr r1, r2; + + /* + * need to check that none of the ranges eventually matches + */ + for (i = 0;i < atom1->nbRanges;i++) { + for (j = 0;j < atom2->nbRanges;j++) { + r1 = atom1->ranges[i]; + r2 = atom2->ranges[j]; + res = xmlFACompareRanges(r1, r2); + if (res == 1) { + ret = 1; + goto done; + } + } + } + ret = 0; + } + break; default: - return(1); + goto not_determinist; } +done: if (atom1->neg != atom2->neg) { ret = !ret; } - return(ret); + if (ret == 0) + return(0); +not_determinist: + return(1); } /** @@ -1923,12 +2145,18 @@ static int xmlFARecurseDeterminism(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state, int to, xmlRegAtomPtr atom) { int ret = 1; - int transnr; + int res; + int transnr, nbTrans; xmlRegTransPtr t1; if (state == NULL) return(ret); - for (transnr = 0;transnr < state->nbTrans;transnr++) { + /* + * don't recurse on transitions potentially added in the course of + * the elimination. + */ + nbTrans = state->nbTrans; + for (transnr = 0;transnr < nbTrans;transnr++) { t1 = &(state->trans[transnr]); /* * check transitions conflicting with the one looked at @@ -1936,16 +2164,21 @@ xmlFARecurseDeterminism(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state, if (t1->atom == NULL) { if (t1->to == -1) continue; - ret = xmlFARecurseDeterminism(ctxt, ctxt->states[t1->to], + res = xmlFARecurseDeterminism(ctxt, ctxt->states[t1->to], to, atom); - if (ret == 0) - return(0); + if (res == 0) { + ret = 0; + /* t1->nd = 1; */ + } continue; } if (t1->to != to) continue; - if (xmlFACompareAtoms(t1->atom, atom)) - return(0); + if (xmlFACompareAtoms(t1->atom, atom)) { + ret = 0; + /* mark the transition as non-deterministic */ + t1->nd = 1; + } } return(ret); } @@ -1962,7 +2195,7 @@ static int xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) { int statenr, transnr; xmlRegStatePtr state; - xmlRegTransPtr t1, t2; + xmlRegTransPtr t1, t2, last; int i; int ret = 1; @@ -1974,8 +2207,7 @@ xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) { return(ctxt->determinist); /* - * Check for all states that there aren't 2 transitions - * with the same atom and a different target. + * First cleanup the automata removing cancelled transitions */ for (statenr = 0;statenr < ctxt->nbStates;statenr++) { state = ctxt->states[statenr]; @@ -1989,8 +2221,10 @@ xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) { * Determinism checks in case of counted or all transitions * will have to be handled separately */ - if (t1->atom == NULL) + if (t1->atom == NULL) { + /* t1->nd = 1; */ continue; + } if (t1->to == -1) /* eliminated */ continue; for (i = 0;i < transnr;i++) { @@ -2001,10 +2235,46 @@ xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) { if (t1->to == t2->to) { if (xmlFACompareAtoms(t1->atom, t2->atom)) t2->to = -1; /* eliminated */ - } else { - /* not determinist ! */ - if (xmlFACompareAtoms(t1->atom, t2->atom)) - ret = 0; + } + } + } + } + } + + /* + * Check for all states that there aren't 2 transitions + * with the same atom and a different target. + */ + for (statenr = 0;statenr < ctxt->nbStates;statenr++) { + state = ctxt->states[statenr]; + if (state == NULL) + continue; + if (state->nbTrans < 2) + continue; + last = NULL; + for (transnr = 0;transnr < state->nbTrans;transnr++) { + t1 = &(state->trans[transnr]); + /* + * Determinism checks in case of counted or all transitions + * will have to be handled separately + */ + if (t1->atom == NULL) { + continue; + } + if (t1->to == -1) /* eliminated */ + continue; + for (i = 0;i < transnr;i++) { + t2 = &(state->trans[i]); + if (t2->to == -1) /* eliminated */ + continue; + if (t2->atom != NULL) { + /* not determinist ! */ + if (xmlFACompareAtoms(t1->atom, t2->atom)) { + ret = 0; + /* mark the transitions as non-deterministic ones */ + t1->nd = 1; + t2->nd = 1; + last = t1; } } else if (t1->to != -1) { /* @@ -2013,16 +2283,39 @@ xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) { */ ret = xmlFARecurseDeterminism(ctxt, ctxt->states[t1->to], t2->to, t2->atom); + /* don't shortcut the computation so all non deterministic + transition get marked down if (ret == 0) return(0); + */ + if (ret == 0) { + t1->nd = 1; + /* t2->nd = 1; */ + last = t1; + } } } + /* don't shortcut the computation so all non deterministic + transition get marked down if (ret == 0) - break; + break; */ + } + + /* + * mark specifically the last non-deterministic transition + * from a state since there is no need to set-up rollback + * from it + */ + if (last != NULL) { + last->nd = 2; } + + /* don't shortcut the computation so all non deterministic + transition get marked down if (ret == 0) - break; + break; */ } + ctxt->determinist = ret; return(ret); } @@ -2336,6 +2629,12 @@ xmlFARegExecSave(xmlRegExecCtxtPtr exec) { xmlFARegDebugExec(exec); exec->transno--; #endif +#ifdef MAX_PUSH + if (exec->nbPush > MAX_PUSH) { + return; + } + exec->nbPush++; +#endif if (exec->maxRollbacks == 0) { exec->maxRollbacks = 4; @@ -2422,10 +2721,11 @@ static int xmlFARegExec(xmlRegexpPtr comp, const xmlChar *content) { xmlRegExecCtxt execval; xmlRegExecCtxtPtr exec = &execval; - int ret, codepoint = 0, len; + int ret, codepoint = 0, len, deter; exec->inputString = content; exec->index = 0; + exec->nbPush = 0; exec->determinist = 1; exec->maxRollbacks = 0; exec->nbRollbacks = 0; @@ -2482,6 +2782,7 @@ xmlFARegExec(xmlRegexpPtr comp, const xmlChar *content) { continue; atom = trans->atom; ret = 0; + deter = 1; if (trans->count >= 0) { int count; xmlRegCounterPtr counter; @@ -2497,6 +2798,8 @@ xmlFARegExec(xmlRegexpPtr comp, const xmlChar *content) { trans->count, count, counter->min, counter->max); #endif ret = ((count >= counter->min) && (count <= counter->max)); + if ((ret) && (counter->min != counter->max)) + deter = 0; } else if (atom == NULL) { fprintf(stderr, "epsilon transition left at runtime\n"); exec->status = -2; @@ -2509,7 +2812,15 @@ xmlFARegExec(xmlRegexpPtr comp, const xmlChar *content) { /* * this is a multiple input sequence + * If there is a counter associated increment it now. + * before potentially saving and rollback */ + if (trans->counter >= 0) { +#ifdef DEBUG_REGEXP_EXEC + printf("Increasing count %d\n", trans->counter); +#endif + exec->counts[trans->counter]++; + } if (exec->state->nbTrans > exec->transno + 1) { xmlFARegExecSave(exec); } @@ -2559,6 +2870,12 @@ xmlFARegExec(xmlRegexpPtr comp, const xmlChar *content) { if (ret == 0) { goto rollback; } + if (trans->counter >= 0) { +#ifdef DEBUG_REGEXP_EXEC + printf("Decreasing count %d\n", trans->counter); +#endif + exec->counts[trans->counter]--; + } } else if ((ret == 0) && (atom->min == 0) && (atom->max > 0)) { /* * we don't match on the codepoint, but minOccurs of 0 @@ -2576,7 +2893,17 @@ xmlFARegExec(xmlRegexpPtr comp, const xmlChar *content) { ret = 1; } if (ret == 1) { - if (exec->state->nbTrans > exec->transno + 1) { + if ((trans->nd == 1) || + ((trans->count >= 0) && (deter == 0) && + (exec->state->nbTrans > exec->transno + 1))) { +#ifdef DEBUG_REGEXP_EXEC + if (trans->nd == 1) + printf("Saving on nd transition atom %d for %c at %d\n", + trans->atom->no, codepoint, exec->index); + else + printf("Saving on counted transition count %d for %c at %d\n", + trans->count, codepoint, exec->index); +#endif xmlFARegExecSave(exec); } if (trans->counter >= 0) { @@ -2613,6 +2940,10 @@ rollback: * Failed to find a way out */ exec->determinist = 0; +#ifdef DEBUG_REGEXP_EXEC + printf("rollback from state %d on %d:%c\n", exec->state->no, + codepoint,codepoint); +#endif xmlFARegExecRollBack(exec); } progress: @@ -2632,8 +2963,11 @@ progress: xmlFree(exec->counts); if (exec->status == 0) return(1); - if (exec->status == -1) + if (exec->status == -1) { + if (exec->nbPush > MAX_PUSH) + return(-1); return(0); + } return(exec->status); } @@ -2708,6 +3042,7 @@ xmlRegNewExecCtxt(xmlRegexpPtr comp, xmlRegExecCallbacks callback, void *data) { exec->inputStack = NULL; exec->errStateNo = -1; exec->errString = NULL; + exec->nbPush = 0; return(exec); } @@ -3344,7 +3679,7 @@ xmlRegExecPushString2(xmlRegExecCtxtPtr exec, const xmlChar *value, ret = xmlRegExecPushStringInternal(exec, str, data, 1); if (str != buf) - xmlFree(buf); + xmlFree(str); return(ret); } @@ -4784,11 +5119,11 @@ xmlNewAutomata(void) { /* initialize the parser */ ctxt->end = NULL; ctxt->start = ctxt->state = xmlRegNewState(ctxt); - ctxt->start->type = XML_REGEXP_START_STATE; if (ctxt->start == NULL) { xmlFreeAutomata(ctxt); return(NULL); } + ctxt->start->type = XML_REGEXP_START_STATE; if (xmlRegStatePush(ctxt, ctxt->start) < 0) { xmlRegFreeState(ctxt->start); xmlFreeAutomata(ctxt); @@ -5081,7 +5416,7 @@ xmlAutomataNewCountTrans2(xmlAutomataPtr am, xmlAutomataStatePtr from, to = xmlRegNewState(am); xmlRegStatePush(am, to); } - xmlRegStateAddTrans(am, from, atom, to, counter, -1, 0); + xmlRegStateAddTrans(am, from, atom, to, counter, -1); xmlRegAtomPush(am, atom); am->state = to; @@ -5147,7 +5482,7 @@ xmlAutomataNewCountTrans(xmlAutomataPtr am, xmlAutomataStatePtr from, to = xmlRegNewState(am); xmlRegStatePush(am, to); } - xmlRegStateAddTrans(am, from, atom, to, counter, -1, 0); + xmlRegStateAddTrans(am, from, atom, to, counter, -1); xmlRegAtomPush(am, atom); am->state = to; @@ -5236,7 +5571,7 @@ xmlAutomataNewOnceTrans2(xmlAutomataPtr am, xmlAutomataStatePtr from, to = xmlRegNewState(am); xmlRegStatePush(am, to); } - xmlRegStateAddTrans(am, from, atom, to, counter, -1, 0); + xmlRegStateAddTrans(am, from, atom, to, counter, -1); xmlRegAtomPush(am, atom); am->state = to; return(to); @@ -5298,7 +5633,7 @@ xmlAutomataNewOnceTrans(xmlAutomataPtr am, xmlAutomataStatePtr from, to = xmlRegNewState(am); xmlRegStatePush(am, to); } - xmlRegStateAddTrans(am, from, atom, to, counter, -1, 0); + xmlRegStateAddTrans(am, from, atom, to, counter, -1); xmlRegAtomPush(am, atom); am->state = to; return(to); @@ -6134,7 +6469,7 @@ tail: * xmlExpGetLanguage: * @ctxt: the expression context * @exp: the expression - * @list: where to store the tokens + * @langList: where to store the tokens * @len: the allocated lenght of @list * * Find all the strings used in @exp and store them in @list @@ -6144,10 +6479,10 @@ tail: */ int xmlExpGetLanguage(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, - const xmlChar**list, int len) { - if ((ctxt == NULL) || (exp == NULL) || (list == NULL) || (len <= 0)) + const xmlChar**langList, int len) { + if ((ctxt == NULL) || (exp == NULL) || (langList == NULL) || (len <= 0)) return(-1); - return(xmlExpGetLanguageInt(ctxt, exp, list, len, 0)); + return(xmlExpGetLanguageInt(ctxt, exp, langList, len, 0)); } static int @@ -6200,7 +6535,7 @@ tail: * xmlExpGetStart: * @ctxt: the expression context * @exp: the expression - * @list: where to store the tokens + * @tokList: where to store the tokens * @len: the allocated lenght of @list * * Find all the strings that appears at the start of the languages @@ -6212,10 +6547,10 @@ tail: */ int xmlExpGetStart(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, - const xmlChar**list, int len) { - if ((ctxt == NULL) || (exp == NULL) || (list == NULL) || (len <= 0)) + const xmlChar**tokList, int len) { + if ((ctxt == NULL) || (exp == NULL) || (tokList == NULL) || (len <= 0)) return(-1); - return(xmlExpGetStartInt(ctxt, exp, list, len, 0)); + return(xmlExpGetStartInt(ctxt, exp, tokList, len, 0)); } /** @@ -6861,10 +7196,10 @@ xmlExpExpDeriveInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) { len = xmlExpGetStartInt(ctxt, sub, tab, ctxt->tabSize, 0); while (len < 0) { const xmlChar **temp; - temp = (const xmlChar **) xmlRealloc(tab, ctxt->tabSize * 2 * + temp = (const xmlChar **) xmlRealloc((xmlChar **) tab, ctxt->tabSize * 2 * sizeof(const xmlChar *)); if (temp == NULL) { - xmlFree(tab); + xmlFree((xmlChar **) tab); return(NULL); } tab = temp; @@ -6875,14 +7210,14 @@ xmlExpExpDeriveInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) { tmp = xmlExpStringDeriveInt(ctxt, exp, tab[i]); if ((tmp == NULL) || (tmp == forbiddenExp)) { xmlExpFree(ctxt, ret); - xmlFree(tab); + xmlFree((xmlChar **) tab); return(tmp); } tmp2 = xmlExpStringDeriveInt(ctxt, sub, tab[i]); if ((tmp2 == NULL) || (tmp2 == forbiddenExp)) { xmlExpFree(ctxt, tmp); xmlExpFree(ctxt, ret); - xmlFree(tab); + xmlFree((xmlChar **) tab); return(tmp); } tmp3 = xmlExpExpDeriveInt(ctxt, tmp, tmp2); @@ -6891,7 +7226,7 @@ xmlExpExpDeriveInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) { if ((tmp3 == NULL) || (tmp3 == forbiddenExp)) { xmlExpFree(ctxt, ret); - xmlFree(tab); + xmlFree((xmlChar **) tab); return(tmp3); } @@ -6900,12 +7235,12 @@ xmlExpExpDeriveInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) { else { ret = xmlExpHashGetEntry(ctxt, XML_EXP_OR, ret, tmp3, NULL, 0, 0); if (ret == NULL) { - xmlFree(tab); + xmlFree((xmlChar **) tab); return(NULL); } } } - xmlFree(tab); + xmlFree((xmlChar **) tab); return(ret); } diff --git a/xmlsave.c b/xmlsave.c index ca1d876..ba35f32 100644 --- a/xmlsave.c +++ b/xmlsave.c @@ -344,9 +344,9 @@ xmlSaveCtxtInit(xmlSaveCtxtPtr ctxt) ctxt->indent[ctxt->indent_nr * ctxt->indent_size] = 0; } - if (xmlSaveNoEmptyTags) { - ctxt->options |= XML_SAVE_NO_EMPTY; - } + if (xmlSaveNoEmptyTags) { + ctxt->options |= XML_SAVE_NO_EMPTY; + } } /** @@ -400,10 +400,10 @@ xmlNewSaveCtxt(const char *encoding, int options) * Use the options */ - /* Re-check this option as it may already have been set */ - if ((ret->options & XML_SAVE_NO_EMPTY) && ! (options & XML_SAVE_NO_EMPTY)) { - options |= XML_SAVE_NO_EMPTY; - } + /* Re-check this option as it may already have been set */ + if ((ret->options & XML_SAVE_NO_EMPTY) && ! (options & XML_SAVE_NO_EMPTY)) { + options |= XML_SAVE_NO_EMPTY; + } ret->options = options; if (options & XML_SAVE_FORMAT) @@ -1111,6 +1111,10 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { xmlDtdDumpOutput(ctxt, (xmlDtdPtr) cur); return; } + if (cur->type == XML_DOCUMENT_FRAG_NODE) { + xhtmlNodeListDumpOutput(ctxt, cur->children); + return; + } buf = ctxt->buf; if (cur->type == XML_ELEMENT_DECL) { xmlDumpElementDecl(buf->buffer, (xmlElementPtr) cur); @@ -1473,13 +1477,36 @@ xmlSaveToFilename(const char *filename, const char *encoding, int options) * with the encoding and the options given * * Returns a new serialization context or NULL in case of error. + */ + xmlSaveCtxtPtr xmlSaveToBuffer(xmlBufferPtr buffer, const char *encoding, int options) { - TODO - return(NULL); + xmlSaveCtxtPtr ret; + xmlOutputBufferPtr out_buff; + xmlCharEncodingHandlerPtr handler; + + ret = xmlNewSaveCtxt(encoding, options); + if (ret == NULL) return(NULL); + + if (encoding != NULL) { + handler = xmlFindCharEncodingHandler(encoding); + if (handler == NULL) { + xmlFree(ret); + return(NULL); + } + } else + handler = NULL; + out_buff = xmlOutputBufferCreateBuffer(buffer, handler); + if (out_buff == NULL) { + xmlFree(ret); + if (handler) xmlCharEncCloseFunc(handler); + return(NULL); + } + + ret->buf = out_buff; + return(ret); } - */ /** * xmlSaveToIO: diff --git a/xmlschemas.c b/xmlschemas.c index abc4802..0da3564 100644 --- a/xmlschemas.c +++ b/xmlschemas.c @@ -17,10 +17,32 @@ * against their types. * - Eliminate item creation for: ?? * + * URGENT TODO: + * - For xsi-driven schema acquisition, augment the IDCs after every + * acquisition episode (xmlSchemaAugmentIDC). + * * NOTES: * - Elimated item creation for: , , * , , , * + * PROBLEMS: + * - http://lists.w3.org/Archives/Public/www-xml-schema-comments/2005JulSep/0337.html + * IDC XPath expression and chameleon includes: the targetNamespace is changed, so + * XPath will have trouble to resolve to this namespace, since not known. + * + * + * CONSTRAINTS: + * + * Schema Component Constraint: + * All Group Limited (cos-all-limited) + * Status: complete + * (1.2) + * In xmlSchemaGroupDefReferenceTermFixup() and + * (2) + * In xmlSchemaParseModelGroup() + * TODO: Actually this should go to component-level checks, + * but is done here due to performance. Move it to an other layer + * is schema construction via an API is implemented. */ #define IN_LIBXML #include "libxml.h" @@ -58,20 +80,24 @@ /* #define DEBUG_AUTOMATA 1 */ -#define DEBUG_ATTR_VALIDATION 0 +/* #define DEBUG_IDC */ -/* #define DEBUG_IDC 1 */ +/* #define DEBUG_IDC_NODE_TABLE */ -/* #define DEBUG_INCLUDES 1 */ +#ifdef DEBUG_IDC + #ifndef DEBUG_IDC_NODE_TABLE + #define DEBUG_IDC_NODE_TABLE + #endif +#endif /* #define ENABLE_PARTICLE_RESTRICTION 1 */ -/* #define ENABLE_SCHEMA_SPACES */ - -/* #define ENABLE_REDEFINE */ +#define ENABLE_REDEFINE /* #define ENABLE_NAMED_LOCALS */ +/* #define ENABLE_IDC_NODE_TABLES_TEST */ + #define DUMP_CONTENT_MODEL #ifdef LIBXML_READER_ENABLED @@ -98,101 +124,160 @@ static const xmlChar *xmlSchemaInstanceNs = (const xmlChar *) static const xmlChar *xmlNamespaceNs = (const xmlChar *) "http://www.w3.org/2000/xmlns/"; -static const xmlChar *xmlSchemaElemDesElemDecl = (const xmlChar *) - "element decl."; -static const xmlChar *xmlSchemaElemDesAttrDecl = (const xmlChar *) - "attribute decl."; -static const xmlChar *xmlSchemaElemDesAttrRef = (const xmlChar *) - "attribute use"; -static const xmlChar *xmlSchemaElemModelGrDef = (const xmlChar *) - "model group"; - -#define IS_SCHEMA(node, type) \ - ((node != NULL) && (node->ns != NULL) && \ - (xmlStrEqual(node->name, (const xmlChar *) type)) && \ - (xmlStrEqual(node->ns->href, xmlSchemaNs))) +/* +* Come casting macros. +*/ +#define ACTXT_CAST (xmlSchemaAbstractCtxtPtr) +#define PCTXT_CAST (xmlSchemaParserCtxtPtr) +#define VCTXT_CAST (xmlSchemaValidCtxtPtr) +#define WXS_BASIC_CAST (xmlSchemaBasicItemPtr) +#define WXS_TREE_CAST (xmlSchemaTreeItemPtr) +#define WXS_PTC_CAST (xmlSchemaParticlePtr) +#define WXS_TYPE_CAST (xmlSchemaTypePtr) +#define WXS_ELEM_CAST (xmlSchemaElementPtr) +#define WXS_ATTR_GROUP_CAST (xmlSchemaAttributeGroupPtr) +#define WXS_ATTR_CAST (xmlSchemaAttributePtr) +#define WXS_ATTR_USE_CAST (xmlSchemaAttributeUsePtr) +#define WXS_ATTR_PROHIB_CAST (xmlSchemaAttributeUseProhibPtr) +#define WXS_MODEL_GROUPDEF_CAST (xmlSchemaModelGroupDefPtr) +#define WXS_MODEL_GROUP_CAST (xmlSchemaModelGroupPtr) +#define WXS_IDC_CAST (xmlSchemaIDCPtr) +#define WXS_QNAME_CAST (xmlSchemaQNameRefPtr) +#define WXS_LIST_CAST (xmlSchemaItemListPtr) -#define FREE_AND_NULL(str) \ - if (str != NULL) { \ - xmlFree((xmlChar *) str); \ - str = NULL; \ - } +/* +* Macros to query common properties of components. +*/ +#define WXS_ITEM_NODE(i) xmlSchemaGetComponentNode(WXS_BASIC_CAST (i)) -#define IS_ANYTYPE(item) \ - ((item->type == XML_SCHEMA_TYPE_BASIC) && \ - (item->builtInType == XML_SCHEMAS_ANYTYPE)) +#define WXS_ITEM_TYPE_NAME(i) xmlSchemaGetComponentTypeStr(WXS_BASIC_CAST (i)) +/* +* Macros for element declarations. +*/ +#define WXS_ELEM_TYPEDEF(e) (e)->subtypes -#define IS_COMPLEX_TYPE(item) \ - ((item->type == XML_SCHEMA_TYPE_COMPLEX) || \ - (item->builtInType == XML_SCHEMAS_ANYTYPE)) +#define WXS_SUBST_HEAD(item) (item)->refDecl +/* +* Macros for attribute declarations. +*/ +#define WXS_ATTR_TYPEDEF(a) (a)->subtypes +/* +* Macros for attribute uses. +*/ +#define WXS_ATTRUSE_DECL(au) WXS_ATTR_CAST (WXS_ATTR_USE_CAST (au))->attrDecl -#define IS_SIMPLE_TYPE(item) \ - ((item->type == XML_SCHEMA_TYPE_SIMPLE) || \ - ((item->type == XML_SCHEMA_TYPE_BASIC) && \ - (item->builtInType != XML_SCHEMAS_ANYTYPE))) +#define WXS_ATTRUSE_TYPEDEF(au) WXS_ATTR_TYPEDEF(WXS_ATTRUSE_DECL( WXS_ATTR_USE_CAST au)) -#define IS_ANY_SIMPLE_TYPE(item) \ - ((item->type == XML_SCHEMA_TYPE_BASIC) && \ - (item->builtInType == XML_SCHEMAS_ANYSIMPLETYPE)) +#define WXS_ATTRUSE_DECL_NAME(au) (WXS_ATTRUSE_DECL(au))->name -#define IS_NOT_TYPEFIXED(item) \ - ((item->type != XML_SCHEMA_TYPE_BASIC) && \ - ((item->flags & XML_SCHEMAS_TYPE_INTERNAL_RESOLVED) == 0)) +#define WXS_ATTRUSE_DECL_TNS(au) (WXS_ATTRUSE_DECL(au))->targetNamespace +/* +* Macros for attribute groups. +*/ +#define WXS_ATTR_GROUP_HAS_REFS(ag) ((WXS_ATTR_GROUP_CAST (ag))->flags & XML_SCHEMAS_ATTRGROUP_HAS_REFS) +#define WXS_ATTR_GROUP_EXPANDED(ag) ((WXS_ATTR_GROUP_CAST (ag))->flags & XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED) +/* +* Macros for particles. +*/ +#define WXS_PARTICLE(p) WXS_PTC_CAST (p) -#define TYPE_IS_NOT_FIXEDUP_1(item) \ - (((item)->type != XML_SCHEMA_TYPE_BASIC) && \ - (((item)->flags & XML_SCHEMAS_TYPE_FIXUP_1) == 0)) +#define WXS_PARTICLE_TERM(p) (WXS_PARTICLE(p))->children -#define HAS_COMPLEX_CONTENT(item) \ - ((item->contentType == XML_SCHEMA_CONTENT_MIXED) || \ - (item->contentType == XML_SCHEMA_CONTENT_EMPTY) || \ - (item->contentType == XML_SCHEMA_CONTENT_ELEMENTS)) +#define WXS_PARTICLE_MODEL(p) WXS_MODEL_GROUP_CAST WXS_PARTICLE(p)->children +/* +* Macros for model groups definitions. +*/ +#define WXS_MODELGROUPDEF_MODEL(mgd) (WXS_MODEL_GROUP_CAST (mgd))->children +/* +* Macros for model groups. +*/ +#define WXS_IS_MODEL_GROUP(i) \ + (((i)->type == XML_SCHEMA_TYPE_SEQUENCE) || \ + ((i)->type == XML_SCHEMA_TYPE_CHOICE) || \ + ((i)->type == XML_SCHEMA_TYPE_ALL)) -#define HAS_SIMPLE_CONTENT(item) \ - ((item->contentType == XML_SCHEMA_CONTENT_SIMPLE) || \ - (item->contentType == XML_SCHEMA_CONTENT_BASIC)) +#define WXS_MODELGROUP_PARTICLE(mg) WXS_PTC_CAST (mg)->children +/* +* Macros for schema buckets. +*/ +#define WXS_IS_BUCKET_INCREDEF(t) (((t) == XML_SCHEMA_SCHEMA_INCLUDE) || \ + ((t) == XML_SCHEMA_SCHEMA_REDEFINE)) -#define HAS_MIXED_CONTENT(item) (item->contentType == XML_SCHEMA_CONTENT_MIXED) +#define WXS_IS_BUCKET_IMPMAIN(t) (((t) == XML_SCHEMA_SCHEMA_MAIN) || \ + ((t) == XML_SCHEMA_SCHEMA_IMPORT)) + +#define WXS_IMPBUCKET(b) ((xmlSchemaImportPtr) (b)) + +#define WXS_INCBUCKET(b) ((xmlSchemaIncludePtr) (b)) +/* +* Macros for complex/simple types. +*/ +#define WXS_IS_ANYTYPE(i) \ + (( (i)->type == XML_SCHEMA_TYPE_BASIC) && \ + ( (WXS_TYPE_CAST (i))->builtInType == XML_SCHEMAS_ANYTYPE)) -#define IS_PARTICLE_EMPTIABLE(item) \ - (xmlSchemaIsParticleEmptiable((xmlSchemaParticlePtr) item->subtypes)) +#define WXS_IS_COMPLEX(i) \ + (((i)->type == XML_SCHEMA_TYPE_COMPLEX) || \ + ((i)->builtInType == XML_SCHEMAS_ANYTYPE)) -#define GET_NODE(item) xmlSchemaGetComponentNode((xmlSchemaBasicItemPtr) item) +#define WXS_IS_SIMPLE(item) \ + ((item->type == XML_SCHEMA_TYPE_SIMPLE) || \ + ((item->type == XML_SCHEMA_TYPE_BASIC) && \ + (item->builtInType != XML_SCHEMAS_ANYTYPE))) -#define GET_LIST_ITEM_TYPE(item) item->subtypes +#define WXS_IS_ANY_SIMPLE_TYPE(i) \ + (((i)->type == XML_SCHEMA_TYPE_BASIC) && \ + ((i)->builtInType == XML_SCHEMAS_ANYSIMPLETYPE)) -#define VARIETY_ATOMIC(item) (item->flags & XML_SCHEMAS_TYPE_VARIETY_ATOMIC) -#define VARIETY_LIST(item) (item->flags & XML_SCHEMAS_TYPE_VARIETY_LIST) -#define VARIETY_UNION(item) (item->flags & XML_SCHEMAS_TYPE_VARIETY_UNION) +#define WXS_IS_RESTRICTION(t) \ + ((t)->flags & XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION) -#define IS_MODEL_GROUP(item) \ - ((item->type == XML_SCHEMA_TYPE_SEQUENCE) || \ - (item->type == XML_SCHEMA_TYPE_CHOICE) || \ - (item->type == XML_SCHEMA_TYPE_ALL)) +#define WXS_IS_EXTENSION(t) \ + ((t)->flags & XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION) -#define INODE_NILLED(item) (item->flags & XML_SCHEMA_ELEM_INFO_NILLED) +#define WXS_IS_TYPE_NOT_FIXED(i) \ + (((i)->type != XML_SCHEMA_TYPE_BASIC) && \ + (((i)->flags & XML_SCHEMAS_TYPE_INTERNAL_RESOLVED) == 0)) -#define ELEM_TYPE(item) item->subtypes +#define WXS_IS_TYPE_NOT_FIXED_1(item) \ + (((item)->type != XML_SCHEMA_TYPE_BASIC) && \ + (((item)->flags & XML_SCHEMAS_TYPE_FIXUP_1) == 0)) +/* +* Macros for exclusively for complex types. +*/ +#define WXS_HAS_COMPLEX_CONTENT(item) \ + ((item->contentType == XML_SCHEMA_CONTENT_MIXED) || \ + (item->contentType == XML_SCHEMA_CONTENT_EMPTY) || \ + (item->contentType == XML_SCHEMA_CONTENT_ELEMENTS)) -#define GET_PARTICLE(item) (xmlSchemaParticlePtr) item->subtypes; +#define WXS_HAS_SIMPLE_CONTENT(item) \ + ((item->contentType == XML_SCHEMA_CONTENT_SIMPLE) || \ + (item->contentType == XML_SCHEMA_CONTENT_BASIC)) -#define SUBST_GROUP_AFF(item) (item)->refDecl +#define WXS_HAS_MIXED_CONTENT(item) \ + (item->contentType == XML_SCHEMA_CONTENT_MIXED) -#define ACTXT_CAST (xmlSchemaAbstractCtxtPtr) +#define WXS_EMPTIABLE(t) \ + (xmlSchemaIsParticleEmptiable(WXS_PTC_CAST (t)->subtypes)) -#if 0 -#define WXS_GET_NEXT(item) \ - xmlSchemaGetNextComponent((xmlSchemaBasicItemPtr) item) -#endif +#define WXS_TYPE_CONTENTTYPE(t) (t)->subtypes -#define CAN_PARSE_SCHEMA(b) (((b)->doc != NULL) && ((b)->parsed == 0)) +#define WXS_TYPE_PARTICLE(t) WXS_PTC_CAST (t)->subtypes -#define HFAILURE if (res == -1) goto exit_failure; +#define WXS_TYPE_PARTICLE_TERM(t) WXS_PARTICLE_TERM(WXS_TYPE_PARTICLE(t)) +/* +* Macros for exclusively for simple types. +*/ +#define WXS_LIST_ITEMTYPE(t) (t)->subtypes -#define HERROR if (res != 0) goto exit_error; +#define WXS_IS_ATOMIC(t) (t->flags & XML_SCHEMAS_TYPE_VARIETY_ATOMIC) -#define HSTOP(ctx) if ((ctx)->stop) goto exit; +#define WXS_IS_LIST(t) (t->flags & XML_SCHEMAS_TYPE_VARIETY_LIST) +#define WXS_IS_UNION(t) (t->flags & XML_SCHEMAS_TYPE_VARIETY_UNION) +/* +* Misc parser context macros. +*/ #define WXS_CONSTRUCTOR(ctx) (ctx)->constructor #define WXS_HAS_BUCKETS(ctx) \ @@ -201,47 +286,57 @@ static const xmlChar *xmlSchemaElemModelGrDef = (const xmlChar *) #define WXS_SUBST_GROUPS(ctx) WXS_CONSTRUCTOR((ctx))->substGroups -#define WXS_SCHEMA_BUCKET(ctx) WXS_CONSTRUCTOR((ctx))->bucket +#define WXS_BUCKET(ctx) WXS_CONSTRUCTOR((ctx))->bucket #define WXS_SCHEMA(ctx) (ctx)->schema -#define ADD_LOCAL_ITEM(ctx, item) \ - xmlSchemaAddItem(&(WXS_SCHEMA_BUCKET(ctx)->locals), item) - -#define ADD_GLOBAL_ITEM(ctx, item) \ - xmlSchemaAddItem(&(WXS_SCHEMA_BUCKET(ctx)->globals), item) +#define WXS_ADD_LOCAL(ctx, item) \ + xmlSchemaAddItemSize(&(WXS_BUCKET(ctx)->locals), 10, item) -#define WXS_ADD_PENDING_ITEM(ctx, item) \ - xmlSchemaAddItem(&((ctx)->constructor->pending), item) +#define WXS_ADD_GLOBAL(ctx, item) \ + xmlSchemaAddItemSize(&(WXS_BUCKET(ctx)->globals), 5, item) -#define WXS_IS_RESTRICTION(t) \ - ((t)->flags & XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION) +#define WXS_ADD_PENDING(ctx, item) \ + xmlSchemaAddItemSize(&((ctx)->constructor->pending), 10, item) +/* +* xmlSchemaItemList macros. +*/ +#define WXS_ILIST_IS_EMPTY(l) ((l == NULL) || ((l)->nbItems == 0)) +/* +* Misc macros. +*/ +#define IS_SCHEMA(node, type) \ + ((node != NULL) && (node->ns != NULL) && \ + (xmlStrEqual(node->name, (const xmlChar *) type)) && \ + (xmlStrEqual(node->ns->href, xmlSchemaNs))) -#define WXS_IS_EXTENSION(t) \ - ((t)->flags & XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION) +#define FREE_AND_NULL(str) if ((str) != NULL) { xmlFree((xmlChar *) (str)); str = NULL; } /* -* @b: The schema bucket +* Since we put the default/fixed values into the dict, we can +* use pointer comparison for those values. +* REMOVED: (xmlStrEqual((v1), (v2))) */ -#define WXS_IS_INCREDEF(t) (((t) == XML_SCHEMA_SCHEMA_INCLUDE) || \ - ((t) == XML_SCHEMA_SCHEMA_REDEFINE)) +#define WXS_ARE_DEFAULT_STR_EQUAL(v1, v2) ((v1) == (v2)) -#define WXS_IS_IMPMAIN(t) (((t) == XML_SCHEMA_SCHEMA_MAIN) || \ - ((t) == XML_SCHEMA_SCHEMA_IMPORT)) +#define INODE_NILLED(item) (item->flags & XML_SCHEMA_ELEM_INFO_NILLED) + +#define CAN_PARSE_SCHEMA(b) (((b)->doc != NULL) && ((b)->parsed == 0)) + +#define HFAILURE if (res == -1) goto exit_failure; -#define IMPBUCKET_CAST(b) ((xmlSchemaImportPtr) (b)) -#define INCBUCKET_CAST(b) ((xmlSchemaIncludePtr) (b)) +#define HERROR if (res != 0) goto exit_error; +#define HSTOP(ctx) if ((ctx)->stop) goto exit; +/* +* Some flags used for various schema constraints. +*/ #define SUBSET_RESTRICTION 1<<0 #define SUBSET_EXTENSION 1<<1 #define SUBSET_SUBSTITUTION 1<<2 #define SUBSET_LIST 1<<3 #define SUBSET_UNION 1<<4 -#define XML_SCHEMAS_PARSE_ERROR 1 - -#define SCHEMAS_PARSE_OPTIONS XML_PARSE_NOENT - typedef struct _xmlSchemaNodeInfo xmlSchemaNodeInfo; typedef xmlSchemaNodeInfo *xmlSchemaNodeInfoPtr; @@ -253,10 +348,13 @@ struct _xmlSchemaItemList { int sizeItems; /* used for dynamic addition of schemata */ }; +#define XML_SCHEMA_CTXT_PARSER 1 +#define XML_SCHEMA_CTXT_VALIDATOR 2 + typedef struct _xmlSchemaAbstractCtxt xmlSchemaAbstractCtxt; typedef xmlSchemaAbstractCtxt *xmlSchemaAbstractCtxtPtr; struct _xmlSchemaAbstractCtxt { - int type; + int type; /* E.g. XML_SCHEMA_CTXT_VALIDATOR */ }; typedef struct _xmlSchemaBucket xmlSchemaBucket; @@ -281,8 +379,12 @@ struct _xmlSchemaSchemaRelation { xmlSchemaBucketPtr bucket; }; +#define XML_SCHEMA_BUCKET_MARKED 1<<0 +#define XML_SCHEMA_BUCKET_COMPS_ADDED 1<<1 + struct _xmlSchemaBucket { int type; + int flags; const xmlChar *schemaLocation; const xmlChar *origTargetNamespace; const xmlChar *targetNamespace; @@ -308,6 +410,7 @@ typedef struct _xmlSchemaImport xmlSchemaImport; typedef xmlSchemaImport *xmlSchemaImportPtr; struct _xmlSchemaImport { int type; /* Main OR import OR include. */ + int flags; const xmlChar *schemaLocation; /* The URI of the schema document. */ /* For chameleon includes, @origTargetNamespace will be NULL */ const xmlChar *origTargetNamespace; @@ -336,6 +439,7 @@ typedef struct _xmlSchemaInclude xmlSchemaInclude; typedef xmlSchemaInclude *xmlSchemaIncludePtr; struct _xmlSchemaInclude { int type; + int flags; const xmlChar *schemaLocation; const xmlChar *origTargetNamespace; const xmlChar *targetNamespace; @@ -352,38 +456,142 @@ struct _xmlSchemaInclude { xmlSchemaImportPtr ownerImport; }; +/** + * xmlSchemaBasicItem: + * + * The abstract base type for schema components. + */ +typedef struct _xmlSchemaBasicItem xmlSchemaBasicItem; +typedef xmlSchemaBasicItem *xmlSchemaBasicItemPtr; +struct _xmlSchemaBasicItem { + xmlSchemaTypeType type; +}; + +/** + * xmlSchemaAnnotItem: + * + * The abstract base type for annotated schema components. + * (Extends xmlSchemaBasicItem) + */ +typedef struct _xmlSchemaAnnotItem xmlSchemaAnnotItem; +typedef xmlSchemaAnnotItem *xmlSchemaAnnotItemPtr; +struct _xmlSchemaAnnotItem { + xmlSchemaTypeType type; + xmlSchemaAnnotPtr annot; +}; + +/** + * xmlSchemaTreeItem: + * + * The abstract base type for tree-like structured schema components. + * (Extends xmlSchemaAnnotItem) + */ +typedef struct _xmlSchemaTreeItem xmlSchemaTreeItem; +typedef xmlSchemaTreeItem *xmlSchemaTreeItemPtr; +struct _xmlSchemaTreeItem { + xmlSchemaTypeType type; + xmlSchemaAnnotPtr annot; + xmlSchemaTreeItemPtr next; + xmlSchemaTreeItemPtr children; +}; + + +#define XML_SCHEMA_ATTR_USE_FIXED 1<<0 +/** + * xmlSchemaAttributeUsePtr: + * + * The abstract base type for tree-like structured schema components. + * (Extends xmlSchemaTreeItem) + */ +typedef struct _xmlSchemaAttributeUse xmlSchemaAttributeUse; +typedef xmlSchemaAttributeUse *xmlSchemaAttributeUsePtr; +struct _xmlSchemaAttributeUse { + xmlSchemaTypeType type; + xmlSchemaAnnotPtr annot; + xmlSchemaAttributeUsePtr next; /* The next attr. use. */ + /* + * The attr. decl. OR a QName-ref. to an attr. decl. OR + * a QName-ref. to an attribute group definition. + */ + xmlSchemaAttributePtr attrDecl; + + int flags; + xmlNodePtr node; + int occurs; /* required, optional */ + const xmlChar * defValue; + xmlSchemaValPtr defVal; +}; + +/** + * xmlSchemaAttributeUseProhibPtr: + * + * A helper component to reflect attribute prohibitions. + * (Extends xmlSchemaBasicItem) + */ +typedef struct _xmlSchemaAttributeUseProhib xmlSchemaAttributeUseProhib; +typedef xmlSchemaAttributeUseProhib *xmlSchemaAttributeUseProhibPtr; +struct _xmlSchemaAttributeUseProhib { + xmlSchemaTypeType type; /* == XML_SCHEMA_EXTRA_ATTR_USE_PROHIB */ + xmlNodePtr node; + const xmlChar *name; + const xmlChar *targetNamespace; + int isRef; +}; + +/** + * xmlSchemaRedef: + */ +typedef struct _xmlSchemaRedef xmlSchemaRedef; +typedef xmlSchemaRedef *xmlSchemaRedefPtr; +struct _xmlSchemaRedef { + xmlSchemaRedefPtr next; + xmlSchemaBasicItemPtr item; /* The redefining component. */ + xmlSchemaBasicItemPtr reference; /* The referencing component. */ + xmlSchemaBasicItemPtr target; /* The to-be-redefined component. */ + const xmlChar *refName; /* The name of the to-be-redefined component. */ + const xmlChar *refTargetNs; /* The target namespace of the + to-be-redefined comp. */ + xmlSchemaBucketPtr targetBucket; /* The redefined schema. */ +}; + +/** + * xmlSchemaConstructionCtxt: + */ typedef struct _xmlSchemaConstructionCtxt xmlSchemaConstructionCtxt; typedef xmlSchemaConstructionCtxt *xmlSchemaConstructionCtxtPtr; struct _xmlSchemaConstructionCtxt { - xmlSchemaPtr schema; /* The main schema. */ + xmlSchemaPtr mainSchema; /* The main schema. */ + xmlSchemaBucketPtr mainBucket; /* The main schema bucket */ xmlDictPtr dict; xmlSchemaItemListPtr buckets; /* List of schema buckets. */ /* xmlSchemaItemListPtr relations; */ /* List of schema relations. */ - xmlSchemaBucketPtr bucket; /* The current schema bucket */ - /* All Components of all schemas that need to be fixed. */ - xmlSchemaItemListPtr pending; + xmlSchemaBucketPtr bucket; /* The current schema bucket */ + xmlSchemaItemListPtr pending; /* All Components of all schemas that + need to be fixed. */ xmlHashTablePtr substGroups; + xmlSchemaRedefPtr redefs; + xmlSchemaRedefPtr lastRedef; }; -#define XML_SCHEMA_CTXT_PARSER 1 -#define XML_SCHEMA_CTXT_VALIDATOR 2 +#define XML_SCHEMAS_PARSE_ERROR 1 +#define SCHEMAS_PARSE_OPTIONS XML_PARSE_NOENT struct _xmlSchemaParserCtxt { int type; - void *userData; /* user specific data block */ + void *errCtxt; /* user specific error context */ xmlSchemaValidityErrorFunc error; /* the callback in case of errors */ xmlSchemaValidityWarningFunc warning; /* the callback in case of warning */ - xmlSchemaValidError err; + int err; int nberrors; xmlStructuredErrorFunc serror; xmlSchemaConstructionCtxtPtr constructor; - int ownsConstructor; /* TODO: Move this to parser flags. */ + int ownsConstructor; /* TODO: Move this to parser *flags*. */ - /* xmlSchemaPtr topschema; The main schema */ - /* xmlHashTablePtr namespaces; Hash table of namespaces to schemas */ + /* xmlSchemaPtr topschema; */ + /* xmlHashTablePtr namespaces; */ - xmlSchemaPtr schema; /* The schema in use */ + xmlSchemaPtr schema; /* The main schema in use */ int counter; const xmlChar *URL; @@ -403,7 +611,6 @@ struct _xmlSchemaParserCtxt { xmlDictPtr dict; /* dictionnary for interned string names */ xmlSchemaTypePtr ctxtType; /* The current context simple/complex type */ - xmlSchemaTypePtr parentItem; /* The current parent schema item */ int options; xmlSchemaValidCtxtPtr vctxt; int isS4S; @@ -411,63 +618,11 @@ struct _xmlSchemaParserCtxt { int xsiAssemble; int stop; /* If the parser should stop; i.e. a critical error. */ const xmlChar *targetNamespace; -}; - -#define XML_SCHEMAS_ATTR_UNKNOWN 1 -#define XML_SCHEMAS_ATTR_ASSESSED 2 -#define XML_SCHEMAS_ATTR_PROHIBITED 3 -#define XML_SCHEMAS_ATTR_ERR_MISSING 4 -#define XML_SCHEMAS_ATTR_INVALID_VALUE 5 -#define XML_SCHEMAS_ATTR_ERR_NO_TYPE 6 -#define XML_SCHEMAS_ATTR_ERR_FIXED_VALUE 7 -#define XML_SCHEMAS_ATTR_DEFAULT 8 -#define XML_SCHEMAS_ATTR_VALIDATE_VALUE 9 -#define XML_SCHEMAS_ATTR_ERR_WILD_STRICT_NO_DECL 10 -#define XML_SCHEMAS_ATTR_HAS_ATTR_USE 11 -#define XML_SCHEMAS_ATTR_HAS_ATTR_DECL 12 -#define XML_SCHEMAS_ATTR_WILD_SKIP 13 -#define XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL 14 -#define XML_SCHEMAS_ATTR_ERR_WILD_DUPLICATE_ID 15 -#define XML_SCHEMAS_ATTR_ERR_WILD_AND_USE_ID 16 -#define XML_SCHEMAS_ATTR_META 17 - -/** - * xmlSchemaBasicItem: - * - * The abstract base type for schema components. - */ -typedef struct _xmlSchemaBasicItem xmlSchemaBasicItem; -typedef xmlSchemaBasicItem *xmlSchemaBasicItemPtr; -struct _xmlSchemaBasicItem { - xmlSchemaTypeType type; -}; - -/** - * xmlSchemaAnnotItem: - * - * The abstract base type for annotated schema components. - * (Extends xmlSchemaBasicItem) - */ -typedef struct _xmlSchemaAnnotItem xmlSchemaAnnotItem; -typedef xmlSchemaAnnotItem *xmlSchemaAnnotItemPtr; -struct _xmlSchemaAnnotItem { - xmlSchemaTypeType type; - xmlSchemaAnnotPtr annot; -}; + xmlSchemaBucketPtr redefined; /* The schema to be redefined. */ -/** - * xmlSchemaTreeItem: - * - * The abstract base type for tree-like structured schema components. - * (Extends xmlSchemaAnnotItem) - */ -typedef struct _xmlSchemaTreeItem xmlSchemaTreeItem; -typedef xmlSchemaTreeItem *xmlSchemaTreeItemPtr; -struct _xmlSchemaTreeItem { - xmlSchemaTypeType type; - xmlSchemaAnnotPtr annot; - xmlSchemaTreeItemPtr next; - xmlSchemaTreeItemPtr children; + xmlSchemaRedefPtr redef; /* Used for redefinitions. */ + int redefCounter; /* Used for redefinitions. */ + xmlSchemaItemListPtr attrProhibs; }; /** @@ -480,10 +635,11 @@ typedef struct _xmlSchemaQNameRef xmlSchemaQNameRef; typedef xmlSchemaQNameRef *xmlSchemaQNameRefPtr; struct _xmlSchemaQNameRef { xmlSchemaTypeType type; - xmlSchemaBasicItemPtr item; + xmlSchemaBasicItemPtr item; /* The resolved referenced item. */ xmlSchemaTypeType itemType; const xmlChar *name; const xmlChar *targetNamespace; + xmlNodePtr node; }; /** @@ -497,8 +653,10 @@ typedef xmlSchemaParticle *xmlSchemaParticlePtr; struct _xmlSchemaParticle { xmlSchemaTypeType type; xmlSchemaAnnotPtr annot; - xmlSchemaTreeItemPtr next; /* next particle (OR "element decl" OR "wildcard") */ - xmlSchemaTreeItemPtr children; /* the "term" ("model group" OR "group definition") */ + xmlSchemaTreeItemPtr next; /* next particle */ + xmlSchemaTreeItemPtr children; /* the "term" (e.g. a model group, + a group definition, a XML_SCHEMA_EXTRA_QNAMEREF (if a reference), + etc.) */ int minOccurs; int maxOccurs; xmlNodePtr node; @@ -521,6 +679,7 @@ struct _xmlSchemaModelGroup { }; #define XML_SCHEMA_MODEL_GROUP_DEF_MARKED 1<<0 +#define XML_SCHEMA_MODEL_GROUP_DEF_REDEFINED 1<<1 /** * xmlSchemaModelGroupDef: * @@ -538,7 +697,6 @@ struct _xmlSchemaModelGroupDef { const xmlChar *targetNamespace; xmlNodePtr node; int flags; - xmlSchemaModelGroupDefPtr redef; /* Redefinitions. */ }; typedef struct _xmlSchemaIDC xmlSchemaIDC; @@ -590,7 +748,7 @@ typedef xmlSchemaIDCAug *xmlSchemaIDCAugPtr; struct _xmlSchemaIDCAug { xmlSchemaIDCAugPtr next; /* next in a list */ xmlSchemaIDCPtr def; /* the IDC definition */ - int bubbleDepth; /* the lowest tree level to which IDC + int keyrefDepth; /* the lowest tree level to which IDC tables need to be bubbled upwards */ }; @@ -634,11 +792,10 @@ struct _xmlSchemaPSVIIDCBinding { xmlSchemaPSVIIDCNodePtr *nodeTable; /* array of key-sequences */ int nbNodes; /* number of entries in the node table */ int sizeNodes; /* size of the node table */ - int nbDupls; /* number of already identified duplicates in the node - table */ - /* int nbKeys; number of keys in each key-sequence */ + xmlSchemaItemListPtr dupls; }; + #define XPATH_STATE_OBJ_TYPE_IDC_SELECTOR 1 #define XPATH_STATE_OBJ_TYPE_IDC_FIELD 2 @@ -673,17 +830,20 @@ struct _xmlSchemaIDCStateObj { /** * xmlSchemaIDCMatcher: * - * Used to IDC selectors (and fields) successively. + * Used to evaluate IDC selectors (and fields). */ struct _xmlSchemaIDCMatcher { int type; int depth; /* the tree depth at creation time */ xmlSchemaIDCMatcherPtr next; /* next in the list */ xmlSchemaIDCAugPtr aidc; /* the augmented IDC item */ + int idcType; xmlSchemaPSVIIDCKeyPtr **keySeqs; /* the key-sequences of the target elements */ int sizeKeySeqs; int targetDepth; + xmlSchemaItemListPtr targets; /* list of target-node + (xmlSchemaPSVIIDCNodePtr) entries */ }; /* @@ -733,9 +893,29 @@ struct _xmlSchemaNodeInfo { const xmlChar **nsBindings; /* Namespace bindings on this element */ int nbNsBindings; - int sizeNsBindings; + int sizeNsBindings; + + int hasKeyrefs; + int appliedXPath; /* Indicates that an XPath has been applied. */ }; +#define XML_SCHEMAS_ATTR_UNKNOWN 1 +#define XML_SCHEMAS_ATTR_ASSESSED 2 +#define XML_SCHEMAS_ATTR_PROHIBITED 3 +#define XML_SCHEMAS_ATTR_ERR_MISSING 4 +#define XML_SCHEMAS_ATTR_INVALID_VALUE 5 +#define XML_SCHEMAS_ATTR_ERR_NO_TYPE 6 +#define XML_SCHEMAS_ATTR_ERR_FIXED_VALUE 7 +#define XML_SCHEMAS_ATTR_DEFAULT 8 +#define XML_SCHEMAS_ATTR_VALIDATE_VALUE 9 +#define XML_SCHEMAS_ATTR_ERR_WILD_STRICT_NO_DECL 10 +#define XML_SCHEMAS_ATTR_HAS_ATTR_USE 11 +#define XML_SCHEMAS_ATTR_HAS_ATTR_DECL 12 +#define XML_SCHEMAS_ATTR_WILD_SKIP 13 +#define XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL 14 +#define XML_SCHEMAS_ATTR_ERR_WILD_DUPLICATE_ID 15 +#define XML_SCHEMAS_ATTR_ERR_WILD_AND_USE_ID 16 +#define XML_SCHEMAS_ATTR_META 17 /* * @metaType values of xmlSchemaAttrInfo. */ @@ -759,7 +939,7 @@ struct _xmlSchemaAttrInfo { int flags; /* combination of node info flags */ xmlSchemaAttributePtr decl; /* the attribute declaration */ - xmlSchemaAttributePtr use; /* the attribute use */ + xmlSchemaAttributeUsePtr use; /* the attribute use */ int state; int metaType; const xmlChar *vcValue; /* the value constraint value */ @@ -775,7 +955,7 @@ struct _xmlSchemaAttrInfo { */ struct _xmlSchemaValidCtxt { int type; - void *userData; /* user specific data block */ + void *errCtxt; /* user specific data block */ xmlSchemaValidityErrorFunc error; /* the callback in case of errors */ xmlSchemaValidityWarningFunc warning; /* the callback in case of warning */ xmlStructuredErrorFunc serror; @@ -786,7 +966,7 @@ struct _xmlSchemaValidCtxt { xmlCharEncoding enc; xmlSAXHandlerPtr sax; xmlParserCtxtPtr parserCtxt; - void *user_data; + void *user_data; /* TODO: What is this for? */ int err; int nberrors; @@ -836,6 +1016,9 @@ struct _xmlSchemaValidCtxt { int skipDepth; xmlSchemaItemListPtr nodeQNames; + int hasKeyrefs; + int createIDCNodeTables; + int psviExposeIDCNodeTables; }; /** @@ -864,7 +1047,7 @@ static int xmlSchemaParseRedefine(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node); static int xmlSchemaTypeFixup(xmlSchemaTypePtr type, - xmlSchemaParserCtxtPtr ctxt); + xmlSchemaAbstractCtxtPtr ctxt); static const xmlChar * xmlSchemaFacetTypeToString(xmlSchemaTypeType type); static int @@ -882,7 +1065,7 @@ xmlSchemaParseModelGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlNodePtr node, xmlSchemaTypeType type, int withParticle); static const xmlChar * -xmlSchemaCompTypeToString(xmlSchemaTypeType type); +xmlSchemaGetComponentTypeStr(xmlSchemaBasicItemPtr item); static xmlSchemaTypeLinkPtr xmlSchemaGetUnionSimpleTypeMemberTypes(xmlSchemaTypePtr type); static void @@ -890,7 +1073,8 @@ xmlSchemaInternalErr(xmlSchemaAbstractCtxtPtr actxt, const char *funcName, const char *message); static int -xmlSchemaCheckCOSSTDerivedOK(xmlSchemaTypePtr type, +xmlSchemaCheckCOSSTDerivedOK(xmlSchemaAbstractCtxtPtr ctxt, + xmlSchemaTypePtr type, xmlSchemaTypePtr baseType, int subset); static void @@ -898,6 +1082,10 @@ xmlSchemaCheckElementDeclComponent(xmlSchemaElementPtr elemDecl, xmlSchemaParserCtxtPtr ctxt); static void xmlSchemaComponentListFree(xmlSchemaItemListPtr list); +static xmlSchemaQNameRefPtr +xmlSchemaParseAttributeGroupRef(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaPtr schema, + xmlNodePtr node); /************************************************************************ * * @@ -906,21 +1094,25 @@ xmlSchemaComponentListFree(xmlSchemaItemListPtr list); ************************************************************************/ /** - * xmlSchemaCompTypeToString: + * xmlSchemaItemTypeToStr: * @type: the type of the schema item * * Returns the component name of a schema item. */ static const xmlChar * -xmlSchemaCompTypeToString(xmlSchemaTypeType type) +xmlSchemaItemTypeToStr(xmlSchemaTypeType type) { switch (type) { + case XML_SCHEMA_TYPE_BASIC: + return(BAD_CAST "simple type definition"); case XML_SCHEMA_TYPE_SIMPLE: return(BAD_CAST "simple type definition"); case XML_SCHEMA_TYPE_COMPLEX: return(BAD_CAST "complex type definition"); case XML_SCHEMA_TYPE_ELEMENT: return(BAD_CAST "element declaration"); + case XML_SCHEMA_TYPE_ATTRIBUTE_USE: + return(BAD_CAST "attribute use"); case XML_SCHEMA_TYPE_ATTRIBUTE: return(BAD_CAST "attribute declaration"); case XML_SCHEMA_TYPE_GROUP: @@ -950,14 +1142,36 @@ xmlSchemaCompTypeToString(xmlSchemaTypeType type) return(BAD_CAST "wildcard (any)"); case XML_SCHEMA_EXTRA_QNAMEREF: return(BAD_CAST "[helper component] QName reference"); + case XML_SCHEMA_EXTRA_ATTR_USE_PROHIB: + return(BAD_CAST "[helper component] attribute use prohibition"); default: return(BAD_CAST "Not a schema component"); } } /** - * xmlSchemaGetComponentNode: - * @item: a schema component + * xmlSchemaGetComponentTypeStr: + * @type: the type of the schema item + * + * Returns the component name of a schema item. + */ +static const xmlChar * +xmlSchemaGetComponentTypeStr(xmlSchemaBasicItemPtr item) +{ + switch (item->type) { + case XML_SCHEMA_TYPE_BASIC: + if (WXS_IS_COMPLEX(WXS_TYPE_CAST item)) + return(BAD_CAST "complex type definition"); + else + return(BAD_CAST "simple type definition"); + default: + return(xmlSchemaItemTypeToStr(item->type)); + } +} + +/** + * xmlSchemaGetComponentNode: + * @item: a schema component * * Returns node associated with the schema component. * NOTE that such a node need not be available; plus, a component's @@ -993,6 +1207,14 @@ xmlSchemaGetComponentNode(xmlSchemaBasicItemPtr item) case XML_SCHEMA_TYPE_IDC_KEY: case XML_SCHEMA_TYPE_IDC_KEYREF: return (((xmlSchemaIDCPtr) item)->node); + case XML_SCHEMA_EXTRA_QNAMEREF: + return(((xmlSchemaQNameRefPtr) item)->node); + /* TODO: What to do with NOTATIONs? + case XML_SCHEMA_TYPE_NOTATION: + return (((xmlSchemaNotationPtr) item)->node); + */ + case XML_SCHEMA_TYPE_ATTRIBUTE_USE: + return (((xmlSchemaAttributeUsePtr) item)->node); default: return (NULL); } @@ -1039,37 +1261,6 @@ xmlSchemaGetNextComponent(xmlSchemaBasicItemPtr item) } #endif -/** - * xmlSchemaGetAttrName: - * @attr: the attribute declaration/use - * - * Returns the name of the attribute; if the attribute - * is a reference, the name of the referenced global type will be returned. - */ -static const xmlChar * -xmlSchemaGetAttrName(xmlSchemaAttributePtr attr) -{ - if (attr->ref != NULL) - return(attr->ref); - else - return(attr->name); -} - -/** - * xmlSchemaGetAttrTargetNsURI: - * @type: the type (element or attribute) - * - * Returns the target namespace URI of the type; if the type is a reference, - * the target namespace of the referenced type will be returned. - */ -static const xmlChar * -xmlSchemaGetAttrTargetNsURI(xmlSchemaAttributePtr attr) -{ - if (attr->ref != NULL) - return (attr->refNs); - else - return(attr->targetNamespace); -} /** * xmlSchemaFormatQName: @@ -1089,14 +1280,18 @@ xmlSchemaFormatQName(xmlChar **buf, const xmlChar *localName) { FREE_AND_NULL(*buf) - if (namespaceName == NULL) - return(localName); - - *buf = xmlStrdup(BAD_CAST "{"); - *buf = xmlStrcat(*buf, namespaceName); - *buf = xmlStrcat(*buf, BAD_CAST "}"); - *buf = xmlStrcat(*buf, localName); - + if (namespaceName != NULL) { + *buf = xmlStrdup(BAD_CAST "{"); + *buf = xmlStrcat(*buf, namespaceName); + *buf = xmlStrcat(*buf, BAD_CAST "}"); + } + if (localName != NULL) { + if (namespaceName == NULL) + return(localName); + *buf = xmlStrcat(*buf, localName); + } else { + *buf = xmlStrcat(*buf, BAD_CAST "(NULL)"); + } return ((const xmlChar *) *buf); } @@ -1129,6 +1324,16 @@ xmlSchemaGetComponentName(xmlSchemaBasicItemPtr item) case XML_SCHEMA_TYPE_IDC_UNIQUE: case XML_SCHEMA_TYPE_IDC_KEYREF: return (((xmlSchemaIDCPtr) item)->name); + case XML_SCHEMA_TYPE_ATTRIBUTE_USE: + if (WXS_ATTRUSE_DECL(item) != NULL) { + return(xmlSchemaGetComponentName( + WXS_BASIC_CAST WXS_ATTRUSE_DECL(item))); + } else + return(NULL); + case XML_SCHEMA_EXTRA_QNAMEREF: + return (((xmlSchemaQNameRefPtr) item)->name); + case XML_SCHEMA_TYPE_NOTATION: + return (((xmlSchemaNotationPtr) item)->name); default: /* * Other components cannot have names. @@ -1138,6 +1343,22 @@ xmlSchemaGetComponentName(xmlSchemaBasicItemPtr item) return (NULL); } +#define xmlSchemaGetQNameRefName(r) (WXS_QNAME_CAST (r))->name +#define xmlSchemaGetQNameRefTargetNs(r) (WXS_QNAME_CAST (r))->targetNamespace +/* +static const xmlChar * +xmlSchemaGetQNameRefName(void *ref) +{ + return(((xmlSchemaQNameRefPtr) ref)->name); +} + +static const xmlChar * +xmlSchemaGetQNameRefTargetNs(void *ref) +{ + return(((xmlSchemaQNameRefPtr) ref)->targetNamespace); +} +*/ + static const xmlChar * xmlSchemaGetComponentTargetNs(xmlSchemaBasicItemPtr item) { @@ -1159,6 +1380,17 @@ xmlSchemaGetComponentTargetNs(xmlSchemaBasicItemPtr item) case XML_SCHEMA_TYPE_IDC_UNIQUE: case XML_SCHEMA_TYPE_IDC_KEYREF: return (((xmlSchemaIDCPtr) item)->targetNamespace); + case XML_SCHEMA_TYPE_ATTRIBUTE_USE: + if (WXS_ATTRUSE_DECL(item) != NULL) { + return(xmlSchemaGetComponentTargetNs( + WXS_BASIC_CAST WXS_ATTRUSE_DECL(item))); + } + /* TODO: Will returning NULL break something? */ + break; + case XML_SCHEMA_EXTRA_QNAMEREF: + return (((xmlSchemaQNameRefPtr) item)->targetNamespace); + case XML_SCHEMA_TYPE_NOTATION: + return (((xmlSchemaNotationPtr) item)->targetNamespace); default: /* * Other components cannot have names. @@ -1178,18 +1410,25 @@ xmlSchemaGetComponentQName(xmlChar **buf, } static const xmlChar* -xmlSchemaGetIDCDesignation(xmlChar **buf, xmlSchemaIDCPtr idc) +xmlSchemaGetComponentDesignation(xmlChar **buf, void *item) { xmlChar *str = NULL; - *buf = xmlStrcat(*buf, xmlSchemaCompTypeToString(idc->type)); + *buf = xmlStrcat(*buf, WXS_ITEM_TYPE_NAME(item)); *buf = xmlStrcat(*buf, BAD_CAST " '"); - *buf = xmlStrcat(*buf, xmlSchemaGetComponentQName(&str, idc)); + *buf = xmlStrcat(*buf, xmlSchemaGetComponentQName(&str, + (xmlSchemaBasicItemPtr) item)); *buf = xmlStrcat(*buf, BAD_CAST "'"); FREE_AND_NULL(str); return(*buf); } +static const xmlChar* +xmlSchemaGetIDCDesignation(xmlChar **buf, xmlSchemaIDCPtr idc) +{ + return(xmlSchemaGetComponentDesignation(buf, idc)); +} + /** * xmlSchemaWildcardPCToString: * @pc: the type of processContents @@ -1316,7 +1555,7 @@ internal_error: static xmlChar* xmlSchemaFormatItemForReport(xmlChar **buf, const xmlChar *itemDes, - xmlSchemaTypePtr item, + xmlSchemaBasicItemPtr item, xmlNodePtr itemNode) { xmlChar *str = NULL; @@ -1331,84 +1570,99 @@ xmlSchemaFormatItemForReport(xmlChar **buf, *buf = xmlStrdup(itemDes); } else if (item != NULL) { switch (item->type) { - case XML_SCHEMA_TYPE_BASIC: - if (VARIETY_ATOMIC(item)) + case XML_SCHEMA_TYPE_BASIC: { + xmlSchemaTypePtr type = WXS_TYPE_CAST item; + + if (WXS_IS_ATOMIC(type)) *buf = xmlStrdup(BAD_CAST "atomic type 'xs:"); - else if (VARIETY_LIST(item)) + else if (WXS_IS_LIST(type)) *buf = xmlStrdup(BAD_CAST "list type 'xs:"); - else if (VARIETY_UNION(item)) + else if (WXS_IS_UNION(type)) *buf = xmlStrdup(BAD_CAST "union type 'xs:"); else *buf = xmlStrdup(BAD_CAST "simple type 'xs:"); - *buf = xmlStrcat(*buf, item->name); + *buf = xmlStrcat(*buf, type->name); *buf = xmlStrcat(*buf, BAD_CAST "'"); + } break; - case XML_SCHEMA_TYPE_SIMPLE: - if (item->flags & XML_SCHEMAS_TYPE_GLOBAL) { + case XML_SCHEMA_TYPE_SIMPLE: { + xmlSchemaTypePtr type = WXS_TYPE_CAST item; + + if (type->flags & XML_SCHEMAS_TYPE_GLOBAL) { *buf = xmlStrdup(BAD_CAST""); } else { *buf = xmlStrdup(BAD_CAST "local "); } - if (VARIETY_ATOMIC(item)) + if (WXS_IS_ATOMIC(type)) *buf = xmlStrcat(*buf, BAD_CAST "atomic type"); - else if (VARIETY_LIST(item)) + else if (WXS_IS_LIST(type)) *buf = xmlStrcat(*buf, BAD_CAST "list type"); - else if (VARIETY_UNION(item)) + else if (WXS_IS_UNION(type)) *buf = xmlStrcat(*buf, BAD_CAST "union type"); else *buf = xmlStrcat(*buf, BAD_CAST "simple type"); - if (item->flags & XML_SCHEMAS_TYPE_GLOBAL) { + if (type->flags & XML_SCHEMAS_TYPE_GLOBAL) { *buf = xmlStrcat(*buf, BAD_CAST " '"); - *buf = xmlStrcat(*buf, item->name); + *buf = xmlStrcat(*buf, type->name); *buf = xmlStrcat(*buf, BAD_CAST "'"); } + } break; - case XML_SCHEMA_TYPE_COMPLEX: - if (item->flags & XML_SCHEMAS_TYPE_GLOBAL) + case XML_SCHEMA_TYPE_COMPLEX: { + xmlSchemaTypePtr type = WXS_TYPE_CAST item; + + if (type->flags & XML_SCHEMAS_TYPE_GLOBAL) *buf = xmlStrdup(BAD_CAST ""); else *buf = xmlStrdup(BAD_CAST "local "); *buf = xmlStrcat(*buf, BAD_CAST "complex type"); - if (item->flags & XML_SCHEMAS_TYPE_GLOBAL) { + if (type->flags & XML_SCHEMAS_TYPE_GLOBAL) { *buf = xmlStrcat(*buf, BAD_CAST " '"); - *buf = xmlStrcat(*buf, item->name); + *buf = xmlStrcat(*buf, type->name); *buf = xmlStrcat(*buf, BAD_CAST "'"); } + } break; - case XML_SCHEMA_TYPE_ATTRIBUTE: { - xmlSchemaAttributePtr attr; + case XML_SCHEMA_TYPE_ATTRIBUTE_USE: { + xmlSchemaAttributeUsePtr ause; - attr = (xmlSchemaAttributePtr) item; - if ((attr->flags & XML_SCHEMAS_ATTR_GLOBAL) || - (attr->ref == NULL)) { - *buf = xmlStrdup(xmlSchemaElemDesAttrDecl); - *buf = xmlStrcat(*buf, BAD_CAST " '"); - *buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str, - attr->targetNamespace, attr->name)); - FREE_AND_NULL(str) + ause = WXS_ATTR_USE_CAST item; + *buf = xmlStrdup(BAD_CAST "attribute use "); + if (WXS_ATTRUSE_DECL(ause) != NULL) { *buf = xmlStrcat(*buf, BAD_CAST "'"); - } else { - *buf = xmlStrdup(xmlSchemaElemDesAttrRef); - *buf = xmlStrcat(*buf, BAD_CAST " '"); - *buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str, - attr->refNs, attr->ref)); + *buf = xmlStrcat(*buf, + xmlSchemaGetComponentQName(&str, WXS_ATTRUSE_DECL(ause))); FREE_AND_NULL(str) + *buf = xmlStrcat(*buf, BAD_CAST "'"); + } else { + *buf = xmlStrcat(*buf, BAD_CAST "(unknown)"); + } + } + break; + case XML_SCHEMA_TYPE_ATTRIBUTE: { + xmlSchemaAttributePtr attr; + + attr = (xmlSchemaAttributePtr) item; + *buf = xmlStrdup(BAD_CAST "attribute decl."); + *buf = xmlStrcat(*buf, BAD_CAST " '"); + *buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str, + attr->targetNamespace, attr->name)); + FREE_AND_NULL(str) *buf = xmlStrcat(*buf, BAD_CAST "'"); - } } break; + case XML_SCHEMA_TYPE_ATTRIBUTEGROUP: + xmlSchemaGetComponentDesignation(buf, item); + break; case XML_SCHEMA_TYPE_ELEMENT: { xmlSchemaElementPtr elem; elem = (xmlSchemaElementPtr) item; - if ((elem->flags & XML_SCHEMAS_ELEM_GLOBAL) || - (elem->ref == NULL)) { - *buf = xmlStrdup(xmlSchemaElemDesElemDecl); - *buf = xmlStrcat(*buf, BAD_CAST " '"); - *buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str, - elem->targetNamespace, elem->name)); - *buf = xmlStrcat(*buf, BAD_CAST "'"); - } + *buf = xmlStrdup(BAD_CAST "element decl."); + *buf = xmlStrcat(*buf, BAD_CAST " '"); + *buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str, + elem->targetNamespace, elem->name)); + *buf = xmlStrcat(*buf, BAD_CAST "'"); } break; case XML_SCHEMA_TYPE_IDC_UNIQUE: @@ -1445,15 +1699,10 @@ xmlSchemaFormatItemForReport(xmlChar **buf, *buf = xmlStrcat(*buf, xmlSchemaFacetTypeToString(item->type)); *buf = xmlStrcat(*buf, BAD_CAST "'"); break; - case XML_SCHEMA_TYPE_NOTATION: - *buf = xmlStrdup(BAD_CAST "notation"); - break; case XML_SCHEMA_TYPE_GROUP: { - *buf = xmlStrdup(xmlSchemaElemModelGrDef); + *buf = xmlStrdup(BAD_CAST "model group def."); *buf = xmlStrcat(*buf, BAD_CAST " '"); - *buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str, - ((xmlSchemaModelGroupDefPtr) item)->targetNamespace, - ((xmlSchemaModelGroupDefPtr) item)->name)); + *buf = xmlStrcat(*buf, xmlSchemaGetComponentQName(&str, item)); *buf = xmlStrcat(*buf, BAD_CAST "'"); FREE_AND_NULL(str) } @@ -1462,8 +1711,15 @@ xmlSchemaFormatItemForReport(xmlChar **buf, case XML_SCHEMA_TYPE_CHOICE: case XML_SCHEMA_TYPE_ALL: case XML_SCHEMA_TYPE_PARTICLE: - *buf = xmlStrdup(xmlSchemaCompTypeToString(item->type)); - break; + *buf = xmlStrdup(WXS_ITEM_TYPE_NAME(item)); + break; + case XML_SCHEMA_TYPE_NOTATION: { + *buf = xmlStrdup(WXS_ITEM_TYPE_NAME(item)); + *buf = xmlStrcat(*buf, BAD_CAST " '"); + *buf = xmlStrcat(*buf, xmlSchemaGetComponentQName(&str, item)); + *buf = xmlStrcat(*buf, BAD_CAST "'"); + FREE_AND_NULL(str); + } default: named = 0; } @@ -1575,6 +1831,13 @@ xmlSchemaErrMemory(const char *msg) } #endif +static void +xmlSchemaPSimpleErr(const char *msg) +{ + __xmlSimpleError(XML_FROM_SCHEMASP, XML_ERR_NO_MEMORY, NULL, NULL, + msg); +} + /** * xmlSchemaPErrMemory: * @node: a context node @@ -1613,8 +1876,9 @@ xmlSchemaPErr(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, int error, if (ctxt != NULL) { ctxt->nberrors++; + ctxt->err = error; channel = ctxt->error; - data = ctxt->userData; + data = ctxt->errCtxt; schannel = ctxt->serror; } __xmlRaiseError(schannel, channel, data, ctxt, node, XML_FROM_SCHEMASP, @@ -1678,8 +1942,9 @@ xmlSchemaPErrExt(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, int error, if (ctxt != NULL) { ctxt->nberrors++; + ctxt->err = error; channel = ctxt->error; - data = ctxt->userData; + data = ctxt->errCtxt; schannel = ctxt->serror; } __xmlRaiseError(schannel, channel, data, ctxt, node, XML_FROM_SCHEMASP, @@ -1737,11 +2002,11 @@ xmlSchemaPSimpleInternalErr(xmlNodePtr node, * Handle a validation error */ static void -xmlSchemaErr3Line(xmlSchemaAbstractCtxtPtr ctxt, +xmlSchemaErr4Line(xmlSchemaAbstractCtxtPtr ctxt, xmlErrorLevel errorLevel, int error, xmlNodePtr node, int line, const char *msg, const xmlChar *str1, const xmlChar *str2, - const xmlChar *str3) + const xmlChar *str3, const xmlChar *str4) { xmlStructuredErrorFunc schannel = NULL; xmlGenericErrorFunc channel = NULL; @@ -1759,7 +2024,7 @@ xmlSchemaErr3Line(xmlSchemaAbstractCtxtPtr ctxt, channel = vctxt->warning; } schannel = vctxt->serror; - data = vctxt->userData; + data = vctxt->errCtxt; /* * Error node. If we specify a line number, then @@ -1799,7 +2064,7 @@ xmlSchemaErr3Line(xmlSchemaAbstractCtxtPtr ctxt, node, XML_FROM_SCHEMASV, error, errorLevel, file, line, (const char *) str1, (const char *) str2, - (const char *) str3, 0, 0, msg, str1, str2, str3); + (const char *) str3, 0, 0, msg, str1, str2, str3, str4); } else if (ctxt->type == XML_SCHEMA_CTXT_PARSER) { xmlSchemaParserCtxtPtr pctxt = (xmlSchemaParserCtxtPtr) ctxt; @@ -1811,12 +2076,12 @@ xmlSchemaErr3Line(xmlSchemaAbstractCtxtPtr ctxt, channel = pctxt->warning; } schannel = pctxt->serror; - data = pctxt->userData; + data = pctxt->errCtxt; __xmlRaiseError(schannel, channel, data, ctxt, node, XML_FROM_SCHEMASP, error, errorLevel, NULL, 0, (const char *) str1, (const char *) str2, - (const char *) str3, 0, 0, msg, str1, str2, str3); + (const char *) str3, 0, 0, msg, str1, str2, str3, str4); } else { TODO } @@ -1840,8 +2105,18 @@ xmlSchemaErr3(xmlSchemaAbstractCtxtPtr actxt, int error, xmlNodePtr node, const char *msg, const xmlChar *str1, const xmlChar *str2, const xmlChar *str3) { - xmlSchemaErr3Line(actxt, XML_ERR_ERROR, error, node, 0, - msg, str1, str2, str3); + xmlSchemaErr4Line(actxt, XML_ERR_ERROR, error, node, 0, + msg, str1, str2, str3, NULL); +} + +static void +xmlSchemaErr4(xmlSchemaAbstractCtxtPtr actxt, + int error, xmlNodePtr node, const char *msg, + const xmlChar *str1, const xmlChar *str2, + const xmlChar *str3, const xmlChar *str4) +{ + xmlSchemaErr4Line(actxt, XML_ERR_ERROR, error, node, 0, + msg, str1, str2, str3, str4); } static void @@ -1849,7 +2124,7 @@ xmlSchemaErr(xmlSchemaAbstractCtxtPtr actxt, int error, xmlNodePtr node, const char *msg, const xmlChar *str1, const xmlChar *str2) { - xmlSchemaErr3(actxt, error, node, msg, str1, str2, NULL); + xmlSchemaErr4(actxt, error, node, msg, str1, str2, NULL, NULL); } static xmlChar * @@ -1859,6 +2134,19 @@ xmlSchemaFormatNodeForError(xmlChar ** msg, { xmlChar *str = NULL; + *msg = NULL; + if ((node != NULL) && + (node->type != XML_ELEMENT_NODE) && + (node->type != XML_ATTRIBUTE_NODE)) + { + /* + * Don't try to format other nodes than element and + * attribute nodes. + * Play save and return an empty string. + */ + *msg = xmlStrdup(BAD_CAST ""); + return(*msg); + } if (node != NULL) { /* * Work on tree nodes. @@ -1923,7 +2211,7 @@ xmlSchemaFormatNodeForError(xmlChar ** msg, * VAL TODO: The output of the given schema component is currently * disabled. */ -#if 0 +#if 0 if ((type != NULL) && (xmlSchemaIsGlobalItem(type))) { *msg = xmlStrcat(*msg, BAD_CAST " ["); *msg = xmlStrcat(*msg, xmlSchemaFormatItemForReport(&str, @@ -1983,24 +2271,45 @@ xmlSchemaPInternalErr(xmlSchemaParserCtxtPtr pctxt, #endif static void -xmlSchemaCustomErr(xmlSchemaAbstractCtxtPtr actxt, +xmlSchemaCustomErr4(xmlSchemaAbstractCtxtPtr actxt, xmlParserErrors error, xmlNodePtr node, - xmlSchemaTypePtr type ATTRIBUTE_UNUSED, + xmlSchemaBasicItemPtr item, const char *message, - const xmlChar *str1, - const xmlChar *str2) + const xmlChar *str1, const xmlChar *str2, + const xmlChar *str3, const xmlChar *str4) { xmlChar *msg = NULL; - xmlSchemaFormatNodeForError(&msg, actxt, node); + if ((node == NULL) && (item != NULL) && + (actxt->type == XML_SCHEMA_CTXT_PARSER)) { + node = WXS_ITEM_NODE(item); + xmlSchemaFormatItemForReport(&msg, NULL, item, NULL); + msg = xmlStrcat(msg, BAD_CAST ": "); + } else + xmlSchemaFormatNodeForError(&msg, actxt, node); msg = xmlStrcat(msg, (const xmlChar *) message); msg = xmlStrcat(msg, BAD_CAST ".\n"); - xmlSchemaErr(actxt, error, node, - (const char *) msg, str1, str2); + xmlSchemaErr4(actxt, error, node, + (const char *) msg, str1, str2, str3, str4); FREE_AND_NULL(msg) } +static void +xmlSchemaCustomErr(xmlSchemaAbstractCtxtPtr actxt, + xmlParserErrors error, + xmlNodePtr node, + xmlSchemaBasicItemPtr item, + const char *message, + const xmlChar *str1, + const xmlChar *str2) +{ + xmlSchemaCustomErr4(actxt, error, node, item, + message, str1, str2, NULL, NULL); +} + + + static void xmlSchemaCustomWarning(xmlSchemaAbstractCtxtPtr actxt, xmlParserErrors error, @@ -2018,8 +2327,8 @@ xmlSchemaCustomWarning(xmlSchemaAbstractCtxtPtr actxt, msg = xmlStrcat(msg, BAD_CAST ".\n"); /* URGENT TODO: Set the error code to something sane. */ - xmlSchemaErr3Line(actxt, XML_ERR_WARNING, error, node, 0, - (const char *) msg, str1, str2, str3); + xmlSchemaErr4Line(actxt, XML_ERR_WARNING, error, node, 0, + (const char *) msg, str1, str2, str3, NULL); FREE_AND_NULL(msg) } @@ -2040,12 +2349,12 @@ xmlSchemaKeyrefErr(xmlSchemaValidCtxtPtr vctxt, msg = xmlStrdup(BAD_CAST "Element '%s': "); msg = xmlStrcat(msg, (const xmlChar *) message); msg = xmlStrcat(msg, BAD_CAST ".\n"); - xmlSchemaErr3Line(ACTXT_CAST vctxt, XML_ERR_ERROR, + xmlSchemaErr4Line(ACTXT_CAST vctxt, XML_ERR_ERROR, error, NULL, idcNode->nodeLine, (const char *) msg, xmlSchemaFormatQName(&qname, vctxt->nodeQNames->items[idcNode->nodeQNameID +1], vctxt->nodeQNames->items[idcNode->nodeQNameID]), - str1, str2); + str1, str2, NULL); FREE_AND_NULL(qname); FREE_AND_NULL(msg); } @@ -2114,11 +2423,11 @@ xmlSchemaSimpleTypeErr(xmlSchemaAbstractCtxtPtr actxt, else msg = xmlStrcat(msg, BAD_CAST "the "); - if (VARIETY_ATOMIC(type)) + if (WXS_IS_ATOMIC(type)) msg = xmlStrcat(msg, BAD_CAST "atomic type"); - else if (VARIETY_LIST(type)) + else if (WXS_IS_LIST(type)) msg = xmlStrcat(msg, BAD_CAST "list type"); - else if (VARIETY_UNION(type)) + else if (WXS_IS_UNION(type)) msg = xmlStrcat(msg, BAD_CAST "union type"); if (xmlSchemaIsGlobalItem(type)) { @@ -2188,7 +2497,7 @@ xmlSchemaComplexTypeErr(xmlSchemaAbstractCtxtPtr actxt, xmlChar *str = NULL, *msg = NULL; xmlChar *localName, *nsName; const xmlChar *cur, *end; - int i, is_not; + int i; xmlSchemaFormatNodeForError(&msg, actxt, node); msg = xmlStrcat(msg, (const xmlChar *) message); @@ -2211,11 +2520,8 @@ xmlSchemaComplexTypeErr(xmlSchemaAbstractCtxtPtr actxt, continue; if ((cur[0] == 'n') && (cur[1] == 'o') && (cur[2] == 't') && (cur[3] == ' ')) { - is_not = 1; cur += 4; str = xmlStrcat(str, BAD_CAST "##other"); - } else { - is_not = 0; } /* * Get the local name. @@ -2366,12 +2672,12 @@ xmlSchemaFacetErr(xmlSchemaAbstractCtxtPtr actxt, xmlSchemaErr(actxt, error, node, (const char *) msg, value, facet->value); } else if (facetType == XML_SCHEMA_FACET_MINEXCLUSIVE) { - msg = xmlStrcat(msg, BAD_CAST "The value '%s' must be less than " + msg = xmlStrcat(msg, BAD_CAST "The value '%s' must be greater than " "'%s'.\n"); xmlSchemaErr(actxt, error, node, (const char *) msg, value, facet->value); } else if (facetType == XML_SCHEMA_FACET_MAXEXCLUSIVE) { - msg = xmlStrcat(msg, BAD_CAST "The value '%s' must be more than " + msg = xmlStrcat(msg, BAD_CAST "The value '%s' must be less than " "'%s'.\n"); xmlSchemaErr(actxt, error, node, (const char *) msg, value, facet->value); @@ -2427,7 +2733,7 @@ xmlSchemaFacetErr(xmlSchemaAbstractCtxtPtr actxt, static void xmlSchemaPMissingAttrErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlNodePtr ownerElem, const char *name, const char *message) @@ -2464,7 +2770,7 @@ xmlSchemaPMissingAttrErr(xmlSchemaParserCtxtPtr ctxt, static void xmlSchemaPResCompAttrErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlNodePtr ownerElem, const char *name, const xmlChar *refName, @@ -2476,7 +2782,7 @@ xmlSchemaPResCompAttrErr(xmlSchemaParserCtxtPtr ctxt, xmlSchemaFormatItemForReport(&des, NULL, ownerItem, ownerElem); if (refTypeStr == NULL) - refTypeStr = (const char *) xmlSchemaCompTypeToString(refType); + refTypeStr = (const char *) xmlSchemaItemTypeToStr(refType); xmlSchemaPErrExt(ctxt, ownerElem, error, NULL, NULL, NULL, "%s, attribute '%s': The QName value '%s' does not resolve to a(n) " @@ -2501,7 +2807,7 @@ static void xmlSchemaPCustomAttrErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, xmlChar **ownerDes, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlAttrPtr attr, const char *msg) { @@ -2534,49 +2840,18 @@ xmlSchemaPCustomAttrErr(xmlSchemaParserCtxtPtr ctxt, static void xmlSchemaPIllegalAttrErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlChar **ownerDes, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerComp ATTRIBUTE_UNUSED, xmlAttrPtr attr) { - xmlChar *des = NULL, *strA = NULL; + xmlChar *strA = NULL, *strB = NULL; - if (ownerDes == NULL) - xmlSchemaFormatItemForReport(&des, NULL, ownerItem, attr->parent); - else if (*ownerDes == NULL) { - xmlSchemaFormatItemForReport(ownerDes, NULL, ownerItem, attr->parent); - des = *ownerDes; - } else - des = *ownerDes; - xmlSchemaPErr(ctxt, (xmlNodePtr) attr, error, - "%s: The attribute '%s' is not allowed.\n", BAD_CAST des, - xmlSchemaFormatQNameNs(&strA, attr->ns, attr->name)); - if (ownerDes == NULL) - FREE_AND_NULL(des); + xmlSchemaFormatNodeForError(&strA, ACTXT_CAST ctxt, attr->parent); + xmlSchemaErr4(ACTXT_CAST ctxt, error, (xmlNodePtr) attr, + "%sThe attribute '%s' is not allowed.\n", BAD_CAST strA, + xmlSchemaFormatQNameNs(&strB, attr->ns, attr->name), + NULL, NULL); FREE_AND_NULL(strA); -} - -/** - * xmlSchemaPAquireDes: - * @des: the first designation - * @itemDes: the second designation - * @item: the schema item - * @itemElem: the node of the schema item - * - * Creates a designation for an item. - */ -static void -xmlSchemaPAquireDes(xmlChar **des, - xmlChar **itemDes, - xmlSchemaTypePtr item, - xmlNodePtr itemElem) -{ - if (itemDes == NULL) - xmlSchemaFormatItemForReport(des, NULL, item, itemElem); - else if (*itemDes == NULL) { - xmlSchemaFormatItemForReport(itemDes, NULL, item, itemElem); - *des = *itemDes; - } else - *des = *itemDes; + FREE_AND_NULL(strB); } /** @@ -2596,8 +2871,7 @@ xmlSchemaPAquireDes(xmlChar **des, static void xmlSchemaPCustomErrExt(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlChar **itemDes, - xmlSchemaTypePtr item, + xmlSchemaBasicItemPtr item, xmlNodePtr itemElem, const char *message, const xmlChar *str1, @@ -2606,16 +2880,15 @@ xmlSchemaPCustomErrExt(xmlSchemaParserCtxtPtr ctxt, { xmlChar *des = NULL, *msg = NULL; - xmlSchemaPAquireDes(&des, itemDes, item, itemElem); + xmlSchemaFormatItemForReport(&des, NULL, item, itemElem); msg = xmlStrdup(BAD_CAST "%s: "); msg = xmlStrcat(msg, (const xmlChar *) message); msg = xmlStrcat(msg, BAD_CAST ".\n"); if ((itemElem == NULL) && (item != NULL)) - itemElem = item->node; + itemElem = WXS_ITEM_NODE(item); xmlSchemaPErrExt(ctxt, itemElem, error, NULL, NULL, NULL, (const char *) msg, BAD_CAST des, str1, str2, str3, NULL); - if (itemDes == NULL) - FREE_AND_NULL(des); + FREE_AND_NULL(des); FREE_AND_NULL(msg); } @@ -2634,13 +2907,12 @@ xmlSchemaPCustomErrExt(xmlSchemaParserCtxtPtr ctxt, static void xmlSchemaPCustomErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlChar **itemDes, - xmlSchemaTypePtr item, + xmlSchemaBasicItemPtr item, xmlNodePtr itemElem, const char *message, const xmlChar *str1) { - xmlSchemaPCustomErrExt(ctxt, error, itemDes, item, itemElem, message, + xmlSchemaPCustomErrExt(ctxt, error, item, itemElem, message, str1, NULL, NULL); } @@ -2658,25 +2930,28 @@ xmlSchemaPCustomErr(xmlSchemaParserCtxtPtr ctxt, * Reports an attribute use error during parsing. */ static void -xmlSchemaPAttrUseErr(xmlSchemaParserCtxtPtr ctxt, +xmlSchemaPAttrUseErr4(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlSchemaTypePtr item, - const xmlSchemaAttributePtr attr, + xmlNodePtr node, + xmlSchemaBasicItemPtr ownerItem, + const xmlSchemaAttributeUsePtr attruse, const char *message, - const xmlChar *str1) + const xmlChar *str1, const xmlChar *str2, + const xmlChar *str3,const xmlChar *str4) { xmlChar *str = NULL, *msg = NULL; - xmlSchemaFormatItemForReport(&msg, NULL, item, NULL); - msg = xmlStrcat(msg, BAD_CAST ", "); + + xmlSchemaFormatItemForReport(&msg, NULL, ownerItem, NULL); + msg = xmlStrcat(msg, BAD_CAST ", "); msg = xmlStrcat(msg, BAD_CAST xmlSchemaFormatItemForReport(&str, NULL, - (xmlSchemaTypePtr) attr, NULL)); + WXS_BASIC_CAST attruse, NULL)); FREE_AND_NULL(str); msg = xmlStrcat(msg, BAD_CAST ": "); msg = xmlStrcat(msg, (const xmlChar *) message); msg = xmlStrcat(msg, BAD_CAST ".\n"); - xmlSchemaPErr(ctxt, attr->node, error, - (const char *) msg, str1, NULL); + xmlSchemaErr4(ACTXT_CAST ctxt, error, node, + (const char *) msg, str1, str2, str3, str4); xmlFree(msg); } @@ -2684,9 +2959,8 @@ xmlSchemaPAttrUseErr(xmlSchemaParserCtxtPtr ctxt, * xmlSchemaPIllegalFacetAtomicErr: * @ctxt: the schema parser context * @error: the error code - * @itemDes: the designation of the type - * @item: the schema type - * @baseItem: the base type of type + * @type: the schema type + * @baseType: the base type of type * @facet: the illegal facet * * Reports an illegal facet for atomic simple types. @@ -2694,22 +2968,20 @@ xmlSchemaPAttrUseErr(xmlSchemaParserCtxtPtr ctxt, static void xmlSchemaPIllegalFacetAtomicErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlChar **itemDes, - xmlSchemaTypePtr item, - xmlSchemaTypePtr baseItem, + xmlSchemaTypePtr type, + xmlSchemaTypePtr baseType, xmlSchemaFacetPtr facet) { xmlChar *des = NULL, *strT = NULL; - xmlSchemaPAquireDes(&des, itemDes, item, item->node); - xmlSchemaPErrExt(ctxt, item->node, error, NULL, NULL, NULL, + xmlSchemaFormatItemForReport(&des, NULL, WXS_BASIC_CAST type, type->node); + xmlSchemaPErrExt(ctxt, type->node, error, NULL, NULL, NULL, "%s: The facet '%s' is not allowed on types derived from the " "type %s.\n", BAD_CAST des, xmlSchemaFacetTypeToString(facet->type), - xmlSchemaFormatItemForReport(&strT, NULL, baseItem, NULL), + xmlSchemaFormatItemForReport(&strT, NULL, WXS_BASIC_CAST baseType, NULL), NULL, NULL); - if (itemDes == NULL) - FREE_AND_NULL(des); + FREE_AND_NULL(des); FREE_AND_NULL(strT); } @@ -2726,18 +2998,17 @@ xmlSchemaPIllegalFacetAtomicErr(xmlSchemaParserCtxtPtr ctxt, static void xmlSchemaPIllegalFacetListUnionErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlChar **itemDes, - xmlSchemaTypePtr item, + xmlSchemaTypePtr type, xmlSchemaFacetPtr facet) { xmlChar *des = NULL, *strT = NULL; - xmlSchemaPAquireDes(&des, itemDes, item, item->node); - xmlSchemaPErr(ctxt, item->node, error, + xmlSchemaFormatItemForReport(&des, NULL, WXS_BASIC_CAST type, + type->node); + xmlSchemaPErr(ctxt, type->node, error, "%s: The facet '%s' is not allowed.\n", BAD_CAST des, xmlSchemaFacetTypeToString(facet->type)); - if (itemDes == NULL) - FREE_AND_NULL(des); + FREE_AND_NULL(des); FREE_AND_NULL(strT); } @@ -2754,26 +3025,18 @@ xmlSchemaPIllegalFacetListUnionErr(xmlSchemaParserCtxtPtr ctxt, static void xmlSchemaPMutualExclAttrErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlChar **ownerDes, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlAttrPtr attr, const char *name1, const char *name2) { xmlChar *des = NULL; - if (ownerDes == NULL) - xmlSchemaFormatItemForReport(&des, NULL, ownerItem, attr->parent); - else if (*ownerDes == NULL) { - xmlSchemaFormatItemForReport(ownerDes, NULL, ownerItem, attr->parent); - des = *ownerDes; - } else - des = *ownerDes; + xmlSchemaFormatItemForReport(&des, NULL, WXS_BASIC_CAST ownerItem, attr->parent); xmlSchemaPErrExt(ctxt, (xmlNodePtr) attr, error, NULL, NULL, NULL, "%s: The attributes '%s' and '%s' are mutually exclusive.\n", BAD_CAST des, BAD_CAST name1, BAD_CAST name2, NULL, NULL); - if (ownerDes == NULL) - FREE_AND_NULL(des) + FREE_AND_NULL(des); } /** @@ -2792,7 +3055,7 @@ xmlSchemaPMutualExclAttrErr(xmlSchemaParserCtxtPtr ctxt, static void xmlSchemaPSimpleTypeErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlSchemaTypePtr ownerItem ATTRIBUTE_UNUSED, + xmlSchemaBasicItemPtr ownerItem ATTRIBUTE_UNUSED, xmlNodePtr node, xmlSchemaTypePtr type, const char *expected, @@ -2819,11 +3082,11 @@ xmlSchemaPSimpleTypeErr(xmlSchemaParserCtxtPtr ctxt, else msg = xmlStrcat(msg, BAD_CAST "the "); - if (VARIETY_ATOMIC(type)) + if (WXS_IS_ATOMIC(type)) msg = xmlStrcat(msg, BAD_CAST "atomic type"); - else if (VARIETY_LIST(type)) + else if (WXS_IS_LIST(type)) msg = xmlStrcat(msg, BAD_CAST "list type"); - else if (VARIETY_UNION(type)) + else if (WXS_IS_UNION(type)) msg = xmlStrcat(msg, BAD_CAST "union type"); if (xmlSchemaIsGlobalItem(type)) { @@ -2882,8 +3145,7 @@ xmlSchemaPSimpleTypeErr(xmlSchemaParserCtxtPtr ctxt, static void xmlSchemaPContentErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlChar **ownerDes, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlNodePtr ownerElem, xmlNodePtr child, const char *message, @@ -2891,13 +3153,7 @@ xmlSchemaPContentErr(xmlSchemaParserCtxtPtr ctxt, { xmlChar *des = NULL; - if (ownerDes == NULL) - xmlSchemaFormatItemForReport(&des, NULL, ownerItem, ownerElem); - else if (*ownerDes == NULL) { - xmlSchemaFormatItemForReport(ownerDes, NULL, ownerItem, ownerElem); - des = *ownerDes; - } else - des = *ownerDes; + xmlSchemaFormatItemForReport(&des, NULL, ownerItem, ownerElem); if (message != NULL) xmlSchemaPErr2(ctxt, ownerElem, child, error, "%s: %s.\n", @@ -2913,8 +3169,7 @@ xmlSchemaPContentErr(xmlSchemaParserCtxtPtr ctxt, BAD_CAST des, NULL); } } - if (ownerDes == NULL) - FREE_AND_NULL(des) + FREE_AND_NULL(des) } /************************************************************************ @@ -3056,76 +3311,207 @@ xmlSchemaItemListAdd(xmlSchemaItemListPtr list, void *item) return(-1); } } - /* ((xmlSchemaBasicItemPtr *) list->items)[list->nbItems++] = (void *) item; */ list->items[list->nbItems++] = item; return(0); } -/** - * xmlSchemaItemListFree: - * @annot: a schema type structure - * - * Deallocate a annotation structure - */ -static void -xmlSchemaItemListFree(xmlSchemaItemListPtr list) -{ - if (list == NULL) - return; - if (list->items != NULL) - xmlFree(list->items); - xmlFree(list); -} - -static void -xmlSchemaBucketFree(xmlSchemaBucketPtr bucket) +static int +xmlSchemaItemListAddSize(xmlSchemaItemListPtr list, + int initialSize, + void *item) { - if (bucket == NULL) - return; - if (bucket->globals != NULL) { - xmlSchemaComponentListFree(bucket->globals); - xmlSchemaItemListFree(bucket->globals); - } - if (bucket->locals != NULL) { - xmlSchemaComponentListFree(bucket->locals); - xmlSchemaItemListFree(bucket->locals); - } - if (bucket->relations != NULL) { - xmlSchemaSchemaRelationPtr prev, cur = bucket->relations; - do { - prev = cur; - cur = cur->next; - xmlFree(prev); - } while (cur != NULL); - } - if ((! bucket->preserveDoc) && (bucket->doc != NULL)) { - xmlFreeDoc(bucket->doc); - } - if (bucket->type == XML_SCHEMA_SCHEMA_IMPORT) { - if (IMPBUCKET_CAST(bucket)->schema != NULL) - xmlSchemaFree(IMPBUCKET_CAST(bucket)->schema); + if (list->items == NULL) { + if (initialSize <= 0) + initialSize = 1; + list->items = (void **) xmlMalloc( + initialSize * sizeof(void *)); + if (list->items == NULL) { + xmlSchemaPErrMemory(NULL, "allocating new item list", NULL); + return(-1); + } + list->sizeItems = initialSize; + } else if (list->sizeItems <= list->nbItems) { + list->sizeItems *= 2; + list->items = (void **) xmlRealloc(list->items, + list->sizeItems * sizeof(void *)); + if (list->items == NULL) { + xmlSchemaPErrMemory(NULL, "growing item list", NULL); + list->sizeItems = 0; + return(-1); + } } - xmlFree(bucket); + list->items[list->nbItems++] = item; + return(0); } -static xmlSchemaBucketPtr -xmlSchemaBucketCreate(xmlSchemaParserCtxtPtr pctxt, - int type, - const xmlChar *targetNamespace) -{ - xmlSchemaBucketPtr ret; - xmlSchemaConstructionCtxtPtr constr = pctxt->constructor; - int size; - xmlSchemaPtr mainSchema; +static int +xmlSchemaItemListInsert(xmlSchemaItemListPtr list, void *item, int idx) +{ + if (list->items == NULL) { + list->items = (void **) xmlMalloc( + 20 * sizeof(void *)); + if (list->items == NULL) { + xmlSchemaPErrMemory(NULL, "allocating new item list", NULL); + return(-1); + } + list->sizeItems = 20; + } else if (list->sizeItems <= list->nbItems) { + list->sizeItems *= 2; + list->items = (void **) xmlRealloc(list->items, + list->sizeItems * sizeof(void *)); + if (list->items == NULL) { + xmlSchemaPErrMemory(NULL, "growing item list", NULL); + list->sizeItems = 0; + return(-1); + } + } + /* + * Just append if the index is greater/equal than the item count. + */ + if (idx >= list->nbItems) { + list->items[list->nbItems++] = item; + } else { + int i; + for (i = list->nbItems; i > idx; i--) + list->items[i] = list->items[i-1]; + list->items[idx] = item; + list->nbItems++; + } + return(0); +} + +#if 0 /* enable if ever needed */ +static int +xmlSchemaItemListInsertSize(xmlSchemaItemListPtr list, + int initialSize, + void *item, + int idx) +{ + if (list->items == NULL) { + if (initialSize <= 0) + initialSize = 1; + list->items = (void **) xmlMalloc( + initialSize * sizeof(void *)); + if (list->items == NULL) { + xmlSchemaPErrMemory(NULL, "allocating new item list", NULL); + return(-1); + } + list->sizeItems = initialSize; + } else if (list->sizeItems <= list->nbItems) { + list->sizeItems *= 2; + list->items = (void **) xmlRealloc(list->items, + list->sizeItems * sizeof(void *)); + if (list->items == NULL) { + xmlSchemaPErrMemory(NULL, "growing item list", NULL); + list->sizeItems = 0; + return(-1); + } + } + /* + * Just append if the index is greater/equal than the item count. + */ + if (idx >= list->nbItems) { + list->items[list->nbItems++] = item; + } else { + int i; + for (i = list->nbItems; i > idx; i--) + list->items[i] = list->items[i-1]; + list->items[idx] = item; + list->nbItems++; + } + return(0); +} +#endif + +static int +xmlSchemaItemListRemove(xmlSchemaItemListPtr list, int idx) +{ + int i; + if ((list->items == NULL) || (idx >= list->nbItems)) { + xmlSchemaPSimpleErr("Internal error: xmlSchemaItemListRemove, " + "index error.\n"); + return(-1); + } + + if (list->nbItems == 1) { + /* TODO: Really free the list? */ + xmlFree(list->items); + list->items = NULL; + list->nbItems = 0; + list->sizeItems = 0; + } else if (list->nbItems -1 == idx) { + list->nbItems--; + } else { + for (i = idx; i < list->nbItems -1; i++) + list->items[i] = list->items[i+1]; + list->nbItems--; + } + return(0); +} + +/** + * xmlSchemaItemListFree: + * @annot: a schema type structure + * + * Deallocate a annotation structure + */ +static void +xmlSchemaItemListFree(xmlSchemaItemListPtr list) +{ + if (list == NULL) + return; + if (list->items != NULL) + xmlFree(list->items); + xmlFree(list); +} + +static void +xmlSchemaBucketFree(xmlSchemaBucketPtr bucket) +{ + if (bucket == NULL) + return; + if (bucket->globals != NULL) { + xmlSchemaComponentListFree(bucket->globals); + xmlSchemaItemListFree(bucket->globals); + } + if (bucket->locals != NULL) { + xmlSchemaComponentListFree(bucket->locals); + xmlSchemaItemListFree(bucket->locals); + } + if (bucket->relations != NULL) { + xmlSchemaSchemaRelationPtr prev, cur = bucket->relations; + do { + prev = cur; + cur = cur->next; + xmlFree(prev); + } while (cur != NULL); + } + if ((! bucket->preserveDoc) && (bucket->doc != NULL)) { + xmlFreeDoc(bucket->doc); + } + if (bucket->type == XML_SCHEMA_SCHEMA_IMPORT) { + if (WXS_IMPBUCKET(bucket)->schema != NULL) + xmlSchemaFree(WXS_IMPBUCKET(bucket)->schema); + } + xmlFree(bucket); +} + +static xmlSchemaBucketPtr +xmlSchemaBucketCreate(xmlSchemaParserCtxtPtr pctxt, + int type, const xmlChar *targetNamespace) +{ + xmlSchemaBucketPtr ret; + int size; + xmlSchemaPtr mainSchema; - if (constr->schema == NULL) { + if (WXS_CONSTRUCTOR(pctxt)->mainSchema == NULL) { PERROR_INT("xmlSchemaBucketCreate", "no main schema on constructor"); return(NULL); } - mainSchema = constr->schema; + mainSchema = WXS_CONSTRUCTOR(pctxt)->mainSchema; /* Create the schema bucket. */ - if (WXS_IS_INCREDEF(type)) + if (WXS_IS_BUCKET_INCREDEF(type)) size = sizeof(xmlSchemaInclude); else size = sizeof(xmlSchemaImport); @@ -3137,13 +3523,23 @@ xmlSchemaBucketCreate(xmlSchemaParserCtxtPtr pctxt, memset(ret, 0, size); ret->targetNamespace = targetNamespace; ret->type = type; + ret->globals = xmlSchemaItemListCreate(); + if (ret->globals == NULL) { + xmlFree(ret); + return(NULL); + } + ret->locals = xmlSchemaItemListCreate(); + if (ret->locals == NULL) { + xmlFree(ret); + return(NULL); + } /* * The following will assure that only the first bucket is marked as * XML_SCHEMA_SCHEMA_MAIN and it points to the *main* schema. * For each following import buckets an xmlSchema will be created. */ if (! WXS_HAS_BUCKETS(pctxt)) { - if (WXS_IS_INCREDEF(type)) { + if (WXS_IS_BUCKET_INCREDEF(type)) { PERROR_INT("xmlSchemaBucketCreate", "first bucket but it's an include or redefine"); xmlSchemaBucketFree(ret); @@ -3152,7 +3548,8 @@ xmlSchemaBucketCreate(xmlSchemaParserCtxtPtr pctxt, /* Force the type to be XML_SCHEMA_SCHEMA_MAIN. */ ret->type = XML_SCHEMA_SCHEMA_MAIN; /* Point to the *main* schema. */ - IMPBUCKET_CAST(ret)->schema = mainSchema; + WXS_CONSTRUCTOR(pctxt)->mainBucket = ret; + WXS_IMPBUCKET(ret)->schema = mainSchema; } else { if (type == XML_SCHEMA_SCHEMA_MAIN) { PERROR_INT("xmlSchemaBucketCreate", @@ -3163,18 +3560,19 @@ xmlSchemaBucketCreate(xmlSchemaParserCtxtPtr pctxt, /* * Create a schema for imports. */ - IMPBUCKET_CAST(ret)->schema = xmlSchemaNewSchema(pctxt); - if (IMPBUCKET_CAST(ret)->schema == NULL) { + WXS_IMPBUCKET(ret)->schema = xmlSchemaNewSchema(pctxt); + if (WXS_IMPBUCKET(ret)->schema == NULL) { xmlSchemaBucketFree(ret); return(NULL); } } } - if (WXS_IS_IMPMAIN(type)) { + if (WXS_IS_BUCKET_IMPMAIN(type)) { int res; - /* Imports got into the "schemasImports" slot of the main *schema*. */ + /* Imports go into the "schemasImports" slot of the main *schema*. */ if (mainSchema->schemasImports == NULL) { - mainSchema->schemasImports = xmlHashCreateDict(5, constr->dict); + mainSchema->schemasImports = xmlHashCreateDict(5, + WXS_CONSTRUCTOR(pctxt)->dict); if (mainSchema->schemasImports == NULL) { xmlSchemaBucketFree(ret); return(NULL); @@ -3194,12 +3592,12 @@ xmlSchemaBucketCreate(xmlSchemaParserCtxtPtr pctxt, } } else { /* Set the @ownerImport of an include bucket. */ - if (WXS_IS_IMPMAIN(constr->bucket->type)) - INCBUCKET_CAST(ret)->ownerImport = - IMPBUCKET_CAST(constr->bucket); + if (WXS_IS_BUCKET_IMPMAIN(WXS_CONSTRUCTOR(pctxt)->bucket->type)) + WXS_INCBUCKET(ret)->ownerImport = + WXS_IMPBUCKET(WXS_CONSTRUCTOR(pctxt)->bucket); else - INCBUCKET_CAST(ret)->ownerImport = - INCBUCKET_CAST(constr->bucket)->ownerImport; + WXS_INCBUCKET(ret)->ownerImport = + WXS_INCBUCKET(WXS_CONSTRUCTOR(pctxt)->bucket)->ownerImport; /* Includes got into the "includes" slot of the *main* schema. */ if (mainSchema->includes == NULL) { @@ -3215,20 +3613,20 @@ xmlSchemaBucketCreate(xmlSchemaParserCtxtPtr pctxt, * Add to list of all buckets; this is used for lookup * during schema construction time only. */ - if (xmlSchemaItemListAdd(constr->buckets, ret) == -1) + if (xmlSchemaItemListAdd(WXS_CONSTRUCTOR(pctxt)->buckets, ret) == -1) return(NULL); return(ret); } static int -xmlSchemaAddItem(xmlSchemaItemListPtr *list, void *item) +xmlSchemaAddItemSize(xmlSchemaItemListPtr *list, int initialSize, void *item) { if (*list == NULL) { *list = xmlSchemaItemListCreate(); if (*list == NULL) return(-1); } - xmlSchemaItemListAdd(*list, item); + xmlSchemaItemListAddSize(*list, initialSize, item); return(0); } @@ -3272,9 +3670,9 @@ xmlSchemaFreeNotation(xmlSchemaNotationPtr nota) /** * xmlSchemaFreeAttribute: - * @schema: a schema attribute structure + * @attr: an attribute declaration * - * Deallocate a Schema Attribute structure. + * Deallocates an attribute declaration structure. */ static void xmlSchemaFreeAttribute(xmlSchemaAttributePtr attr) @@ -3288,6 +3686,38 @@ xmlSchemaFreeAttribute(xmlSchemaAttributePtr attr) xmlFree(attr); } +/** + * xmlSchemaFreeAttributeUse: + * @use: an attribute use + * + * Deallocates an attribute use structure. + */ +static void +xmlSchemaFreeAttributeUse(xmlSchemaAttributeUsePtr use) +{ + if (use == NULL) + return; + if (use->annot != NULL) + xmlSchemaFreeAnnot(use->annot); + if (use->defVal != NULL) + xmlSchemaFreeValue(use->defVal); + xmlFree(use); +} + +/** + * xmlSchemaFreeAttributeUseProhib: + * @prohib: an attribute use prohibition + * + * Deallocates an attribute use structure. + */ +static void +xmlSchemaFreeAttributeUseProhib(xmlSchemaAttributeUseProhibPtr prohib) +{ + if (prohib == NULL) + return; + xmlFree(prohib); +} + /** * xmlSchemaFreeWildcardNsSet: * set: a schema wildcard namespace @@ -3333,31 +3763,15 @@ xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard) * Deallocate a Schema Attribute Group structure. */ static void -xmlSchemaFreeAttributeGroup(xmlSchemaAttributeGroupPtr attr) +xmlSchemaFreeAttributeGroup(xmlSchemaAttributeGroupPtr attrGr) { - if (attr == NULL) + if (attrGr == NULL) return; - if (attr->annot != NULL) - xmlSchemaFreeAnnot(attr->annot); - xmlFree(attr); -} - -/** - * xmlSchemaFreeAttributeUseList: - * @attrUse: an attribute link - * - * Deallocate a list of schema attribute uses. - */ -static void -xmlSchemaFreeAttributeUseList(xmlSchemaAttributeLinkPtr attrUse) -{ - xmlSchemaAttributeLinkPtr next; - - while (attrUse != NULL) { - next = attrUse->next; - xmlFree(attrUse); - attrUse = next; - } + if (attrGr->annot != NULL) + xmlSchemaFreeAnnot(attrGr->annot); + if (attrGr->attrUses != NULL) + xmlSchemaItemListFree(WXS_LIST_CAST attrGr->attrUses); + xmlFree(attrGr); } /** @@ -3503,13 +3917,8 @@ xmlSchemaFreeType(xmlSchemaTypePtr type) facet = next; } } - if (type->type != XML_SCHEMA_TYPE_BASIC) { - /* - * TODO: Why is this restricted to non built-in types? - */ - if (type->attributeUses != NULL) - xmlSchemaFreeAttributeUseList(type->attributeUses); - } + if (type->attrUses != NULL) + xmlSchemaItemListFree((xmlSchemaItemListPtr) type->attrUses); if (type->memberTypes != NULL) xmlSchemaFreeTypeLinkList(type->memberTypes); if (type->facetSet != NULL) { @@ -3555,24 +3964,6 @@ xmlSchemaFreeModelGroup(xmlSchemaModelGroupPtr item) xmlFree(item); } -/** - * xmlSchemaFreeTypeList: - * @type: a schema type structure - * - * Deallocate a Schema Type structure. - */ -static void -xmlSchemaFreeTypeList(xmlSchemaTypePtr type) -{ - xmlSchemaTypePtr next; - - while (type != NULL) { - next = type->redef; - xmlSchemaFreeType(type); - type = next; - } -} - static void xmlSchemaComponentListFree(xmlSchemaItemListPtr list) { @@ -3590,11 +3981,18 @@ xmlSchemaComponentListFree(xmlSchemaItemListPtr list) switch (item->type) { case XML_SCHEMA_TYPE_SIMPLE: case XML_SCHEMA_TYPE_COMPLEX: - xmlSchemaFreeTypeList((xmlSchemaTypePtr) item); + xmlSchemaFreeType((xmlSchemaTypePtr) item); break; case XML_SCHEMA_TYPE_ATTRIBUTE: xmlSchemaFreeAttribute((xmlSchemaAttributePtr) item); - break; + break; + case XML_SCHEMA_TYPE_ATTRIBUTE_USE: + xmlSchemaFreeAttributeUse((xmlSchemaAttributeUsePtr) item); + break; + case XML_SCHEMA_EXTRA_ATTR_USE_PROHIB: + xmlSchemaFreeAttributeUseProhib( + (xmlSchemaAttributeUseProhibPtr) item); + break; case XML_SCHEMA_TYPE_ELEMENT: xmlSchemaFreeElement((xmlSchemaElementPtr) item); break; @@ -3636,8 +4034,7 @@ xmlSchemaComponentListFree(xmlSchemaItemListPtr list) xmlSchemaPSimpleInternalErr(NULL, "Internal error: xmlSchemaComponentListFree, " "unexpected component type '%s'\n", - (const xmlChar *) - xmlSchemaCompTypeToString(item->type)); + (const xmlChar *) WXS_ITEM_TYPE_NAME(item)); } break; } @@ -3707,6 +4104,9 @@ xmlSchemaFree(xmlSchemaPtr schema) #ifdef LIBXML_OUTPUT_ENABLED +static void +xmlSchemaTypeDump(xmlSchemaTypePtr type, FILE * output); /* forward */ + /** * xmlSchemaElementDump: * @elem: an element @@ -3723,20 +4123,15 @@ xmlSchemaElementDump(xmlSchemaElementPtr elem, FILE * output, if (elem == NULL) return; - if (elem->flags & XML_SCHEMAS_ELEM_REF) { - fprintf(output, "Particle: %s", name); - fprintf(output, ", term element: %s", elem->ref); - if (elem->refNs != NULL) - fprintf(output, " ns %s", elem->refNs); - } else { - fprintf(output, "Element"); - if (elem->flags & XML_SCHEMAS_ELEM_GLOBAL) - fprintf(output, " (global)"); - fprintf(output, ": %s ", elem->name); - if (namespace != NULL) - fprintf(output, "ns %s", namespace); - } + + fprintf(output, "Element"); + if (elem->flags & XML_SCHEMAS_ELEM_GLOBAL) + fprintf(output, " (global)"); + fprintf(output, ": '%s' ", elem->name); + if (namespace != NULL) + fprintf(output, "ns '%s'", namespace); fprintf(output, "\n"); +#if 0 if ((elem->minOccurs != 1) || (elem->maxOccurs != 1)) { fprintf(output, " min %d ", elem->minOccurs); if (elem->maxOccurs >= UNBOUNDED) @@ -3746,14 +4141,14 @@ xmlSchemaElementDump(xmlSchemaElementPtr elem, FILE * output, else fprintf(output, "\n"); } +#endif /* * Misc other properties. */ if ((elem->flags & XML_SCHEMAS_ELEM_NILLABLE) || (elem->flags & XML_SCHEMAS_ELEM_ABSTRACT) || (elem->flags & XML_SCHEMAS_ELEM_FIXED) || - (elem->flags & XML_SCHEMAS_ELEM_DEFAULT) || - (elem->id != NULL)) { + (elem->flags & XML_SCHEMAS_ELEM_DEFAULT)) { fprintf(output, " props: "); if (elem->flags & XML_SCHEMAS_ELEM_FIXED) fprintf(output, "[fixed] "); @@ -3763,8 +4158,6 @@ xmlSchemaElementDump(xmlSchemaElementPtr elem, FILE * output, fprintf(output, "[abstract] "); if (elem->flags & XML_SCHEMAS_ELEM_NILLABLE) fprintf(output, "[nillable] "); - if (elem->id != NULL) - fprintf(output, "[id: '%s'] ", elem->id); fprintf(output, "\n"); } /* @@ -3776,19 +4169,24 @@ xmlSchemaElementDump(xmlSchemaElementPtr elem, FILE * output, * Type. */ if (elem->namedType != NULL) { - fprintf(output, " type: %s ", elem->namedType); + fprintf(output, " type: '%s' ", elem->namedType); if (elem->namedTypeNs != NULL) - fprintf(output, "ns %s\n", elem->namedTypeNs); + fprintf(output, "ns '%s'\n", elem->namedTypeNs); else fprintf(output, "\n"); + } else if (elem->subtypes != NULL) { + /* + * Dump local types. + */ + xmlSchemaTypeDump(elem->subtypes, output); } /* * Substitution group. */ if (elem->substGroup != NULL) { - fprintf(output, " substitutionGroup: %s ", elem->substGroup); + fprintf(output, " substitutionGroup: '%s' ", elem->substGroup); if (elem->substGroupNs != NULL) - fprintf(output, "ns %s\n", elem->substGroupNs); + fprintf(output, "ns '%s'\n", elem->substGroupNs); else fprintf(output, "\n"); } @@ -3818,9 +4216,10 @@ xmlSchemaAnnotDump(FILE * output, xmlSchemaAnnotPtr annot) } /** - * xmlSchemaTypeDump: - * @output: the file output - * @type: a type structure + * xmlSchemaContentModelDump: + * @particle: the schema particle + * @output: the file output + * @depth: the depth used for intentation * * Dump a SchemaType structure */ @@ -3843,27 +4242,32 @@ xmlSchemaContentModelDump(xmlSchemaParticlePtr particle, FILE * output, int dept return; } term = particle->children; - switch (term->type) { - case XML_SCHEMA_TYPE_ELEMENT: - fprintf(output, "ELEM '%s'", xmlSchemaFormatQName(&str, - ((xmlSchemaElementPtr)term)->targetNamespace, - ((xmlSchemaElementPtr)term)->name)); - break; - case XML_SCHEMA_TYPE_SEQUENCE: - fprintf(output, "SEQUENCE"); - break; - case XML_SCHEMA_TYPE_CHOICE: - fprintf(output, "CHOICE"); - break; - case XML_SCHEMA_TYPE_ALL: - fprintf(output, "ALL"); - break; - case XML_SCHEMA_TYPE_ANY: - fprintf(output, "ANY"); - break; - default: - fprintf(output, "UNKNOWN\n"); - return; + if (term == NULL) { + fprintf(output, "(NULL)"); + } else { + switch (term->type) { + case XML_SCHEMA_TYPE_ELEMENT: + fprintf(output, "ELEM '%s'", xmlSchemaFormatQName(&str, + ((xmlSchemaElementPtr)term)->targetNamespace, + ((xmlSchemaElementPtr)term)->name)); + FREE_AND_NULL(str); + break; + case XML_SCHEMA_TYPE_SEQUENCE: + fprintf(output, "SEQUENCE"); + break; + case XML_SCHEMA_TYPE_CHOICE: + fprintf(output, "CHOICE"); + break; + case XML_SCHEMA_TYPE_ALL: + fprintf(output, "ALL"); + break; + case XML_SCHEMA_TYPE_ANY: + fprintf(output, "ANY"); + break; + default: + fprintf(output, "UNKNOWN\n"); + return; + } } if (particle->minOccurs != 1) fprintf(output, " min: %d", particle->minOccurs); @@ -3872,10 +4276,11 @@ xmlSchemaContentModelDump(xmlSchemaParticlePtr particle, FILE * output, int dept else if (particle->maxOccurs != 1) fprintf(output, " max: %d", particle->maxOccurs); fprintf(output, "\n"); - if (((term->type == XML_SCHEMA_TYPE_SEQUENCE) || - (term->type == XML_SCHEMA_TYPE_CHOICE) || - (term->type == XML_SCHEMA_TYPE_ALL)) && - (term->children != NULL)) { + if (term && + ((term->type == XML_SCHEMA_TYPE_SEQUENCE) || + (term->type == XML_SCHEMA_TYPE_CHOICE) || + (term->type == XML_SCHEMA_TYPE_ALL)) && + (term->children != NULL)) { xmlSchemaContentModelDump((xmlSchemaParticlePtr) term->children, output, depth +1); } @@ -3883,6 +4288,51 @@ xmlSchemaContentModelDump(xmlSchemaParticlePtr particle, FILE * output, int dept xmlSchemaContentModelDump((xmlSchemaParticlePtr) particle->next, output, depth); } + +/** + * xmlSchemaAttrUsesDump: + * @uses: attribute uses list + * @output: the file output + * + * Dumps a list of attribute use components. + */ +static void +xmlSchemaAttrUsesDump(xmlSchemaItemListPtr uses, FILE * output) +{ + xmlSchemaAttributeUsePtr use; + xmlSchemaAttributeUseProhibPtr prohib; + xmlSchemaQNameRefPtr ref; + const xmlChar *name, *tns; + xmlChar *str = NULL; + int i; + + if ((uses == NULL) || (uses->nbItems == 0)) + return; + + fprintf(output, " attributes:\n"); + for (i = 0; i < uses->nbItems; i++) { + use = uses->items[i]; + if (use->type == XML_SCHEMA_EXTRA_ATTR_USE_PROHIB) { + fprintf(output, " [prohibition] "); + prohib = (xmlSchemaAttributeUseProhibPtr) use; + name = prohib->name; + tns = prohib->targetNamespace; + } else if (use->type == XML_SCHEMA_EXTRA_QNAMEREF) { + fprintf(output, " [reference] "); + ref = (xmlSchemaQNameRefPtr) use; + name = ref->name; + tns = ref->targetNamespace; + } else { + fprintf(output, " [use] "); + name = WXS_ATTRUSE_DECL_NAME(use); + tns = WXS_ATTRUSE_DECL_TNS(use); + } + fprintf(output, "'%s'\n", + (const char *) xmlSchemaFormatQName(&str, tns, name)); + FREE_AND_NULL(str); + } +} + /** * xmlSchemaTypeDump: * @output: the file output @@ -3899,11 +4349,11 @@ xmlSchemaTypeDump(xmlSchemaTypePtr type, FILE * output) } fprintf(output, "Type: "); if (type->name != NULL) - fprintf(output, "%s ", type->name); + fprintf(output, "'%s' ", type->name); else - fprintf(output, "no name "); + fprintf(output, "(no name) "); if (type->targetNamespace != NULL) - fprintf(output, "ns %s ", type->targetNamespace); + fprintf(output, "ns '%s' ", type->targetNamespace); switch (type->type) { case XML_SCHEMA_TYPE_BASIC: fprintf(output, "[basic] "); @@ -3965,12 +4415,14 @@ xmlSchemaTypeDump(xmlSchemaTypePtr type, FILE * output) } fprintf(output, "\n"); if (type->base != NULL) { - fprintf(output, " base type: %s", type->base); + fprintf(output, " base type: '%s'", type->base); if (type->baseNs != NULL) - fprintf(output, " ns %s\n", type->baseNs); + fprintf(output, " ns '%s'\n", type->baseNs); else fprintf(output, "\n"); } + if (type->attrUses != NULL) + xmlSchemaAttrUsesDump(type->attrUses, output); if (type->annot != NULL) xmlSchemaAnnotDump(output, type->annot); #ifdef DUMP_CONTENT_MODEL @@ -4010,14 +4462,13 @@ xmlSchemaDump(FILE * output, xmlSchemaPtr schema) fprintf(output, "\n"); if (schema->annot != NULL) xmlSchemaAnnotDump(output, schema->annot); - xmlHashScan(schema->typeDecl, (xmlHashScanner) xmlSchemaTypeDump, output); xmlHashScanFull(schema->elemDecl, (xmlHashScannerFull) xmlSchemaElementDump, output); } -#ifdef DEBUG_IDC +#ifdef DEBUG_IDC_NODE_TABLE /** * xmlSchemaDebugDumpIDCTable: * @vctxt: the WXS validation context @@ -4030,21 +4481,22 @@ xmlSchemaDebugDumpIDCTable(FILE * output, const xmlChar *localName, xmlSchemaPSVIIDCBindingPtr bind) { - xmlChar *str = NULL, *value; + xmlChar *str = NULL; + const xmlChar *value; xmlSchemaPSVIIDCNodePtr tab; xmlSchemaPSVIIDCKeyPtr key; int i, j, res; - fprintf(output, "IDC: TABLES on %s\n", + fprintf(output, "IDC: TABLES on '%s'\n", xmlSchemaFormatQName(&str, namespaceName, localName)); FREE_AND_NULL(str) if (bind == NULL) return; do { - fprintf(output, "IDC: BINDING %s\n", - xmlSchemaFormatQName(&str, bind->definition->targetNamespace, - bind->definition->name)); + fprintf(output, "IDC: BINDING '%s' (%d)\n", + xmlSchemaGetComponentQName(&str, + bind->definition), bind->nbNodes); FREE_AND_NULL(str) for (i = 0; i < bind->nbNodes; i++) { tab = bind->nodeTable[i]; @@ -4054,7 +4506,7 @@ xmlSchemaDebugDumpIDCTable(FILE * output, if ((key != NULL) && (key->val != NULL)) { res = xmlSchemaGetCanonValue(key->val, &value); if (res >= 0) - fprintf(output, "\"%s\" ", value); + fprintf(output, "'%s' ", value); else fprintf(output, "CANON-VALUE-FAILED "); if (res == 0) @@ -4066,6 +4518,29 @@ xmlSchemaDebugDumpIDCTable(FILE * output, } fprintf(output, ")\n"); } + if (bind->dupls && bind->dupls->nbItems) { + fprintf(output, "IDC: dupls (%d):\n", bind->dupls->nbItems); + for (i = 0; i < bind->dupls->nbItems; i++) { + tab = bind->dupls->items[i]; + fprintf(output, " ( "); + for (j = 0; j < bind->definition->nbFields; j++) { + key = tab->keys[j]; + if ((key != NULL) && (key->val != NULL)) { + res = xmlSchemaGetCanonValue(key->val, &value); + if (res >= 0) + fprintf(output, "'%s' ", value); + else + fprintf(output, "CANON-VALUE-FAILED "); + if (res == 0) + FREE_AND_NULL(value) + } else if (key != NULL) + fprintf(output, "(no val), "); + else + fprintf(output, "(key missing), "); + } + fprintf(output, ")\n"); + } + } bind = bind->next; } while (bind != NULL); } @@ -4147,6 +4622,12 @@ xmlSchemaGetNodeContent(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node) return(ret); } +static const xmlChar * +xmlSchemaGetNodeContentNoDict(xmlNodePtr node) +{ + return((const xmlChar*) xmlNodeGetContent(node)); +} + /** * xmlSchemaGetProp: * @ctxt: the parser context @@ -4263,10 +4744,7 @@ xmlSchemaGetType(xmlSchemaPtr schema, const xmlChar * name, WXS_FIND_GLOBAL_ITEM(typeDecl) } exit: - if ((ret != NULL) && (ret->redef != NULL)) { - /* Return the last redefinition. */ - ret = ret->redef; - } + #ifdef DEBUG if (ret == NULL) { if (nsName == NULL) @@ -4375,10 +4853,7 @@ xmlSchemaGetGroup(xmlSchemaPtr schema, const xmlChar * name, WXS_FIND_GLOBAL_ITEM(groupDecl) } exit: - if ((ret != NULL) && (ret->redef != NULL)) { - /* Return the last redefinition. */ - ret = ret->redef; - } + #ifdef DEBUG if (ret == NULL) { if (nsName == NULL) @@ -4491,19 +4966,94 @@ xmlSchemaIsBlank(xmlChar * str, int len) return (1); } -#define WXS_GET_GLOBAL_HASH(c, s, slot) \ -{ \ - if (WXS_IS_IMPMAIN((c)->type)) \ - table = &(IMPBUCKET_CAST((c))->schema->slot); \ - else \ - table = &(INCBUCKET_CAST((c))->ownerImport->schema->slot); \ -} \ - -#define WXS_INIT_GLOBAL_HASH(ctx, tbl) \ -if (*(tbl) == NULL) *(tbl) = xmlHashCreateDict(10, (ctx)->dict); \ -if (*(tbl) == NULL) { if (ret != NULL) xmlFree(ret); return (NULL); } - -/** +#define WXS_COMP_NAME(c, t) ((t) (c))->name +#define WXS_COMP_TNS(c, t) ((t) (c))->targetNamespace +/* +* xmlSchemaFindRedefCompInGraph: +* ATTENTION TODO: This uses pointer comp. for strings. +*/ +static xmlSchemaBasicItemPtr +xmlSchemaFindRedefCompInGraph(xmlSchemaBucketPtr bucket, + xmlSchemaTypeType type, + const xmlChar *name, + const xmlChar *nsName) +{ + xmlSchemaBasicItemPtr ret; + int i; + + if ((bucket == NULL) || (name == NULL)) + return(NULL); + if ((bucket->globals == NULL) || + (bucket->globals->nbItems == 0)) + goto subschemas; + /* + * Search in global components. + */ + for (i = 0; i < bucket->globals->nbItems; i++) { + ret = bucket->globals->items[i]; + if (ret->type == type) { + switch (type) { + case XML_SCHEMA_TYPE_COMPLEX: + case XML_SCHEMA_TYPE_SIMPLE: + if ((WXS_COMP_NAME(ret, xmlSchemaTypePtr) == name) && + (WXS_COMP_TNS(ret, xmlSchemaTypePtr) == + nsName)) + { + return(ret); + } + break; + case XML_SCHEMA_TYPE_GROUP: + if ((WXS_COMP_NAME(ret, + xmlSchemaModelGroupDefPtr) == name) && + (WXS_COMP_TNS(ret, + xmlSchemaModelGroupDefPtr) == nsName)) + { + return(ret); + } + break; + case XML_SCHEMA_TYPE_ATTRIBUTEGROUP: + if ((WXS_COMP_NAME(ret, + xmlSchemaAttributeGroupPtr) == name) && + (WXS_COMP_TNS(ret, + xmlSchemaAttributeGroupPtr) == nsName)) + { + return(ret); + } + break; + default: + /* Should not be hit. */ + return(NULL); + } + } + } +subschemas: + /* + * Process imported/included schemas. + */ + if (bucket->relations != NULL) { + xmlSchemaSchemaRelationPtr rel = bucket->relations; + + /* + * TODO: Marking the bucket will not avoid multiple searches + * in the same schema, but avoids at least circularity. + */ + bucket->flags |= XML_SCHEMA_BUCKET_MARKED; + do { + if ((rel->bucket != NULL) && + ((rel->bucket->flags & XML_SCHEMA_BUCKET_MARKED) == 0)) { + ret = xmlSchemaFindRedefCompInGraph(rel->bucket, + type, name, nsName); + if (ret != NULL) + return(ret); + } + rel = rel->next; + } while (rel != NULL); + bucket->flags ^= XML_SCHEMA_BUCKET_MARKED; + } + return(NULL); +} + +/** * xmlSchemaAddNotation: * @ctxt: a schema parser context * @schema: the schema being built @@ -4516,18 +5066,14 @@ if (*(tbl) == NULL) { if (ret != NULL) xmlFree(ret); return (NULL); } */ static xmlSchemaNotationPtr xmlSchemaAddNotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, - const xmlChar *name) + const xmlChar *name, const xmlChar *nsName, + xmlNodePtr node ATTRIBUTE_UNUSED) { xmlSchemaNotationPtr ret = NULL; - xmlHashTablePtr *table = NULL; - int val; if ((ctxt == NULL) || (schema == NULL) || (name == NULL)) return (NULL); - WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, notaDecl) - - WXS_INIT_GLOBAL_HASH(ctxt, table) ret = (xmlSchemaNotationPtr) xmlMalloc(sizeof(xmlSchemaNotation)); if (ret == NULL) { xmlSchemaPErrMemory(ctxt, "add annotation", NULL); @@ -4535,18 +5081,11 @@ xmlSchemaAddNotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } memset(ret, 0, sizeof(xmlSchemaNotation)); ret->type = XML_SCHEMA_TYPE_NOTATION; - ret->name = xmlDictLookup(ctxt->dict, name, -1); - - val = xmlHashAddEntry(*table, ret->name, ret); - if (val != 0) { - xmlSchemaPErr(ctxt, (xmlNodePtr) ctxt->doc, - XML_SCHEMAP_REDEFINED_NOTATION, - "A notation declaration with the name '%s' does already exist.\n", - name, NULL); - xmlFree(ret); - return (NULL); - } - ADD_GLOBAL_ITEM(ctxt, ret); + ret->name = name; + ret->targetNamespace = nsName; + /* TODO: do we need the node to be set? + * ret->node = node;*/ + WXS_ADD_GLOBAL(ctxt, ret); return (ret); } @@ -4568,8 +5107,6 @@ xmlSchemaAddAttribute(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlNodePtr node, int topLevel) { xmlSchemaAttributePtr ret = NULL; - int val; - xmlHashTablePtr *table; if ((ctxt == NULL) || (schema == NULL)) return (NULL); @@ -4580,86 +5117,138 @@ xmlSchemaAddAttribute(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, return (NULL); } memset(ret, 0, sizeof(xmlSchemaAttribute)); - ret->name = xmlDictLookup(ctxt->dict, name, -1); + ret->type = XML_SCHEMA_TYPE_ATTRIBUTE; + ret->node = node; + ret->name = name; ret->targetNamespace = nsName; - if (topLevel) { - WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, attrDecl) - WXS_INIT_GLOBAL_HASH(ctxt, table) - val = xmlHashAddEntry(*table, name, ret); - if (val != 0) { - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_REDEFINED_ATTR, - NULL, NULL, node, - "A global attribute declaration with the name '%s' does " - "already exist", name); - xmlFree(ret); - return (NULL); - } - ADD_GLOBAL_ITEM(ctxt, ret); - } else - ADD_LOCAL_ITEM(ctxt, ret); - WXS_ADD_PENDING_ITEM(ctxt, ret); + if (topLevel) + WXS_ADD_GLOBAL(ctxt, ret); + else + WXS_ADD_LOCAL(ctxt, ret); + WXS_ADD_PENDING(ctxt, ret); + return (ret); +} + +/** + * xmlSchemaAddAttributeUse: + * @ctxt: a schema parser context + * @schema: the schema being built + * @name: the item name + * @namespace: the namespace + * + * Add an XML schema Attrribute declaration + * *WARNING* this interface is highly subject to change + * + * Returns the new struture or NULL in case of error + */ +static xmlSchemaAttributeUsePtr +xmlSchemaAddAttributeUse(xmlSchemaParserCtxtPtr pctxt, + xmlNodePtr node) +{ + xmlSchemaAttributeUsePtr ret = NULL; + + if (pctxt == NULL) + return (NULL); + + ret = (xmlSchemaAttributeUsePtr) xmlMalloc(sizeof(xmlSchemaAttributeUse)); + if (ret == NULL) { + xmlSchemaPErrMemory(pctxt, "allocating attribute", NULL); + return (NULL); + } + memset(ret, 0, sizeof(xmlSchemaAttributeUse)); + ret->type = XML_SCHEMA_TYPE_ATTRIBUTE_USE; + ret->node = node; + + WXS_ADD_LOCAL(pctxt, ret); + return (ret); +} + +/* +* xmlSchemaAddRedef: +* +* Adds a redefinition information. This is used at a later stage to: +* resolve references to the redefined components and to check constraints. +*/ +static xmlSchemaRedefPtr +xmlSchemaAddRedef(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaBucketPtr targetBucket, + void *item, + const xmlChar *refName, + const xmlChar *refTargetNs) +{ + xmlSchemaRedefPtr ret; + + ret = (xmlSchemaRedefPtr) + xmlMalloc(sizeof(xmlSchemaRedef)); + if (ret == NULL) { + xmlSchemaPErrMemory(pctxt, + "allocating redefinition info", NULL); + return (NULL); + } + memset(ret, 0, sizeof(xmlSchemaRedef)); + ret->item = item; + ret->targetBucket = targetBucket; + ret->refName = refName; + ret->refTargetNs = refTargetNs; + if (WXS_CONSTRUCTOR(pctxt)->redefs == NULL) + WXS_CONSTRUCTOR(pctxt)->redefs = ret; + else + WXS_CONSTRUCTOR(pctxt)->lastRedef->next = ret; + WXS_CONSTRUCTOR(pctxt)->lastRedef = ret; + return (ret); } /** - * xmlSchemaAddAttributeGroup: + * xmlSchemaAddAttributeGroupDefinition: * @ctxt: a schema parser context * @schema: the schema being built * @name: the item name + * @nsName: the target namespace + * @node: the corresponding node * - * Add an XML schema Attrribute Group declaration + * Add an XML schema Attrribute Group definition. * * Returns the new struture or NULL in case of error */ static xmlSchemaAttributeGroupPtr -xmlSchemaAddAttributeGroup(xmlSchemaParserCtxtPtr ctxt, - xmlSchemaPtr schema, - const xmlChar * name, - xmlNodePtr node, - int topLevel) +xmlSchemaAddAttributeGroupDefinition(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaPtr schema ATTRIBUTE_UNUSED, + const xmlChar *name, + const xmlChar *nsName, + xmlNodePtr node) { xmlSchemaAttributeGroupPtr ret = NULL; - xmlHashTablePtr *table = NULL; - int val; - if ((ctxt == NULL) || (schema == NULL)) + if ((pctxt == NULL) || (name == NULL)) return (NULL); ret = (xmlSchemaAttributeGroupPtr) xmlMalloc(sizeof(xmlSchemaAttributeGroup)); if (ret == NULL) { - xmlSchemaPErrMemory(ctxt, "allocating attribute group", NULL); + xmlSchemaPErrMemory(pctxt, "allocating attribute group", NULL); return (NULL); } memset(ret, 0, sizeof(xmlSchemaAttributeGroup)); ret->type = XML_SCHEMA_TYPE_ATTRIBUTEGROUP; - ret->node = node; - - if (topLevel) { - ret->flags |= XML_SCHEMAS_ATTRGROUP_GLOBAL; - ret->name = xmlDictLookup(ctxt->dict, name, -1); - ret->targetNamespace = ctxt->targetNamespace; - - WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, attrgrpDecl) - WXS_INIT_GLOBAL_HASH(ctxt, table) - - val = xmlHashAddEntry(*table, name, ret); - if (val != 0) { - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_REDEFINED_ATTRGROUP, - NULL, NULL, node, - "A global attribute group definition with the name '%s' " - "does already exist", name); + ret->name = name; + ret->targetNamespace = nsName; + ret->node = node; + + /* TODO: Remove the flag. */ + ret->flags |= XML_SCHEMAS_ATTRGROUP_GLOBAL; + if (pctxt->isRedefine) { + pctxt->redef = xmlSchemaAddRedef(pctxt, pctxt->redefined, + ret, name, nsName); + if (pctxt->redef == NULL) { xmlFree(ret); - return (NULL); - } - ADD_GLOBAL_ITEM(ctxt, ret); - } else - ADD_LOCAL_ITEM(ctxt, ret); - - WXS_ADD_PENDING_ITEM(ctxt, ret); + return(NULL); + } + pctxt->redefCounter = 0; + } + WXS_ADD_GLOBAL(pctxt, ret); + WXS_ADD_PENDING(pctxt, ret); return (ret); } @@ -4676,15 +5265,13 @@ xmlSchemaAddAttributeGroup(xmlSchemaParserCtxtPtr ctxt, * Returns the new struture or NULL in case of error */ static xmlSchemaElementPtr -xmlSchemaAddElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, +xmlSchemaAddElement(xmlSchemaParserCtxtPtr ctxt, const xmlChar * name, const xmlChar * nsName, xmlNodePtr node, int topLevel) { xmlSchemaElementPtr ret = NULL; - xmlHashTablePtr *table = NULL; - int val; - if ((ctxt == NULL) || (schema == NULL) || (name == NULL)) + if ((ctxt == NULL) || (name == NULL)) return (NULL); ret = (xmlSchemaElementPtr) xmlMalloc(sizeof(xmlSchemaElement)); @@ -4693,26 +5280,16 @@ xmlSchemaAddElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, return (NULL); } memset(ret, 0, sizeof(xmlSchemaElement)); - ret->name = xmlDictLookup(ctxt->dict, name, -1); + ret->type = XML_SCHEMA_TYPE_ELEMENT; + ret->name = name; ret->targetNamespace = nsName; + ret->node = node; - if (topLevel) { - WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, elemDecl) - WXS_INIT_GLOBAL_HASH(ctxt, table) - val = xmlHashAddEntry(*table, name, ret); - if (val != 0) { - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_REDEFINED_ELEMENT, - NULL, NULL, node, - "A global element declaration with the name '%s' does " - "already exist", name); - xmlFree(ret); - return (NULL); - } - ADD_GLOBAL_ITEM(ctxt, ret); - } else - ADD_LOCAL_ITEM(ctxt, ret); - WXS_ADD_PENDING_ITEM(ctxt, ret); + if (topLevel) + WXS_ADD_GLOBAL(ctxt, ret); + else + WXS_ADD_LOCAL(ctxt, ret); + WXS_ADD_PENDING(ctxt, ret); return (ret); } @@ -4730,12 +5307,11 @@ xmlSchemaAddElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ static xmlSchemaTypePtr xmlSchemaAddType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, + xmlSchemaTypeType type, const xmlChar * name, const xmlChar * nsName, xmlNodePtr node, int topLevel) { xmlSchemaTypePtr ret = NULL; - xmlHashTablePtr *table = NULL; - int val; if ((ctxt == NULL) || (schema == NULL)) return (NULL); @@ -4746,53 +5322,24 @@ xmlSchemaAddType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, return (NULL); } memset(ret, 0, sizeof(xmlSchemaType)); - if (name != NULL) - ret->name = xmlDictLookup(ctxt->dict, name, -1); + ret->type = type; + ret->name = name; ret->targetNamespace = nsName; ret->node = node; - /* TODO: Get rid of occurences here. */ - ret->minOccurs = 1; - ret->maxOccurs = 1; - if (topLevel) { - WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, typeDecl) - WXS_INIT_GLOBAL_HASH(ctxt, table) - val = xmlHashAddEntry(*table, name, ret); - if (val != 0) { - if (! ctxt->isRedefine) { - xmlChar *str = NULL; - - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_REDEFINED_TYPE, - NULL, NULL, node, - "A global type definition with the name '%s' does " - "already exist", - xmlSchemaFormatQName(&str, nsName, name)); - FREE_AND_NULL(str); - xmlFree(ret); - return (NULL); - } else { - xmlSchemaTypePtr prev; - - /* REDEFINE: Add a redefinition. */ - TODO - prev = xmlHashLookup(*table, name); - if (prev == NULL) { - PERROR_INT2("xmlSchemaAddType", "hash list did not " - "return a redefined type component, but should"); - xmlFree(ret); - return (NULL); - } - ret->redef = prev->redef; - prev->redef = ret; - /* TODO: Add to locals; dunno if this will make trouble. */ - ADD_LOCAL_ITEM(ctxt, ret); - } - } else - ADD_GLOBAL_ITEM(ctxt, ret); + if (ctxt->isRedefine) { + ctxt->redef = xmlSchemaAddRedef(ctxt, ctxt->redefined, + ret, name, nsName); + if (ctxt->redef == NULL) { + xmlFree(ret); + return(NULL); + } + ctxt->redefCounter = 0; + } + WXS_ADD_GLOBAL(ctxt, ret); } else - ADD_LOCAL_ITEM(ctxt, ret); - WXS_ADD_PENDING_ITEM(ctxt, ret); + WXS_ADD_LOCAL(ctxt, ret); + WXS_ADD_PENDING(ctxt, ret); return (ret); } @@ -4811,6 +5358,7 @@ xmlSchemaNewQNameRef(xmlSchemaParserCtxtPtr pctxt, "allocating QName reference item", NULL); return (NULL); } + ret->node = NULL; ret->type = XML_SCHEMA_EXTRA_QNAMEREF; ret->name = refName; ret->targetNamespace = refNs; @@ -4819,10 +5367,29 @@ xmlSchemaNewQNameRef(xmlSchemaParserCtxtPtr pctxt, /* * Store the reference item in the schema. */ - ADD_LOCAL_ITEM(pctxt, ret); + WXS_ADD_LOCAL(pctxt, ret); return (ret); } +static xmlSchemaAttributeUseProhibPtr +xmlSchemaAddAttributeUseProhib(xmlSchemaParserCtxtPtr pctxt) +{ + xmlSchemaAttributeUseProhibPtr ret; + + ret = (xmlSchemaAttributeUseProhibPtr) + xmlMalloc(sizeof(xmlSchemaAttributeUseProhib)); + if (ret == NULL) { + xmlSchemaPErrMemory(pctxt, + "allocating attribute use prohibition", NULL); + return (NULL); + } + memset(ret, 0, sizeof(xmlSchemaAttributeUseProhib)); + ret->type = XML_SCHEMA_EXTRA_ATTR_USE_PROHIB; + WXS_ADD_LOCAL(pctxt, ret); + return (ret); +} + + /** * xmlSchemaAddModelGroup: * @ctxt: a schema parser context @@ -4856,7 +5423,10 @@ xmlSchemaAddModelGroup(xmlSchemaParserCtxtPtr ctxt, memset(ret, 0, sizeof(xmlSchemaModelGroup)); ret->type = type; ret->node = node; - ADD_LOCAL_ITEM(ctxt, ret); + WXS_ADD_LOCAL(ctxt, ret); + if ((type == XML_SCHEMA_TYPE_SEQUENCE) || + (type == XML_SCHEMA_TYPE_CHOICE)) + WXS_ADD_PENDING(ctxt, ret); return (ret); } @@ -4900,12 +5470,12 @@ xmlSchemaAddParticle(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, ret->next = NULL; ret->children = NULL; - ADD_LOCAL_ITEM(ctxt, ret); + WXS_ADD_LOCAL(ctxt, ret); /* * Note that addition to pending components will be done locally * to the specific parsing function, since the most particles * need not to be fixed up (i.e. the reference to be resolved). - * REMOVED: WXS_ADD_PENDING_ITEM(ctxt, ret); + * REMOVED: WXS_ADD_PENDING(ctxt, ret); */ return (ret); } @@ -4928,15 +5498,10 @@ xmlSchemaAddModelGroupDefinition(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node) { xmlSchemaModelGroupDefPtr ret = NULL; - xmlHashTablePtr *table = NULL; - int val; if ((ctxt == NULL) || (schema == NULL) || (name == NULL)) return (NULL); - WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, groupDecl) - WXS_INIT_GLOBAL_HASH(ctxt, table) - ret = (xmlSchemaModelGroupDefPtr) xmlMalloc(sizeof(xmlSchemaModelGroupDef)); if (ret == NULL) { @@ -4944,23 +5509,22 @@ xmlSchemaAddModelGroupDefinition(xmlSchemaParserCtxtPtr ctxt, return (NULL); } memset(ret, 0, sizeof(xmlSchemaModelGroupDef)); - ret->name = xmlDictLookup(ctxt->dict, name, -1); + ret->name = name; ret->type = XML_SCHEMA_TYPE_GROUP; ret->node = node; ret->targetNamespace = nsName; - val = xmlHashAddEntry(*table, ret->name, ret); - if (val != 0) { - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_REDEFINED_GROUP, - NULL, NULL, node, - "A global model group definition with the name '%s' does " - "already exist", name); - xmlFree(ret); - return (NULL); + if (ctxt->isRedefine) { + ctxt->redef = xmlSchemaAddRedef(ctxt, ctxt->redefined, + ret, name, nsName); + if (ctxt->redef == NULL) { + xmlFree(ret); + return(NULL); + } + ctxt->redefCounter = 0; } - ADD_GLOBAL_ITEM(ctxt, ret); - WXS_ADD_PENDING_ITEM(ctxt, ret); + WXS_ADD_GLOBAL(ctxt, ret); + WXS_ADD_PENDING(ctxt, ret); return (ret); } @@ -4993,16 +5557,11 @@ xmlSchemaAddIDC(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, const xmlChar *name, const xmlChar *nsName, int category, xmlNodePtr node) { - xmlSchemaIDCPtr ret = NULL; - xmlHashTablePtr *table = NULL; - int val; + xmlSchemaIDCPtr ret = NULL; if ((ctxt == NULL) || (schema == NULL) || (name == NULL)) return (NULL); - WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, idcDef) - WXS_INIT_GLOBAL_HASH(ctxt, table) - ret = (xmlSchemaIDCPtr) xmlMalloc(sizeof(xmlSchemaIDC)); if (ret == NULL) { xmlSchemaPErrMemory(ctxt, @@ -5016,25 +5575,12 @@ xmlSchemaAddIDC(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, ret->type = category; ret->node = node; - val = xmlHashAddEntry(*table, ret->name, ret); - if (val != 0) { - xmlSchemaPCustomErrExt(ctxt, - /* TODO: Error code! */ - XML_SCHEMAP_REDEFINED_TYPE, - NULL, NULL, node, - "An identity-constraint definition with the name '%s' " - "and targetNamespace '%s' does already exist", - ret->name, ret->targetNamespace, NULL); - - xmlFree(ret); - return (NULL); - } - ADD_GLOBAL_ITEM(ctxt, ret); + WXS_ADD_GLOBAL(ctxt, ret); /* * Only keyrefs need to be fixup up. */ if (category == XML_SCHEMA_TYPE_IDC_KEYREF) - WXS_ADD_PENDING_ITEM(ctxt, ret); + WXS_ADD_PENDING(ctxt, ret); return (ret); } @@ -5064,11 +5610,8 @@ xmlSchemaAddWildcard(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } memset(ret, 0, sizeof(xmlSchemaWildcard)); ret->type = type; - ret->node = node; - ret->minOccurs = 1; - ret->maxOccurs = 1; - - ADD_LOCAL_ITEM(ctxt, ret); + ret->node = node; + WXS_ADD_LOCAL(ctxt, ret); return (ret); } @@ -5187,8 +5730,7 @@ xmlSchemaAddElementSubstitutionMember(xmlSchemaParserCtxtPtr pctxt, static int xmlSchemaPValAttrNodeQNameValue(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, - xmlChar **ownerDes ATTRIBUTE_UNUSED, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlAttrPtr attr, const xmlChar *value, const xmlChar **uri, @@ -5269,8 +5811,7 @@ xmlSchemaPValAttrNodeQNameValue(xmlSchemaParserCtxtPtr ctxt, static int xmlSchemaPValAttrNodeQName(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, - xmlChar **ownerDes, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlAttrPtr attr, const xmlChar **uri, const xmlChar **local) @@ -5279,7 +5820,7 @@ xmlSchemaPValAttrNodeQName(xmlSchemaParserCtxtPtr ctxt, value = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr); return (xmlSchemaPValAttrNodeQNameValue(ctxt, schema, - ownerDes, ownerItem, attr, value, uri, local)); + ownerItem, attr, value, uri, local)); } /** @@ -5301,8 +5842,7 @@ xmlSchemaPValAttrNodeQName(xmlSchemaParserCtxtPtr ctxt, static int xmlSchemaPValAttrQName(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, - xmlChar **ownerDes, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlNodePtr ownerElem, const char *name, const xmlChar **uri, @@ -5317,7 +5857,7 @@ xmlSchemaPValAttrQName(xmlSchemaParserCtxtPtr ctxt, return (0); } return (xmlSchemaPValAttrNodeQName(ctxt, schema, - ownerDes, ownerItem, attr, uri, local)); + ownerItem, attr, uri, local)); } /** @@ -5335,25 +5875,15 @@ xmlSchemaPValAttrQName(xmlSchemaParserCtxtPtr ctxt, * if not valid and -1 if an internal error occurs. */ static int -xmlSchemaPValAttrID(xmlSchemaParserCtxtPtr ctxt, - xmlChar **ownerDes ATTRIBUTE_UNUSED, - xmlSchemaTypePtr ownerItem, - xmlNodePtr ownerElem, - const xmlChar *name) +xmlSchemaPValAttrNodeID(xmlSchemaParserCtxtPtr ctxt, xmlAttrPtr attr) { int ret; - xmlChar *value; - xmlAttrPtr attr; - - value = xmlGetNoNsProp(ownerElem, name); - if (value == NULL) - return (0); + const xmlChar *value; - attr = xmlSchemaGetPropNode(ownerElem, (const char *) name); if (attr == NULL) - return (-1); - - ret = xmlValidateNCName(BAD_CAST value, 1); + return(0); + value = xmlSchemaGetNodeContentNoDict((xmlNodePtr) attr); + ret = xmlValidateNCName(value, 1); if (ret == 0) { /* * NOTE: the IDness might have already be declared in the DTD @@ -5366,38 +5896,53 @@ xmlSchemaPValAttrID(xmlSchemaParserCtxtPtr ctxt, * TODO: Use xmlSchemaStrip here; it's not exported at this * moment. */ - strip = xmlSchemaCollapseString(BAD_CAST value); - if (strip != NULL) + strip = xmlSchemaCollapseString(value); + if (strip != NULL) { + xmlFree((xmlChar *) value); value = strip; - res = xmlAddID(NULL, ownerElem->doc, BAD_CAST value, attr); + } + res = xmlAddID(NULL, attr->doc, value, attr); if (res == NULL) { ret = XML_SCHEMAP_S4S_ATTR_INVALID_VALUE; xmlSchemaPSimpleTypeErr(ctxt, XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - ownerItem, (xmlNodePtr) attr, + NULL, (xmlNodePtr) attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_ID), NULL, NULL, "Duplicate value '%s' of simple " - "type 'xs:ID'", BAD_CAST value, NULL); + "type 'xs:ID'", value, NULL); } else attr->atype = XML_ATTRIBUTE_ID; - if (strip != NULL) - xmlFree(strip); } } else if (ret > 0) { ret = XML_SCHEMAP_S4S_ATTR_INVALID_VALUE; xmlSchemaPSimpleTypeErr(ctxt, XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - ownerItem, (xmlNodePtr) attr, + NULL, (xmlNodePtr) attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_ID), NULL, NULL, "The value '%s' of simple type 'xs:ID' is " "not a valid 'xs:NCName'", - BAD_CAST value, NULL); + value, NULL); } - xmlFree(value); + if (value != NULL) + xmlFree((xmlChar *)value); return (ret); } +static int +xmlSchemaPValAttrID(xmlSchemaParserCtxtPtr ctxt, + xmlNodePtr ownerElem, + const xmlChar *name) +{ + xmlAttrPtr attr; + + attr = xmlSchemaGetPropNode(ownerElem, (const char *) name); + if (attr == NULL) + return(0); + return(xmlSchemaPValAttrNodeID(ctxt, attr)); + +} + /** * xmlGetMaxOccurs: * @ctxt: a schema validation context @@ -5528,8 +6073,7 @@ xmlGetMinOccurs(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, */ static int xmlSchemaPGetBoolNodeValue(xmlSchemaParserCtxtPtr ctxt, - xmlChar **ownerDes ATTRIBUTE_UNUSED, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlNodePtr node) { xmlChar *value = NULL; @@ -5576,8 +6120,6 @@ xmlSchemaPGetBoolNodeValue(xmlSchemaParserCtxtPtr ctxt, */ static int xmlGetBooleanProp(xmlSchemaParserCtxtPtr ctxt, - xmlChar **ownerDes ATTRIBUTE_UNUSED, - xmlSchemaTypePtr ownerItem, xmlNodePtr node, const char *name, int def) { @@ -5602,7 +6144,7 @@ xmlGetBooleanProp(xmlSchemaParserCtxtPtr ctxt, else { xmlSchemaPSimpleTypeErr(ctxt, XML_SCHEMAP_INVALID_BOOLEAN, - ownerItem, + NULL, (xmlNodePtr) xmlSchemaGetPropNode(node, name), xmlSchemaGetBuiltInType(XML_SCHEMAS_BOOLEAN), NULL, val, NULL, NULL, NULL); @@ -5629,15 +6171,12 @@ static xmlSchemaTypePtr xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr xmlSchemaPtr schema, xmlNodePtr node, xmlSchemaTypeType parentType); -static xmlSchemaAttributePtr xmlSchemaParseAttribute(xmlSchemaParserCtxtPtr - ctxt, - xmlSchemaPtr schema, - xmlNodePtr node, - int topLevel); -static xmlSchemaAttributeGroupPtr -xmlSchemaParseAttributeGroup(xmlSchemaParserCtxtPtr ctxt, - xmlSchemaPtr schema, xmlNodePtr node, - int topLevel); +static xmlSchemaBasicItemPtr +xmlSchemaParseLocalAttribute(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaPtr schema, + xmlNodePtr node, + xmlSchemaItemListPtr uses, + int parentType); static xmlSchemaTypePtr xmlSchemaParseList(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlNodePtr node); @@ -5664,8 +6203,7 @@ xmlSchemaParseAnyAttribute(xmlSchemaParserCtxtPtr ctxt, */ static int xmlSchemaPValAttrNodeValue(xmlSchemaParserCtxtPtr pctxt, - xmlChar **ownerDes ATTRIBUTE_UNUSED, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlAttrPtr attr, const xmlChar *value, xmlSchemaTypePtr type) @@ -5695,7 +6233,8 @@ xmlSchemaPValAttrNodeValue(xmlSchemaParserCtxtPtr pctxt, break; default: { PERROR_INT("xmlSchemaPValAttrNodeValue", - "validation using the given type is not supported"); + "validation using the given type is not supported while " + "parsing a schema"); return (-1); } } @@ -5707,7 +6246,7 @@ xmlSchemaPValAttrNodeValue(xmlSchemaParserCtxtPtr pctxt, "failed to validate a schema attribute value"); return (-1); } else if (ret > 0) { - if (VARIETY_LIST(type)) + if (WXS_IS_LIST(type)) ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2; else ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1; @@ -5737,8 +6276,7 @@ xmlSchemaPValAttrNodeValue(xmlSchemaParserCtxtPtr pctxt, */ static int xmlSchemaPValAttrNode(xmlSchemaParserCtxtPtr ctxt, - xmlChar **ownerDes, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlAttrPtr attr, xmlSchemaTypePtr type, const xmlChar **value) @@ -5752,7 +6290,7 @@ xmlSchemaPValAttrNode(xmlSchemaParserCtxtPtr ctxt, if (value != NULL) *value = val; - return (xmlSchemaPValAttrNodeValue(ctxt, ownerDes, ownerItem, attr, + return (xmlSchemaPValAttrNodeValue(ctxt, ownerItem, attr, val, type)); } @@ -5776,9 +6314,8 @@ xmlSchemaPValAttrNode(xmlSchemaParserCtxtPtr ctxt, * number otherwise and -1 in case of an internal or API error. */ static int -xmlSchemaPValAttr(xmlSchemaParserCtxtPtr ctxt, - xmlChar **ownerDes, - xmlSchemaTypePtr ownerItem, +xmlSchemaPValAttr(xmlSchemaParserCtxtPtr ctxt, + xmlSchemaBasicItemPtr ownerItem, xmlNodePtr ownerElem, const char *name, xmlSchemaTypePtr type, @@ -5807,7 +6344,7 @@ xmlSchemaPValAttr(xmlSchemaParserCtxtPtr ctxt, *value = NULL; return (0); } - return (xmlSchemaPValAttrNode(ctxt, ownerDes, ownerItem, attr, + return (xmlSchemaPValAttrNode(ctxt, ownerItem, attr, type, value)); } @@ -5815,87 +6352,90 @@ static int xmlSchemaCheckReference(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema ATTRIBUTE_UNUSED, xmlNodePtr node, - xmlSchemaBasicItemPtr item, + xmlAttrPtr attr, const xmlChar *namespaceName) { /* TODO: Pointer comparison instead? */ if (xmlStrEqual(pctxt->targetNamespace, namespaceName)) - return (1); + return (0); if (xmlStrEqual(xmlSchemaNs, namespaceName)) - return (1); + return (0); /* * Check if the referenced namespace was ed. */ - if (WXS_SCHEMA_BUCKET(pctxt)->relations != NULL) { + if (WXS_BUCKET(pctxt)->relations != NULL) { xmlSchemaSchemaRelationPtr rel; - rel = WXS_SCHEMA_BUCKET(pctxt)->relations; + rel = WXS_BUCKET(pctxt)->relations; do { - if (WXS_IS_IMPMAIN(rel->type) && + if (WXS_IS_BUCKET_IMPMAIN(rel->type) && xmlStrEqual(namespaceName, rel->importNamespace)) - return (1); + return (0); rel = rel->next; } while (rel != NULL); } /* * No matching ed namespace found. */ - if (namespaceName == NULL) - xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_SRC_RESOLVE, - NULL, (xmlSchemaTypePtr) item, node, - "References from this schema to components in no " - "namespace are not valid, since not indicated by an import " - "statement", NULL); - else - xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_SRC_RESOLVE, - NULL, (xmlSchemaTypePtr) item, node, - "References from this schema to components in the " - "namespace '%s' are not valid, since not indicated by an import " - "statement", namespaceName); - return (0); + { + xmlNodePtr n = (attr != NULL) ? (xmlNodePtr) attr : node; + + if (namespaceName == NULL) + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_SRC_RESOLVE, n, NULL, + "References from this schema to components in no " + "namespace are not allowed, since not indicated by an " + "import statement", NULL, NULL); + else + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_SRC_RESOLVE, n, NULL, + "References from this schema to components in the " + "namespace '%s' are not allowed, since not indicated by an " + "import statement", namespaceName, NULL); + } + return (XML_SCHEMAP_SRC_RESOLVE); } /** - * xmlSchemaParseAttrDecls: + * xmlSchemaParseLocalAttributes: * @ctxt: a schema validation context * @schema: the schema being built * @node: a subtree containing XML Schema informations * @type: the hosting type where the attributes will be anchored * - * parse a XML schema attrDecls declaration corresponding to - * + * Parses attribute uses and attribute declarations and + * attribute group references. */ -static xmlNodePtr -xmlSchemaParseAttrDecls(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, - xmlNodePtr child, xmlSchemaTypePtr type) -{ - xmlSchemaAttributePtr lastattr = NULL, attr; - - while ((IS_SCHEMA(child, "attribute")) || - (IS_SCHEMA(child, "attributeGroup"))) { - attr = NULL; - if (IS_SCHEMA(child, "attribute")) { - attr = xmlSchemaParseAttribute(ctxt, schema, child, 0); - } else if (IS_SCHEMA(child, "attributeGroup")) { - attr = (xmlSchemaAttributePtr) - xmlSchemaParseAttributeGroup(ctxt, schema, child, 0); - } - if (attr != NULL) { - if (lastattr == NULL) { - if (type->type == XML_SCHEMA_TYPE_ATTRIBUTEGROUP) - ((xmlSchemaAttributeGroupPtr) type)->attributes = attr; - else - type->attributes = attr; - lastattr = attr; - } else { - lastattr->next = attr; - lastattr = attr; - } +static int +xmlSchemaParseLocalAttributes(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, + xmlNodePtr *child, xmlSchemaItemListPtr *list, + int parentType, int *hasRefs) +{ + void *item; + + while ((IS_SCHEMA((*child), "attribute")) || + (IS_SCHEMA((*child), "attributeGroup"))) { + if (IS_SCHEMA((*child), "attribute")) { + item = xmlSchemaParseLocalAttribute(ctxt, schema, *child, + *list, parentType); + } else { + item = xmlSchemaParseAttributeGroupRef(ctxt, schema, *child); + if ((item != NULL) && (hasRefs != NULL)) + *hasRefs = 1; } - child = child->next; + if (item != NULL) { + if (*list == NULL) { + /* TODO: Customize grow factor. */ + *list = xmlSchemaItemListCreate(); + if (*list == NULL) + return(-1); + } + if (xmlSchemaItemListAddSize(*list, 2, item) == -1) + return(-1); + } + *child = (*child)->next; } - return (child); + return (0); } /** @@ -5912,7 +6452,7 @@ xmlSchemaParseAttrDecls(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ static xmlSchemaAnnotPtr xmlSchemaParseAnnotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, - xmlNodePtr node) + xmlNodePtr node, int needed) { xmlSchemaAnnotPtr ret; xmlNodePtr child = NULL; @@ -5929,7 +6469,10 @@ xmlSchemaParseAnnotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ if ((ctxt == NULL) || (schema == NULL) || (node == NULL)) return (NULL); - ret = xmlSchemaNewAnnot(ctxt, node); + if (needed) + ret = xmlSchemaNewAnnot(ctxt, node); + else + ret = NULL; attr = node->properties; while (attr != NULL) { if (((attr->ns == NULL) && @@ -5938,12 +6481,11 @@ xmlSchemaParseAnnotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlStrEqual(attr->ns->href, xmlSchemaNs))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * And now for the children... */ @@ -5964,12 +6506,11 @@ xmlSchemaParseAnnotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlStrEqual(attr->ns->href, xmlSchemaNs))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttr(ctxt, NULL, NULL, child, "source", + xmlSchemaPValAttr(ctxt, NULL, child, "source", xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), NULL); child = child->next; } else if (IS_SCHEMA(child, "documentation")) { @@ -5984,8 +6525,7 @@ xmlSchemaParseAnnotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (attr->ns == NULL) { if (!xmlStrEqual(attr->name, BAD_CAST "source")) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else { if (xmlStrEqual(attr->ns->href, xmlSchemaNs) || @@ -5993,8 +6533,7 @@ xmlSchemaParseAnnotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, (!xmlStrEqual(attr->ns->href, XML_XML_NAMESPACE)))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } attr = attr->next; @@ -6004,14 +6543,14 @@ xmlSchemaParseAnnotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ attr = xmlSchemaGetPropNodeNs(child, (const char *) XML_XML_NAMESPACE, "lang"); if (attr != NULL) - xmlSchemaPValAttrNode(ctxt, NULL, NULL, attr, + xmlSchemaPValAttrNode(ctxt, NULL, attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_LANGUAGE), NULL); child = child->next; } else { if (!barked) xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, "(appinfo | documentation)*"); + NULL, node, child, NULL, "(appinfo | documentation)*"); barked = 1; child = child->next; } @@ -6085,8 +6624,7 @@ xmlSchemaParseFacet(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlSchemaFreeFacet(facet); return (NULL); } - xmlSchemaPValAttrID(ctxt, NULL, - (xmlSchemaTypePtr) facet, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); facet->value = value; if ((facet->type != XML_SCHEMA_FACET_PATTERN) && (facet->type != XML_SCHEMA_FACET_ENUMERATION)) { @@ -6101,7 +6639,7 @@ xmlSchemaParseFacet(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, child = node->children; if (IS_SCHEMA(child, "annotation")) { - facet->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + facet->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } if (child != NULL) { @@ -6199,7 +6737,7 @@ xmlSchemaParseWildcardNs(xmlSchemaParserCtxtPtr ctxt, /* * Validate the item (anyURI). */ - xmlSchemaPValAttrNodeValue(ctxt, NULL, NULL, attr, + xmlSchemaPValAttrNodeValue(ctxt, NULL, attr, nsItem, xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI)); dictnsItem = xmlDictLookup(ctxt->dict, nsItem, -1); } @@ -6317,17 +6855,15 @@ xmlSchemaParseAny(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, (!xmlStrEqual(attr->name, BAD_CAST "namespace")) && (!xmlStrEqual(attr->name, BAD_CAST "processContents"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * minOccurs/maxOccurs. */ @@ -6348,13 +6884,13 @@ xmlSchemaParseAny(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ child = node->children; if (IS_SCHEMA(child, "annotation")) { - annot = xmlSchemaParseAnnotation(ctxt, schema, child); + annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, + NULL, node, child, NULL, "(annotation?)"); } /* @@ -6371,8 +6907,6 @@ xmlSchemaParseAny(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (particle == NULL) return (NULL); particle->annot = annot; - wild->minOccurs = min; - wild->maxOccurs = max; particle->children = (xmlSchemaTreeItemPtr) wild; return (particle); @@ -6404,29 +6938,26 @@ xmlSchemaParseNotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, "Notation has no name\n", NULL, NULL); return (NULL); } - ret = xmlSchemaAddNotation(ctxt, schema, name); - if (ret == NULL) { + ret = xmlSchemaAddNotation(ctxt, schema, name, + ctxt->targetNamespace, node); + if (ret == NULL) return (NULL); - } - ret->targetNamespace = ctxt->targetNamespace; - - xmlSchemaPValAttrID(ctxt, NULL, (xmlSchemaTypePtr) ret, - node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); if (IS_SCHEMA(child, "annotation")) { - ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } child = node->children; if (IS_SCHEMA(child, "annotation")) { - ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, + NULL, node, child, NULL, "(annotation?)"); } @@ -6470,18 +7001,15 @@ xmlSchemaParseAnyAttribute(xmlSchemaParserCtxtPtr ctxt, (!xmlStrEqual(attr->name, BAD_CAST "namespace")) && (!xmlStrEqual(attr->name, BAD_CAST "processContents"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(ctxt, NULL, (xmlSchemaTypePtr) ret, - node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * Parse the namespace list. */ @@ -6492,13 +7020,13 @@ xmlSchemaParseAnyAttribute(xmlSchemaParserCtxtPtr ctxt, */ child = node->children; if (IS_SCHEMA(child, "annotation")) { - ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, + NULL, node, child, NULL, "(annotation?)"); } @@ -6517,466 +7045,765 @@ xmlSchemaParseAnyAttribute(xmlSchemaParserCtxtPtr ctxt, * * Returns the attribute declaration. */ -static xmlSchemaAttributePtr -xmlSchemaParseAttribute(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, - xmlNodePtr node, int topLevel) +static xmlSchemaBasicItemPtr +xmlSchemaParseLocalAttribute(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaPtr schema, + xmlNodePtr node, + xmlSchemaItemListPtr uses, + int parentType) { - const xmlChar *name, *attrValue; - xmlChar *repName = NULL; /* The reported designation. */ - xmlSchemaAttributePtr ret; + const xmlChar *attrValue, *name = NULL, *ns = NULL; + xmlSchemaAttributeUsePtr use = NULL; xmlNodePtr child = NULL; - xmlAttrPtr attr, nameAttr; - int isRef = 0; + xmlAttrPtr attr; + const xmlChar *tmpNs = NULL, *tmpName = NULL, *defValue = NULL; + int isRef = 0, occurs = XML_SCHEMAS_ATTR_USE_OPTIONAL; + int nberrors, hasForm = 0, defValueType = 0; + +#define WXS_ATTR_DEF_VAL_DEFAULT 1 +#define WXS_ATTR_DEF_VAL_FIXED 2 /* - * Note that the w3c spec assumes the schema to be validated with schema - * for schemas beforehand. - * * 3.2.3 Constraints on XML Representations of Attribute Declarations */ - if ((ctxt == NULL) || (schema == NULL) || (node == NULL)) + if ((pctxt == NULL) || (schema == NULL) || (node == NULL)) return (NULL); attr = xmlSchemaGetPropNode(node, "ref"); - nameAttr = xmlSchemaGetPropNode(node, "name"); - - if ((attr == NULL) && (nameAttr == NULL)) { - /* - * 3.2.3 : 3.1 - * One of ref or name must be present, but not both - */ - xmlSchemaPMissingAttrErr(ctxt, XML_SCHEMAP_SRC_ATTRIBUTE_3_1, - NULL, node, NULL, - "One of the attributes 'ref' or 'name' must be present"); - return (NULL); - } - if ((topLevel) || (attr == NULL)) { - if (nameAttr == NULL) { - xmlSchemaPMissingAttrErr(ctxt, XML_SCHEMAP_S4S_ATTR_MISSING, - NULL, node, "name", NULL); + if (attr != NULL) { + if (xmlSchemaPValAttrNodeQName(pctxt, schema, + NULL, attr, &tmpNs, &tmpName) != 0) { return (NULL); } - } else + if (xmlSchemaCheckReference(pctxt, schema, node, attr, tmpNs) != 0) + return(NULL); isRef = 1; - - if (isRef) { -#ifdef ENABLE_NAMED_LOCALS - char buf[50]; -#endif - const xmlChar *refNs = NULL, *ref = NULL; - - /* - * Parse as attribute reference. - */ - if (xmlSchemaPValAttrNodeQName(ctxt, schema, - (xmlChar **) &xmlSchemaElemDesAttrRef, NULL, attr, &refNs, - &ref) != 0) { - return (NULL); - } -#ifdef ENABLE_NAMED_LOCALS - snprintf(buf, 49, "#aRef%d", ctxt->counter++ + 1); - name = (const xmlChar *) buf; - ret = xmlSchemaAddAttribute(ctxt, schema, name, NULL, node, 0); -#else - ret = xmlSchemaAddAttribute(ctxt, schema, NULL, NULL, node, 0); -#endif - - if (ret == NULL) { - if (repName != NULL) - xmlFree(repName); - return (NULL); - } - ret->type = XML_SCHEMA_TYPE_ATTRIBUTE; - ret->node = node; - ret->refNs = refNs; - ret->ref = ref; - xmlSchemaCheckReference(ctxt, schema, node, (xmlSchemaBasicItemPtr) ret, - refNs); - /* - xmlSchemaFormatTypeRep(&repName, (xmlSchemaTypePtr) ret, NULL, NULL); - */ - if (nameAttr != NULL) - xmlSchemaPMutualExclAttrErr(ctxt, XML_SCHEMAP_SRC_ATTRIBUTE_3_1, - &repName, (xmlSchemaTypePtr) ret, nameAttr, - "ref", "name"); - /* - * Check for illegal attributes. - */ - attr = node->properties; - while (attr != NULL) { - if (attr->ns == NULL) { - if (xmlStrEqual(attr->name, BAD_CAST "type") || - xmlStrEqual(attr->name, BAD_CAST "form")) { + } + nberrors = pctxt->nberrors; + /* + * Check for illegal attributes. + */ + attr = node->properties; + while (attr != NULL) { + if (attr->ns == NULL) { + if (isRef) { + if (xmlStrEqual(attr->name, BAD_CAST "id")) { + xmlSchemaPValAttrNodeID(pctxt, attr); + goto attr_next; + } else if (xmlStrEqual(attr->name, BAD_CAST "ref")) { + goto attr_next; + } + } else { + if (xmlStrEqual(attr->name, BAD_CAST "name")) { + goto attr_next; + } else if (xmlStrEqual(attr->name, BAD_CAST "id")) { + xmlSchemaPValAttrNodeID(pctxt, attr); + goto attr_next; + } else if (xmlStrEqual(attr->name, BAD_CAST "type")) { + xmlSchemaPValAttrNodeQName(pctxt, schema, NULL, + attr, &tmpNs, &tmpName); + goto attr_next; + } else if (xmlStrEqual(attr->name, BAD_CAST "form")) { /* - * 3.2.3 : 3.2 - * If ref is present, then all of , - * form and type must be absent. + * Evaluate the target namespace */ - xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_SRC_ATTRIBUTE_3_2, &repName, - (xmlSchemaTypePtr) ret, attr); - } else if ((!xmlStrEqual(attr->name, BAD_CAST "ref")) && - (!xmlStrEqual(attr->name, BAD_CAST "use")) && - (!xmlStrEqual(attr->name, BAD_CAST "id")) && - (!xmlStrEqual(attr->name, BAD_CAST "name")) && - (!xmlStrEqual(attr->name, BAD_CAST "fixed")) && - (!xmlStrEqual(attr->name, BAD_CAST "default"))) { - xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - &repName, (xmlSchemaTypePtr) ret, attr); + hasForm = 1; + attrValue = xmlSchemaGetNodeContent(pctxt, + (xmlNodePtr) attr); + if (xmlStrEqual(attrValue, BAD_CAST "qualified")) { + ns = pctxt->targetNamespace; + } else if (!xmlStrEqual(attrValue, BAD_CAST "unqualified")) + { + xmlSchemaPSimpleTypeErr(pctxt, + XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, + NULL, (xmlNodePtr) attr, + NULL, "(qualified | unqualified)", + attrValue, NULL, NULL, NULL); + } + goto attr_next; } - } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { - xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - &repName, (xmlSchemaTypePtr) ret, attr); } - attr = attr->next; - } - } else { - const xmlChar *ns = NULL; + if (xmlStrEqual(attr->name, BAD_CAST "use")) { + + attrValue = xmlSchemaGetNodeContent(pctxt, (xmlNodePtr) attr); + /* TODO: Maybe we need to normalize the value beforehand. */ + if (xmlStrEqual(attrValue, BAD_CAST "optional")) + occurs = XML_SCHEMAS_ATTR_USE_OPTIONAL; + else if (xmlStrEqual(attrValue, BAD_CAST "prohibited")) + occurs = XML_SCHEMAS_ATTR_USE_PROHIBITED; + else if (xmlStrEqual(attrValue, BAD_CAST "required")) + occurs = XML_SCHEMAS_ATTR_USE_REQUIRED; + else { + xmlSchemaPSimpleTypeErr(pctxt, + XML_SCHEMAP_INVALID_ATTR_USE, + NULL, (xmlNodePtr) attr, + NULL, "(optional | prohibited | required)", + attrValue, NULL, NULL, NULL); + } + goto attr_next; + } else if (xmlStrEqual(attr->name, BAD_CAST "default")) { + /* + * 3.2.3 : 1 + * default and fixed must not both be present. + */ + if (defValue) { + xmlSchemaPMutualExclAttrErr(pctxt, + XML_SCHEMAP_SRC_ATTRIBUTE_1, + NULL, attr, "default", "fixed"); + } else { + defValue = xmlSchemaGetNodeContent(pctxt, (xmlNodePtr) attr); + defValueType = WXS_ATTR_DEF_VAL_DEFAULT; + } + goto attr_next; + } else if (xmlStrEqual(attr->name, BAD_CAST "fixed")) { + /* + * 3.2.3 : 1 + * default and fixed must not both be present. + */ + if (defValue) { + xmlSchemaPMutualExclAttrErr(pctxt, + XML_SCHEMAP_SRC_ATTRIBUTE_1, + NULL, attr, "default", "fixed"); + } else { + defValue = xmlSchemaGetNodeContent(pctxt, (xmlNodePtr) attr); + defValueType = WXS_ATTR_DEF_VAL_FIXED; + } + goto attr_next; + } + } else if (! xmlStrEqual(attr->ns->href, xmlSchemaNs)) + goto attr_next; + + xmlSchemaPIllegalAttrErr(pctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); + +attr_next: + attr = attr->next; + } + /* + * 3.2.3 : 2 + * If default and use are both present, use must have + * the actual value optional. + */ + if ((defValueType == WXS_ATTR_DEF_VAL_DEFAULT) && + (occurs != XML_SCHEMAS_ATTR_USE_OPTIONAL)) { + xmlSchemaPSimpleTypeErr(pctxt, + XML_SCHEMAP_SRC_ATTRIBUTE_2, + NULL, node, NULL, + "(optional | prohibited | required)", NULL, + "The value of the attribute 'use' must be 'optional' " + "if the attribute 'default' is present", + NULL, NULL); + } + /* + * We want correct attributes. + */ + if (nberrors != pctxt->nberrors) + return(NULL); + if (! isRef) { + xmlSchemaAttributePtr attrDecl; + /* TODO: move XML_SCHEMAS_QUALIF_ATTR to the parser. */ + if ((! hasForm) && (schema->flags & XML_SCHEMAS_QUALIF_ATTR)) + ns = pctxt->targetNamespace; /* - * Parse as attribute declaration. + * 3.2.6 Schema Component Constraint: xsi: Not Allowed + * TODO: Move this to the component layer. */ - if (xmlSchemaPValAttrNode(ctxt, - (xmlChar **) &xmlSchemaElemDesAttrDecl, NULL, nameAttr, + if (xmlStrEqual(ns, xmlSchemaInstanceNs)) { + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_NO_XSI, + node, NULL, + "The target namespace must not match '%s'", + xmlSchemaInstanceNs, NULL); + } + attr = xmlSchemaGetPropNode(node, "name"); + if (attr == NULL) { + xmlSchemaPMissingAttrErr(pctxt, XML_SCHEMAP_S4S_ATTR_MISSING, + NULL, node, "name", NULL); + return (NULL); + } + if (xmlSchemaPValAttrNode(pctxt, NULL, attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) { return (NULL); } /* - xmlSchemaFormatTypeRep(&repName, NULL, xmlSchemaElemDesAttrDecl, name); - */ - /* * 3.2.6 Schema Component Constraint: xmlns Not Allowed * TODO: Move this to the component layer. */ if (xmlStrEqual(name, BAD_CAST "xmlns")) { - xmlSchemaPSimpleTypeErr(ctxt, + xmlSchemaPSimpleTypeErr(pctxt, XML_SCHEMAP_NO_XMLNS, - NULL, (xmlNodePtr) nameAttr, + NULL, (xmlNodePtr) attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), NULL, NULL, - "The value of type 'xs:NCName' must not match 'xmlns'", + "The value of the attribute must not match 'xmlns'", NULL, NULL); - if (repName != NULL) - xmlFree(repName); return (NULL); } + if (occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) + goto check_children; /* - * Evaluate the target namespace + * Create the attribute use component. */ - if (topLevel) { - ns = ctxt->targetNamespace; - } else { - attr = xmlSchemaGetPropNode(node, "form"); - if (attr != NULL) { - attrValue = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr); - if (xmlStrEqual(attrValue, BAD_CAST "qualified")) { - ns = ctxt->targetNamespace; - } else if (!xmlStrEqual(attrValue, BAD_CAST "unqualified")) { - xmlSchemaPSimpleTypeErr(ctxt, - XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - NULL, (xmlNodePtr) attr, - NULL, "(qualified | unqualified)", - attrValue, NULL, NULL, NULL); - } - } else if (schema->flags & XML_SCHEMAS_QUALIF_ATTR) - /* TODO: move XML_SCHEMAS_QUALIF_ATTR to the parser. */ - ns = ctxt->targetNamespace; - } - ret = xmlSchemaAddAttribute(ctxt, schema, name, ns, node, topLevel); - if (ret == NULL) { - if (repName != NULL) - xmlFree(repName); + use = xmlSchemaAddAttributeUse(pctxt, node); + if (use == NULL) + return(NULL); + use->occurs = occurs; + /* + * Create the attribute declaration. + */ + attrDecl = xmlSchemaAddAttribute(pctxt, schema, name, ns, node, 0); + if (attrDecl == NULL) return (NULL); + if (tmpName != NULL) { + attrDecl->typeName = tmpName; + attrDecl->typeNs = tmpNs; } - ret->type = XML_SCHEMA_TYPE_ATTRIBUTE; - ret->node = node; - if (topLevel) - ret->flags |= XML_SCHEMAS_ATTR_GLOBAL; + use->attrDecl = attrDecl; /* - * 3.2.6 Schema Component Constraint: xsi: Not Allowed - * TODO: Move this to the component layer. - */ - if (xmlStrEqual(ret->targetNamespace, xmlSchemaInstanceNs)) { - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_NO_XSI, - &repName, (xmlSchemaTypePtr) ret, node, - "The target namespace must not match '%s'", - xmlSchemaInstanceNs); + * Value constraint. + */ + if (defValue != NULL) { + attrDecl->defValue = defValue; + if (defValueType == WXS_ATTR_DEF_VAL_FIXED) + attrDecl->flags |= XML_SCHEMAS_ATTR_FIXED; } + } else if (occurs != XML_SCHEMAS_ATTR_USE_PROHIBITED) { + xmlSchemaQNameRefPtr ref; + /* - * Check for illegal attributes. + * Create the attribute use component. */ - attr = node->properties; - while (attr != NULL) { - if (attr->ns == NULL) { - if ((!xmlStrEqual(attr->name, BAD_CAST "id")) && - (!xmlStrEqual(attr->name, BAD_CAST "default")) && - (!xmlStrEqual(attr->name, BAD_CAST "fixed")) && - (!xmlStrEqual(attr->name, BAD_CAST "name")) && - (!xmlStrEqual(attr->name, BAD_CAST "type"))) { - if ((topLevel) || - ((!xmlStrEqual(attr->name, BAD_CAST "form")) && - (!xmlStrEqual(attr->name, BAD_CAST "use")))) { - xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - &repName, (xmlSchemaTypePtr) ret, attr); - } - } - } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { - xmlSchemaPIllegalAttrErr(ctxt, XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - &repName, (xmlSchemaTypePtr) ret, attr); - } - attr = attr->next; - } - xmlSchemaPValAttrQName(ctxt, schema, &repName, (xmlSchemaTypePtr) ret, - node, "type", &ret->typeNs, &ret->typeName); - } - xmlSchemaPValAttrID(ctxt, NULL, (xmlSchemaTypePtr) ret, - node, BAD_CAST "id"); - /* - * Attribute "fixed". - */ - ret->defValue = xmlSchemaGetProp(ctxt, node, "fixed"); - if (ret->defValue != NULL) - ret->flags |= XML_SCHEMAS_ATTR_FIXED; - /* - * Attribute "default". - */ - attr = xmlSchemaGetPropNode(node, "default"); - if (attr != NULL) { + use = xmlSchemaAddAttributeUse(pctxt, node); + if (use == NULL) + return(NULL); /* - * 3.2.3 : 1 - * default and fixed must not both be present. + * We need to resolve the reference at later stage. */ - if (ret->flags & XML_SCHEMAS_ATTR_FIXED) { - xmlSchemaPMutualExclAttrErr(ctxt, XML_SCHEMAP_SRC_ATTRIBUTE_1, - &repName, (xmlSchemaTypePtr) ret, attr, "default", "fixed"); - } else - ret->defValue = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr); - } - if (topLevel == 0) { + WXS_ADD_PENDING(pctxt, use); + use->occurs = occurs; /* - * Attribute "use". + * Create a QName reference to the attribute declaration. */ - attr = xmlSchemaGetPropNode(node, "use"); - if (attr != NULL) { - attrValue = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr); - if (xmlStrEqual(attrValue, BAD_CAST "optional")) - ret->occurs = XML_SCHEMAS_ATTR_USE_OPTIONAL; - else if (xmlStrEqual(attrValue, BAD_CAST "prohibited")) - ret->occurs = XML_SCHEMAS_ATTR_USE_PROHIBITED; - else if (xmlStrEqual(attrValue, BAD_CAST "required")) - ret->occurs = XML_SCHEMAS_ATTR_USE_REQUIRED; - else - xmlSchemaPSimpleTypeErr(ctxt, - XML_SCHEMAP_INVALID_ATTR_USE, - (xmlSchemaTypePtr) ret, (xmlNodePtr) attr, - NULL, "(optional | prohibited | required)", - attrValue, NULL, NULL, NULL); - } else - ret->occurs = XML_SCHEMAS_ATTR_USE_OPTIONAL; + ref = xmlSchemaNewQNameRef(pctxt, XML_SCHEMA_TYPE_ATTRIBUTE, + tmpName, tmpNs); + if (ref == NULL) + return(NULL); /* - * 3.2.3 : 2 - * If default and use are both present, use must have - * the actual value optional. + * Assign the reference. This will be substituted for the + * referenced attribute declaration when the QName is resolved. */ - if ((ret->occurs != XML_SCHEMAS_ATTR_USE_OPTIONAL) && - (ret->defValue != NULL) && - ((ret->flags & XML_SCHEMAS_ATTR_FIXED) == 0)) { - xmlSchemaPSimpleTypeErr(ctxt, - XML_SCHEMAP_SRC_ATTRIBUTE_2, - (xmlSchemaTypePtr) ret, (xmlNodePtr) attr, - NULL, "(optional | prohibited | required)", NULL, - "The value must be 'optional' if the attribute " - "'default' is present as well", NULL, NULL); - } + use->attrDecl = WXS_ATTR_CAST ref; + /* + * Value constraint. + */ + if (defValue != NULL) + use->defValue = defValue; + if (defValueType == WXS_ATTR_DEF_VAL_FIXED) + use->flags |= XML_SCHEMA_ATTR_USE_FIXED; } + +check_children: /* * And now for the children... */ child = node->children; - if (IS_SCHEMA(child, "annotation")) { - ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child); - child = child->next; - } - if (isRef) { - if (child != NULL) { - if (IS_SCHEMA(child, "simpleType")) - /* - * 3.2.3 : 3.2 - * If ref is present, then all of , - * form and type must be absent. - */ - xmlSchemaPContentErr(ctxt, XML_SCHEMAP_SRC_ATTRIBUTE_3_2, - &repName, (xmlSchemaTypePtr) ret, node, child, NULL, - "(annotation?)"); - else - xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - &repName, (xmlSchemaTypePtr) ret, node, child, NULL, - "(annotation?)"); - } - } else { - if (IS_SCHEMA(child, "simpleType")) { - if (ret->typeName != NULL) { - /* - * 3.2.3 : 4 - * type and must not both be present. - */ - xmlSchemaPContentErr(ctxt, XML_SCHEMAP_SRC_ATTRIBUTE_4, - &repName, (xmlSchemaTypePtr) ret, node, child, - "The attribute 'type' and the child " - "are mutually exclusive", NULL); - } else - ret->subtypes = xmlSchemaParseSimpleType(ctxt, schema, child, 0); + if (occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) { + xmlSchemaAttributeUseProhibPtr prohib; + + if (IS_SCHEMA(child, "annotation")) { + xmlSchemaParseAnnotation(pctxt, schema, child, 0); child = child->next; } - if (child != NULL) - xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - &repName, (xmlSchemaTypePtr) ret, node, child, NULL, - "(annotation?, simpleType?)"); - } - /* - * Cleanup. - */ - if (repName != NULL) - xmlFree(repName); - return (ret); -} - -/** - * xmlSchemaParseAttributeGroup: - * @ctxt: a schema validation context - * @schema: the schema being built - * @node: a subtree containing XML Schema informations - * - * parse a XML schema Attribute Group declaration - * *WARNING* this interface is highly subject to change - * - * Returns the attribute group or NULL in case of error. - */ -static xmlSchemaAttributeGroupPtr -xmlSchemaParseAttributeGroup(xmlSchemaParserCtxtPtr ctxt, - xmlSchemaPtr schema, xmlNodePtr node, - int topLevel) -{ - const xmlChar *name; - xmlSchemaAttributeGroupPtr ret; - xmlNodePtr child = NULL; - xmlAttrPtr attr, nameAttr; - - if ((ctxt == NULL) || (schema == NULL) || (node == NULL)) - return (NULL); - - nameAttr = xmlSchemaGetPropNode(node, "name"); - attr = xmlSchemaGetPropNode(node, "ref"); - if ((topLevel) || (attr == NULL)) { + if (child != NULL) { + xmlSchemaPContentErr(pctxt, + XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, + NULL, node, child, NULL, + "(annotation?)"); + } /* - * Parse as an attribute group definition. - * Note that those are allowed at top level only. + * Check for pointlessness of attribute prohibitions. */ - if (nameAttr == NULL) { - xmlSchemaPMissingAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_MISSING, - NULL, node, "name", NULL); - return (NULL); + if (parentType == XML_SCHEMA_TYPE_ATTRIBUTEGROUP) { + xmlSchemaCustomWarning(ACTXT_CAST pctxt, + XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, + node, NULL, + "Skipping attribute use prohibition, since it is " + "pointless inside an ", + NULL, NULL, NULL); + return(NULL); + } else if (parentType == XML_SCHEMA_TYPE_EXTENSION) { + xmlSchemaCustomWarning(ACTXT_CAST pctxt, + XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, + node, NULL, + "Skipping attribute use prohibition, since it is " + "pointless when extending a type", + NULL, NULL, NULL); + return(NULL); + } + if (! isRef) { + tmpName = name; + tmpNs = ns; } - /* REDUNDANT: name = xmlSchemaGetNodeContent(ctxt, - * (xmlNodePtr) nameAttr); - */ /* - * The name is crucial, exit if invalid. + * Check for duplicate attribute prohibitions. */ - if (xmlSchemaPValAttrNode(ctxt, - NULL, NULL, nameAttr, - xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) { - return (NULL); + if (uses) { + int i; + + for (i = 0; i < uses->nbItems; i++) { + use = uses->items[i]; + if ((use->type == XML_SCHEMA_EXTRA_ATTR_USE_PROHIB) && + (tmpName == (WXS_ATTR_PROHIB_CAST use)->name) && + (tmpNs == (WXS_ATTR_PROHIB_CAST use)->targetNamespace)) + { + xmlChar *str = NULL; + + xmlSchemaCustomWarning(ACTXT_CAST pctxt, + XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, + node, NULL, + "Skipping duplicate attribute use prohibition '%s'", + xmlSchemaFormatQName(&str, tmpNs, tmpName), + NULL, NULL); + FREE_AND_NULL(str) + return(NULL); + } + } } - ret = xmlSchemaAddAttributeGroup(ctxt, schema, name, node, 1); - if (ret == NULL) - return (NULL); - } else { -#ifdef ENABLE_NAMED_LOCALS - char buf[50]; -#endif - const xmlChar *refNs = NULL, *ref = NULL; - /* - * Parse as an attribute group definition reference. + * Create the attribute prohibition helper component. */ - if (attr == NULL) { - xmlSchemaPMissingAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_MISSING, - NULL, node, "ref", NULL); + prohib = xmlSchemaAddAttributeUseProhib(pctxt); + if (prohib == NULL) + return(NULL); + prohib->node = node; + prohib->name = tmpName; + prohib->targetNamespace = tmpNs; + if (isRef) { + /* + * We need at least to resolve to the attribute declaration. + */ + WXS_ADD_PENDING(pctxt, prohib); } - xmlSchemaPValAttrNodeQName(ctxt, schema, - NULL, NULL, attr, &refNs,&ref); -#ifdef ENABLE_NAMED_LOCALS - snprintf(buf, 49, "#agRef%d", ctxt->counter++ + 1); - name = (const xmlChar *) buf; - if (name == NULL) { - xmlSchemaPErrMemory(ctxt, "creating internal name for an " - "attribute group definition reference", node); - return (NULL); - } - ret = xmlSchemaAddAttributeGroup(ctxt, schema, name, node, 0); -#else - ret = xmlSchemaAddAttributeGroup(ctxt, schema, NULL, node, 0); -#endif - if (ret == NULL) - return (NULL); - ret->ref = ref; - ret->refNs = refNs; - xmlSchemaCheckReference(ctxt, schema, node, - (xmlSchemaBasicItemPtr) ret, refNs); + return(WXS_BASIC_CAST prohib); + } else { + if (IS_SCHEMA(child, "annotation")) { + /* + * TODO: Should this go into the attr decl? + */ + use->annot = xmlSchemaParseAnnotation(pctxt, schema, child, 1); + child = child->next; + } + if (isRef) { + if (child != NULL) { + if (IS_SCHEMA(child, "simpleType")) + /* + * 3.2.3 : 3.2 + * If ref is present, then all of , + * form and type must be absent. + */ + xmlSchemaPContentErr(pctxt, + XML_SCHEMAP_SRC_ATTRIBUTE_3_2, + NULL, node, child, NULL, + "(annotation?)"); + else + xmlSchemaPContentErr(pctxt, + XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, + NULL, node, child, NULL, + "(annotation?)"); + } + } else { + if (IS_SCHEMA(child, "simpleType")) { + if (WXS_ATTRUSE_DECL(use)->typeName != NULL) { + /* + * 3.2.3 : 4 + * type and must not both be present. + */ + xmlSchemaPContentErr(pctxt, XML_SCHEMAP_SRC_ATTRIBUTE_4, + NULL, node, child, + "The attribute 'type' and the child " + "are mutually exclusive", NULL); + } else + WXS_ATTRUSE_TYPEDEF(use) = + xmlSchemaParseSimpleType(pctxt, schema, child, 0); + child = child->next; + } + if (child != NULL) + xmlSchemaPContentErr(pctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, + NULL, node, child, NULL, + "(annotation?, simpleType?)"); + } + } + return (WXS_BASIC_CAST use); +} + + +static xmlSchemaAttributePtr +xmlSchemaParseGlobalAttribute(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaPtr schema, + xmlNodePtr node) +{ + const xmlChar *attrValue; + xmlSchemaAttributePtr ret; + xmlNodePtr child = NULL; + xmlAttrPtr attr; + + /* + * Note that the w3c spec assumes the schema to be validated with schema + * for schemas beforehand. + * + * 3.2.3 Constraints on XML Representations of Attribute Declarations + */ + if ((pctxt == NULL) || (schema == NULL) || (node == NULL)) + return (NULL); + /* + * 3.2.3 : 3.1 + * One of ref or name must be present, but not both + */ + attr = xmlSchemaGetPropNode(node, "name"); + if (attr == NULL) { + xmlSchemaPMissingAttrErr(pctxt, XML_SCHEMAP_S4S_ATTR_MISSING, + NULL, node, "name", NULL); + return (NULL); + } + if (xmlSchemaPValAttrNode(pctxt, NULL, attr, + xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &attrValue) != 0) { + return (NULL); + } + /* + * 3.2.6 Schema Component Constraint: xmlns Not Allowed + * TODO: Move this to the component layer. + */ + if (xmlStrEqual(attrValue, BAD_CAST "xmlns")) { + xmlSchemaPSimpleTypeErr(pctxt, + XML_SCHEMAP_NO_XMLNS, + NULL, (xmlNodePtr) attr, + xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), NULL, NULL, + "The value of the attribute must not match 'xmlns'", + NULL, NULL); + return (NULL); + } + /* + * 3.2.6 Schema Component Constraint: xsi: Not Allowed + * TODO: Move this to the component layer. + * Or better leave it here and add it to the component layer + * if we have a schema construction API. + */ + if (xmlStrEqual(pctxt->targetNamespace, xmlSchemaInstanceNs)) { + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_NO_XSI, node, NULL, + "The target namespace must not match '%s'", + xmlSchemaInstanceNs, NULL); + } + + ret = xmlSchemaAddAttribute(pctxt, schema, attrValue, + pctxt->targetNamespace, node, 1); + if (ret == NULL) + return (NULL); + ret->flags |= XML_SCHEMAS_ATTR_GLOBAL; + + /* + * Check for illegal attributes. + */ + attr = node->properties; + while (attr != NULL) { + if (attr->ns == NULL) { + if ((!xmlStrEqual(attr->name, BAD_CAST "id")) && + (!xmlStrEqual(attr->name, BAD_CAST "default")) && + (!xmlStrEqual(attr->name, BAD_CAST "fixed")) && + (!xmlStrEqual(attr->name, BAD_CAST "name")) && + (!xmlStrEqual(attr->name, BAD_CAST "type"))) + { + xmlSchemaPIllegalAttrErr(pctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); + } + } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { + xmlSchemaPIllegalAttrErr(pctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); + } + attr = attr->next; + } + xmlSchemaPValAttrQName(pctxt, schema, NULL, + node, "type", &ret->typeNs, &ret->typeName); + + xmlSchemaPValAttrID(pctxt, node, BAD_CAST "id"); + /* + * Attribute "fixed". + */ + ret->defValue = xmlSchemaGetProp(pctxt, node, "fixed"); + if (ret->defValue != NULL) + ret->flags |= XML_SCHEMAS_ATTR_FIXED; + /* + * Attribute "default". + */ + attr = xmlSchemaGetPropNode(node, "default"); + if (attr != NULL) { + /* + * 3.2.3 : 1 + * default and fixed must not both be present. + */ + if (ret->flags & XML_SCHEMAS_ATTR_FIXED) { + xmlSchemaPMutualExclAttrErr(pctxt, XML_SCHEMAP_SRC_ATTRIBUTE_1, + WXS_BASIC_CAST ret, attr, "default", "fixed"); + } else + ret->defValue = xmlSchemaGetNodeContent(pctxt, (xmlNodePtr) attr); + } + /* + * And now for the children... + */ + child = node->children; + if (IS_SCHEMA(child, "annotation")) { + ret->annot = xmlSchemaParseAnnotation(pctxt, schema, child, 1); + child = child->next; + } + if (IS_SCHEMA(child, "simpleType")) { + if (ret->typeName != NULL) { + /* + * 3.2.3 : 4 + * type and must not both be present. + */ + xmlSchemaPContentErr(pctxt, XML_SCHEMAP_SRC_ATTRIBUTE_4, + NULL, node, child, + "The attribute 'type' and the child " + "are mutually exclusive", NULL); + } else + ret->subtypes = xmlSchemaParseSimpleType(pctxt, schema, child, 0); + child = child->next; } + if (child != NULL) + xmlSchemaPContentErr(pctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, + NULL, node, child, NULL, + "(annotation?, simpleType?)"); + + return (ret); +} + +/** + * xmlSchemaParseAttributeGroupRef: + * @ctxt: a schema validation context + * @schema: the schema being built + * @node: a subtree containing XML Schema informations + * + * Parse an attribute group definition reference. + * Note that a reference to an attribute group does not + * correspond to any component at all. + * *WARNING* this interface is highly subject to change + * + * Returns the attribute group or NULL in case of error. + */ +static xmlSchemaQNameRefPtr +xmlSchemaParseAttributeGroupRef(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaPtr schema, + xmlNodePtr node) +{ + xmlSchemaQNameRefPtr ret; + xmlNodePtr child = NULL; + xmlAttrPtr attr; + const xmlChar *refNs = NULL, *ref = NULL; + + if ((pctxt == NULL) || (schema == NULL) || (node == NULL)) + return (NULL); + + attr = xmlSchemaGetPropNode(node, "ref"); + if (attr == NULL) { + xmlSchemaPMissingAttrErr(pctxt, + XML_SCHEMAP_S4S_ATTR_MISSING, + NULL, node, "ref", NULL); + return (NULL); + } + xmlSchemaPValAttrNodeQName(pctxt, schema, + NULL, attr, &refNs, &ref); + if (xmlSchemaCheckReference(pctxt, schema, node, attr, refNs) != 0) + return(NULL); + /* * Check for illegal attributes. */ attr = node->properties; while (attr != NULL) { if (attr->ns == NULL) { - if ((((topLevel == 0) && - (!xmlStrEqual(attr->name, BAD_CAST "ref"))) || - (topLevel && (!xmlStrEqual(attr->name, BAD_CAST "name")))) && + if ((!xmlStrEqual(attr->name, BAD_CAST "ref")) && (!xmlStrEqual(attr->name, BAD_CAST "id"))) { - xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + xmlSchemaPIllegalAttrErr(pctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { - xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + xmlSchemaPIllegalAttrErr(pctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } /* Attribute ID */ - xmlSchemaPValAttrID(ctxt, NULL, (xmlSchemaTypePtr) ret, - node, BAD_CAST "id"); + xmlSchemaPValAttrID(pctxt, node, BAD_CAST "id"); + /* * And now for the children... */ child = node->children; if (IS_SCHEMA(child, "annotation")) { - ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + /* + * TODO: We do not have a place to store the annotation, do we? + */ + xmlSchemaParseAnnotation(pctxt, schema, child, 0); child = child->next; } - if (topLevel) { - child = xmlSchemaParseAttrDecls(ctxt, schema, child, - (xmlSchemaTypePtr) ret); - if (IS_SCHEMA(child, "anyAttribute")) { - ret->attributeWildcard = xmlSchemaParseAnyAttribute(ctxt, - schema, child); - child = child->next; + if (child != NULL) { + xmlSchemaPContentErr(pctxt, + XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, + NULL, node, child, NULL, + "(annotation?)"); + } + + /* + * Handle attribute group redefinitions. + */ + if (pctxt->isRedefine && pctxt->redef && + (pctxt->redef->item->type == + XML_SCHEMA_TYPE_ATTRIBUTEGROUP) && + (ref == pctxt->redef->refName) && + (refNs == pctxt->redef->refTargetNs)) + { + /* + * SPEC src-redefine: + * (7.1) "If it has an among its contents + * the ·actual value· of whose ref [attribute] is the same + * as the ·actual value· of its own name attribute plus + * target namespace, then it must have exactly one such group." + */ + if (pctxt->redefCounter != 0) { + xmlChar *str = NULL; + + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_SRC_REDEFINE, node, NULL, + "The redefining attribute group definition " + "'%s' must not contain more than one " + "reference to the redefined definition", + xmlSchemaFormatQName(&str, refNs, ref), NULL); + FREE_AND_NULL(str); + return(NULL); + } + pctxt->redefCounter++; + /* + * URGENT TODO: How to ensure that the reference will not be + * handled by the normal component resolution mechanism? + */ + ret = xmlSchemaNewQNameRef(pctxt, + XML_SCHEMA_TYPE_ATTRIBUTEGROUP, ref, refNs); + if (ret == NULL) + return(NULL); + ret->node = node; + pctxt->redef->reference = WXS_BASIC_CAST ret; + } else { + /* + * Create a QName-reference helper component. We will substitute this + * component for the attribute uses of the referenced attribute group + * definition. + */ + ret = xmlSchemaNewQNameRef(pctxt, + XML_SCHEMA_TYPE_ATTRIBUTEGROUP, ref, refNs); + if (ret == NULL) + return(NULL); + ret->node = node; + /* Add to pending items, to be able to resolve the reference. */ + WXS_ADD_PENDING(pctxt, ret); + } + return (ret); +} + +/** + * xmlSchemaParseAttributeGroupDefinition: + * @pctxt: a schema validation context + * @schema: the schema being built + * @node: a subtree containing XML Schema informations + * + * parse a XML schema Attribute Group declaration + * *WARNING* this interface is highly subject to change + * + * Returns the attribute group definition or NULL in case of error. + */ +static xmlSchemaAttributeGroupPtr +xmlSchemaParseAttributeGroupDefinition(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaPtr schema, + xmlNodePtr node) +{ + const xmlChar *name; + xmlSchemaAttributeGroupPtr ret; + xmlNodePtr child = NULL; + xmlAttrPtr attr; + int hasRefs = 0; + + if ((pctxt == NULL) || (schema == NULL) || (node == NULL)) + return (NULL); + + attr = xmlSchemaGetPropNode(node, "name"); + if (attr == NULL) { + xmlSchemaPMissingAttrErr(pctxt, + XML_SCHEMAP_S4S_ATTR_MISSING, + NULL, node, "name", NULL); + return (NULL); + } + /* + * The name is crucial, exit if invalid. + */ + if (xmlSchemaPValAttrNode(pctxt, + NULL, attr, + xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) { + return (NULL); + } + ret = xmlSchemaAddAttributeGroupDefinition(pctxt, schema, + name, pctxt->targetNamespace, node); + if (ret == NULL) + return (NULL); + /* + * Check for illegal attributes. + */ + attr = node->properties; + while (attr != NULL) { + if (attr->ns == NULL) { + if ((!xmlStrEqual(attr->name, BAD_CAST "name")) && + (!xmlStrEqual(attr->name, BAD_CAST "id"))) + { + xmlSchemaPIllegalAttrErr(pctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); + } + } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { + xmlSchemaPIllegalAttrErr(pctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } + attr = attr->next; + } + /* Attribute ID */ + xmlSchemaPValAttrID(pctxt, node, BAD_CAST "id"); + /* + * And now for the children... + */ + child = node->children; + if (IS_SCHEMA(child, "annotation")) { + ret->annot = xmlSchemaParseAnnotation(pctxt, schema, child, 1); + child = child->next; + } + /* + * Parse contained attribute decls/refs. + */ + if (xmlSchemaParseLocalAttributes(pctxt, schema, &child, + (xmlSchemaItemListPtr *) &(ret->attrUses), + XML_SCHEMA_TYPE_ATTRIBUTEGROUP, &hasRefs) == -1) + return(NULL); + if (hasRefs) + ret->flags |= XML_SCHEMAS_ATTRGROUP_HAS_REFS; + /* + * Parse the attribute wildcard. + */ + if (IS_SCHEMA(child, "anyAttribute")) { + ret->attributeWildcard = xmlSchemaParseAnyAttribute(pctxt, + schema, child); + child = child->next; } if (child != NULL) { - xmlSchemaPContentErr(ctxt, + xmlSchemaPContentErr(pctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, - "(annotation?)"); + NULL, node, child, NULL, + "(annotation?, ((attribute | attributeGroup)*, anyAttribute?))"); } return (ret); } @@ -7139,7 +7966,7 @@ xmlSchemaCheckCSelectorXPath(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPCustomErr(ctxt, /* TODO: Adjust error code. */ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - NULL, NULL, node, + NULL, node, "The XPath expression of the selector is not valid", NULL); return (XML_SCHEMAP_S4S_ATTR_INVALID_VALUE); } else { @@ -7159,7 +7986,6 @@ xmlSchemaCheckCSelectorXPath(xmlSchemaParserCtxtPtr ctxt, */ if (nsList != NULL) { int i, count = 0; - xmlNsPtr ns; for (i = 0; nsList[i] != NULL; i++) count++; @@ -7169,10 +7995,10 @@ xmlSchemaCheckCSelectorXPath(xmlSchemaParserCtxtPtr ctxt, if (nsArray == NULL) { xmlSchemaPErrMemory(ctxt, "allocating a namespace array", NULL); + xmlFree(nsList); return (-1); } for (i = 0; i < count; i++) { - ns = nsList[i]; nsArray[2 * i] = nsList[i]->href; nsArray[2 * i + 1] = nsList[i]->prefix; } @@ -7195,7 +8021,7 @@ xmlSchemaCheckCSelectorXPath(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPCustomErr(ctxt, /* TODO: Adjust error code? */ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - NULL, NULL, node, + NULL, node, "The XPath expression '%s' could not be " "compiled", selector->xpath); return (XML_SCHEMAP_S4S_ATTR_INVALID_VALUE); @@ -7304,7 +8130,7 @@ xmlSchemaAddAnnotation(xmlSchemaAnnotItemPtr annItem, default: xmlSchemaPCustomErr(NULL, XML_SCHEMAP_INTERNAL, - NULL, NULL, NULL, + NULL, NULL, "Internal error: xmlSchemaAddAnnotation, " "The item is not a annotated schema component", NULL); break; @@ -7343,13 +8169,11 @@ xmlSchemaParseIDCSelectorAndField(xmlSchemaParserCtxtPtr ctxt, if ((!xmlStrEqual(attr->name, BAD_CAST "id")) && (!xmlStrEqual(attr->name, BAD_CAST "xpath"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } @@ -7390,7 +8214,7 @@ xmlSchemaParseIDCSelectorAndField(xmlSchemaParserCtxtPtr ctxt, } } - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * And now for the children... */ @@ -7400,13 +8224,13 @@ xmlSchemaParseIDCSelectorAndField(xmlSchemaParserCtxtPtr ctxt, * Add the annotation to the parent IDC. */ xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) idc, - xmlSchemaParseAnnotation(ctxt, schema, child)); + xmlSchemaParseAnnotation(ctxt, schema, child, 1)); child = child->next; } if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, + NULL, node, child, NULL, "(annotation?)"); } @@ -7447,13 +8271,11 @@ xmlSchemaParseIDC(xmlSchemaParserCtxtPtr ctxt, ((idcCategory != XML_SCHEMA_TYPE_IDC_KEYREF) || (!xmlStrEqual(attr->name, BAD_CAST "refer")))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } @@ -7468,7 +8290,7 @@ xmlSchemaParseIDC(xmlSchemaParserCtxtPtr ctxt, "name", NULL); return (NULL); } else if (xmlSchemaPValAttrNode(ctxt, - NULL, NULL, attr, + NULL, attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) { return (NULL); } @@ -7478,8 +8300,7 @@ xmlSchemaParseIDC(xmlSchemaParserCtxtPtr ctxt, if (item == NULL) return(NULL); - xmlSchemaPValAttrID(ctxt, NULL, (xmlSchemaTypePtr) item, - node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); if (idcCategory == XML_SCHEMA_TYPE_IDC_KEYREF) { /* * Attribute "refer" (mandatory). @@ -7499,11 +8320,10 @@ xmlSchemaParseIDC(xmlSchemaParserCtxtPtr ctxt, if (item->ref == NULL) return (NULL); xmlSchemaPValAttrNodeQName(ctxt, schema, - NULL, NULL, attr, + NULL, attr, &(item->ref->targetNamespace), &(item->ref->name)); - xmlSchemaCheckReference(ctxt, schema, node, - (xmlSchemaBasicItemPtr) item, + xmlSchemaCheckReference(ctxt, schema, node, attr, item->ref->targetNamespace); } } @@ -7512,13 +8332,13 @@ xmlSchemaParseIDC(xmlSchemaParserCtxtPtr ctxt, */ child = node->children; if (IS_SCHEMA(child, "annotation")) { - item->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + item->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } if (child == NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_MISSING, - NULL, NULL, node, child, + NULL, node, child, "A child element is missing", "(annotation?, (selector, field+))"); } @@ -7550,14 +8370,14 @@ xmlSchemaParseIDC(xmlSchemaParserCtxtPtr ctxt, } else { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, + NULL, node, child, NULL, "(annotation?, (selector, field+))"); } } if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, + NULL, node, child, NULL, "(annotation?, (selector, field+))"); } @@ -7579,7 +8399,7 @@ xmlSchemaParseIDC(xmlSchemaParserCtxtPtr ctxt, */ static xmlSchemaBasicItemPtr xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, - xmlNodePtr node, int topLevel) + xmlNodePtr node, int *isElemRef, int topLevel) { xmlSchemaElementPtr decl = NULL; xmlSchemaParticlePtr particle = NULL; @@ -7594,6 +8414,9 @@ xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if ((ctxt == NULL) || (schema == NULL) || (node == NULL)) return (NULL); + + if (isElemRef != NULL) + *isElemRef = 0; /* * If we get a "ref" attribute on a local we will assume it's * a reference - even if there's a "name" attribute; this seems to be more @@ -7611,10 +8434,10 @@ xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } else isRef = 1; - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); child = node->children; if (IS_SCHEMA(child, "annotation")) { - annot = xmlSchemaParseAnnotation(ctxt, schema, child); + annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } /* @@ -7640,16 +8463,18 @@ xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * The reference part ============================================= */ + if (isElemRef != NULL) + *isElemRef = 1; + xmlSchemaPValAttrNodeQName(ctxt, schema, - NULL, NULL, attr, &refNs, &ref); - xmlSchemaCheckReference(ctxt, schema, node, NULL, refNs); + NULL, attr, &refNs, &ref); + xmlSchemaCheckReference(ctxt, schema, node, attr, refNs); /* * SPEC (3.3.3 : 2.1) "One of ref or name must be present, but not both" */ if (nameAttr != NULL) { xmlSchemaPMutualExclAttrErr(ctxt, - XML_SCHEMAP_SRC_ELEMENT_2_1, - NULL, NULL, nameAttr, "ref", "name"); + XML_SCHEMAP_SRC_ELEMENT_2_1, NULL, nameAttr, "ref", "name"); } /* * Check for illegal attributes. @@ -7676,8 +8501,7 @@ xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } @@ -7686,12 +8510,12 @@ xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, "(annotation?)"); + NULL, node, child, NULL, "(annotation?)"); } if ((min == 0) && (max == 0)) goto return_null; /* - * Create the reference item. + * Create the reference item and attach it to the particle. */ refer = xmlSchemaNewQNameRef(ctxt, XML_SCHEMA_TYPE_ELEMENT, ref, refNs); @@ -7703,7 +8527,7 @@ xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * Add the particle to pending components, since the reference * need to be resolved. */ - WXS_ADD_PENDING_ITEM(ctxt, particle); + WXS_ADD_PENDING(ctxt, particle); return ((xmlSchemaBasicItemPtr) particle); } /* @@ -7714,7 +8538,7 @@ declaration_part: const xmlChar *ns = NULL, *fixed, *name, *attrValue; xmlSchemaIDCPtr curIDC = NULL, lastIDC = NULL; - if (xmlSchemaPValAttrNode(ctxt, NULL, NULL, nameAttr, + if (xmlSchemaPValAttrNode(ctxt, NULL, nameAttr, xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) goto return_null; /* @@ -7738,13 +8562,10 @@ declaration_part: } else if (schema->flags & XML_SCHEMAS_QUALIF_ELEM) ns = ctxt->targetNamespace; } - decl = xmlSchemaAddElement(ctxt, schema, name, ns, node, topLevel); + decl = xmlSchemaAddElement(ctxt, name, ns, node, topLevel); if (decl == NULL) { goto return_null; } - decl->type = XML_SCHEMA_TYPE_ELEMENT; - decl->node = node; - decl->targetNamespace = ns; /* * Check for illegal attributes. */ @@ -7765,23 +8586,20 @@ declaration_part: (!xmlStrEqual(attr->name, BAD_CAST "form"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, (xmlSchemaTypePtr) decl, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if ((!xmlStrEqual(attr->name, BAD_CAST "final")) && (!xmlStrEqual(attr->name, BAD_CAST "abstract")) && (!xmlStrEqual(attr->name, BAD_CAST "substitutionGroup"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, (xmlSchemaTypePtr) decl, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, (xmlSchemaTypePtr) decl, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } @@ -7794,11 +8612,10 @@ declaration_part: */ decl->flags |= XML_SCHEMAS_ELEM_GLOBAL; decl->flags |= XML_SCHEMAS_ELEM_TOPLEVEL; - xmlSchemaPValAttrQName(ctxt, schema, NULL, - (xmlSchemaTypePtr) decl, node, "substitutionGroup", + xmlSchemaPValAttrQName(ctxt, schema, + NULL, node, "substitutionGroup", &(decl->substGroupNs), &(decl->substGroup)); - if (xmlGetBooleanProp(ctxt, NULL, (xmlSchemaTypePtr) decl, - node, "abstract", 0)) + if (xmlGetBooleanProp(ctxt, node, "abstract", 0)) decl->flags |= XML_SCHEMAS_ELEM_ABSTRACT; /* * Attribute "final". @@ -7817,7 +8634,7 @@ declaration_part: XML_SCHEMAS_ELEM_FINAL_RESTRICTION, -1, -1, -1) != 0) { xmlSchemaPSimpleTypeErr(ctxt, XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - (xmlSchemaTypePtr) decl, (xmlNodePtr) attr, + NULL, (xmlNodePtr) attr, NULL, "(#all | List of (extension | restriction))", attrValue, NULL, NULL, NULL); } @@ -7846,23 +8663,22 @@ declaration_part: XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION, -1, -1) != 0) { xmlSchemaPSimpleTypeErr(ctxt, XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - (xmlSchemaTypePtr) decl, (xmlNodePtr) attr, + NULL, (xmlNodePtr) attr, NULL, "(#all | List of (extension | " "restriction | substitution))", attrValue, NULL, NULL, NULL); } } - if (xmlGetBooleanProp(ctxt, NULL, (xmlSchemaTypePtr) decl, - node, "nillable", 0)) + if (xmlGetBooleanProp(ctxt, node, "nillable", 0)) decl->flags |= XML_SCHEMAS_ELEM_NILLABLE; attr = xmlSchemaGetPropNode(node, "type"); if (attr != NULL) { xmlSchemaPValAttrNodeQName(ctxt, schema, - NULL, (xmlSchemaTypePtr) decl, attr, + NULL, attr, &(decl->namedTypeNs), &(decl->namedType)); xmlSchemaCheckReference(ctxt, schema, node, - (xmlSchemaBasicItemPtr) decl, decl->namedTypeNs); + attr, decl->namedTypeNs); } decl->value = xmlSchemaGetProp(ctxt, node, "default"); attr = xmlSchemaGetPropNode(node, "fixed"); @@ -7875,8 +8691,7 @@ declaration_part: */ xmlSchemaPMutualExclAttrErr(ctxt, XML_SCHEMAP_SRC_ELEMENT_1, - NULL, (xmlSchemaTypePtr) decl, attr, - "default", "fixed"); + NULL, attr, "default", "fixed"); } else { decl->flags |= XML_SCHEMAS_ELEM_FIXED; decl->value = fixed; @@ -7894,11 +8709,11 @@ declaration_part: if (decl->namedType != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_SRC_ELEMENT_3, - NULL, (xmlSchemaTypePtr) decl, node, child, + NULL, node, child, "The attribute 'type' and the child are " "mutually exclusive", NULL); } else - ELEM_TYPE(decl) = xmlSchemaParseComplexType(ctxt, schema, child, 0); + WXS_ELEM_TYPEDEF(decl) = xmlSchemaParseComplexType(ctxt, schema, child, 0); child = child->next; } else if (IS_SCHEMA(child, "simpleType")) { /* @@ -7909,11 +8724,11 @@ declaration_part: if (decl->namedType != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_SRC_ELEMENT_3, - NULL, (xmlSchemaTypePtr) decl, node, child, + NULL, node, child, "The attribute 'type' and the child are " "mutually exclusive", NULL); } else - ELEM_TYPE(decl) = xmlSchemaParseSimpleType(ctxt, schema, child, 0); + WXS_ELEM_TYPEDEF(decl) = xmlSchemaParseSimpleType(ctxt, schema, child, 0); child = child->next; } while ((IS_SCHEMA(child, "unique")) || @@ -7938,7 +8753,7 @@ declaration_part: if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, (xmlSchemaTypePtr) decl, node, child, + NULL, node, child, NULL, "(annotation?, ((simpleType | complexType)?, " "(unique | key | keyref)*))"); } @@ -8011,17 +8826,15 @@ xmlSchemaParseUnion(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if ((!xmlStrEqual(attr->name, BAD_CAST "id")) && (!xmlStrEqual(attr->name, BAD_CAST "memberTypes"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * Attribute "memberTypes". This is a list of QNames. * TODO: Check the value to contain anything. @@ -8035,7 +8848,7 @@ xmlSchemaParseUnion(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlSchemaQNameRefPtr ref; cur = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr); - type->ref = cur; + type->base = cur; do { while (IS_BLANK_CH(*cur)) cur++; @@ -8045,7 +8858,7 @@ xmlSchemaParseUnion(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (end == cur) break; tmp = xmlStrndup(cur, end - cur); - if (xmlSchemaPValAttrNodeQNameValue(ctxt, schema, NULL, + if (xmlSchemaPValAttrNodeQNameValue(ctxt, schema, NULL, attr, BAD_CAST tmp, &nsName, &localName) == 0) { /* * Create the member type link. @@ -8093,7 +8906,7 @@ xmlSchemaParseUnion(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * Add the annotation to the simple type ancestor. */ xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type, - xmlSchemaParseAnnotation(ctxt, schema, child)); + xmlSchemaParseAnnotation(ctxt, schema, child, 1)); child = child->next; } if (IS_SCHEMA(child, "simpleType")) { @@ -8122,7 +8935,7 @@ xmlSchemaParseUnion(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, "(annotation?, simpleType*)"); + NULL, node, child, NULL, "(annotation?, simpleType*)"); } if ((attr == NULL) && (type->subtypes == NULL)) { /* @@ -8132,7 +8945,7 @@ xmlSchemaParseUnion(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES, - NULL, NULL, node, + NULL, node, "Either the attribute 'memberTypes' or " "at least one child must be present", NULL); } @@ -8181,32 +8994,33 @@ xmlSchemaParseList(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if ((!xmlStrEqual(attr->name, BAD_CAST "id")) && (!xmlStrEqual(attr->name, BAD_CAST "itemType"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * Attribute "itemType". NOTE that we will use the "ref" and "refNs" * fields for holding the reference to the itemType. + * + * REVAMP TODO: Use the "base" and "baseNs" fields, since we will remove + * the "ref" fields. */ - xmlSchemaPValAttrQName(ctxt, schema, NULL, NULL, - node, "itemType", &(type->refNs), &(type->ref)); + xmlSchemaPValAttrQName(ctxt, schema, NULL, + node, "itemType", &(type->baseNs), &(type->base)); /* * And now for the children... */ child = node->children; if (IS_SCHEMA(child, "annotation")) { xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type, - xmlSchemaParseAnnotation(ctxt, schema, child)); + xmlSchemaParseAnnotation(ctxt, schema, child, 1)); child = child->next; } if (IS_SCHEMA(child, "simpleType")) { @@ -8215,34 +9029,34 @@ xmlSchemaParseList(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * Either the itemType [attribute] or the [child] of * the element must be present, but not both. */ - if (type->ref != NULL) { + if (type->base != NULL) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_SIMPLE_TYPE_1, - NULL, NULL, node, + NULL, node, "The attribute 'itemType' and the child " "are mutually exclusive", NULL); } else { type->subtypes = xmlSchemaParseSimpleType(ctxt, schema, child, 0); } child = child->next; - } else if (type->ref == NULL) { + } else if (type->base == NULL) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_SIMPLE_TYPE_1, - NULL, NULL, node, + NULL, node, "Either the attribute 'itemType' or the child " "must be present", NULL); } if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, "(annotation?, simpleType?)"); + NULL, node, child, NULL, "(annotation?, simpleType?)"); } - if ((type->ref == NULL) && + if ((type->base == NULL) && (type->subtypes == NULL) && (xmlSchemaGetPropNode(node, "itemType") == NULL)) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_SIMPLE_TYPE_1, - NULL, NULL, node, + NULL, node, "Either the attribute 'itemType' or the child " "must be present", NULL); } @@ -8265,7 +9079,7 @@ static xmlSchemaTypePtr xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlNodePtr node, int topLevel) { - xmlSchemaTypePtr type, oldCtxtType, oldParentItem; + xmlSchemaTypePtr type, oldCtxtType; xmlNodePtr child = NULL; const xmlChar *attrValue = NULL; xmlAttrPtr attr; @@ -8284,7 +9098,7 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, return (NULL); } else { if (xmlSchemaPValAttrNode(ctxt, - NULL, NULL, attr, + NULL, attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &attrValue) != 0) return (NULL); /* @@ -8300,7 +9114,7 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * about this case. */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_REDEFINE, - NULL, NULL, node, + NULL, node, "Redefinition of built-in simple types is not " "supported", NULL); return(NULL); @@ -8326,11 +9140,14 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ #ifdef ENABLE_NAMED_LOCALS snprintf(buf, 39, "#ST%d", ctxt->counter++ + 1); - type = xmlSchemaAddType(ctxt, schema, (const xmlChar *)buf, + type = xmlSchemaAddType(ctxt, schema, + XML_SCHEMA_TYPE_SIMPLE, + xmlDictLookup(ctxt->dict, (const xmlChar *)buf, -1), ctxt->targetNamespace, node, 0); #else - type = xmlSchemaAddType(ctxt, schema, NULL, - ctxt->targetNamespace, node, 0); + type = xmlSchemaAddType(ctxt, schema, + XML_SCHEMA_TYPE_SIMPLE, + NULL, ctxt->targetNamespace, node, 0); #endif if (type == NULL) return (NULL); @@ -8344,13 +9161,11 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (attr->ns == NULL) { if (!xmlStrEqual(attr->name, BAD_CAST "id")) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, type, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, type, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } @@ -8360,8 +9175,8 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * * Note that attrValue is the value of the attribute "name" here. */ - type = xmlSchemaAddType(ctxt, schema, attrValue, - ctxt->targetNamespace, node, 1); + type = xmlSchemaAddType(ctxt, schema, XML_SCHEMA_TYPE_SIMPLE, + attrValue, ctxt->targetNamespace, node, 1); if (type == NULL) return (NULL); type->type = XML_SCHEMA_TYPE_SIMPLE; @@ -8377,13 +9192,11 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, (!xmlStrEqual(attr->name, BAD_CAST "name")) && (!xmlStrEqual(attr->name, BAD_CAST "final"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, type, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, type, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } @@ -8407,29 +9220,29 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlSchemaPSimpleTypeErr(ctxt, XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - type, (xmlNodePtr) attr, + WXS_BASIC_CAST type, (xmlNodePtr) attr, NULL, "(#all | List of (list | union | restriction)", attrValue, NULL, NULL, NULL); } } } type->targetNamespace = ctxt->targetNamespace; - xmlSchemaPValAttrID(ctxt, NULL, type, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * And now for the children... */ oldCtxtType = ctxt->ctxtType; - oldParentItem = ctxt->parentItem; + ctxt->ctxtType = type; - ctxt->parentItem = type; + child = node->children; if (IS_SCHEMA(child, "annotation")) { - type->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + type->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } if (child == NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_MISSING, - NULL, type, node, child, NULL, + NULL, node, child, NULL, "(annotation?, (restriction | list | union))"); } else if (IS_SCHEMA(child, "restriction")) { xmlSchemaParseRestriction(ctxt, schema, child, @@ -8445,7 +9258,7 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, type, node, child, NULL, + NULL, node, child, NULL, "(annotation?, (restriction | list | union))"); } /* @@ -8457,26 +9270,24 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ if (topLevel && ctxt->isRedefine && (! hasRestriction)) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_REDEFINE, - NULL, NULL, node, "This is a redefinition, thus the " + NULL, node, "This is a redefinition, thus the " " must have a child", NULL); } - - ctxt->parentItem = oldParentItem; + ctxt->ctxtType = oldCtxtType; return (type); } /** * xmlSchemaParseModelGroupDefRef: - * @ctxt: a schema validation context - * @schema: the schema being built - * @node: a subtree containing XML Schema informations + * @ctxt: the parser context + * @schema: the schema being built + * @node: the node * - * Parses a XML schema particle (reference to a model group definition). - * *WARNING* this interface is highly subject to change + * Parses a reference to a model group definition. * - * Returns -1 in case of error, 0 if the declaration is improper and - * 1 in case of success. + * We will return a particle component with a qname-component or + * NULL in case of an error. */ static xmlSchemaTreeItemPtr xmlSchemaParseModelGroupDefRef(xmlSchemaParserCtxtPtr ctxt, @@ -8496,13 +9307,13 @@ xmlSchemaParseModelGroupDefRef(xmlSchemaParserCtxtPtr ctxt, if (attr == NULL) { xmlSchemaPMissingAttrErr(ctxt, XML_SCHEMAP_S4S_ATTR_MISSING, - NULL, node, - "ref", NULL); + NULL, node, "ref", NULL); return (NULL); - } else if (xmlSchemaPValAttrNodeQName(ctxt, schema, NULL, NULL, + } else if (xmlSchemaPValAttrNodeQName(ctxt, schema, NULL, attr, &refNs, &ref) != 0) { return (NULL); } + xmlSchemaCheckReference(ctxt, schema, node, attr, refNs); min = xmlGetMinOccurs(ctxt, node, 0, -1, 1, "xs:nonNegativeInteger"); max = xmlGetMaxOccurs(ctxt, node, 0, UNBOUNDED, 1, "(xs:nonNegativeInteger | unbounded)"); @@ -8517,29 +9328,24 @@ xmlSchemaParseModelGroupDefRef(xmlSchemaParserCtxtPtr ctxt, (!xmlStrEqual(attr->name, BAD_CAST "minOccurs")) && (!xmlStrEqual(attr->name, BAD_CAST "maxOccurs"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); item = xmlSchemaAddParticle(ctxt, schema, node, min, max); if (item == NULL) - return (NULL); - /* Add to pending components; the reference needs to be resolved. */ - WXS_ADD_PENDING_ITEM(ctxt, item); + return (NULL); /* - * Create a reference item as the term; it will be substituted for - * the model group after the reference has been resolved. + * Create a qname-reference and set as the term; it will be substituted + * for the model group after the reference has been resolved. */ item->children = (xmlSchemaTreeItemPtr) - xmlSchemaNewQNameRef(ctxt, XML_SCHEMA_TYPE_GROUP, ref, refNs); - xmlSchemaCheckReference(ctxt, schema, node, (xmlSchemaBasicItemPtr) item, refNs); + xmlSchemaNewQNameRef(ctxt, XML_SCHEMA_TYPE_GROUP, ref, refNs); xmlSchemaPCheckParticleCorrect_2(ctxt, item, node, min, max); /* * And now for the children... @@ -8550,13 +9356,13 @@ xmlSchemaParseModelGroupDefRef(xmlSchemaParserCtxtPtr ctxt, /* * TODO: What to do exactly with the annotation? */ - item->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + item->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?)"); } /* @@ -8575,6 +9381,11 @@ xmlSchemaParseModelGroupDefRef(xmlSchemaParserCtxtPtr ctxt, * @node: a subtree containing XML Schema informations * * Parses a XML schema model group definition. + * + * Note that the contraint src-redefine (6.2) can't be applied until + * references have been resolved. So we will do this at the + * component fixup level. + * * *WARNING* this interface is highly subject to change * * Returns -1 in case of error, 0 if the declaration is improper and @@ -8600,8 +9411,7 @@ xmlSchemaParseModelGroupDefinition(xmlSchemaParserCtxtPtr ctxt, NULL, node, "name", NULL); return (NULL); - } else if (xmlSchemaPValAttrNode(ctxt, - NULL, NULL, attr, + } else if (xmlSchemaPValAttrNode(ctxt, NULL, attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) { return (NULL); } @@ -8618,23 +9428,21 @@ xmlSchemaParseModelGroupDefinition(xmlSchemaParserCtxtPtr ctxt, if ((!xmlStrEqual(attr->name, BAD_CAST "name")) && (!xmlStrEqual(attr->name, BAD_CAST "id"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * And now for the children... */ child = node->children; if (IS_SCHEMA(child, "annotation")) { - item->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + item->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } if (IS_SCHEMA(child, "all")) { @@ -8650,13 +9458,15 @@ xmlSchemaParseModelGroupDefinition(xmlSchemaParserCtxtPtr ctxt, XML_SCHEMA_TYPE_SEQUENCE, 0); child = child->next; } + + + if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?, (all | choice | sequence)?)"); } - return (item); } @@ -8776,7 +9586,7 @@ xmlSchemaParseSchemaElement(xmlSchemaParserCtxtPtr ctxt, * since they are not visible at the component level. I.e. * they are used if processing schema *documents* only. */ - res = xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + res = xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); HFAILURE; /* @@ -8793,7 +9603,7 @@ xmlSchemaParseSchemaElement(xmlSchemaParserCtxtPtr ctxt, */ attr = xmlSchemaGetPropNode(node, "targetNamespace"); if (attr != NULL) { - res = xmlSchemaPValAttrNode(ctxt, NULL, NULL, attr, + res = xmlSchemaPValAttrNode(ctxt, NULL, attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), NULL); HFAILURE; if (res != 0) { @@ -8897,7 +9707,7 @@ xmlSchemaParseSchemaTopLevel(xmlSchemaParserCtxtPtr ctxt, (IS_SCHEMA(child, "redefine")) || (IS_SCHEMA(child, "annotation"))) { if (IS_SCHEMA(child, "annotation")) { - annot = xmlSchemaParseAnnotation(ctxt, schema, child); + annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); if (schema->annot == NULL) schema->annot = annot; else @@ -8938,13 +9748,13 @@ xmlSchemaParseSchemaTopLevel(xmlSchemaParserCtxtPtr ctxt, xmlSchemaParseSimpleType(ctxt, schema, child, 1); child = child->next; } else if (IS_SCHEMA(child, "element")) { - xmlSchemaParseElement(ctxt, schema, child, 1); + xmlSchemaParseElement(ctxt, schema, child, NULL, 1); child = child->next; } else if (IS_SCHEMA(child, "attribute")) { - xmlSchemaParseAttribute(ctxt, schema, child, 1); + xmlSchemaParseGlobalAttribute(ctxt, schema, child); child = child->next; } else if (IS_SCHEMA(child, "attributeGroup")) { - xmlSchemaParseAttributeGroup(ctxt, schema, child, 1); + xmlSchemaParseAttributeGroupDefinition(ctxt, schema, child); child = child->next; } else if (IS_SCHEMA(child, "group")) { xmlSchemaParseModelGroupDefinition(ctxt, schema, child); @@ -8955,14 +9765,17 @@ xmlSchemaParseSchemaTopLevel(xmlSchemaParserCtxtPtr ctxt, } else { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, child->parent, child, + NULL, child->parent, child, NULL, "((include | import | redefine | annotation)*, " "(((simpleType | complexType | group | attributeGroup) " "| element | attribute | notation), annotation*)*)"); child = child->next; } while (IS_SCHEMA(child, "annotation")) { - annot = xmlSchemaParseAnnotation(ctxt, schema, child); + /* + * TODO: We should add all annotations. + */ + annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); if (schema->annot == NULL) schema->annot = annot; else @@ -8971,7 +9784,6 @@ xmlSchemaParseSchemaTopLevel(xmlSchemaParserCtxtPtr ctxt, } } exit: - ctxt->parentItem = NULL; ctxt->ctxtType = NULL; if (oldErrs != ctxt->nberrors) res = ctxt->err; @@ -9003,6 +9815,18 @@ xmlSchemaSchemaRelationFree(xmlSchemaSchemaRelationPtr rel) } #endif +static void +xmlSchemaRedefListFree(xmlSchemaRedefPtr redef) +{ + xmlSchemaRedefPtr prev; + + while (redef != NULL) { + prev = redef; + redef = redef->next; + xmlFree(prev); + } +} + static void xmlSchemaConstructionCtxtFree(xmlSchemaConstructionCtxtPtr con) { @@ -9019,6 +9843,8 @@ xmlSchemaConstructionCtxtFree(xmlSchemaConstructionCtxtPtr con) if (con->substGroups != NULL) xmlHashFree(con->substGroups, (xmlHashDeallocator) xmlSchemaSubstGroupFree); + if (con->redefs != NULL) + xmlSchemaRedefListFree(con->redefs); if (con->dict != NULL) xmlDictFree(con->dict); xmlFree(con); @@ -9070,6 +9896,11 @@ xmlSchemaParserCtxtCreate(void) } memset(ret, 0, sizeof(xmlSchemaParserCtxt)); ret->type = XML_SCHEMA_CTXT_PARSER; + ret->attrProhibs = xmlSchemaItemListCreate(); + if (ret->attrProhibs == NULL) { + xmlFree(ret); + return(NULL); + } return(ret); } @@ -9114,7 +9945,9 @@ xmlSchemaCreatePCtxtOnVCtxt(xmlSchemaValidCtxtPtr vctxt) } /* TODO: Pass user data. */ xmlSchemaSetParserErrors(vctxt->pctxt, vctxt->error, - vctxt->warning, vctxt->userData); + vctxt->warning, vctxt->errCtxt); + xmlSchemaSetParserStructuredErrors(vctxt->pctxt, vctxt->serror, + vctxt->errCtxt); } return (0); } @@ -9312,7 +10145,9 @@ xmlSchemaParseNewDoc(xmlSchemaParserCtxtPtr pctxt, */ newpctxt->schema = schema; xmlSchemaSetParserErrors(newpctxt, pctxt->error, pctxt->warning, - pctxt->userData); + pctxt->errCtxt); + xmlSchemaSetParserStructuredErrors(newpctxt, pctxt->serror, + pctxt->errCtxt); newpctxt->counter = pctxt->counter; @@ -9459,7 +10294,7 @@ xmlSchemaAddSchemaDoc(xmlSchemaParserCtxtPtr pctxt, /* * Save the namespace import information. */ - if (WXS_IS_IMPMAIN(type)) { + if (WXS_IS_BUCKET_IMPMAIN(type)) { relation->importNamespace = importNamespace; if (schemaLocation == NULL) { /* @@ -9475,7 +10310,7 @@ xmlSchemaAddSchemaDoc(xmlSchemaParserCtxtPtr pctxt, /* Did we already fetch the doc? */ if (bkt != NULL) { /* TODO: The following nasty cases will produce an error. */ - if ((WXS_IS_IMPMAIN(type)) && (! bkt->imported)) { + if ((WXS_IS_BUCKET_IMPMAIN(type)) && (! bkt->imported)) { /* We included/redefined and then try to import a schema. */ xmlSchemaCustomErr(ACTXT_CAST pctxt, err, invokingNode, NULL, @@ -9483,7 +10318,7 @@ xmlSchemaAddSchemaDoc(xmlSchemaParserCtxtPtr pctxt, "it was already included or redefined", schemaLocation, NULL); goto exit; - } else if ((! WXS_IS_IMPMAIN(type)) && (bkt->imported)) { + } else if ((! WXS_IS_BUCKET_IMPMAIN(type)) && (bkt->imported)) { /* We imported and then try to include/redefine a schema. */ xmlSchemaCustomErr(ACTXT_CAST pctxt, err, invokingNode, NULL, @@ -9494,7 +10329,7 @@ xmlSchemaAddSchemaDoc(xmlSchemaParserCtxtPtr pctxt, } } - if (WXS_IS_IMPMAIN(type)) { + if (WXS_IS_BUCKET_IMPMAIN(type)) { /* * Given that the schemaLocation [attribute] is only a hint, it is open * to applications to ignore all but the first for a given @@ -9751,7 +10586,7 @@ doc_load: if (preserveDoc) bkt->preserveDoc = 1; } - if (WXS_IS_IMPMAIN(type)) + if (WXS_IS_BUCKET_IMPMAIN(type)) bkt->imported++; /* * Add it to the graph of schemas. @@ -9803,8 +10638,8 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema, xmlNodePtr node) { xmlNodePtr child; - const xmlChar *namespaceName = NULL; - const xmlChar *schemaLocation = NULL; + const xmlChar *namespaceName = NULL, *schemaLocation = NULL; + const xmlChar *thisTargetNamespace; xmlAttrPtr attr; int ret = 0; xmlSchemaBucketPtr bucket = NULL; @@ -9822,20 +10657,18 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema, (!xmlStrEqual(attr->name, BAD_CAST "namespace")) && (!xmlStrEqual(attr->name, BAD_CAST "schemaLocation"))) { xmlSchemaPIllegalAttrErr(pctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(pctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } /* * Extract and validate attributes. */ - if (xmlSchemaPValAttr(pctxt, NULL, NULL, node, + if (xmlSchemaPValAttr(pctxt, NULL, node, "namespace", xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), &namespaceName) != 0) { xmlSchemaPSimpleTypeErr(pctxt, @@ -9846,7 +10679,7 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema, return (pctxt->err); } - if (xmlSchemaPValAttr(pctxt, NULL, NULL, node, + if (xmlSchemaPValAttr(pctxt, NULL, node, "schemaLocation", xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), &schemaLocation) != 0) { xmlSchemaPSimpleTypeErr(pctxt, @@ -9870,25 +10703,31 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema, if (child != NULL) { xmlSchemaPContentErr(pctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?)"); } /* * Apply additional constraints. + * + * Note that it is important to use the original @targetNamespace + * (or none at all), to rule out imports of schemas _with_ a + * @targetNamespace if the importing schema is a chameleon schema + * (with no @targetNamespace). */ + thisTargetNamespace = WXS_BUCKET(pctxt)->origTargetNamespace; if (namespaceName != NULL) { /* * 1.1 If the namespace [attribute] is present, then its ·actual value· * must not match the ·actual value· of the enclosing 's * targetNamespace [attribute]. */ - if (xmlStrEqual(pctxt->targetNamespace, namespaceName)) { + if (xmlStrEqual(thisTargetNamespace, namespaceName)) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_SRC_IMPORT_1_1, - NULL, NULL, node, + NULL, node, "The value of the attribute 'namespace' must not match " "the target namespace '%s' of the importing schema", - pctxt->targetNamespace); + thisTargetNamespace); return (pctxt->err); } } else { @@ -9896,10 +10735,10 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema, * 1.2 If the namespace [attribute] is not present, then the enclosing * must have a targetNamespace [attribute]. */ - if (pctxt->targetNamespace == NULL) { + if (thisTargetNamespace == NULL) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_SRC_IMPORT_1_2, - NULL, NULL, node, + NULL, node, "The attribute 'namespace' must be existent if " "the importing schema has no target namespace", NULL); @@ -9907,13 +10746,13 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema, } } /* - * Locate and aquire the schema document. + * Locate and acquire the schema document. */ if (schemaLocation != NULL) schemaLocation = xmlSchemaBuildAbsoluteURI(pctxt->dict, schemaLocation, node); ret = xmlSchemaAddSchemaDoc(pctxt, XML_SCHEMA_SCHEMA_IMPORT, - schemaLocation, NULL, NULL, 0, node, pctxt->targetNamespace, + schemaLocation, NULL, NULL, 0, node, thisTargetNamespace, namespaceName, &bucket); if (ret != 0) @@ -9965,17 +10804,15 @@ xmlSchemaParseIncludeOrRedefineAttrs(xmlSchemaParserCtxtPtr pctxt, if ((!xmlStrEqual(attr->name, BAD_CAST "id")) && (!xmlStrEqual(attr->name, BAD_CAST "schemaLocation"))) { xmlSchemaPIllegalAttrErr(pctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(pctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(pctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(pctxt, node, BAD_CAST "id"); /* * Preliminary step, extract the URI-Reference and make an URI * from the base. @@ -9988,7 +10825,7 @@ xmlSchemaParseIncludeOrRedefineAttrs(xmlSchemaParserCtxtPtr pctxt, xmlChar *base = NULL; xmlChar *uri = NULL; - if (xmlSchemaPValAttrNode(pctxt, NULL, NULL, attr, + if (xmlSchemaPValAttrNode(pctxt, NULL, attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), (const xmlChar **) schemaLocation) != 0) goto exit_error; @@ -10019,13 +10856,13 @@ xmlSchemaParseIncludeOrRedefineAttrs(xmlSchemaParserCtxtPtr pctxt, if (type == XML_SCHEMA_SCHEMA_REDEFINE) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_SRC_REDEFINE, - NULL, NULL, node, + NULL, node, "The schema document '%s' cannot redefine itself.", *schemaLocation); } else { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_SRC_INCLUDE, - NULL, NULL, node, + NULL, node, "The schema document '%s' cannot include itself.", *schemaLocation); } @@ -10047,7 +10884,7 @@ xmlSchemaParseIncludeOrRedefine(xmlSchemaParserCtxtPtr pctxt, { xmlNodePtr child = NULL; const xmlChar *schemaLocation = NULL; - int res = 0, /* docRes = 0, located = 0, */ hasRedefinitions = 0; + int res = 0; /* hasRedefinitions = 0 */ int isChameleon = 0, wasChameleon = 0; xmlSchemaBucketPtr bucket = NULL; @@ -10070,12 +10907,10 @@ xmlSchemaParseIncludeOrRedefine(xmlSchemaParserCtxtPtr pctxt, if (res != 0) return(res); /* - if (bucket == NULL) { - PERROR_INT("xmlSchemaParseIncludeOrRedefine", - "no schema bucket aquired"); - return(-1); - } - */ + * If we get no schema bucket back, then this means that the schema + * document could not be located or was broken XML or was not + * a schema document. + */ if ((bucket == NULL) || (bucket->doc == NULL)) { if (type == XML_SCHEMA_SCHEMA_INCLUDE) { /* @@ -10139,7 +10974,7 @@ xmlSchemaParseIncludeOrRedefine(xmlSchemaParserCtxtPtr pctxt, /* TODO: Change error function. */ xmlSchemaPCustomErrExt(pctxt, XML_SCHEMAP_SRC_INCLUDE, - NULL, NULL, node, + NULL, node, "The target namespace '%s' of the included/redefined " "schema '%s' differs from '%s' of the " "including/redefining schema", @@ -10186,11 +11021,11 @@ xmlSchemaParseIncludeOrRedefine(xmlSchemaParserCtxtPtr pctxt, * And now for the children... */ child = node->children; - if (type == XML_SCHEMA_SCHEMA_REDEFINE) { - + if (type == XML_SCHEMA_SCHEMA_REDEFINE) { /* * Parse (simpleType | complexType | group | attributeGroup))* */ + pctxt->redefined = bucket; /* * How to proceed if the redefined schema was not located? */ @@ -10204,30 +11039,23 @@ xmlSchemaParseIncludeOrRedefine(xmlSchemaParserCtxtPtr pctxt, /* * TODO: discard or not? */ - } else if (bucket && bucket->parsed) { - /* - * TODO: Not nice: we won't parse the stuff if the redefined - * document was not parsed or not located. - */ - if (IS_SCHEMA(child, "simpleType")) { - xmlSchemaParseSimpleType(pctxt, schema, child, 1); - } else if (IS_SCHEMA(child, "complexType")) { - xmlSchemaParseComplexType(pctxt, schema, child, 1); - hasRedefinitions = 1; - } else if (IS_SCHEMA(child, "group")) { - TODO - hasRedefinitions = 1; - /* xmlSchemaParseModelGroupDefinition(pctxt, - schema, child); */ - } else if (IS_SCHEMA(child, "attributeGroup")) { - TODO - hasRedefinitions = 1; - /* xmlSchemaParseAttributeGroup(pctxt, schema, - child, 1); */ - } + } else if (IS_SCHEMA(child, "simpleType")) { + xmlSchemaParseSimpleType(pctxt, schema, child, 1); + } else if (IS_SCHEMA(child, "complexType")) { + xmlSchemaParseComplexType(pctxt, schema, child, 1); + /* hasRedefinitions = 1; */ + } else if (IS_SCHEMA(child, "group")) { + /* hasRedefinitions = 1; */ + xmlSchemaParseModelGroupDefinition(pctxt, + schema, child); + } else if (IS_SCHEMA(child, "attributeGroup")) { + /* hasRedefinitions = 1; */ + xmlSchemaParseAttributeGroupDefinition(pctxt, schema, + child); } child = child->next; } + pctxt->redefined = NULL; pctxt->isRedefine = 0; } else { if (IS_SCHEMA(child, "annotation")) { @@ -10241,11 +11069,11 @@ xmlSchemaParseIncludeOrRedefine(xmlSchemaParserCtxtPtr pctxt, res = XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED; if (type == XML_SCHEMA_SCHEMA_REDEFINE) { xmlSchemaPContentErr(pctxt, res, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation | (simpleType | complexType | group | attributeGroup))*"); } else { xmlSchemaPContentErr(pctxt, res, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?)"); } } @@ -10292,7 +11120,18 @@ xmlSchemaParseInclude(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema, * @type: the "compositor" type * @particleNeeded: if a a model group with a particle * - * parse a XML schema Sequence definition + * parse a XML schema Sequence definition. + * Applies parts of: + * Schema Representation Constraint: + * Redefinition Constraints and Semantics (src-redefine) + * (6.1), (6.1.1), (6.1.2) + * + * Schema Component Constraint: + * All Group Limited (cos-all-limited) (2) + * TODO: Actually this should go to component-level checks, + * but is done here due to performance. Move it to an other layer + * is schema construction via an API is implemented. + * * *WARNING* this interface is highly subject to change * * Returns -1 in case of error, 0 if the declaration is improper and @@ -10307,7 +11146,7 @@ xmlSchemaParseModelGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlSchemaParticlePtr particle = NULL; xmlNodePtr child = NULL; xmlAttrPtr attr; - int min = 0, max = 0; + int min = 1, max = 1, isElemRef, hasRefs = 0; if ((ctxt == NULL) || (schema == NULL) || (node == NULL)) return (NULL); @@ -10346,13 +11185,11 @@ xmlSchemaParseModelGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, (!xmlStrEqual(attr->name, BAD_CAST "maxOccurs")) && (!xmlStrEqual(attr->name, BAD_CAST "minOccurs"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } @@ -10365,29 +11202,26 @@ xmlSchemaParseModelGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (attr->ns == NULL) { if (!xmlStrEqual(attr->name, BAD_CAST "id")) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - } /* * Extract and validate attributes. */ - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * And now for the children... */ child = node->children; if (IS_SCHEMA(child, "annotation")) { - item->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + item->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } if (type == XML_SCHEMA_TYPE_ALL) { @@ -10395,17 +11229,33 @@ xmlSchemaParseModelGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, while (IS_SCHEMA(child, "element")) { part = (xmlSchemaParticlePtr) xmlSchemaParseElement(ctxt, - schema, child, 0); + schema, child, &isElemRef, 0); + /* + * SPEC cos-all-limited (2) + * "The {max occurs} of all the particles in the {particles} + * of the ('all') group must be 0 or 1. + */ if (part != NULL) { - if (part->minOccurs > 1) - xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_INVALID_MINOCCURS, - NULL, NULL, child, - "Invalid value for minOccurs (must be 0 or 1)", NULL); - if (part->maxOccurs > 1) - xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_INVALID_MAXOCCURS, - NULL, NULL, child, + if (isElemRef) + hasRefs++; + if (part->minOccurs > 1) { + xmlSchemaPCustomErr(ctxt, + XML_SCHEMAP_COS_ALL_LIMITED, + NULL, child, + "Invalid value for minOccurs (must be 0 or 1)", + NULL); + /* Reset to 1. */ + part->minOccurs = 1; + } + if (part->maxOccurs > 1) { + xmlSchemaPCustomErr(ctxt, + XML_SCHEMAP_COS_ALL_LIMITED, + NULL, child, "Invalid value for maxOccurs (must be 0 or 1)", NULL); + /* Reset to 1. */ + part->maxOccurs = 1; + } if (last == NULL) item->children = (xmlSchemaTreeItemPtr) part; else @@ -10417,7 +11267,7 @@ xmlSchemaParseModelGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?, (annotation?, element*)"); } } else { @@ -10432,10 +11282,76 @@ xmlSchemaParseModelGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (IS_SCHEMA(child, "element")) { part = (xmlSchemaTreeItemPtr) - xmlSchemaParseElement(ctxt, schema, child, 0); + xmlSchemaParseElement(ctxt, schema, child, &isElemRef, 0); + if (part && isElemRef) + hasRefs++; } else if (IS_SCHEMA(child, "group")) { part = xmlSchemaParseModelGroupDefRef(ctxt, schema, child); + if (part != NULL) + hasRefs++; + /* + * Handle redefinitions. + */ + if (ctxt->isRedefine && ctxt->redef && + (ctxt->redef->item->type == XML_SCHEMA_TYPE_GROUP) && + part && part->children) + { + if ((xmlSchemaGetQNameRefName(part->children) == + ctxt->redef->refName) && + (xmlSchemaGetQNameRefTargetNs(part->children) == + ctxt->redef->refTargetNs)) + { + /* + * SPEC src-redefine: + * (6.1) "If it has a among its contents at + * some level the ·actual value· of whose ref + * [attribute] is the same as the ·actual value· of + * its own name attribute plus target namespace, then + * all of the following must be true:" + * (6.1.1) "It must have exactly one such group." + */ + if (ctxt->redefCounter != 0) { + xmlChar *str = NULL; + + xmlSchemaCustomErr(ACTXT_CAST ctxt, + XML_SCHEMAP_SRC_REDEFINE, child, NULL, + "The redefining model group definition " + "'%s' must not contain more than one " + "reference to the redefined definition", + xmlSchemaFormatQName(&str, + ctxt->redef->refTargetNs, + ctxt->redef->refName), + NULL); + FREE_AND_NULL(str) + part = NULL; + } else if (((WXS_PARTICLE(part))->minOccurs != 1) || + ((WXS_PARTICLE(part))->maxOccurs != 1)) + { + xmlChar *str = NULL; + /* + * SPEC src-redefine: + * (6.1.2) "The ·actual value· of both that + * group's minOccurs and maxOccurs [attribute] + * must be 1 (or ·absent·). + */ + xmlSchemaCustomErr(ACTXT_CAST ctxt, + XML_SCHEMAP_SRC_REDEFINE, child, NULL, + "The redefining model group definition " + "'%s' must not contain a reference to the " + "redefined definition with a " + "maxOccurs/minOccurs other than 1", + xmlSchemaFormatQName(&str, + ctxt->redef->refTargetNs, + ctxt->redef->refName), + NULL); + FREE_AND_NULL(str) + part = NULL; + } + ctxt->redef->reference = WXS_BASIC_CAST part; + ctxt->redefCounter++; + } + } } else if (IS_SCHEMA(child, "any")) { part = (xmlSchemaTreeItemPtr) xmlSchemaParseAny(ctxt, schema, child); @@ -10458,16 +11374,21 @@ xmlSchemaParseModelGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?, (element | group | choice | sequence | any)*)"); } } - if (withParticle) { - if ((min == 0) && (max == 0)) - return (NULL); - else - return ((xmlSchemaTreeItemPtr) particle); - } else + if ((max == 0) && (min == 0)) + return (NULL); + if (hasRefs) { + /* + * We need to resolve references. + */ + WXS_ADD_PENDING(ctxt, item); + } + if (withParticle) + return ((xmlSchemaTreeItemPtr) particle); + else return ((xmlSchemaTreeItemPtr) item); } @@ -10505,20 +11426,18 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if ((!xmlStrEqual(attr->name, BAD_CAST "id")) && (!xmlStrEqual(attr->name, BAD_CAST "base"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } /* * Extract and validate attributes. */ - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * Attribute */ @@ -10531,21 +11450,20 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * the {content type} of the type definition ·resolved· to by * the ·actual value· of the base [attribute]" */ - if (xmlSchemaPValAttrQName(ctxt, schema, - NULL, NULL, node, "base", + if (xmlSchemaPValAttrQName(ctxt, schema, NULL, node, "base", &(type->baseNs), &(type->base)) == 0) { if ((type->base == NULL) && (type->type == XML_SCHEMA_TYPE_COMPLEX)) { xmlSchemaPMissingAttrErr(ctxt, XML_SCHEMAP_S4S_ATTR_MISSING, - type, node, "base", NULL); + NULL, node, "base", NULL); } else if ((ctxt->isRedefine) && (type->flags & XML_SCHEMAS_TYPE_GLOBAL)) { if (type->base == NULL) { xmlSchemaPMissingAttrErr(ctxt, XML_SCHEMAP_S4S_ATTR_MISSING, - type, node, "base", NULL); + NULL, node, "base", NULL); } else if ((! xmlStrEqual(type->base, type->name)) || (! xmlStrEqual(type->baseNs, type->targetNamespace))) { @@ -10558,7 +11476,7 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * of its own name attribute plus target namespace;" */ xmlSchemaPCustomErrExt(ctxt, XML_SCHEMAP_SRC_REDEFINE, - NULL, NULL, node, "This is a redefinition, but the QName " + NULL, node, "This is a redefinition, but the QName " "value '%s' of the 'base' attribute does not match the " "type's designation '%s'", xmlSchemaFormatQName(&str1, type->baseNs, type->base), @@ -10566,6 +11484,9 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, type->name), NULL); FREE_AND_NULL(str1); FREE_AND_NULL(str2); + /* Avoid confusion and erase the values. */ + type->base = NULL; + type->baseNs = NULL; } } } @@ -10578,7 +11499,7 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * Add the annotation to the simple type ancestor. */ xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type, - xmlSchemaParseAnnotation(ctxt, schema, child)); + xmlSchemaParseAnnotation(ctxt, schema, child, 1)); child = child->next; } if (parentType == XML_SCHEMA_TYPE_SIMPLE) { @@ -10594,7 +11515,7 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ xmlSchemaPContentErr(ctxt, XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE, - NULL, NULL, node, child, + NULL, node, child, "The attribute 'base' and the child are " "mutually exclusive", NULL); } else { @@ -10605,7 +11526,7 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } else if (type->base == NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE, - NULL, NULL, node, child, + NULL, node, child, "Either the attribute 'base' or a child " "must be present", NULL); } @@ -10634,9 +11555,13 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * Model group reference . */ - } else if (IS_SCHEMA(child, "group")) { + } else if (IS_SCHEMA(child, "group")) { type->subtypes = (xmlSchemaTypePtr) xmlSchemaParseModelGroupDefRef(ctxt, schema, child); + /* + * Note that the reference will be resolved in + * xmlSchemaResolveTypeReferences(); + */ child = child->next; } } else if (parentType == XML_SCHEMA_TYPE_SIMPLE_CONTENT) { @@ -10728,7 +11653,10 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * Attribute uses/declarations. */ - child = xmlSchemaParseAttrDecls(ctxt, schema, child, type); + if (xmlSchemaParseLocalAttributes(ctxt, schema, &child, + (xmlSchemaItemListPtr *) &(type->attrUses), + XML_SCHEMA_TYPE_RESTRICTION, NULL) == -1) + return(NULL); /* * Attribute wildcard. */ @@ -10742,13 +11670,13 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (parentType == XML_SCHEMA_TYPE_COMPLEX_CONTENT) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "annotation?, (group | all | choice | sequence)?, " "((attribute | attributeGroup)*, anyAttribute?))"); } else if (parentType == XML_SCHEMA_TYPE_SIMPLE_CONTENT) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?, (simpleType?, (minExclusive | minInclusive | " "maxExclusive | maxInclusive | totalDigits | fractionDigits | " "length | minLength | maxLength | enumeration | whiteSpace | " @@ -10757,7 +11685,7 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* Simple type */ xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?, (simpleType?, (minExclusive | minInclusive | " "maxExclusive | maxInclusive | totalDigits | fractionDigits | " "length | minLength | maxLength | enumeration | whiteSpace | " @@ -10802,24 +11730,22 @@ xmlSchemaParseExtension(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if ((!xmlStrEqual(attr->name, BAD_CAST "id")) && (!xmlStrEqual(attr->name, BAD_CAST "base"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * Attribute "base" - mandatory. */ - if ((xmlSchemaPValAttrQName(ctxt, schema, - NULL, NULL, node, "base", &(type->baseNs), &(type->base)) == 0) && + if ((xmlSchemaPValAttrQName(ctxt, schema, NULL, node, + "base", &(type->baseNs), &(type->base)) == 0) && (type->base == NULL)) { xmlSchemaPMissingAttrErr(ctxt, XML_SCHEMAP_S4S_ATTR_MISSING, @@ -10834,7 +11760,7 @@ xmlSchemaParseExtension(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * Add the annotation to the type ancestor. */ xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type, - xmlSchemaParseAnnotation(ctxt, schema, child)); + xmlSchemaParseAnnotation(ctxt, schema, child, 1)); child = child->next; } if (parentType == XML_SCHEMA_TYPE_COMPLEX_CONTENT) { @@ -10861,6 +11787,10 @@ xmlSchemaParseExtension(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } else if (IS_SCHEMA(child, "group")) { type->subtypes = (xmlSchemaTypePtr) xmlSchemaParseModelGroupDefRef(ctxt, schema, child); + /* + * Note that the reference will be resolved in + * xmlSchemaResolveTypeReferences(); + */ child = child->next; } } @@ -10868,7 +11798,10 @@ xmlSchemaParseExtension(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * Attribute uses/declarations. */ - child = xmlSchemaParseAttrDecls(ctxt, schema, child, type); + if (xmlSchemaParseLocalAttributes(ctxt, schema, &child, + (xmlSchemaItemListPtr *) &(type->attrUses), + XML_SCHEMA_TYPE_EXTENSION, NULL) == -1) + return(NULL); /* * Attribute wildcard. */ @@ -10883,14 +11816,14 @@ xmlSchemaParseExtension(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* Complex content extension. */ xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?, ((group | all | choice | sequence)?, " "((attribute | attributeGroup)*, anyAttribute?)))"); } else { /* Simple content extension. */ xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?, ((attribute | attributeGroup)*, " "anyAttribute?))"); } @@ -10933,18 +11866,16 @@ xmlSchemaParseSimpleContent(xmlSchemaParserCtxtPtr ctxt, if (attr->ns == NULL) { if ((!xmlStrEqual(attr->name, BAD_CAST "id"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * And now for the children... @@ -10955,19 +11886,19 @@ xmlSchemaParseSimpleContent(xmlSchemaParserCtxtPtr ctxt, * Add the annotation to the complex type ancestor. */ xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type, - xmlSchemaParseAnnotation(ctxt, schema, child)); + xmlSchemaParseAnnotation(ctxt, schema, child, 1)); child = child->next; } if (child == NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_MISSING, - NULL, NULL, node, NULL, NULL, + NULL, node, NULL, NULL, "(annotation?, (restriction | extension))"); } if (child == NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_MISSING, - NULL, NULL, node, NULL, NULL, + NULL, node, NULL, NULL, "(annotation?, (restriction | extension))"); } if (IS_SCHEMA(child, "restriction")) { @@ -10984,7 +11915,7 @@ xmlSchemaParseSimpleContent(xmlSchemaParserCtxtPtr ctxt, if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?, (restriction | extension))"); } return (0); @@ -11026,23 +11957,21 @@ xmlSchemaParseComplexContent(xmlSchemaParserCtxtPtr ctxt, (!xmlStrEqual(attr->name, BAD_CAST "mixed"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * Set the 'mixed' on the complex type ancestor. */ - if (xmlGetBooleanProp(ctxt, NULL, NULL, node, "mixed", 0)) { + if (xmlGetBooleanProp(ctxt, node, "mixed", 0)) { if ((type->flags & XML_SCHEMAS_TYPE_MIXED) == 0) type->flags |= XML_SCHEMAS_TYPE_MIXED; } @@ -11052,19 +11981,19 @@ xmlSchemaParseComplexContent(xmlSchemaParserCtxtPtr ctxt, * Add the annotation to the complex type ancestor. */ xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type, - xmlSchemaParseAnnotation(ctxt, schema, child)); + xmlSchemaParseAnnotation(ctxt, schema, child, 1)); child = child->next; } if (child == NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_MISSING, - NULL, NULL, node, NULL, + NULL, node, NULL, NULL, "(annotation?, (restriction | extension))"); } if (child == NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_MISSING, - NULL, NULL, node, NULL, + NULL, node, NULL, NULL, "(annotation?, (restriction | extension))"); } if (IS_SCHEMA(child, "restriction")) { @@ -11081,7 +12010,7 @@ xmlSchemaParseComplexContent(xmlSchemaParserCtxtPtr ctxt, if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, + NULL, node, child, NULL, "(annotation?, (restriction | extension))"); } return (0); @@ -11124,8 +12053,7 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlSchemaPMissingAttrErr(ctxt, XML_SCHEMAP_S4S_ATTR_MISSING, NULL, node, "name", NULL); return (NULL); - } else if (xmlSchemaPValAttrNode(ctxt, - NULL, NULL, attr, + } else if (xmlSchemaPValAttrNode(ctxt, NULL, attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) { return (NULL); } @@ -11137,11 +12065,14 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ #ifdef ENABLE_NAMED_LOCALS snprintf(buf, 39, "#CT%d", ctxt->counter++ + 1); - type = xmlSchemaAddType(ctxt, schema, (const xmlChar *)buf, + type = xmlSchemaAddType(ctxt, schema, + XML_SCHEMA_TYPE_COMPLEX, + xmlDictLookup(ctxt->dict, (const xmlChar *)buf, -1), ctxt->targetNamespace, node, 0); #else - type = xmlSchemaAddType(ctxt, schema, NULL, - ctxt->targetNamespace, node, 0); + type = xmlSchemaAddType(ctxt, schema, + XML_SCHEMA_TYPE_COMPLEX, + NULL, ctxt->targetNamespace, node, 0); #endif if (type == NULL) return (NULL); @@ -11155,8 +12086,9 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * Parse as global complex type definition. */ - type = xmlSchemaAddType(ctxt, schema, name, ctxt->targetNamespace, - node, 1); + type = xmlSchemaAddType(ctxt, schema, + XML_SCHEMA_TYPE_COMPLEX, + name, ctxt->targetNamespace, node, 1); if (type == NULL) return (NULL); type->node = node; @@ -11174,14 +12106,13 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * Attribute "id". */ - xmlSchemaPValAttrID(ctxt, NULL, type, node, - BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); } else if (xmlStrEqual(attr->name, BAD_CAST "mixed")) { /* * Attribute "mixed". */ - if (xmlSchemaPGetBoolNodeValue(ctxt, NULL, type, - (xmlNodePtr) attr)) + if (xmlSchemaPGetBoolNodeValue(ctxt, + NULL, (xmlNodePtr) attr)) type->flags |= XML_SCHEMAS_TYPE_MIXED; } else if (topLevel) { /* @@ -11193,8 +12124,8 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * Attribute "abstract". */ - if (xmlSchemaPGetBoolNodeValue(ctxt, NULL, type, - (xmlNodePtr) attr)) + if (xmlSchemaPGetBoolNodeValue(ctxt, + NULL, (xmlNodePtr) attr)) type->flags |= XML_SCHEMAS_TYPE_ABSTRACT; } else if (xmlStrEqual(attr->name, BAD_CAST "final")) { /* @@ -11211,7 +12142,7 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, { xmlSchemaPSimpleTypeErr(ctxt, XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - type, (xmlNodePtr) attr, NULL, + NULL, (xmlNodePtr) attr, NULL, "(#all | List of (extension | restriction))", attrValue, NULL, NULL, NULL); } else @@ -11229,25 +12160,22 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, -1, -1, -1) != 0) { xmlSchemaPSimpleTypeErr(ctxt, XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - type, (xmlNodePtr) attr, NULL, + NULL, (xmlNodePtr) attr, NULL, "(#all | List of (extension | restriction)) ", attrValue, NULL, NULL, NULL); } else block = 1; } else { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, type, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, type, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { - xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, type, attr); + xmlSchemaPIllegalAttrErr(ctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } @@ -11274,7 +12202,7 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ child = node->children; if (IS_SCHEMA(child, "annotation")) { - type->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + type->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } ctxt->ctxtType = type; @@ -11331,12 +12259,19 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } else if (IS_SCHEMA(child, "group")) { type->subtypes = (xmlSchemaTypePtr) xmlSchemaParseModelGroupDefRef(ctxt, schema, child); + /* + * Note that the reference will be resolved in + * xmlSchemaResolveTypeReferences(); + */ child = child->next; } /* * Parse attribute decls/refs. */ - child = xmlSchemaParseAttrDecls(ctxt, schema, child, type); + if (xmlSchemaParseLocalAttributes(ctxt, schema, &child, + (xmlSchemaItemListPtr *) &(type->attrUses), + XML_SCHEMA_TYPE_RESTRICTION, NULL) == -1) + return(NULL); /* * Parse attribute wildcard. */ @@ -11348,7 +12283,7 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, type, node, child, + NULL, node, child, NULL, "(annotation?, (simpleContent | complexContent | " "((group | all | choice | sequence)?, ((attribute | " "attributeGroup)*, anyAttribute?))))"); @@ -11358,7 +12293,7 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ if (topLevel && ctxt->isRedefine && (! hasRestrictionOrExtension)) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_REDEFINE, - NULL, NULL, node, "This is a redefinition, thus the " + NULL, node, "This is a redefinition, thus the " " must have a or " "grand-child", NULL); } @@ -11527,6 +12462,8 @@ xmlSchemaFreeParserCtxt(xmlSchemaParserCtxtPtr ctxt) ctxt->constructor = NULL; ctxt->ownsConstructor = 0; } + if (ctxt->attrProhibs != NULL) + xmlSchemaItemListFree(ctxt->attrProhibs); xmlDictFree(ctxt->dict); xmlFree(ctxt); } @@ -11555,7 +12492,7 @@ xmlSchemaBuildContentModelForSubstGroup(xmlSchemaParserCtxtPtr pctxt, end = xmlAutomataNewState(pctxt->am); substGroup = xmlSchemaSubstGroupGet(pctxt, elemDecl); if (substGroup == NULL) { - xmlSchemaPErr(pctxt, GET_NODE(particle), + xmlSchemaPErr(pctxt, WXS_ITEM_NODE(particle), XML_SCHEMAP_INTERNAL, "Internal error: xmlSchemaBuildContentModelForSubstGroup, " "declaration is marked having a subst. group but none " @@ -11658,10 +12595,11 @@ xmlSchemaBuildContentModelForElement(xmlSchemaParserCtxtPtr ctxt, } else if ((particle->maxOccurs >= UNBOUNDED) && (particle->minOccurs < 2)) { /* Special case. */ - start = ctxt->state; + start = ctxt->state; ctxt->state = xmlAutomataNewTransition2(ctxt->am, start, NULL, - elemDecl->name, elemDecl->targetNamespace, elemDecl); - xmlAutomataNewEpsilon(ctxt->am, ctxt->state, start); + elemDecl->name, elemDecl->targetNamespace, elemDecl); + ctxt->state = xmlAutomataNewTransition2(ctxt->am, ctxt->state, ctxt->state, + elemDecl->name, elemDecl->targetNamespace, elemDecl); } else { int counter; int maxOccurs = particle->maxOccurs == UNBOUNDED ? @@ -11688,7 +12626,8 @@ xmlSchemaBuildContentModelForElement(xmlSchemaParserCtxtPtr ctxt, * @particle: the particle component * @name: the complex type's name whose content is being built * - * Generate the automata sequence needed for that type + * Create the automaton for the {content type} of a complex type. + * */ static void xmlSchemaBuildAContentModel(xmlSchemaParserCtxtPtr pctxt, @@ -11699,7 +12638,10 @@ xmlSchemaBuildAContentModel(xmlSchemaParserCtxtPtr pctxt, return; } if (particle->children == NULL) { - PERROR_INT("xmlSchemaBuildAContentModel", "no term on particle"); + /* + * Just return in this case. A missing "term" of the particle + * might arise due to an invalid "term" component. + */ return; } @@ -12037,7 +12979,7 @@ xmlSchemaBuildAContentModel(xmlSchemaParserCtxtPtr pctxt, xmlSchemaInternalErr2(ACTXT_CAST pctxt, "xmlSchemaBuildAContentModel", "found unexpected term of type '%s' in content model", - xmlSchemaCompTypeToString(particle->children->type), NULL); + WXS_ITEM_TYPE_NAME(particle->children), NULL); return; } } @@ -12054,8 +12996,6 @@ static void xmlSchemaBuildContentModel(xmlSchemaTypePtr type, xmlSchemaParserCtxtPtr ctxt) { - xmlAutomataStatePtr start; - if ((type->type != XML_SCHEMA_TYPE_COMPLEX) || (type->contModel != NULL) || ((type->contentType != XML_SCHEMA_CONTENT_ELEMENTS) && @@ -12066,27 +13006,30 @@ xmlSchemaBuildContentModel(xmlSchemaTypePtr type, xmlGenericError(xmlGenericErrorContext, "Building content model for %s\n", name); #endif - + ctxt->am = NULL; ctxt->am = xmlNewAutomata(); if (ctxt->am == NULL) { xmlGenericError(xmlGenericErrorContext, "Cannot create automata for complex type %s\n", type->name); return; } - start = ctxt->state = xmlAutomataGetInitState(ctxt->am); - xmlSchemaBuildAContentModel(ctxt, (xmlSchemaParticlePtr) type->subtypes); + ctxt->state = xmlAutomataGetInitState(ctxt->am); + /* + * Build the automaton. + */ + xmlSchemaBuildAContentModel(ctxt, WXS_TYPE_PARTICLE(type)); xmlAutomataSetFinalState(ctxt->am, ctxt->state); type->contModel = xmlAutomataCompile(ctxt->am); if (type->contModel == NULL) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_INTERNAL, - NULL, type, type->node, + WXS_BASIC_CAST type, type->node, "Failed to compile the content model", NULL); } else if (xmlRegexpIsDeterminist(type->contModel) != 1) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_NOT_DETERMINISTIC, /* XML_SCHEMAS_ERR_NOTDETERMINIST, */ - NULL, type, type->node, + WXS_BASIC_CAST type, type->node, "The content model is not determinist", NULL); } else { #ifdef DEBUG_CONTENT_REGEXP @@ -12130,7 +13073,7 @@ xmlSchemaResolveElementReferences(xmlSchemaElementPtr elemDecl, if (type == NULL) { xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE, - (xmlSchemaTypePtr) elemDecl, elemDecl->node, + WXS_BASIC_CAST elemDecl, elemDecl->node, "type", elemDecl->namedType, elemDecl->namedTypeNs, XML_SCHEMA_TYPE_BASIC, "type definition"); } else @@ -12148,7 +13091,7 @@ xmlSchemaResolveElementReferences(xmlSchemaElementPtr elemDecl, if (substHead == NULL) { xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE, - (xmlSchemaTypePtr) elemDecl, NULL, + WXS_BASIC_CAST elemDecl, NULL, "substitutionGroup", elemDecl->substGroup, elemDecl->substGroupNs, XML_SCHEMA_TYPE_ELEMENT, NULL); } else { @@ -12157,7 +13100,7 @@ xmlSchemaResolveElementReferences(xmlSchemaElementPtr elemDecl, * Set the "substitution group affiliation". * NOTE that now we use the "refDecl" field for this. */ - SUBST_GROUP_AFF(elemDecl) = substHead; + WXS_SUBST_HEAD(elemDecl) = substHead; /* * The type definitions is set to: * SPEC "...the {type definition} of the element @@ -12216,9 +13159,9 @@ xmlSchemaResolveUnionMemberTypes(xmlSchemaParserCtxtPtr ctxt, nsName = ((xmlSchemaQNameRefPtr) link->type)->targetNamespace; memberType = xmlSchemaGetType(ctxt->schema, name, nsName); - if ((memberType == NULL) || (! IS_SIMPLE_TYPE(memberType))) { + if ((memberType == NULL) || (! WXS_IS_SIMPLE(memberType))) { xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE, - type, type->node, "memberTypes", + WXS_BASIC_CAST type, type->node, "memberTypes", name, nsName, XML_SCHEMA_TYPE_SIMPLE, NULL); /* * Remove the member type link. @@ -12273,7 +13216,7 @@ xmlSchemaIsDerivedFromBuiltInType(xmlSchemaTypePtr type, int valType) { if (type == NULL) return (0); - if (IS_COMPLEX_TYPE(type)) + if (WXS_IS_COMPLEX(type)) return (0); if (type->type == XML_SCHEMA_TYPE_BASIC) { if (type->builtInType == valType) @@ -12282,10 +13225,8 @@ xmlSchemaIsDerivedFromBuiltInType(xmlSchemaTypePtr type, int valType) (type->builtInType == XML_SCHEMAS_ANYTYPE)) return (0); return(xmlSchemaIsDerivedFromBuiltInType(type->subtypes, valType)); - } else - return(xmlSchemaIsDerivedFromBuiltInType(type->subtypes, valType)); - - return (0); + } + return(xmlSchemaIsDerivedFromBuiltInType(type->subtypes, valType)); } #if 0 @@ -12304,7 +13245,7 @@ xmlSchemaIsUserDerivedFromBuiltInType(xmlSchemaTypePtr type, int valType) { if (type == NULL) return (0); - if (IS_COMPLEX_TYPE(type)) + if (WXS_IS_COMPLEX(type)) return (0); if (type->type == XML_SCHEMA_TYPE_BASIC) { if (type->builtInType == valType) @@ -12322,14 +13263,11 @@ xmlSchemaQueryBuiltInType(xmlSchemaTypePtr type) { if (type == NULL) return (NULL); - if (IS_COMPLEX_TYPE(type)) + if (WXS_IS_COMPLEX(type)) return (NULL); if (type->type == XML_SCHEMA_TYPE_BASIC) - return(type); - else - return(xmlSchemaQueryBuiltInType(type->subtypes)); - - return (NULL); + return(type); + return(xmlSchemaQueryBuiltInType(type->subtypes)); } /** @@ -12368,7 +13306,7 @@ xmlSchemaGetPrimitiveType(xmlSchemaTypePtr type) static xmlSchemaTypePtr xmlSchemaGetBuiltInTypeAncestor(xmlSchemaTypePtr type) { - if (VARIETY_LIST(type) || VARIETY_UNION(type)) + if (WXS_IS_LIST(type) || WXS_IS_UNION(type)) return (0); while (type != NULL) { if (type->type == XML_SCHEMA_TYPE_BASIC) @@ -12380,73 +13318,6 @@ xmlSchemaGetBuiltInTypeAncestor(xmlSchemaTypePtr type) } #endif -/** - * xmlSchemaBuildAttributeUsesOwned: - * @ctxt: the schema parser context - * @type: the complex type definition - * @cur: the attribute declaration list - * @lastUse: the top of the attribute use list - * - * Builds the attribute uses list on the given complex type. - * This one is supposed to be called by - * xmlSchemaBuildAttributeValidation only. - */ -static int -xmlSchemaBuildAttributeUsesOwned(xmlSchemaParserCtxtPtr ctxt, - int isRestriction, - xmlSchemaAttributePtr cur, - xmlSchemaAttributeLinkPtr *uses, - xmlSchemaAttributeLinkPtr *lastUse, - int *hasProhibitions) -{ - xmlSchemaAttributeLinkPtr tmp; - while (cur != NULL) { - if (cur->type == XML_SCHEMA_TYPE_ATTRIBUTEGROUP) { - /* - * W3C: "2 The {attribute uses} of the attribute groups ·resolved· - * to by the ·actual value·s of the ref [attribute] of the - * [children], if any." - */ - if (xmlSchemaBuildAttributeUsesOwned(ctxt, isRestriction, - ((xmlSchemaAttributeGroupPtr) cur)->attributes, uses, - lastUse, hasProhibitions) == -1) { - return (-1); - } - } else if ((! isRestriction) && - (cur->occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED)) { - /* - * Warn about pointless prohibitions when extending. - */ - xmlSchemaCustomWarning(ACTXT_CAST ctxt, - XML_SCHEMAP_WARN_ATTR_REDECL_PROH, - cur->node, NULL, - "Attribute use prohibitions are pointless when " - "extending a type", NULL, NULL, NULL); - } else { - /* W3C: "1 The set of attribute uses corresponding to the - * [children], if any." - */ - tmp = (xmlSchemaAttributeLinkPtr) - xmlMalloc(sizeof(xmlSchemaAttributeLink)); - if (tmp == NULL) { - xmlSchemaPErrMemory(ctxt, "building attribute uses", NULL); - return (-1); - } - tmp->attr = cur; - tmp->next = NULL; - if (*uses == NULL) - *uses = tmp; - else - (*lastUse)->next = tmp; - *lastUse = tmp; - if (cur->occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) - (*hasProhibitions)++; - } - cur = cur->next; - } - return (0); -} - /** * xmlSchemaCloneWildcardNsConstraints: * @ctxt: the schema parser context @@ -12459,14 +13330,14 @@ xmlSchemaBuildAttributeUsesOwned(xmlSchemaParserCtxtPtr ctxt, */ static int xmlSchemaCloneWildcardNsConstraints(xmlSchemaParserCtxtPtr ctxt, - xmlSchemaWildcardPtr *dest, + xmlSchemaWildcardPtr dest, xmlSchemaWildcardPtr source) { xmlSchemaWildcardNsPtr cur, tmp, last; - if ((source == NULL) || (*dest == NULL)) + if ((source == NULL) || (dest == NULL)) return(-1); - (*dest)->any = source->any; + dest->any = source->any; cur = source->nsSet; last = NULL; while (cur != NULL) { @@ -12475,21 +13346,21 @@ xmlSchemaCloneWildcardNsConstraints(xmlSchemaParserCtxtPtr ctxt, return(-1); tmp->value = cur->value; if (last == NULL) - (*dest)->nsSet = tmp; + dest->nsSet = tmp; else last->next = tmp; last = tmp; cur = cur->next; } - if ((*dest)->negNsSet != NULL) - xmlSchemaFreeWildcardNsSet((*dest)->negNsSet); + if (dest->negNsSet != NULL) + xmlSchemaFreeWildcardNsSet(dest->negNsSet); if (source->negNsSet != NULL) { - (*dest)->negNsSet = xmlSchemaNewWildcardNsConstraint(ctxt); - if ((*dest)->negNsSet == NULL) + dest->negNsSet = xmlSchemaNewWildcardNsConstraint(ctxt); + if (dest->negNsSet == NULL) return(-1); - (*dest)->negNsSet->value = source->negNsSet->value; + dest->negNsSet->value = source->negNsSet->value; } else - (*dest)->negNsSet = NULL; + dest->negNsSet = NULL; return(0); } @@ -12813,7 +13684,7 @@ xmlSchemaIntersectWildcards(xmlSchemaParserCtxtPtr ctxt, * 2 If either O1 or O2 is any, then the other must be the value. */ if ((completeWild->any != curWild->any) && (completeWild->any)) { - if (xmlSchemaCloneWildcardNsConstraints(ctxt, &completeWild, curWild) == -1) + if (xmlSchemaCloneWildcardNsConstraints(ctxt, completeWild, curWild) == -1) return(-1); return(0); } @@ -12829,7 +13700,7 @@ xmlSchemaIntersectWildcards(xmlSchemaParserCtxtPtr ctxt, if (completeWild->nsSet == NULL) { neg = completeWild->negNsSet->value; - if (xmlSchemaCloneWildcardNsConstraints(ctxt, &completeWild, curWild) == -1) + if (xmlSchemaCloneWildcardNsConstraints(ctxt, completeWild, curWild) == -1) return(-1); } else neg = curWild->negNsSet->value; @@ -13005,85 +13876,8 @@ xmlSchemaCheckCOSNSSubset(xmlSchemaWildcardPtr sub, return (1); } -/** - * xmlSchemaBuildCompleteAttributeWildcard: - * @ctxt: the schema parser context - * @attrs: the attribute list - * @completeWild: the resulting complete wildcard - * - * Returns -1 in case of an internal error, 0 otherwise. - */ static int -xmlSchemaBuildCompleteAttributeWildcard(xmlSchemaParserCtxtPtr ctxt, - xmlSchemaAttributePtr attrs, - xmlSchemaWildcardPtr *completeWild) -{ - while (attrs != NULL) { - if (attrs->type == XML_SCHEMA_TYPE_ATTRIBUTEGROUP) { - xmlSchemaAttributeGroupPtr group; - - group = (xmlSchemaAttributeGroupPtr) attrs; - /* - * Handle attribute group references. - */ - if (group->ref != NULL) { - if (group->refItem == NULL) { - /* - * TODO: Should we raise a warning here? - */ - /* - * The referenced attribute group definition could not - * be resolved beforehand, so skip. - */ - attrs = attrs->next; - continue; - } else - group = group->refItem; - } - /* - * For every attribute group definition, an intersected wildcard - * will be created (assumed that a wildcard exists on the - * particular attr. gr. def. or on any contained attr. gr. def - * at all). - * The flag XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED ensures - * that the intersection will be performed only once. - */ - if ((group->flags & XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED) == 0) { - if (group->attributes != NULL) { - if (xmlSchemaBuildCompleteAttributeWildcard(ctxt, - group->attributes, &group->attributeWildcard) == -1) - return (-1); - } - group->flags |= XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED; - } - if (group->attributeWildcard != NULL) { - if (*completeWild == NULL) { - /* - * Copy the first encountered wildcard as context, except for the annotation. - * - * Although the complete wildcard might not correspond to any - * node in the schema, we will save this context node. - */ - *completeWild = xmlSchemaAddWildcard(ctxt, ctxt->schema, - XML_SCHEMA_TYPE_ANY_ATTRIBUTE, - group->attributeWildcard->node); - if (xmlSchemaCloneWildcardNsConstraints(ctxt, - completeWild, group->attributeWildcard) == -1) - return (-1); - (*completeWild)->processContents = group->attributeWildcard->processContents; - (*completeWild)->node = group->attributeWildcard->node; - } else if (xmlSchemaIntersectWildcards(ctxt, *completeWild, group->attributeWildcard) == -1) - return (-1); - } - } - attrs = attrs->next; - } - - return (0); -} - -static int -xmlSchemaGetEffectiveValueConstraint(xmlSchemaAttributePtr item, +xmlSchemaGetEffectiveValueConstraint(xmlSchemaAttributeUsePtr attruse, int *fixed, const xmlChar **value, xmlSchemaValPtr *val) @@ -13093,21 +13887,23 @@ xmlSchemaGetEffectiveValueConstraint(xmlSchemaAttributePtr item, if (val != 0) *val = NULL; - if (item->defValue == NULL) - item = item->refDecl; - - if (item == NULL) - return (0); - - if (item->defValue != NULL) { - *value = item->defValue; - if (val != 0) - *val = item->defVal; - if (item->flags & XML_SCHEMAS_ATTR_FIXED) + if (attruse->defValue != NULL) { + *value = attruse->defValue; + if (val != NULL) + *val = attruse->defVal; + if (attruse->flags & XML_SCHEMA_ATTR_USE_FIXED) *fixed = 1; - return (1); + return(1); + } else if ((attruse->attrDecl != NULL) && + (attruse->attrDecl->defValue != NULL)) { + *value = attruse->attrDecl->defValue; + if (val != NULL) + *val = attruse->attrDecl->defVal; + if (attruse->attrDecl->flags & XML_SCHEMAS_ATTR_FIXED) + *fixed = 1; + return(1); } - return (0); + return(0); } /** * xmlSchemaCheckCVCWildcardNamespace: @@ -13117,9 +13913,8 @@ xmlSchemaGetEffectiveValueConstraint(xmlSchemaAttributePtr item, * Validation Rule: Wildcard allows Namespace Name * (cvc-wildcard-namespace) * - * - * Returns 1 if the given namespace matches the wildcard, - * 0 otherwise. + * Returns 0 if the given namespace matches the wildcard, + * 1 otherwise and -1 on API errors. */ static int xmlSchemaCheckCVCWildcardNamespace(xmlSchemaWildcardPtr wild, @@ -13129,659 +13924,527 @@ xmlSchemaCheckCVCWildcardNamespace(xmlSchemaWildcardPtr wild, return(-1); if (wild->any) - return(1); + return(0); else if (wild->nsSet != NULL) { xmlSchemaWildcardNsPtr cur; cur = wild->nsSet; while (cur != NULL) { if (xmlStrEqual(cur->value, ns)) - return(1); + return(0); cur = cur->next; } } else if ((wild->negNsSet != NULL) && (ns != NULL) && (!xmlStrEqual(wild->negNsSet->value, ns))) - return(1); + return(0); - return(0); + return(1); } -/** - * xmlSchemaBuildAttributeValidation: - * @ctxt: the schema parser context - * @type: the complex type definition - * - * - * Builds the wildcard and the attribute uses on the given complex type. - * Returns -1 if an internal error occurs, 0 otherwise. - */ -static int -xmlSchemaBuildAttributeValidation(xmlSchemaParserCtxtPtr pctxt, - xmlSchemaTypePtr type) -{ - xmlSchemaTypePtr baseType = NULL; - xmlSchemaAttributeLinkPtr cur, base, tmp, id = NULL, - prev = NULL, localUses = NULL, lastUse = NULL, lastBaseUse = NULL; - xmlSchemaAttributePtr attrs; - xmlSchemaTypePtr anyType; - xmlChar *str = NULL; - int err = 0, hasProhibitions = 0; +#define XML_SCHEMA_ACTION_DERIVE 0 +#define XML_SCHEMA_ACTION_REDEFINE 1 - anyType = xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYTYPE); - /* - * Complex Type Definition with complex content Schema Component. - * - * Attribute uses. - * TODO: Add checks for absent referenced attribute declarations and - * simple types. - */ - if (type->attributeUses != NULL) { - PERROR_INT("xmlSchemaBuildAttributeValidation", - "attribute uses already builded"); - return (-1); - } - if (type->baseType == NULL) { - PERROR_INT("xmlSchemaBuildAttributeValidation", - "no base type"); - return (-1); - } - baseType = type->baseType; - /* - * Gather attribute uses defined by this type. - */ - attrs = type->attributes; - if (attrs != NULL) { - if (xmlSchemaBuildAttributeUsesOwned(pctxt, - WXS_IS_RESTRICTION(type) ? 1 : 0, - attrs, - &localUses, &lastUse, &hasProhibitions) == -1) { - return (-1); - } - /* - * Handle attribute wildcards. - */ - err = xmlSchemaBuildCompleteAttributeWildcard(pctxt, - attrs, &type->attributeWildcard); - /* - * NOTE: During the parse time, the wildcard is created - * on the complexType directly, if encountered in a - * or element. - */ - if (err == -1) { - PERROR_INT("xmlSchemaBuildAttributeValidation", - "failed to build an intersected attribute wildcard"); - return (-1); - } - } - - if (hasProhibitions) { - xmlSchemaAttributeLinkPtr tmpPrev = NULL; - /* - * Handle annoying pointless prohibitions. - * Note that this will be done for restrictions only, since - * prohibitions are not gathered for extensions. - */ - cur = localUses; +#define WXS_ACTION_STR(a) \ +((a) == XML_SCHEMA_ACTION_DERIVE) ? (const xmlChar *) "base" : (const xmlChar *) "redefined" -pointless_prohib_next: - while (cur != NULL) { - tmp = cur->next; - tmpPrev = cur; - while (tmp != NULL) { - if ( ((cur->attr->occurs != XML_SCHEMAS_ATTR_USE_PROHIBITED) && - (tmp->attr->occurs != XML_SCHEMAS_ATTR_USE_PROHIBITED)) || - (xmlSchemaGetAttrName(cur->attr) != - xmlSchemaGetAttrName(tmp->attr)) || - (xmlSchemaGetAttrTargetNsURI(cur->attr) != - xmlSchemaGetAttrTargetNsURI(tmp->attr))) +/* +* Schema Component Constraint: +* Derivation Valid (Restriction, Complex) +* derivation-ok-restriction (2) - (4) +* +* ATTENTION: +* In XML Schema 1.1 this will be: +* Validation Rule: +* Checking complex type subsumption (practicalSubsumption) (1, 2 and 3) +* +*/ +static int +xmlSchemaCheckDerivationOKRestriction2to4(xmlSchemaParserCtxtPtr pctxt, + int action, + xmlSchemaBasicItemPtr item, + xmlSchemaBasicItemPtr baseItem, + xmlSchemaItemListPtr uses, + xmlSchemaItemListPtr baseUses, + xmlSchemaWildcardPtr wild, + xmlSchemaWildcardPtr baseWild) +{ + xmlSchemaAttributeUsePtr cur = NULL, bcur; + int i, j, found; /* err = 0; */ + const xmlChar *bEffValue; + int effFixed; + + if (uses != NULL) { + for (i = 0; i < uses->nbItems; i++) { + cur = uses->items[i]; + found = 0; + if (baseUses == NULL) + goto not_found; + for (j = 0; j < baseUses->nbItems; j++) { + bcur = baseUses->items[j]; + if ((WXS_ATTRUSE_DECL_NAME(cur) == + WXS_ATTRUSE_DECL_NAME(bcur)) && + (WXS_ATTRUSE_DECL_TNS(cur) == + WXS_ATTRUSE_DECL_TNS(bcur))) { - tmpPrev = tmp; - tmp = tmp->next; - continue; - } - if (cur->attr->occurs == tmp->attr->occurs) { - xmlSchemaAttributeLinkPtr tmpFree; - /* - * Warn about duplicate prohibitions. - */ - xmlSchemaCustomWarning(ACTXT_CAST pctxt, - XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, - tmp->attr->node, NULL, - "Skipping duplicate prohibition " - "of attribute use '%s'", - xmlSchemaFormatQName(&str, - xmlSchemaGetAttrTargetNsURI(tmp->attr), - xmlSchemaGetAttrName(tmp->attr)), - NULL, NULL); - FREE_AND_NULL(str) - /* - * Remove the duplicate prohibition. - */ - tmpFree = tmp; - tmpPrev->next = tmp->next; - tmp = tmp->next; - xmlFree(tmpFree); - hasProhibitions--; - continue; - } else { - xmlSchemaAttributeLinkPtr tmpFree; - xmlSchemaAttributePtr reattr; - /* - * Annoying case: - * This is the case when we prohibited - * the base attribute decl in the previous - * step; i.e. when we prohibit and declare the - * same attribute in the same . - */ - if (cur->attr->occurs == - XML_SCHEMAS_ATTR_USE_PROHIBITED) - reattr = cur->attr; - else - reattr = tmp->attr; - xmlSchemaCustomWarning(ACTXT_CAST pctxt, - XML_SCHEMAP_WARN_ATTR_REDECL_PROH, - reattr->node, NULL, - "Skipping pointless prohibition of " - "attribute use '%s', since a corresponding " - "attribute was explicitely declared as well", - xmlSchemaFormatQName(&str, - xmlSchemaGetAttrTargetNsURI(reattr), - xmlSchemaGetAttrName(reattr)), - NULL, NULL); - FREE_AND_NULL(str); /* - * Remove the prohibition. + * (2.1) "If there is an attribute use in the {attribute + * uses} of the {base type definition} (call this B) whose + * {attribute declaration} has the same {name} and {target + * namespace}, then all of the following must be true:" */ - if (reattr == cur->attr) { - tmpFree = cur; - if (prev != NULL) - prev->next = cur->next; - else - localUses = cur->next; - cur = cur->next; - xmlFree(tmpFree); - hasProhibitions--; - goto pointless_prohib_next; + found = 1; + + if ((cur->occurs == XML_SCHEMAS_ATTR_USE_OPTIONAL) && + (bcur->occurs == XML_SCHEMAS_ATTR_USE_REQUIRED)) + { + xmlChar *str = NULL; + /* + * (2.1.1) "one of the following must be true:" + * (2.1.1.1) "B's {required} is false." + * (2.1.1.2) "R's {required} is true." + */ + xmlSchemaPAttrUseErr4(pctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1, + WXS_ITEM_NODE(item), item, cur, + "The 'optional' attribute use is inconsistent " + "with the corresponding 'required' attribute use of " + "the %s %s", + WXS_ACTION_STR(action), + xmlSchemaGetComponentDesignation(&str, baseItem), + NULL, NULL); + FREE_AND_NULL(str); + /* err = pctxt->err; */ + } else if (xmlSchemaCheckCOSSTDerivedOK(ACTXT_CAST pctxt, + WXS_ATTRUSE_TYPEDEF(cur), + WXS_ATTRUSE_TYPEDEF(bcur), 0) != 0) + { + xmlChar *strA = NULL, *strB = NULL, *strC = NULL; + + /* + * SPEC (2.1.2) "R's {attribute declaration}'s + * {type definition} must be validly derived from + * B's {type definition} given the empty set as + * defined in Type Derivation OK (Simple) (§3.14.6)." + */ + xmlSchemaPAttrUseErr4(pctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2, + WXS_ITEM_NODE(item), item, cur, + "The attribute declaration's %s " + "is not validly derived from " + "the corresponding %s of the " + "attribute declaration in the %s %s", + xmlSchemaGetComponentDesignation(&strA, + WXS_ATTRUSE_TYPEDEF(cur)), + xmlSchemaGetComponentDesignation(&strB, + WXS_ATTRUSE_TYPEDEF(bcur)), + WXS_ACTION_STR(action), + xmlSchemaGetComponentDesignation(&strC, baseItem)); + /* xmlSchemaGetComponentDesignation(&str, baseItem), */ + FREE_AND_NULL(strA); + FREE_AND_NULL(strB); + FREE_AND_NULL(strC); + /* err = pctxt->err; */ } else { - tmpFree = tmp; - tmpPrev->next = tmp->next; - tmp = tmp->next; - xmlFree(tmpFree); - hasProhibitions--; - continue; + /* + * 2.1.3 [Definition:] Let the effective value + * constraint of an attribute use be its {value + * constraint}, if present, otherwise its {attribute + * declaration}'s {value constraint} . + */ + xmlSchemaGetEffectiveValueConstraint(bcur, + &effFixed, &bEffValue, NULL); + /* + * 2.1.3 ... one of the following must be true + * + * 2.1.3.1 B's ·effective value constraint· is + * ·absent· or default. + */ + if ((bEffValue != NULL) && + (effFixed == 1)) { + const xmlChar *rEffValue = NULL; + + xmlSchemaGetEffectiveValueConstraint(bcur, + &effFixed, &rEffValue, NULL); + /* + * 2.1.3.2 R's ·effective value constraint· is + * fixed with the same string as B's. + * MAYBE TODO: Compare the computed values. + * Hmm, it says "same string" so + * string-equality might really be sufficient. + */ + if ((effFixed == 0) || + (! WXS_ARE_DEFAULT_STR_EQUAL(rEffValue, bEffValue))) + { + xmlChar *str = NULL; + + xmlSchemaPAttrUseErr4(pctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3, + WXS_ITEM_NODE(item), item, cur, + "The effective value constraint of the " + "attribute use is inconsistent with " + "its correspondent in the %s %s", + WXS_ACTION_STR(action), + xmlSchemaGetComponentDesignation(&str, + baseItem), + NULL, NULL); + FREE_AND_NULL(str); + /* err = pctxt->err; */ + } + } } + break; + } + } +not_found: + if (!found) { + /* + * (2.2) "otherwise the {base type definition} must have an + * {attribute wildcard} and the {target namespace} of the + * R's {attribute declaration} must be ·valid· with respect + * to that wildcard, as defined in Wildcard allows Namespace + * Name (§3.10.4)." + */ + if ((baseWild == NULL) || + (xmlSchemaCheckCVCWildcardNamespace(baseWild, + (WXS_ATTRUSE_DECL(cur))->targetNamespace) != 0)) + { + xmlChar *str = NULL; + + xmlSchemaPAttrUseErr4(pctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2, + WXS_ITEM_NODE(item), item, cur, + "Neither a matching attribute use, " + "nor a matching wildcard exists in the %s %s", + WXS_ACTION_STR(action), + xmlSchemaGetComponentDesignation(&str, baseItem), + NULL, NULL); + FREE_AND_NULL(str); + /* err = pctxt->err; */ } - tmpPrev = tmp; - tmp = tmp->next; } - prev = cur; - cur = cur->next; } } - - /* 3.4.6 -> Complex Type Definition Properties Correct 4. - * "Two distinct attribute declarations in the {attribute uses} must - * not have identical {name}s and {target namespace}s." - * - * This is done here for s. We will compare only the - * attr uses of the current type. - * For s this is done further down. + /* + * SPEC derivation-ok-restriction (3): + * (3) "For each attribute use in the {attribute uses} of the {base type + * definition} whose {required} is true, there must be an attribute + * use with an {attribute declaration} with the same {name} and + * {target namespace} as its {attribute declaration} in the {attribute + * uses} of the complex type definition itself whose {required} is true. */ - if ((localUses != NULL) && (localUses->next != NULL) && - (WXS_IS_RESTRICTION(type))) { - cur = localUses; - while (cur != NULL) { - if (cur->attr->occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) { - cur = cur->next; + if (baseUses != NULL) { + for (j = 0; j < baseUses->nbItems; j++) { + bcur = baseUses->items[j]; + if (bcur->occurs != XML_SCHEMAS_ATTR_USE_REQUIRED) continue; - } - tmp = cur->next; - while (tmp != NULL) { - if (tmp->attr->occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) { - tmp = tmp->next; - continue; - } - if ((xmlStrEqual(xmlSchemaGetAttrName(cur->attr), - xmlSchemaGetAttrName(tmp->attr))) && - (xmlStrEqual(xmlSchemaGetAttrTargetNsURI(cur->attr), - xmlSchemaGetAttrTargetNsURI(tmp->attr)))) { - /* - * Duplicate attr uses. - */ - xmlSchemaPAttrUseErr(pctxt, - XML_SCHEMAP_CT_PROPS_CORRECT_4, - type, cur->attr, - "Duplicate attribute use '%s' specified", - xmlSchemaFormatQName(&str, - xmlSchemaGetAttrTargetNsURI(tmp->attr), - xmlSchemaGetAttrName(tmp->attr))); - FREE_AND_NULL(str) - break; + found = 0; + if (uses != NULL) { + for (i = 0; i < uses->nbItems; i++) { + cur = uses->items[i]; + if ((WXS_ATTRUSE_DECL_NAME(cur) == + WXS_ATTRUSE_DECL_NAME(bcur)) && + (WXS_ATTRUSE_DECL_TNS(cur) == + WXS_ATTRUSE_DECL_TNS(bcur))) { + found = 1; + break; + } } - tmp = tmp->next; } - cur = cur->next; + if (!found) { + xmlChar *strA = NULL, *strB = NULL; + + xmlSchemaCustomErr4(ACTXT_CAST pctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3, + NULL, item, + "A matching attribute use for the " + "'required' %s of the %s %s is missing", + xmlSchemaGetComponentDesignation(&strA, bcur), + WXS_ACTION_STR(action), + xmlSchemaGetComponentDesignation(&strB, baseItem), + NULL); + FREE_AND_NULL(strA); + FREE_AND_NULL(strB); + } } } - /* - * Inherit the attribute uses of the base type, but leave out - * prohibited ones. - * NOTE: It is allowed to "extend" the anyType complex type. - */ - if (baseType->attributeUses != NULL) { - base = baseType->attributeUses; -inherit_start: - while (base != NULL) { - /* - * Check if prohibited. - */ - if (hasProhibitions) { - cur = localUses; - while (cur != NULL) { - if ((cur->attr->occurs == - XML_SCHEMAS_ATTR_USE_PROHIBITED) && - xmlStrEqual(xmlSchemaGetAttrName(cur->attr), - xmlSchemaGetAttrName(base->attr)) && - xmlStrEqual(xmlSchemaGetAttrTargetNsURI(cur->attr), - xmlSchemaGetAttrTargetNsURI(base->attr))) - { - /* - * Don't inherit prohibited attr uses. - */ - if (base->attr->occurs == - XML_SCHEMAS_ATTR_USE_REQUIRED) { - /* - * derivation-ok-restriction 3 - * There won't be an attr use left if - * prohibiting the inherited one, so this - * will automatically violate required - * attr uses. - */ - xmlSchemaPCustomErr(pctxt, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3, - NULL, type, NULL, - "A matching attribute use for the " - "'required' attribute use '%s' of the " - "base type is missing", - xmlSchemaFormatQName(&str, - xmlSchemaGetAttrTargetNsURI(base->attr), - xmlSchemaGetAttrName(base->attr))); - FREE_AND_NULL(str) - } - base = base->next; - goto inherit_start; - } - cur = cur->next; - } - } - tmp = (xmlSchemaAttributeLinkPtr) - xmlMalloc(sizeof(xmlSchemaAttributeLink)); - if (tmp == NULL) { - xmlSchemaPErrMemory(pctxt, - "allocating attribute uses", NULL); - return (-1); - } - tmp->attr = base->attr; - tmp->next = NULL; - if (type->attributeUses == NULL) { - type->attributeUses = tmp; - } else - lastBaseUse->next = tmp; - lastBaseUse = tmp; - /* next */ - base = base->next; - } - } + * derivation-ok-restriction (4) + */ + if (wild != NULL) { + /* + * (4) "If there is an {attribute wildcard}, all of the + * following must be true:" + */ + if (baseWild == NULL) { + xmlChar *str = NULL; - if ((WXS_IS_EXTENSION(type)) && - ((IS_ANYTYPE(baseType)) || - ((baseType != NULL) && - (baseType->type == XML_SCHEMA_TYPE_COMPLEX) && - (baseType->attributeWildcard != NULL)))) { - if (type->attributeWildcard != NULL) { /* - * Union the complete wildcard with the base wildcard. - */ - if (xmlSchemaUnionWildcards(pctxt, type->attributeWildcard, - baseType->attributeWildcard) == -1) - return (-1); - } else { + * (4.1) "The {base type definition} must also have one." + */ + xmlSchemaCustomErr4(ACTXT_CAST pctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1, + NULL, item, + "The %s has an attribute wildcard, " + "but the %s %s '%s' does not have one", + WXS_ITEM_TYPE_NAME(item), + WXS_ACTION_STR(action), + WXS_ITEM_TYPE_NAME(baseItem), + xmlSchemaGetComponentQName(&str, baseItem)); + FREE_AND_NULL(str); + return(pctxt->err); + } else if ((baseWild->any == 0) && + xmlSchemaCheckCOSNSSubset(wild, baseWild)) + { + xmlChar *str = NULL; /* - * Just inherit the wildcard. + * (4.2) "The complex type definition's {attribute wildcard}'s + * {namespace constraint} must be a subset of the {base type + * definition}'s {attribute wildcard}'s {namespace constraint}, + * as defined by Wildcard Subset (§3.10.6)." */ - /* - * NOTE: This is the only case where an attribute - * wildcard is shared. - */ - type->attributeWildcard = baseType->attributeWildcard; + xmlSchemaCustomErr4(ACTXT_CAST pctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2, + NULL, item, + "The attribute wildcard is not a valid " + "subset of the wildcard in the %s %s '%s'", + WXS_ACTION_STR(action), + WXS_ITEM_TYPE_NAME(baseItem), + xmlSchemaGetComponentQName(&str, baseItem), + NULL); + FREE_AND_NULL(str); + return(pctxt->err); + } + /* 4.3 Unless the {base type definition} is the ·ur-type + * definition·, the complex type definition's {attribute + * wildcard}'s {process contents} must be identical to or + * stronger than the {base type definition}'s {attribute + * wildcard}'s {process contents}, where strict is stronger + * than lax is stronger than skip. + */ + if ((! WXS_IS_ANYTYPE(baseItem)) && + (wild->processContents < baseWild->processContents)) { + xmlChar *str = NULL; + xmlSchemaCustomErr4(ACTXT_CAST pctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3, + NULL, baseItem, + "The {process contents} of the attribute wildcard is " + "weaker than the one in the %s %s '%s'", + WXS_ACTION_STR(action), + WXS_ITEM_TYPE_NAME(baseItem), + xmlSchemaGetComponentQName(&str, baseItem), + NULL); + FREE_AND_NULL(str) + return(pctxt->err); } } + return(0); +} - if (WXS_IS_RESTRICTION(type)) { - if (type->attributeWildcard != NULL) { + +static int +xmlSchemaExpandAttributeGroupRefs(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaBasicItemPtr item, + xmlSchemaWildcardPtr *completeWild, + xmlSchemaItemListPtr list, + xmlSchemaItemListPtr prohibs); +/** + * xmlSchemaFixupTypeAttributeUses: + * @ctxt: the schema parser context + * @type: the complex type definition + * + * + * Builds the wildcard and the attribute uses on the given complex type. + * Returns -1 if an internal error occurs, 0 otherwise. + * + * ATTENTION TODO: Experimantally this uses pointer comparisons for + * strings, so recheck this if we start to hardcode some schemata, since + * they might not be in the same dict. + * NOTE: It is allowed to "extend" the xs:anyType type. + */ +static int +xmlSchemaFixupTypeAttributeUses(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaTypePtr type) +{ + xmlSchemaTypePtr baseType = NULL; + xmlSchemaAttributeUsePtr use; + xmlSchemaItemListPtr uses, baseUses, prohibs = NULL; + + if (type->baseType == NULL) { + PERROR_INT("xmlSchemaFixupTypeAttributeUses", + "no base type"); + return (-1); + } + baseType = type->baseType; + if (WXS_IS_TYPE_NOT_FIXED(baseType)) + if (xmlSchemaTypeFixup(baseType, ACTXT_CAST pctxt) == -1) + return(-1); + + uses = type->attrUses; + baseUses = baseType->attrUses; + /* + * Expand attribute group references. And build the 'complete' + * wildcard, i.e. intersect multiple wildcards. + * Move attribute prohibitions into a separate list. + */ + if (uses != NULL) { + if (WXS_IS_RESTRICTION(type)) { /* - * Derivation Valid (Restriction, Complex) - * 4.1 The {base type definition} must also have one. + * This one will transfer all attr. prohibitions + * into pctxt->attrProhibs. */ - if (baseType->attributeWildcard == NULL) { - xmlSchemaPCustomErr(pctxt, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1, - NULL, type, NULL, - "The type has an attribute wildcard, " - "but the base type %s does not have one", - xmlSchemaFormatItemForReport(&str, NULL, baseType, NULL)); - FREE_AND_NULL(str) - return (1); - } else if (xmlSchemaCheckCOSNSSubset( - type->attributeWildcard, baseType->attributeWildcard)) { - /* 4.2 */ - xmlSchemaPCustomErr(pctxt, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2, - NULL, type, NULL, - "The attribute wildcard is not a valid " - "subset of the wildcard in the base type %s", - xmlSchemaFormatItemForReport(&str, NULL, baseType, NULL)); - FREE_AND_NULL(str) - return (1); - } - /* 4.3 Unless the {base type definition} is the ·ur-type - * definition·, the complex type definition's {attribute - * wildcard}'s {process contents} must be identical to or - * stronger than the {base type definition}'s {attribute - * wildcard}'s {process contents}, where strict is stronger - * than lax is stronger than skip. - */ - if ((! IS_ANYTYPE(baseType)) && - (type->attributeWildcard->processContents < - baseType->attributeWildcard->processContents)) { - xmlSchemaPCustomErr(pctxt, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3, - NULL, type, NULL, - "The 'process contents' of the attribute wildcard is " - "weaker than the one in the base type %s", - xmlSchemaFormatItemForReport(&str, NULL, baseType, NULL)); - FREE_AND_NULL(str) - return (1); + if (xmlSchemaExpandAttributeGroupRefs(pctxt, + WXS_BASIC_CAST type, &(type->attributeWildcard), uses, + pctxt->attrProhibs) == -1) + { + PERROR_INT("xmlSchemaFixupTypeAttributeUses", + "failed to expand attributes"); } - } - } else if (WXS_IS_EXTENSION(type)) { - /* - * Derivation Valid (Extension) - * At this point the type and the base have both, either - * no wildcard or a wildcard. - */ - if ((baseType->attributeWildcard != NULL) && - (baseType->attributeWildcard != type->attributeWildcard)) { - /* 1.3 */ - if (xmlSchemaCheckCOSNSSubset( - baseType->attributeWildcard, type->attributeWildcard)) { - xmlSchemaPCustomErr(pctxt, - XML_SCHEMAP_COS_CT_EXTENDS_1_3, - NULL, type, NULL, - "The attribute wildcard is not a valid " - "superset of the one in the base type %s", - xmlSchemaFormatItemForReport(&str, NULL, baseType, NULL)); - FREE_AND_NULL(str) - return (1); + if (pctxt->attrProhibs->nbItems != 0) + prohibs = pctxt->attrProhibs; + } else { + if (xmlSchemaExpandAttributeGroupRefs(pctxt, + WXS_BASIC_CAST type, &(type->attributeWildcard), uses, + NULL) == -1) + { + PERROR_INT("xmlSchemaFixupTypeAttributeUses", + "failed to expand attributes"); } } } - - if (localUses == NULL) { - /* PASS */ - } else if (WXS_IS_RESTRICTION(type)) { - /* - * Derive by restriction. At this point prohibited uses are already - * filtered out. - */ - if (IS_ANYTYPE(baseType)) { - type->attributeUses = localUses; - } else { - int found, valid; - const xmlChar *bEffValue; - int effFixed; + /* + * Inherit the attribute uses of the base type. + */ + if (baseUses != NULL) { + int i, j; + xmlSchemaAttributeUseProhibPtr pro; - cur = localUses; - while (cur != NULL) { - if (cur->attr->occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) { - prev = cur; - cur = cur->next; - continue; - } - found = 0; - valid = 1; - base = type->attributeUses; - while (base != NULL) { - if (xmlStrEqual(xmlSchemaGetAttrName(cur->attr), - xmlSchemaGetAttrName(base->attr)) && - xmlStrEqual(xmlSchemaGetAttrTargetNsURI(cur->attr), - xmlSchemaGetAttrTargetNsURI(base->attr))) { + if (WXS_IS_RESTRICTION(type)) { + int usesCount; + xmlSchemaAttributeUsePtr tmp; - found = 1; - - if ((cur->attr->occurs == - XML_SCHEMAS_ATTR_USE_OPTIONAL) && - (base->attr->occurs == - XML_SCHEMAS_ATTR_USE_REQUIRED)) { - /* - * derivation-ok-restriction 2.1.1 - */ - xmlSchemaPAttrUseErr(pctxt, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1, - type, cur->attr, - "The 'optional' use is inconsistent with a " - "matching 'required' use of the base type", - NULL); - } else if (xmlSchemaCheckCOSSTDerivedOK( - cur->attr->subtypes, base->attr->subtypes, 0) != 0) { - - /* - * SPEC (2.1.2) "R's {attribute declaration}'s - * {type definition} must be validly derived from - * B's {type definition} given the empty set as - * defined in Type Derivation OK (Simple) (§3.14.6)." - */ - xmlSchemaPAttrUseErr(pctxt, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2, - type, cur->attr, - "The attribute declaration's type " - "definition is not validly derived from " - "the corresponding definition in the " - "base type", NULL); - } else { - /* - * 2.1.3 [Definition:] Let the effective value - * constraint of an attribute use be its {value - * constraint}, if present, otherwise its {attribute - * declaration}'s {value constraint} . - */ - xmlSchemaGetEffectiveValueConstraint(base->attr, - &effFixed, &bEffValue, NULL); - /* - * 2.1.3 ... one of the following must be true - * - * 2.1.3.1 B's ·effective value constraint· is - * ·absent· or default. - */ - if ((bEffValue != NULL) && - (effFixed == 1)) { - const xmlChar *rEffValue = NULL; - - xmlSchemaGetEffectiveValueConstraint(base->attr, - &effFixed, &rEffValue, NULL); - /* - * 2.1.3.2 R's ·effective value constraint· is - * fixed with the same string as B's. - * TODO: Compare the computed values. - */ - if ((effFixed == 0) || - (! xmlStrEqual(rEffValue, bEffValue))) { - xmlSchemaPAttrUseErr(pctxt, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3, - type, cur->attr, - "The effective value constraint of the " - "attribute use is inconsistent with " - "its correspondent of the base type", - NULL); - } else { - /* - * Override the attribute use. - */ - base->attr = cur->attr; - } - } else - base->attr = cur->attr; - } + if (uses != NULL) + usesCount = uses->nbItems; + else + usesCount = 0; - break; + /* Restriction. */ + for (i = 0; i < baseUses->nbItems; i++) { + use = baseUses->items[i]; + if (prohibs) { + /* + * Filter out prohibited uses. + */ + for (j = 0; j < prohibs->nbItems; j++) { + pro = prohibs->items[j]; + if ((WXS_ATTRUSE_DECL_NAME(use) == pro->name) && + (WXS_ATTRUSE_DECL_TNS(use) == + pro->targetNamespace)) + { + goto inherit_next; + } } - base = base->next; } - - if (!found) { + if (usesCount) { /* - * derivation-ok-restriction 2.2 + * Filter out existing uses. */ - if ((baseType->attributeWildcard == NULL) || - (xmlSchemaCheckCVCWildcardNamespace( - baseType->attributeWildcard, - cur->attr->targetNamespace) != 1)) { - xmlSchemaPAttrUseErr(pctxt, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2, - type, cur->attr, - "Neither a matching attribute use, " - "nor a matching wildcard in the base type does exist", - NULL); - } else { - /* - * Add the attribute use. - * - * Note that this may lead to funny derivation error reports, if - * multiple equal attribute uses exist; but this is not - * allowed anyway, and it will be reported beforehand. - */ - tmp = cur; - if (prev != NULL) - prev->next = cur->next; - else - localUses = cur->next; - cur = cur->next; - tmp->next = NULL; - if (type->attributeUses == NULL) { - type->attributeUses = tmp; - } else - lastBaseUse->next = tmp; - lastBaseUse = tmp; - - continue; + for (j = 0; j < usesCount; j++) { + tmp = uses->items[j]; + if ((WXS_ATTRUSE_DECL_NAME(use) == + WXS_ATTRUSE_DECL_NAME(tmp)) && + (WXS_ATTRUSE_DECL_TNS(use) == + WXS_ATTRUSE_DECL_TNS(tmp))) + { + goto inherit_next; + } } } - prev = cur; - cur = cur->next; + if (uses == NULL) { + type->attrUses = xmlSchemaItemListCreate(); + if (type->attrUses == NULL) + goto exit_failure; + uses = type->attrUses; + } + xmlSchemaItemListAddSize(uses, 2, use); +inherit_next: {} + } + } else { + /* Extension. */ + for (i = 0; i < baseUses->nbItems; i++) { + use = baseUses->items[i]; + if (uses == NULL) { + type->attrUses = xmlSchemaItemListCreate(); + if (type->attrUses == NULL) + goto exit_failure; + uses = type->attrUses; + } + xmlSchemaItemListAddSize(uses, baseUses->nbItems, use); } - if (localUses != NULL) - xmlSchemaFreeAttributeUseList(localUses); - } - } else if (WXS_IS_EXTENSION(type)) { - /* - * The spec allows only appending, and not other kinds of extensions. - * - * This ensures: Schema Component Constraint: Derivation Valid (Extension) : 1.2 - */ - if (localUses != NULL) { - if (type->attributeUses == NULL) { - type->attributeUses = localUses; - } else - lastBaseUse->next = localUses; } - } else { - PERROR_INT("xmlSchemaBuildAttributeValidation", - "no derivation method"); - return (-1); } /* - * 3.4.6 -> Complex Type Definition Properties Correct - */ - if (type->attributeUses != NULL) { - cur = type->attributeUses; - prev = NULL; - while (cur != NULL) { - if (cur->attr->occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) { - /* - * Remove "prohibited" attribute uses. The reason this is - * done at this late stage is to be able to catch - * dublicate attribute uses. So we had to keep prohibited - * uses in the list as well. - */ - tmp = cur; - if (prev == NULL) - type->attributeUses = cur->next; - else - prev->next = cur->next; - cur = cur->next; - xmlFree(tmp); - continue; - } + * Shrink attr. uses. + */ + if (uses) { + if (uses->nbItems == 0) { + xmlSchemaItemListFree(uses); + type->attrUses = NULL; + } + /* + * TODO: We could shrink the size of the array + * to fit the actual number of items. + */ + } + /* + * Compute the complete wildcard. + */ + if (WXS_IS_EXTENSION(type)) { + if (baseType->attributeWildcard != NULL) { /* - * 4. Two distinct attribute declarations in the {attribute uses} must - * not have identical {name}s and {target namespace}s. - * - * Note that this was already done for "restriction" and types derived from - * the ur-type. + * (3.2.2.1) "If the ·base wildcard· is non-·absent·, then + * the appropriate case among the following:" */ - if (WXS_IS_EXTENSION(type)) { - tmp = cur->next; - while (tmp != NULL) { - if ((xmlStrEqual(xmlSchemaGetAttrName(cur->attr), - xmlSchemaGetAttrName(tmp->attr))) && - (xmlStrEqual(xmlSchemaGetAttrTargetNsURI(cur->attr ), - xmlSchemaGetAttrTargetNsURI(tmp->attr)))) { - - xmlSchemaPAttrUseErr(pctxt, - XML_SCHEMAP_CT_PROPS_CORRECT_4, - type, tmp->attr, - "Duplicate attribute use specified", NULL); - break; - } - tmp = tmp->next; - } - } - + if (type->attributeWildcard != NULL) { + /* + * Union the complete wildcard with the base wildcard. + * SPEC {attribute wildcard} + * (3.2.2.1.2) "otherwise a wildcard whose {process contents} + * and {annotation} are those of the ·complete wildcard·, + * and whose {namespace constraint} is the intensional union + * of the {namespace constraint} of the ·complete wildcard· + * and of the ·base wildcard·, as defined in Attribute + * Wildcard Union (§3.10.6)." + */ + if (xmlSchemaUnionWildcards(pctxt, type->attributeWildcard, + baseType->attributeWildcard) == -1) + goto exit_failure; + } else { + /* + * (3.2.2.1.1) "If the ·complete wildcard· is ·absent·, + * then the ·base wildcard·." + */ + type->attributeWildcard = baseType->attributeWildcard; + } + } else { /* - * 5. Two distinct attribute declarations in the - * {attribute uses} must not have {type definition}s which - * are or are derived from ID. + * (3.2.2.2) "otherwise (the ·base wildcard· is ·absent·) the + * ·complete wildcard" + * NOOP */ - if ((cur->attr->subtypes != NULL) && - (xmlSchemaIsDerivedFromBuiltInType(cur->attr->subtypes, - XML_SCHEMAS_ID))) { - if (id != NULL) { - xmlSchemaPAttrUseErr(pctxt, - XML_SCHEMAP_CT_PROPS_CORRECT_5, - type, cur->attr, - "There must not exist more than one attribute " - "use, declared of type 'ID' or derived from it", - NULL); - FREE_AND_NULL(str) - } - id = cur; - } - prev = cur; - cur = cur->next; } + } else { + /* + * SPEC {attribute wildcard} + * (3.1) "If the alternative is chosen, then the + * ·complete wildcard·;" + * NOOP + */ } - /* - * TODO: This check should be removed if we are 100% sure of - * the base type attribute uses already being built. - */ - if ((baseType != NULL) && (! IS_ANYTYPE(baseType)) && - (baseType->type == XML_SCHEMA_TYPE_COMPLEX) && - (IS_NOT_TYPEFIXED(baseType))) { - PERROR_INT("xmlSchemaBuildAttributeValidation", - "attribute uses not builded on base type"); - } + return (0); + +exit_failure: + return(-1); } /** @@ -13963,7 +14626,7 @@ xmlSchemaIsParticleEmptiable(xmlSchemaParticlePtr particle) * SPEC (2) "Its {term} is a group and the minimum part of the * effective total range of that group, [...] is 0." */ - if (IS_MODEL_GROUP(particle->children)) { + if (WXS_IS_MODEL_GROUP(particle->children)) { if (xmlSchemaGetParticleTotalRangeMin(particle) == 0) return (1); } @@ -13972,8 +14635,10 @@ xmlSchemaIsParticleEmptiable(xmlSchemaParticlePtr particle) /** * xmlSchemaCheckCOSSTDerivedOK: + * @actxt: a context * @type: the derived simple type definition * @baseType: the base type definition + * @subset: the subset of ('restriction', ect.) * * Schema Component Constraint: * Type Derivation OK (Simple) (cos-st-derived-OK) @@ -13984,7 +14649,8 @@ xmlSchemaIsParticleEmptiable(xmlSchemaParticlePtr particle) * Returns 0 on success, an positive error code otherwise. */ static int -xmlSchemaCheckCOSSTDerivedOK(xmlSchemaTypePtr type, +xmlSchemaCheckCOSSTDerivedOK(xmlSchemaAbstractCtxtPtr actxt, + xmlSchemaTypePtr type, xmlSchemaTypePtr baseType, int subset) { @@ -13997,7 +14663,18 @@ xmlSchemaCheckCOSSTDerivedOK(xmlSchemaTypePtr type, /* * 2.1 restriction is not in the subset, or in the {final} * of its own {base type definition}; + * + * NOTE that this will be used also via "xsi:type". + * + * TODO: Revise this, it looks strange. How can the "type" + * not be fixed or *in* fixing? */ + if (WXS_IS_TYPE_NOT_FIXED(type)) + if (xmlSchemaTypeFixup(type, actxt) == -1) + return(-1); + if (WXS_IS_TYPE_NOT_FIXED(baseType)) + if (xmlSchemaTypeFixup(baseType, actxt) == -1) + return(-1); if ((subset & SUBSET_RESTRICTION) || (xmlSchemaTypeFinalContains(type->baseType, XML_SCHEMAS_TYPE_FINAL_RESTRICTION))) { @@ -14015,8 +14692,8 @@ xmlSchemaCheckCOSSTDerivedOK(xmlSchemaTypePtr type, * and is validly derived from B given the subset, as defined by this * constraint. */ - if ((! IS_ANYTYPE(type->baseType)) && - (xmlSchemaCheckCOSSTDerivedOK(type->baseType, + if ((! WXS_IS_ANYTYPE(type->baseType)) && + (xmlSchemaCheckCOSSTDerivedOK(actxt, type->baseType, baseType, subset) == 0)) { return (0); } @@ -14024,8 +14701,8 @@ xmlSchemaCheckCOSSTDerivedOK(xmlSchemaTypePtr type, * 2.2.3 D's {variety} is list or union and B is the ·simple ur-type * definition·. */ - if (IS_ANY_SIMPLE_TYPE(baseType) && - (VARIETY_LIST(type) || VARIETY_UNION(type))) { + if (WXS_IS_ANY_SIMPLE_TYPE(baseType) && + (WXS_IS_LIST(type) || WXS_IS_UNION(type))) { return (0); } /* @@ -14036,17 +14713,26 @@ xmlSchemaCheckCOSSTDerivedOK(xmlSchemaTypePtr type, * NOTE: This seems not to involve built-in types, since there is no * built-in Union Simple Type. */ - if (VARIETY_UNION(baseType)) { + if (WXS_IS_UNION(baseType)) { xmlSchemaTypeLinkPtr cur; cur = baseType->memberTypes; while (cur != NULL) { - if (xmlSchemaCheckCOSSTDerivedOK(type, cur->type, subset) == 0) + if (WXS_IS_TYPE_NOT_FIXED(cur->type)) + if (xmlSchemaTypeFixup(cur->type, actxt) == -1) + return(-1); + if (xmlSchemaCheckCOSSTDerivedOK(actxt, + type, cur->type, subset) == 0) + { + /* + * It just has to be validly derived from at least one + * member-type. + */ return (0); + } cur = cur->next; } } - return (XML_SCHEMAP_COS_ST_DERIVED_OK_2_2); } @@ -14075,7 +14761,7 @@ xmlSchemaCheckTypeDefCircularInternal(xmlSchemaParserCtxtPtr pctxt, if (ctxtType == ancestor) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_ST_PROPS_CORRECT_2, - NULL, ctxtType, GET_NODE(ctxtType), + WXS_BASIC_CAST ctxtType, WXS_ITEM_NODE(ctxtType), "The definition is circular", NULL); return (XML_SCHEMAP_ST_PROPS_CORRECT_2); } @@ -14105,17 +14791,11 @@ xmlSchemaCheckTypeDefCircular(xmlSchemaTypePtr item, xmlSchemaParserCtxtPtr ctxt) { if ((item == NULL) || - ((item->type != XML_SCHEMA_TYPE_COMPLEX) && - (item->type != XML_SCHEMA_TYPE_SIMPLE))) + (item->type == XML_SCHEMA_TYPE_BASIC) || + (item->baseType == NULL)) return; - if (item->redef != NULL) { - xmlSchemaTypePtr cur = item; - do { - xmlSchemaCheckTypeDefCircularInternal(ctxt, cur, cur->baseType); - cur = cur->redef; - } while (cur != NULL); - } else - xmlSchemaCheckTypeDefCircularInternal(ctxt, item, item->baseType); + xmlSchemaCheckTypeDefCircularInternal(ctxt, item, + item->baseType); } /* @@ -14147,11 +14827,11 @@ xmlSchemaCheckUnionTypeDefCircularRecur(xmlSchemaParserCtxtPtr pctxt, if (memberType == ctxType) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_SRC_SIMPLE_TYPE_4, - NULL, ctxType, NULL, + WXS_BASIC_CAST ctxType, NULL, "The union type definition is circular", NULL); return (XML_SCHEMAP_SRC_SIMPLE_TYPE_4); } - if ((VARIETY_UNION(memberType)) && + if ((WXS_IS_UNION(memberType)) && ((memberType->flags & XML_SCHEMAS_TYPE_MARKED) == 0)) { int res; @@ -14174,7 +14854,7 @@ static int xmlSchemaCheckUnionTypeDefCircular(xmlSchemaParserCtxtPtr pctxt, xmlSchemaTypePtr type) { - if (! VARIETY_UNION(type)) + if (! WXS_IS_UNION(type)) return(0); return(xmlSchemaCheckUnionTypeDefCircularRecur(pctxt, type, type->memberTypes)); @@ -14190,8 +14870,7 @@ xmlSchemaCheckUnionTypeDefCircular(xmlSchemaParserCtxtPtr pctxt, */ static void xmlSchemaResolveTypeReferences(xmlSchemaTypePtr typeDef, - xmlSchemaParserCtxtPtr ctxt, - const xmlChar * name ATTRIBUTE_UNUSED) + xmlSchemaParserCtxtPtr ctxt) { if (typeDef == NULL) return; @@ -14205,38 +14884,103 @@ xmlSchemaResolveTypeReferences(xmlSchemaTypePtr typeDef, if (typeDef->baseType == NULL) { xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE, - typeDef, typeDef->node, + WXS_BASIC_CAST typeDef, typeDef->node, "base", typeDef->base, typeDef->baseNs, XML_SCHEMA_TYPE_SIMPLE, NULL); return; } } - if (IS_SIMPLE_TYPE(typeDef)) { - if (VARIETY_UNION(typeDef)) { + if (WXS_IS_SIMPLE(typeDef)) { + if (WXS_IS_UNION(typeDef)) { /* * Resolve the memberTypes. */ xmlSchemaResolveUnionMemberTypes(ctxt, typeDef); return; - } else if (VARIETY_LIST(typeDef)) { + } else if (WXS_IS_LIST(typeDef)) { /* * Resolve the itemType. */ - if ((typeDef->subtypes == NULL) && (typeDef->ref != NULL)) { + if ((typeDef->subtypes == NULL) && (typeDef->base != NULL)) { + typeDef->subtypes = xmlSchemaGetType(ctxt->schema, - typeDef->ref, typeDef->refNs); + typeDef->base, typeDef->baseNs); + if ((typeDef->subtypes == NULL) || - (! IS_SIMPLE_TYPE(typeDef->subtypes))) { + (! WXS_IS_SIMPLE(typeDef->subtypes))) + { typeDef->subtypes = NULL; xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE, - typeDef, typeDef->node, - "itemType", typeDef->ref, typeDef->refNs, + WXS_BASIC_CAST typeDef, typeDef->node, + "itemType", typeDef->base, typeDef->baseNs, XML_SCHEMA_TYPE_SIMPLE, NULL); } } return; } + } + /* + * The ball of letters below means, that if we have a particle + * which has a QName-helper component as its {term}, we want + * to resolve it... + */ + else if ((WXS_TYPE_CONTENTTYPE(typeDef) != NULL) && + ((WXS_TYPE_CONTENTTYPE(typeDef))->type == + XML_SCHEMA_TYPE_PARTICLE) && + (WXS_TYPE_PARTICLE_TERM(typeDef) != NULL) && + ((WXS_TYPE_PARTICLE_TERM(typeDef))->type == + XML_SCHEMA_EXTRA_QNAMEREF)) + { + xmlSchemaQNameRefPtr ref = + WXS_QNAME_CAST WXS_TYPE_PARTICLE_TERM(typeDef); + xmlSchemaModelGroupDefPtr groupDef; + + /* + * URGENT TODO: Test this. + */ + WXS_TYPE_PARTICLE_TERM(typeDef) = NULL; + /* + * Resolve the MG definition reference. + */ + groupDef = + WXS_MODEL_GROUPDEF_CAST xmlSchemaGetNamedComponent(ctxt->schema, + ref->itemType, ref->name, ref->targetNamespace); + if (groupDef == NULL) { + xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE, + NULL, WXS_ITEM_NODE(WXS_TYPE_PARTICLE(typeDef)), + "ref", ref->name, ref->targetNamespace, ref->itemType, + NULL); + /* Remove the particle. */ + WXS_TYPE_CONTENTTYPE(typeDef) = NULL; + } else if (WXS_MODELGROUPDEF_MODEL(groupDef) == NULL) + /* Remove the particle. */ + WXS_TYPE_CONTENTTYPE(typeDef) = NULL; + else { + /* + * Assign the MG definition's {model group} to the + * particle's {term}. + */ + WXS_TYPE_PARTICLE_TERM(typeDef) = WXS_MODELGROUPDEF_MODEL(groupDef); + + if (WXS_MODELGROUPDEF_MODEL(groupDef)->type == XML_SCHEMA_TYPE_ALL) { + /* + * SPEC cos-all-limited (1.2) + * "1.2 the {term} property of a particle with + * {max occurs}=1 which is part of a pair which constitutes + * the {content type} of a complex type definition." + */ + if ((WXS_TYPE_PARTICLE(typeDef))->maxOccurs != 1) { + xmlSchemaCustomErr(ACTXT_CAST ctxt, + /* TODO: error code */ + XML_SCHEMAP_COS_ALL_LIMITED, + WXS_ITEM_NODE(WXS_TYPE_PARTICLE(typeDef)), NULL, + "The particle's {max occurs} must be 1, since the " + "reference resolves to an 'all' model group", + NULL, NULL); + } + } + } } } @@ -14278,26 +15022,26 @@ xmlSchemaCheckSTPropsCorrect(xmlSchemaParserCtxtPtr ctxt, */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_ST_PROPS_CORRECT_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "No base type existent", NULL); return (XML_SCHEMAP_ST_PROPS_CORRECT_1); } - if (! IS_SIMPLE_TYPE(baseType)) { + if (! WXS_IS_SIMPLE(baseType)) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_ST_PROPS_CORRECT_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The base type '%s' is not a simple type", xmlSchemaGetComponentQName(&str, baseType)); FREE_AND_NULL(str) return (XML_SCHEMAP_ST_PROPS_CORRECT_1); } - if ( (VARIETY_LIST(type) || VARIETY_UNION(type)) && + if ( (WXS_IS_LIST(type) || WXS_IS_UNION(type)) && (WXS_IS_RESTRICTION(type) == 0) && - (! IS_ANY_SIMPLE_TYPE(baseType))) { + (! WXS_IS_ANY_SIMPLE_TYPE(baseType))) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_ST_PROPS_CORRECT_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "A type, derived by list or union, must have" "the simple ur-type definition as base type, not '%s'", xmlSchemaGetComponentQName(&str, baseType)); @@ -14307,11 +15051,11 @@ xmlSchemaCheckSTPropsCorrect(xmlSchemaParserCtxtPtr ctxt, /* * Variety: One of {atomic, list, union}. */ - if ((! VARIETY_ATOMIC(type)) && (! VARIETY_UNION(type)) && - (! VARIETY_LIST(type))) { + if ((! WXS_IS_ATOMIC(type)) && (! WXS_IS_UNION(type)) && + (! WXS_IS_LIST(type))) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_ST_PROPS_CORRECT_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The variety is absent", NULL); return (XML_SCHEMAP_ST_PROPS_CORRECT_1); } @@ -14324,7 +15068,7 @@ xmlSchemaCheckSTPropsCorrect(xmlSchemaParserCtxtPtr ctxt, XML_SCHEMAS_TYPE_FINAL_RESTRICTION)) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_ST_PROPS_CORRECT_3, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The 'final' of its base type '%s' must not contain " "'restriction'", xmlSchemaGetComponentQName(&str, baseType)); @@ -14369,16 +15113,16 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, return (-1); } - if (VARIETY_ATOMIC(type)) { + if (WXS_IS_ATOMIC(type)) { xmlSchemaTypePtr primitive; /* * 1.1 The {base type definition} must be an atomic simple * type definition or a built-in primitive datatype. */ - if (! VARIETY_ATOMIC(type->baseType)) { + if (! WXS_IS_ATOMIC(type->baseType)) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_1_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The base type '%s' is not an atomic simple type", xmlSchemaGetComponentQName(&str, type->baseType)); FREE_AND_NULL(str) @@ -14392,7 +15136,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, XML_SCHEMAS_TYPE_FINAL_RESTRICTION)) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_1_2, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The final of its base type '%s' must not contain 'restriction'", xmlSchemaGetComponentQName(&str, type->baseType)); FREE_AND_NULL(str) @@ -14420,7 +15164,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, ok = 0; xmlSchemaPIllegalFacetAtomicErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1, - NULL, type, primitive, facet); + type, primitive, facet); } facet = facet->next; } while (facet != NULL); @@ -14436,40 +15180,40 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, * NOTE (1.3.2) Facet derivation constraints are currently handled in * xmlSchemaDeriveAndValidateFacets() */ - } else if (VARIETY_LIST(type)) { + } else if (WXS_IS_LIST(type)) { xmlSchemaTypePtr itemType = NULL; itemType = type->subtypes; - if ((itemType == NULL) || (! IS_SIMPLE_TYPE(itemType))) { + if ((itemType == NULL) || (! WXS_IS_SIMPLE(itemType))) { PERROR_INT("xmlSchemaCheckCOSSTRestricts", "failed to evaluate the item type"); return (-1); } - if (IS_NOT_TYPEFIXED(itemType)) - xmlSchemaTypeFixup(itemType, pctxt); + if (WXS_IS_TYPE_NOT_FIXED(itemType)) + xmlSchemaTypeFixup(itemType, ACTXT_CAST pctxt); /* * 2.1 The {item type definition} must have a {variety} of atomic or * union (in which case all the {member type definitions} * must be atomic). */ - if ((! VARIETY_ATOMIC(itemType)) && - (! VARIETY_UNION(itemType))) { + if ((! WXS_IS_ATOMIC(itemType)) && + (! WXS_IS_UNION(itemType))) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_2_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The item type '%s' does not have a variety of atomic or union", xmlSchemaGetComponentQName(&str, itemType)); FREE_AND_NULL(str) return (XML_SCHEMAP_COS_ST_RESTRICTS_2_1); - } else if (VARIETY_UNION(itemType)) { + } else if (WXS_IS_UNION(itemType)) { xmlSchemaTypeLinkPtr member; member = itemType->memberTypes; while (member != NULL) { - if (! VARIETY_ATOMIC(member->type)) { + if (! WXS_IS_ATOMIC(member->type)) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_2_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The item type is a union type, but the " "member type '%s' of this item type is not atomic", xmlSchemaGetComponentQName(&str, member->type)); @@ -14480,7 +15224,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, } } - if (IS_ANY_SIMPLE_TYPE(type->baseType)) { + if (WXS_IS_ANY_SIMPLE_TYPE(type->baseType)) { xmlSchemaFacetPtr facet; /* * This is the case if we have: type != XML_SCHEMA_FACET_WHITESPACE) { xmlSchemaPIllegalFacetListUnionErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2, - NULL, type, facet); + type, facet); return (XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2); } facet = facet->next; @@ -14534,10 +15278,10 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, * 2.3.2 * 2.3.2.1 The {base type definition} must have a {variety} of list. */ - if (! VARIETY_LIST(type->baseType)) { + if (! WXS_IS_LIST(type->baseType)) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The base type '%s' must be a list type", xmlSchemaGetComponentQName(&str, type->baseType)); FREE_AND_NULL(str) @@ -14551,7 +15295,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, XML_SCHEMAS_TYPE_FINAL_RESTRICTION)) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The 'final' of the base type '%s' must not contain 'restriction'", xmlSchemaGetComponentQName(&str, type->baseType)); FREE_AND_NULL(str) @@ -14566,18 +15310,18 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, xmlSchemaTypePtr baseItemType; baseItemType = type->baseType->subtypes; - if ((baseItemType == NULL) || (! IS_SIMPLE_TYPE(baseItemType))) { + if ((baseItemType == NULL) || (! WXS_IS_SIMPLE(baseItemType))) { PERROR_INT("xmlSchemaCheckCOSSTRestricts", "failed to eval the item type of a base type"); return (-1); } if ((itemType != baseItemType) && - (xmlSchemaCheckCOSSTDerivedOK(itemType, + (xmlSchemaCheckCOSSTDerivedOK(ACTXT_CAST pctxt, itemType, baseItemType, 0) != 0)) { xmlChar *strBIT = NULL, *strBT = NULL; xmlSchemaPCustomErrExt(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The item type '%s' is not validly derived from " "the item type '%s' of the base type '%s'", xmlSchemaGetComponentQName(&str, itemType), @@ -14615,7 +15359,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, default: { xmlSchemaPIllegalFacetListUnionErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4, - NULL, type, facet); + type, facet); /* * We could return, but it's nicer to report all * invalid facets. @@ -14635,7 +15379,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, */ } } - } else if (VARIETY_UNION(type)) { + } else if (WXS_IS_UNION(type)) { /* * 3.1 The {member type definitions} must all have {variety} of * atomic or list. @@ -14644,14 +15388,14 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, member = type->memberTypes; while (member != NULL) { - if (IS_NOT_TYPEFIXED(member->type)) - xmlSchemaTypeFixup(member->type, pctxt); + if (WXS_IS_TYPE_NOT_FIXED(member->type)) + xmlSchemaTypeFixup(member->type, ACTXT_CAST pctxt); - if ((! VARIETY_ATOMIC(member->type)) && - (! VARIETY_LIST(member->type))) { + if ((! WXS_IS_ATOMIC(member->type)) && + (! WXS_IS_LIST(member->type))) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_3_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The member type '%s' is neither an atomic, nor a list type", xmlSchemaGetComponentQName(&str, member->type)); FREE_AND_NULL(str) @@ -14674,7 +15418,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, XML_SCHEMAS_TYPE_FINAL_UNION)) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The 'final' of member type '%s' contains 'union'", xmlSchemaGetComponentQName(&str, member->type)); FREE_AND_NULL(str) @@ -14688,7 +15432,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, if (type->facetSet != NULL) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "No facets allowed", NULL); return (XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2); } @@ -14697,10 +15441,10 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, * 3.3.2.1 The {base type definition} must have a {variety} of union. * I.e. the variety of "list" is inherited. */ - if (! VARIETY_UNION(type->baseType)) { + if (! WXS_IS_UNION(type->baseType)) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The base type '%s' is not a union type", xmlSchemaGetComponentQName(&str, type->baseType)); FREE_AND_NULL(str) @@ -14713,7 +15457,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, XML_SCHEMAS_TYPE_FINAL_RESTRICTION)) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The 'final' of its base type '%s' must not contain 'restriction'", xmlSchemaGetComponentQName(&str, type->baseType)); FREE_AND_NULL(str) @@ -14753,13 +15497,13 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, "different number of member types in base"); } if ((member->type != baseMember->type) && - (xmlSchemaCheckCOSSTDerivedOK( + (xmlSchemaCheckCOSSTDerivedOK(ACTXT_CAST pctxt, member->type, baseMember->type, 0) != 0)) { xmlChar *strBMT = NULL, *strBT = NULL; xmlSchemaPCustomErrExt(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The member type %s is not validly " "derived from its corresponding member " "type %s of the base type %s", @@ -14790,7 +15534,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, (facet->type != XML_SCHEMA_FACET_ENUMERATION)) { xmlSchemaPIllegalFacetListUnionErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4, - NULL, type, facet); + type, facet); ok = 0; } facet = facet->next; @@ -14842,14 +15586,14 @@ xmlSchemaCheckSRCSimpleType(xmlSchemaParserCtxtPtr ctxt, /* * */ - } else if (VARIETY_LIST(type)) { + } else if (WXS_IS_LIST(type)) { /* src-simple-type.3 "If the alternative is chosen, either it must have * an itemType [attribute] or a among its [children], * but not both." * * NOTE: This is checked in the parse function of . */ - } else if (VARIETY_UNION(type)) { + } else if (WXS_IS_UNION(type)) { /* * src-simple-type.4 is checked in xmlSchemaCheckUnionTypeDefCircular(). */ @@ -14873,7 +15617,9 @@ xmlSchemaCreateVCtxtOnPCtxt(xmlSchemaParserCtxtPtr ctxt) } /* TODO: Pass user data. */ xmlSchemaSetValidErrors(ctxt->vctxt, - ctxt->error, ctxt->warning, ctxt->userData); + ctxt->error, ctxt->warning, ctxt->errCtxt); + xmlSchemaSetValidStructuredErrors(ctxt->vctxt, + ctxt->serror, ctxt->errCtxt); } return (0); } @@ -14919,7 +15665,7 @@ xmlSchemaParseCheckCOSValidDefault(xmlSchemaParserCtxtPtr pctxt, * For a string to be a valid default with respect to a type * definition the appropriate case among the following must be true: */ - if IS_COMPLEX_TYPE(type) { + if WXS_IS_COMPLEX(type) { /* * Complex type. * @@ -14929,12 +15675,12 @@ xmlSchemaParseCheckCOSValidDefault(xmlSchemaParserCtxtPtr pctxt, * type}'s particle must be ·emptiable· as defined by * Particle Emptiable (§3.9.6)." */ - if ((! HAS_SIMPLE_CONTENT(type)) && - ((! HAS_MIXED_CONTENT(type)) || (! IS_PARTICLE_EMPTIABLE(type)))) { + if ((! WXS_HAS_SIMPLE_CONTENT(type)) && + ((! WXS_HAS_MIXED_CONTENT(type)) || (! WXS_EMPTIABLE(type)))) { /* NOTE that this covers (2.2.2) as well. */ xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_VALID_DEFAULT_2_1, - NULL, type, type->node, + WXS_BASIC_CAST type, type->node, "For a string to be a valid default, the type definition " "must be a simple type or a complex type with mixed content " "and a particle emptiable", NULL); @@ -14952,10 +15698,10 @@ xmlSchemaParseCheckCOSValidDefault(xmlSchemaParserCtxtPtr pctxt, * string must be ·valid· with respect to that simple type definition * as defined by String Valid (§3.14.4). */ - if (IS_SIMPLE_TYPE(type)) + if (WXS_IS_SIMPLE(type)) ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST pctxt, node, type, value, val, 1, 1, 0); - else if (HAS_SIMPLE_CONTENT(type)) + else if (WXS_HAS_SIMPLE_CONTENT(type)) ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST pctxt, node, type->contentTypeDef, value, val, 1, 1, 0); else @@ -14995,17 +15741,17 @@ xmlSchemaCheckCTPropsCorrect(xmlSchemaParserCtxtPtr pctxt, * Sub-components (§5.3)." */ if ((type->baseType != NULL) && - (IS_SIMPLE_TYPE(type->baseType)) && + (WXS_IS_SIMPLE(type->baseType)) && (WXS_IS_EXTENSION(type) == 0)) { /* * SPEC (2) "If the {base type definition} is a simple type definition, * the {derivation method} must be extension." */ - xmlSchemaPCustomErr(pctxt, + xmlSchemaCustomErr(ACTXT_CAST pctxt, XML_SCHEMAP_SRC_CT_1, - NULL, type, NULL, + NULL, WXS_BASIC_CAST type, "If the base type is a simple type, the derivation method must be " - "'extension'", NULL); + "'extension'", NULL, NULL); return (XML_SCHEMAP_SRC_CT_1); } /* @@ -15014,15 +15760,91 @@ xmlSchemaCheckCTPropsCorrect(xmlSchemaParserCtxtPtr pctxt, * definition by repeatedly following the {base type definition}." * * NOTE (3) is done in xmlSchemaCheckTypeDefCircular(). - * - * SPEC (4) "Two distinct attribute declarations in the {attribute uses} - * must not have identical {name}s and {target namespace}s." - * SPEC (5) "Two distinct attribute declarations in the {attribute uses} - * must not have {type definition}s which are or are derived from ID." - * - * NOTE (4) and (5) are done in xmlSchemaBuildAttributeValidation(). */ + /* + * NOTE that (4) and (5) need the following: + * - attribute uses need to be already inherited (apply attr. prohibitions) + * - attribute group references need to be expanded already + * - simple types need to be typefixed already + */ + if (type->attrUses && + (((xmlSchemaItemListPtr) type->attrUses)->nbItems > 1)) + { + xmlSchemaItemListPtr uses = (xmlSchemaItemListPtr) type->attrUses; + xmlSchemaAttributeUsePtr use, tmp; + int i, j, hasId = 0; + + for (i = uses->nbItems -1; i >= 0; i--) { + use = uses->items[i]; + + /* + * SPEC ct-props-correct + * (4) "Two distinct attribute declarations in the + * {attribute uses} must not have identical {name}s and + * {target namespace}s." + */ + if (i > 0) { + for (j = i -1; j >= 0; j--) { + tmp = uses->items[j]; + if ((WXS_ATTRUSE_DECL_NAME(use) == + WXS_ATTRUSE_DECL_NAME(tmp)) && + (WXS_ATTRUSE_DECL_TNS(use) == + WXS_ATTRUSE_DECL_TNS(tmp))) + { + xmlChar *str = NULL; + + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_AG_PROPS_CORRECT, + NULL, WXS_BASIC_CAST type, + "Duplicate %s", + xmlSchemaGetComponentDesignation(&str, use), + NULL); + FREE_AND_NULL(str); + /* + * Remove the duplicate. + */ + if (xmlSchemaItemListRemove(uses, i) == -1) + goto exit_failure; + goto next_use; + } + } + } + /* + * SPEC ct-props-correct + * (5) "Two distinct attribute declarations in the + * {attribute uses} must not have {type definition}s which + * are or are derived from ID." + */ + if (WXS_ATTRUSE_TYPEDEF(use) != NULL) { + if (xmlSchemaIsDerivedFromBuiltInType( + WXS_ATTRUSE_TYPEDEF(use), XML_SCHEMAS_ID)) + { + if (hasId) { + xmlChar *str = NULL; + + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_AG_PROPS_CORRECT, + NULL, WXS_BASIC_CAST type, + "There must not exist more than one attribute " + "declaration of type 'xs:ID' " + "(or derived from 'xs:ID'). The %s violates this " + "constraint", + xmlSchemaGetComponentDesignation(&str, use), + NULL); + FREE_AND_NULL(str); + if (xmlSchemaItemListRemove(uses, i) == -1) + goto exit_failure; + } + + hasId = 1; + } + } +next_use: {} + } + } return (0); +exit_failure: + return(-1); } static int @@ -15054,7 +15876,8 @@ xmlSchemaAreEqualTypes(xmlSchemaTypePtr typeA, * if not. */ static int -xmlSchemaCheckCOSCTDerivedOK(xmlSchemaTypePtr type, +xmlSchemaCheckCOSCTDerivedOK(xmlSchemaAbstractCtxtPtr actxt, + xmlSchemaTypePtr type, xmlSchemaTypePtr baseType, int set) { @@ -15089,16 +15912,16 @@ xmlSchemaCheckCOSCTDerivedOK(xmlSchemaTypePtr type, * SPEC (2.3.1) "D's {base type definition} must not be the ·ur-type * definition·." */ - if (IS_ANYTYPE(type->baseType)) + if (WXS_IS_ANYTYPE(type->baseType)) return (1); - if (IS_COMPLEX_TYPE(type->baseType)) { + if (WXS_IS_COMPLEX(type->baseType)) { /* * SPEC (2.3.2.1) "If D's {base type definition} is complex, then it * must be validly derived from B given the subset as defined by this * constraint." */ - return (xmlSchemaCheckCOSCTDerivedOK(type->baseType, + return (xmlSchemaCheckCOSCTDerivedOK(actxt, type->baseType, baseType, set)); } else { /* @@ -15106,7 +15929,8 @@ xmlSchemaCheckCOSCTDerivedOK(xmlSchemaTypePtr type, * must be validly derived from B given the subset as defined in Type * Derivation OK (Simple) (§3.14.6). */ - return (xmlSchemaCheckCOSSTDerivedOK(type->baseType, baseType, set)); + return (xmlSchemaCheckCOSSTDerivedOK(actxt, type->baseType, + baseType, set)); } } @@ -15123,14 +15947,15 @@ xmlSchemaCheckCOSCTDerivedOK(xmlSchemaTypePtr type, * Returns 0 on success, an positive error code otherwise. */ static int -xmlSchemaCheckCOSDerivedOK(xmlSchemaTypePtr type, +xmlSchemaCheckCOSDerivedOK(xmlSchemaAbstractCtxtPtr actxt, + xmlSchemaTypePtr type, xmlSchemaTypePtr baseType, int set) { - if (IS_SIMPLE_TYPE(type)) - return (xmlSchemaCheckCOSSTDerivedOK(type, baseType, set)); + if (WXS_IS_SIMPLE(type)) + return (xmlSchemaCheckCOSSTDerivedOK(actxt, type, baseType, set)); else - return (xmlSchemaCheckCOSCTDerivedOK(type, baseType, set)); + return (xmlSchemaCheckCOSCTDerivedOK(actxt, type, baseType, set)); } /** @@ -15145,7 +15970,7 @@ xmlSchemaCheckCOSDerivedOK(xmlSchemaTypePtr type, * STATUS: * missing: * (1.5) - * (1.4.3.2.2.2) "Particle Valid (Extension)", which is not really needed. + * (1.4.3.2.2.2) "Particle Valid (Extension)" * * Returns 0 if the constraints are satisfied, a positive * error code if not and -1 if an internal error occured. @@ -15163,7 +15988,7 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt, * SPEC (1) "If the {base type definition} is a complex type definition, * then all of the following must be true:" */ - if (IS_COMPLEX_TYPE(base)) { + if (WXS_IS_COMPLEX(base)) { /* * SPEC (1.1) "The {final} of the {base type definition} must not * contain extension." @@ -15171,11 +15996,20 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt, if (base->flags & XML_SCHEMAS_TYPE_FINAL_EXTENSION) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_COS_CT_EXTENDS_1_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The 'final' of the base type definition " "contains 'extension'", NULL); return (XML_SCHEMAP_COS_CT_EXTENDS_1_1); } + + /* + * ATTENTION: The constrains (1.2) and (1.3) are not applied, + * since they are automatically satisfied through the + * inheriting mechanism. + * Note that even if redefining components, the inheriting mechanism + * is used. + */ +#if 0 /* * SPEC (1.2) "Its {attribute uses} must be a subset of the {attribute * uses} @@ -15185,22 +16019,89 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt, * type definition itself whose {attribute declaration} has the same * {name}, {target namespace} and {type definition} as its attribute * declaration" - * - * NOTE (1.2): This will be already satisfied by the way the attribute - * uses are extended in xmlSchemaBuildAttributeValidation(); thus this - * check is not needed. */ + if (base->attrUses != NULL) { + int i, j, found; + xmlSchemaAttributeUsePtr use, buse; + for (i = 0; i < (WXS_LIST_CAST base->attrUses)->nbItems; i ++) { + buse = (WXS_LIST_CAST base->attrUses)->items[i]; + found = 0; + if (type->attrUses != NULL) { + use = (WXS_LIST_CAST type->attrUses)->items[j]; + for (j = 0; j < (WXS_LIST_CAST type->attrUses)->nbItems; j ++) + { + if ((WXS_ATTRUSE_DECL_NAME(use) == + WXS_ATTRUSE_DECL_NAME(buse)) && + (WXS_ATTRUSE_DECL_TNS(use) == + WXS_ATTRUSE_DECL_TNS(buse)) && + (WXS_ATTRUSE_TYPEDEF(use) == + WXS_ATTRUSE_TYPEDEF(buse)) + { + found = 1; + break; + } + } + } + if (! found) { + xmlChar *str = NULL; + + xmlSchemaCustomErr(ACTXT_CAST ctxt, + XML_SCHEMAP_COS_CT_EXTENDS_1_2, + NULL, WXS_BASIC_CAST type, + /* + * TODO: The report does not indicate that also the + * type needs to be the same. + */ + "This type is missing a matching correspondent " + "for its {base type}'s %s in its {attribute uses}", + xmlSchemaGetComponentDesignation(&str, + buse->children), + NULL); + FREE_AND_NULL(str) + } + } + } /* * SPEC (1.3) "If it has an {attribute wildcard}, the complex type * definition must also have one, and the base type definition's * {attribute wildcard}'s {namespace constraint} must be a subset * of the complex type definition's {attribute wildcard}'s {namespace * constraint}, as defined by Wildcard Subset (§3.10.6)." - * - * NOTE (1.3) This is already checked in - * xmlSchemaBuildAttributeValidation; thus this check is not needed. - * + */ + + /* + * MAYBE TODO: Enable if ever needed. But this will be needed only + * if created the type via a schema construction API. + */ + if (base->attributeWildcard != NULL) { + if (type->attributeWilcard == NULL) { + xmlChar *str = NULL; + + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_COS_CT_EXTENDS_1_3, + NULL, type, + "The base %s has an attribute wildcard, " + "but this type is missing an attribute wildcard", + xmlSchemaGetComponentDesignation(&str, base)); + FREE_AND_NULL(str) + + } else if (xmlSchemaCheckCOSNSSubset( + base->attributeWildcard, type->attributeWildcard)) + { + xmlChar *str = NULL; + + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_COS_CT_EXTENDS_1_3, + NULL, type, + "The attribute wildcard is not a valid " + "superset of the one in the base %s", + xmlSchemaGetComponentDesignation(&str, base)); + FREE_AND_NULL(str) + } + } +#endif + /* * SPEC (1.4) "One of the following must be true:" */ if ((type->contentTypeDef != NULL) && @@ -15230,7 +16131,7 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt, */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_COS_CT_EXTENDS_1_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The content type must specify a particle", NULL); return (XML_SCHEMAP_COS_CT_EXTENDS_1_1); } @@ -15256,13 +16157,13 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt, */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_COS_CT_EXTENDS_1_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The content type of both, the type and its base " "type, must either 'mixed' or 'element-only'", NULL); return (XML_SCHEMAP_COS_CT_EXTENDS_1_1); } /* - * FUTURE TODO SPEC (1.4.3.2.2.2) "The particle of the + * URGENT TODO SPEC (1.4.3.2.2.2) "The particle of the * complex type definition must be a ·valid extension· * of the {base type definition}'s particle, as defined * in Particle Valid (Extension) (§3.9.6)." @@ -15271,10 +16172,11 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt, * since it is ensured by the derivation process in * xmlSchemaTypeFixup(). We need to implement this when heading * for a construction API + * TODO: !! This is needed to be checked if redefining a type !! */ } /* - * TODO (1.5) + * URGENT TODO (1.5) */ } } else { @@ -15289,7 +16191,7 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt, */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_COS_CT_EXTENDS_1_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The content type must be the simple base type", NULL); return (XML_SCHEMAP_COS_CT_EXTENDS_1_1); } @@ -15301,7 +16203,7 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt, */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_COS_CT_EXTENDS_1_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The 'final' of the base type definition " "contains 'extension'", NULL); return (XML_SCHEMAP_COS_CT_EXTENDS_1_1); @@ -15321,7 +16223,11 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt, * * STATUS: * missing: - * (5.4.2), (5.2.2.1) + * (5.4.2) ??? + * + * ATTENTION: + * In XML Schema 1.1 this will be: + * Validation Rule: Checking complex type subsumption * * Returns 0 if the constraints are satisfied, a positive * error code if not and -1 if an internal error occured. @@ -15333,25 +16239,45 @@ xmlSchemaCheckDerivationOKRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaTypePtr base; /* - * TODO: Correct the error code; XML_SCHEMAP_COS_CT_EXTENDS_1_1 is used + * TODO: Correct the error code; XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1 is used * temporarily only. */ base = type->baseType; + if (! WXS_IS_COMPLEX(base)) { + xmlSchemaCustomErr(ACTXT_CAST ctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, + type->node, WXS_BASIC_CAST type, + "The base type must be a complex type", NULL, NULL); + return(ctxt->err); + } if (base->flags & XML_SCHEMAS_TYPE_FINAL_RESTRICTION) { /* * SPEC (1) "The {base type definition} must be a complex type * definition whose {final} does not contain restriction." */ - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_COS_CT_EXTENDS_1_1, - NULL, type, NULL, + xmlSchemaCustomErr(ACTXT_CAST ctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, + type->node, WXS_BASIC_CAST type, "The 'final' of the base type definition " - "contains 'restriction'", NULL); - return (XML_SCHEMAP_COS_CT_EXTENDS_1_1); + "contains 'restriction'", NULL, NULL); + return (ctxt->err); + } + /* + * SPEC (2), (3) and (4) + * Those are handled in a separate function, since the + * same constraints are needed for redefinition of + * attribute groups as well. + */ + if (xmlSchemaCheckDerivationOKRestriction2to4(ctxt, + XML_SCHEMA_ACTION_DERIVE, + WXS_BASIC_CAST type, WXS_BASIC_CAST base, + type->attrUses, base->attrUses, + type->attributeWildcard, + base->attributeWildcard) == -1) + { + return(-1); } /* - * NOTE (3) and (4) are done in xmlSchemaBuildAttributeValidation(). - * * SPEC (5) "One of the following must be true:" */ if (base->builtInType == XML_SCHEMAS_ANYTYPE) { @@ -15369,14 +16295,39 @@ xmlSchemaCheckDerivationOKRestriction(xmlSchemaParserCtxtPtr ctxt, * SPEC (5.2.2) "One of the following must be true:" */ if ((base->contentType == XML_SCHEMA_CONTENT_SIMPLE) || - (base->contentType == XML_SCHEMA_CONTENT_BASIC)) { + (base->contentType == XML_SCHEMA_CONTENT_BASIC)) + { + int err; /* * SPEC (5.2.2.1) "The {content type} of the {base type * definition} must be a simple type definition from which * the {content type} is validly derived given the empty * set as defined in Type Derivation OK (Simple) (§3.14.6)." - * URGENT TODO + * + * ATTENTION TODO: This seems not needed if the type implicitely + * derived from the base type. + * */ + err = xmlSchemaCheckCOSSTDerivedOK(ACTXT_CAST ctxt, + type->contentTypeDef, base->contentTypeDef, 0); + if (err != 0) { + xmlChar *strA = NULL, *strB = NULL; + + if (err == -1) + return(-1); + xmlSchemaCustomErr(ACTXT_CAST ctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, + NULL, WXS_BASIC_CAST type, + "The {content type} %s is not validly derived from the " + "base type's {content type} %s", + xmlSchemaGetComponentDesignation(&strA, + type->contentTypeDef), + xmlSchemaGetComponentDesignation(&strB, + base->contentTypeDef)); + FREE_AND_NULL(strA); + FREE_AND_NULL(strB); + return(ctxt->err); + } } else if ((base->contentType == XML_SCHEMA_CONTENT_MIXED) && (xmlSchemaIsParticleEmptiable( (xmlSchemaParticlePtr) base->subtypes))) { @@ -15388,11 +16339,11 @@ xmlSchemaCheckDerivationOKRestriction(xmlSchemaParserCtxtPtr ctxt, */ } else { xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_COS_CT_EXTENDS_1_1, - NULL, type, NULL, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, + WXS_BASIC_CAST type, NULL, "The content type of the base type must be either " "a simple type or 'mixed' and an emptiable particle", NULL); - return (XML_SCHEMAP_COS_CT_EXTENDS_1_1); + return (ctxt->err); } } else if (type->contentType == XML_SCHEMA_CONTENT_EMPTY) { /* @@ -15417,31 +16368,31 @@ xmlSchemaCheckDerivationOKRestriction(xmlSchemaParserCtxtPtr ctxt, */ } else { xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_COS_CT_EXTENDS_1_1, - NULL, type, NULL, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, + WXS_BASIC_CAST type, NULL, "The content type of the base type must be either " "empty or 'mixed' (or 'elements-only') and an emptiable " "particle", NULL); - return (XML_SCHEMAP_COS_CT_EXTENDS_1_1); + return (ctxt->err); } } else if ((type->contentType == XML_SCHEMA_CONTENT_ELEMENTS) || - HAS_MIXED_CONTENT(type)) { + WXS_HAS_MIXED_CONTENT(type)) { /* * SPEC (5.4.1.1) "The {content type} of the complex type definition * itself must be element-only" */ - if (HAS_MIXED_CONTENT(type) && (! HAS_MIXED_CONTENT(base))) { + if (WXS_HAS_MIXED_CONTENT(type) && (! WXS_HAS_MIXED_CONTENT(base))) { /* * SPEC (5.4.1.2) "The {content type} of the complex type * definition itself and of the {base type definition} must be * mixed" */ xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_COS_CT_EXTENDS_1_1, - NULL, type, NULL, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, + WXS_BASIC_CAST type, NULL, "If the content type is 'mixed', then the content type of the " "base type must also be 'mixed'", NULL); - return (XML_SCHEMAP_COS_CT_EXTENDS_1_1); + return (ctxt->err); } /* * SPEC (5.4.2) "The particle of the complex type definition itself @@ -15453,10 +16404,10 @@ xmlSchemaCheckDerivationOKRestriction(xmlSchemaParserCtxtPtr ctxt, */ } else { xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_COS_CT_EXTENDS_1_1, - NULL, type, NULL, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, + WXS_BASIC_CAST type, NULL, "The type is not a valid restriction of its base type", NULL); - return (XML_SCHEMAP_COS_CT_EXTENDS_1_1); + return (ctxt->err); } return (0); } @@ -15513,17 +16464,17 @@ xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt, * XML_SCHEMAP_SRC_CT_1 only yet. */ base = type->baseType; - if (! HAS_SIMPLE_CONTENT(type)) { + if (! WXS_HAS_SIMPLE_CONTENT(type)) { /* * 1 If the alternative is chosen, the type definition * ·resolved· to by the ·actual value· of the base [attribute] * must be a complex type definition; */ - if (! IS_COMPLEX_TYPE(base)) { + if (! WXS_IS_COMPLEX(base)) { xmlChar *str = NULL; xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_CT_1, - NULL, type, type->node, + WXS_BASIC_CAST type, type->node, "If using , the base type is expected to be " "a complex type. The base type '%s' is a simple type", xmlSchemaFormatQName(&str, base->targetNamespace, @@ -15539,7 +16490,7 @@ xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt, * 2.1 The type definition ·resolved· to by the ·actual value· of the * base [attribute] must be one of the following: */ - if (IS_SIMPLE_TYPE(base)) { + if (WXS_IS_SIMPLE(base)) { if (WXS_IS_EXTENSION(type) == 0) { xmlChar *str = NULL; /* @@ -15549,7 +16500,7 @@ xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt, /* TODO: Change error code to ..._SRC_CT_2_1_3. */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_CT_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "If using and , the base " "type must be a complex type. The base type '%s' is " "a simple type", @@ -15569,7 +16520,7 @@ xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt, */ if (base->contentTypeDef == NULL) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_INTERNAL, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "Internal error: xmlSchemaCheckSRCCT, " "'%s', base type has no content type", type->name); @@ -15601,7 +16552,7 @@ xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt, /* TODO: Change error code to ..._SRC_CT_2_2. */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_CT_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "A is expected among the children " "of , if is used and " "the base type '%s' is a complex type", @@ -15619,7 +16570,7 @@ xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt, if (WXS_IS_RESTRICTION(type)) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_CT_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "If and is used, the " "base type must be a simple type or a complex type with " "mixed content and particle emptiable. The base type " @@ -15629,7 +16580,7 @@ xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt, } else { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_CT_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "If and is used, the " "base type must be a simple type. The base type '%s' " "is a complex type", @@ -15650,7 +16601,7 @@ xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt, * above for {attribute wildcard} is satisfied, the intensional * intersection must be expressible, as defined in Attribute Wildcard * Intersection (§3.10.6). - * NOTE (4) is done in xmlSchemaBuildAttributeValidation(). + * NOTE (4) is done in xmlSchemaFixupTypeAttributeUses(). */ return (ret); } @@ -15782,7 +16733,7 @@ xmlSchemaCheckRCaseNameAndTypeOK(xmlSchemaParserCtxtPtr ctxt, set |= SUBSET_EXTENSION; set |= SUBSET_LIST; set |= SUBSET_UNION; - if (xmlSchemaCheckCOSDerivedOK(elemR->subtypes, + if (xmlSchemaCheckCOSDerivedOK(ACTXT_CAST ctxt, elemR->subtypes, elemB->subtypes, set) != 0) return (1); } @@ -15932,8 +16883,8 @@ xmlSchemaCheckCOSParticleRestrict(xmlSchemaParserCtxtPtr ctxt, { int ret = 0; - /*part = GET_PARTICLE(type); - basePart = GET_PARTICLE(base); + /*part = WXS_TYPE_PARTICLE(type); + basePart = WXS_TYPE_PARTICLE(base); */ TODO @@ -16049,7 +17000,7 @@ xmlSchemaCheckRCaseRecurse(xmlSchemaParserCtxtPtr ctxt, #define FACET_RESTR_MUTUAL_ERR(fac1, fac2) \ xmlSchemaPCustomErrExt(pctxt, \ XML_SCHEMAP_INVALID_FACET_VALUE, \ - NULL, (xmlSchemaTypePtr) fac1, fac1->node, \ + WXS_BASIC_CAST fac1, fac1->node, \ "It is an error for both '%s' and '%s' to be specified on the "\ "same type definition", \ BAD_CAST xmlSchemaFacetTypeToString(fac1->type), \ @@ -16058,13 +17009,13 @@ xmlSchemaCheckRCaseRecurse(xmlSchemaParserCtxtPtr ctxt, #define FACET_RESTR_ERR(fac1, msg) \ xmlSchemaPCustomErr(pctxt, \ XML_SCHEMAP_INVALID_FACET_VALUE, \ - NULL, (xmlSchemaTypePtr) fac1, fac1->node, \ + WXS_BASIC_CAST fac1, fac1->node, \ msg, NULL); #define FACET_RESTR_FIXED_ERR(fac) \ xmlSchemaPCustomErr(pctxt, \ XML_SCHEMAP_INVALID_FACET_VALUE, \ - NULL, (xmlSchemaTypePtr) fac, fac->node, \ + WXS_BASIC_CAST fac, fac->node, \ "The base type's facet is 'fixed', thus the value must not " \ "differ", NULL); @@ -16099,7 +17050,7 @@ xmlSchemaDeriveFacetErr(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_INVALID_FACET_VALUE, - NULL, (xmlSchemaTypePtr) facet1, facet1->node, + WXS_BASIC_CAST facet1, NULL, (const char *) msg, NULL); if (msg != NULL) @@ -16127,7 +17078,7 @@ xmlSchemaDeriveAndValidateFacets(xmlSchemaParserCtxtPtr pctxt, bfmaxlen = NULL, bfminlen = NULL, /* facets of the base type */ bfmininc = NULL, bfmaxinc = NULL, bfminexc = NULL, bfmaxexc = NULL; - int res, err = 0, fixedErr; + int res; /* err = 0, fixedErr; */ /* * SPEC st-restrict-facets 1: @@ -16211,7 +17162,6 @@ xmlSchemaDeriveAndValidateFacets(xmlSchemaParserCtxtPtr pctxt, break; } } - err = 0; /* * length and minLength or maxLength (2.2) + (3.2) */ @@ -16593,8 +17543,8 @@ xmlSchemaDeriveAndValidateFacets(xmlSchemaParserCtxtPtr pctxt, * Search for a duplicate facet in the current type. */ link = type->facetSet; - err = 0; - fixedErr = 0; + /* err = 0; */ + /* fixedErr = 0; */ while (link != NULL) { facet = link->facet; if (facet->type == bfacet->type) { @@ -16661,14 +17611,18 @@ xmlSchemaFinishMemberTypeDefinitionsProperty(xmlSchemaParserCtxtPtr pctxt, * The actual value is then formed by replacing any union type * definition in the ·explicit members· with the members of their * {member type definitions}, in order. + * + * TODO: There's a bug entry at + * "http://lists.w3.org/Archives/Public/www-xml-schema-comments/2005JulSep/0287.html" + * which indicates that we'll keep the union types the future. */ link = type->memberTypes; while (link != NULL) { - if (IS_NOT_TYPEFIXED(link->type)) - xmlSchemaTypeFixup(link->type, pctxt); + if (WXS_IS_TYPE_NOT_FIXED(link->type)) + xmlSchemaTypeFixup(link->type, ACTXT_CAST pctxt); - if (VARIETY_UNION(link->type)) { + if (WXS_IS_UNION(link->type)) { subLink = xmlSchemaGetUnionSimpleTypeMemberTypes(link->type); if (subLink != NULL) { link->type = subLink->type; @@ -16740,7 +17694,7 @@ xmlSchemaTypeFixupOptimFacets(xmlSchemaTypePtr type) if (has) type->flags |= XML_SCHEMAS_TYPE_HAS_FACETS; - if (has && (! needVal) && VARIETY_ATOMIC(type)) { + if (has && (! needVal) && WXS_IS_ATOMIC(type)) { xmlSchemaTypePtr prim = xmlSchemaGetPrimitiveType(type); /* * OPTIMIZE VAL TODO: Some facets need a computed value. @@ -16760,10 +17714,10 @@ xmlSchemaTypeFixupWhitespace(xmlSchemaTypePtr type) /* * Evaluate the whitespace-facet value. */ - if (VARIETY_LIST(type)) { + if (WXS_IS_LIST(type)) { type->flags |= XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE; return (0); - } else if (VARIETY_UNION(type)) + } else if (WXS_IS_UNION(type)) return (0); if (type->facetSet != NULL) { @@ -16813,7 +17767,6 @@ xmlSchemaTypeFixupWhitespace(xmlSchemaTypePtr type) break; } } - return (0); } return (0); } @@ -16824,11 +17777,11 @@ xmlSchemaFixupSimpleTypeStageOne(xmlSchemaParserCtxtPtr pctxt, { if (type->type != XML_SCHEMA_TYPE_SIMPLE) return(0); - if (! TYPE_IS_NOT_FIXEDUP_1(type)) + if (! WXS_IS_TYPE_NOT_FIXED_1(type)) return(0); type->flags |= XML_SCHEMAS_TYPE_FIXUP_1; - if (VARIETY_LIST(type)) { + if (WXS_IS_LIST(type)) { /* * Corresponds to ... */ @@ -16840,7 +17793,7 @@ xmlSchemaFixupSimpleTypeStageOne(xmlSchemaParserCtxtPtr pctxt, "list type has no item-type assigned"); return(-1); } - } else if (VARIETY_UNION(type)) { + } else if (WXS_IS_UNION(type)) { /* * Corresponds to ... */ @@ -16861,7 +17814,7 @@ xmlSchemaFixupSimpleTypeStageOne(xmlSchemaParserCtxtPtr pctxt, "type has no base-type assigned"); return(-1); } - if (TYPE_IS_NOT_FIXEDUP_1(type->baseType)) + if (WXS_IS_TYPE_NOT_FIXED_1(type->baseType)) if (xmlSchemaFixupSimpleTypeStageOne(pctxt, type->baseType) == -1) return(-1); /* @@ -16869,15 +17822,15 @@ xmlSchemaFixupSimpleTypeStageOne(xmlSchemaParserCtxtPtr pctxt, * If the alternative is chosen, then the * {variety} of the {base type definition}. */ - if (VARIETY_ATOMIC(type->baseType)) + if (WXS_IS_ATOMIC(type->baseType)) type->flags |= XML_SCHEMAS_TYPE_VARIETY_ATOMIC; - else if (VARIETY_LIST(type->baseType)) { + else if (WXS_IS_LIST(type->baseType)) { type->flags |= XML_SCHEMAS_TYPE_VARIETY_LIST; /* * Inherit the itemType. */ type->subtypes = type->baseType->subtypes; - } else if (VARIETY_UNION(type->baseType)) { + } else if (WXS_IS_UNION(type->baseType)) { type->flags |= XML_SCHEMAS_TYPE_VARIETY_UNION; /* * NOTE that we won't assign the memberTypes of the base, @@ -16902,7 +17855,7 @@ xmlSchemaDebugFixedType(xmlSchemaParserCtxtPtr pctxt, } else { xmlGenericError(xmlGenericErrorContext, "Type of %s :", name); } - if ((IS_SIMPLE_TYPE(type)) || (IS_COMPLEX_TYPE(type))) { + if ((WXS_IS_SIMPLE(type)) || (WXS_IS_COMPLEX(type))) { switch (type->contentType) { case XML_SCHEMA_CONTENT_SIMPLE: xmlGenericError(xmlGenericErrorContext, "simple\n"); @@ -16954,7 +17907,7 @@ xmlSchemaFixupSimpleTypeStageTwo(xmlSchemaParserCtxtPtr pctxt, if (type->type != XML_SCHEMA_TYPE_SIMPLE) return(-1); - if (! IS_NOT_TYPEFIXED(type)) + if (! WXS_IS_TYPE_NOT_FIXED(type)) return(0); type->flags |= XML_SCHEMAS_TYPE_INTERNAL_RESOLVED; @@ -16965,11 +17918,13 @@ xmlSchemaFixupSimpleTypeStageTwo(xmlSchemaParserCtxtPtr pctxt, "missing baseType"); goto exit_failure; } - if (IS_NOT_TYPEFIXED(type->baseType)) - xmlSchemaTypeFixup(type->baseType, pctxt); + if (WXS_IS_TYPE_NOT_FIXED(type->baseType)) + xmlSchemaTypeFixup(type->baseType, ACTXT_CAST pctxt); /* * If a member type of a union is a union itself, we need to substitute * that member type for its member types. + * NOTE that this might change in WXS 1.1; i.e. we will keep the union + * types in WXS 1.1. */ if ((type->memberTypes != NULL) && (xmlSchemaFinishMemberTypeDefinitionsProperty(pctxt, type) == -1)) @@ -17043,19 +17998,19 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, int res = 0, olderrs = pctxt->nberrors; xmlSchemaTypePtr baseType = type->baseType; - if (! IS_NOT_TYPEFIXED(type)) + if (! WXS_IS_TYPE_NOT_FIXED(type)) return(0); type->flags |= XML_SCHEMAS_TYPE_INTERNAL_RESOLVED; if (baseType == NULL) { - PERROR_INT("xmlSchemaFixupSimpleTypeStageTwo", + PERROR_INT("xmlSchemaFixupComplexType", "missing baseType"); goto exit_failure; } /* * Fixup the base type. */ - if (IS_NOT_TYPEFIXED(baseType)) - xmlSchemaTypeFixup(baseType, pctxt); + if (WXS_IS_TYPE_NOT_FIXED(baseType)) + xmlSchemaTypeFixup(baseType, ACTXT_CAST pctxt); if (baseType->flags & XML_SCHEMAS_TYPE_INTERNAL_INVALID) { /* * Skip fixup if the base type is invalid. @@ -17075,7 +18030,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, /* * Corresponds to ... */ - if ((IS_COMPLEX_TYPE(baseType)) && + if ((WXS_IS_COMPLEX(baseType)) && (baseType->contentTypeDef != NULL) && (WXS_IS_RESTRICTION(type))) { xmlSchemaTypePtr contentBase, content; @@ -17117,12 +18072,12 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, #ifdef ENABLE_NAMED_LOCALS snprintf(buf, 29, "#scST%d", ++(pctxt->counter)); tmpname = xmlDictLookup(pctxt->dict, BAD_CAST buf, -1); - content = xmlSchemaAddType(pctxt, - pctxt->schema, tmpname, type->targetNamespace, + content = xmlSchemaAddType(pctxt, pctxt->schema, + XML_SCHEMA_TYPE_SIMPLE, tmpname, type->targetNamespace, type->node, 0); #else - content = xmlSchemaAddType(pctxt, - pctxt->schema, NULL, type->targetNamespace, + content = xmlSchemaAddType(pctxt, pctxt->schema, + XML_SCHEMA_TYPE_SIMPLE, NULL, type->targetNamespace, type->node, 0); #endif if (content == NULL) @@ -17143,8 +18098,8 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, type->facetSet = NULL; type->contentTypeDef = content; - if (IS_NOT_TYPEFIXED(contentBase)) - xmlSchemaTypeFixup(contentBase, pctxt); + if (WXS_IS_TYPE_NOT_FIXED(contentBase)) + xmlSchemaTypeFixup(contentBase, ACTXT_CAST pctxt); /* * Fixup the newly created type. We don't need to check * for circularity here. @@ -17154,7 +18109,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, res = xmlSchemaFixupSimpleTypeStageTwo(pctxt, content); HFAILURE HERROR - } else if ((IS_COMPLEX_TYPE(baseType)) && + } else if ((WXS_IS_COMPLEX(baseType)) && (baseType->contentType == XML_SCHEMA_CONTENT_MIXED) && (WXS_IS_RESTRICTION(type))) { /* @@ -17169,14 +18124,14 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, */ xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_INTERNAL, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "Internal error: xmlSchemaTypeFixup, " "complex type '%s': the " "is missing a child, but was not catched " "by xmlSchemaCheckSRCCT()", type->name); goto exit_failure; } - } else if ((IS_COMPLEX_TYPE(baseType)) && WXS_IS_EXTENSION(type)) { + } else if ((WXS_IS_COMPLEX(baseType)) && WXS_IS_EXTENSION(type)) { /* * SPEC (3) If + base is with * content, "...then the {content type} of that @@ -17189,7 +18144,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, */ xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_INTERNAL, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "Internal error: xmlSchemaTypeFixup, " "complex type '%s': the ed base type is " "a complex type with no simple content type", @@ -17197,7 +18152,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, goto exit_failure; } type->contentTypeDef = baseType->contentTypeDef; - } else if ((IS_SIMPLE_TYPE(baseType)) && WXS_IS_EXTENSION(type)) { + } else if ((WXS_IS_SIMPLE(baseType)) && WXS_IS_EXTENSION(type)) { /* * SPEC (4) + base is * "... then that simple type definition" @@ -17209,7 +18164,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, */ xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_INTERNAL, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "Internal error: xmlSchemaTypeFixup, " "complex type '%s' with : unhandled " "derivation case", type->name); @@ -17257,7 +18212,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, goto exit_failure; /* * Create the model group. - */ + */ /* URGENT TODO: avoid adding to pending items. */ particle->children = (xmlSchemaTreeItemPtr) xmlSchemaAddModelGroup(pctxt, pctxt->schema, XML_SCHEMA_TYPE_SEQUENCE, type->node); @@ -17322,7 +18277,47 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, * "A model group whose {compositor} is sequence and whose * {particles} are..." */ - if (! dummySequence) { + if ((WXS_TYPE_PARTICLE(type) != NULL) && + (WXS_TYPE_PARTICLE_TERM(type) != NULL) && + ((WXS_TYPE_PARTICLE_TERM(type))->type == + XML_SCHEMA_TYPE_ALL)) + { + /* + * SPEC cos-all-limited (1) + */ + xmlSchemaCustomErr(ACTXT_CAST pctxt, + /* TODO: error code */ + XML_SCHEMAP_COS_ALL_LIMITED, + WXS_ITEM_NODE(type), NULL, + "The type has an 'all' model group in its " + "{content type} and thus cannot be derived from " + "a non-empty type, since this would produce a " + "'sequence' model group containing the 'all' " + "model group; 'all' model groups are not " + "allowed to appear inside other model groups", + NULL, NULL); + + } else if ((WXS_TYPE_PARTICLE(baseType) != NULL) && + (WXS_TYPE_PARTICLE_TERM(baseType) != NULL) && + ((WXS_TYPE_PARTICLE_TERM(baseType))->type == + XML_SCHEMA_TYPE_ALL)) + { + /* + * SPEC cos-all-limited (1) + */ + xmlSchemaCustomErr(ACTXT_CAST pctxt, + /* TODO: error code */ + XML_SCHEMAP_COS_ALL_LIMITED, + WXS_ITEM_NODE(type), NULL, + "A type cannot be derived by extension from a type " + "which has an 'all' model group in its " + "{content type}, since this would produce a " + "'sequence' model group containing the 'all' " + "model group; 'all' model groups are not " + "allowed to appear inside other model groups", + NULL, NULL); + + } else if (! dummySequence) { xmlSchemaTreeItemPtr effectiveContent = (xmlSchemaTreeItemPtr) type->subtypes; /* @@ -17340,7 +18335,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, XML_SCHEMA_TYPE_SEQUENCE, type->node); if (particle->children == NULL) goto exit_failure; - type->subtypes = (xmlSchemaTypePtr) particle; + WXS_TYPE_CONTENTTYPE(type) = (xmlSchemaTypePtr) particle; /* * SPEC "the particle of the {content type} of * the ... base ..." @@ -17362,6 +18357,16 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, * SPEC "followed by the ·effective content·." */ particle->next = effectiveContent; + /* + * This all will result in: + * new-particle + * --> new-sequence( + * new-particle + * --> base-model, + * this-particle + * --> this-model + * ) + */ } else { /* * This is the case when there is already an empty @@ -17379,16 +18384,21 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, } } /* - * Apply the complex type component constraints; this will not - * check attributes, since this is done in - * xmlSchemaBuildAttributeValidation(). + * Now fixup attribute uses: + * - expand attr. group references + * - intersect attribute wildcards + * - inherit attribute uses of the base type + * - inherit or union attr. wildcards if extending + * - apply attr. use prohibitions if restricting */ - res = xmlSchemaCheckCTComponent(pctxt, type); + res = xmlSchemaFixupTypeAttributeUses(pctxt, type); HFAILURE HERROR /* - * Inherit & check constraints for attributes. + * Apply the complex type component constraints; this will not + * check attributes, since this is done in + * xmlSchemaFixupTypeAttributeUses(). */ - res = xmlSchemaBuildAttributeValidation(pctxt, type); + res = xmlSchemaCheckCTComponent(pctxt, type); HFAILURE HERROR #ifdef DEBUG_TYPE @@ -17425,16 +18435,21 @@ exit_failure: */ static int xmlSchemaTypeFixup(xmlSchemaTypePtr type, - xmlSchemaParserCtxtPtr pctxt) + xmlSchemaAbstractCtxtPtr actxt) { if (type == NULL) return(0); - if (! IS_NOT_TYPEFIXED(type)) + if (actxt->type != XML_SCHEMA_CTXT_PARSER) { + AERROR_INT("xmlSchemaTypeFixup", + "this function needs a parser context"); + return(-1); + } + if (! WXS_IS_TYPE_NOT_FIXED(type)) return(0); if (type->type == XML_SCHEMA_TYPE_COMPLEX) - return(xmlSchemaFixupComplexType(pctxt, type)); + return(xmlSchemaFixupComplexType(PCTXT_CAST actxt, type)); else if (type->type == XML_SCHEMA_TYPE_SIMPLE) - return(xmlSchemaFixupSimpleTypeStageTwo(pctxt, type)); + return(xmlSchemaFixupSimpleTypeStageTwo(PCTXT_CAST actxt, type)); return(0); } @@ -17546,7 +18561,7 @@ xmlSchemaCheckFacet(xmlSchemaFacetPtr facet, xmlChar *str = NULL; xmlSchemaCustomErr(ACTXT_CAST pctxt, - ret, facet->node, (xmlSchemaTypePtr) facet, + ret, facet->node, WXS_BASIC_CAST facet, "The value '%s' of the facet does not validate " "against the base type '%s'", facet->value, @@ -17571,7 +18586,7 @@ xmlSchemaCheckFacet(xmlSchemaFacetPtr facet, /* No error message for RelaxNG. */ if (ctxtGiven) { xmlSchemaCustomErr(ACTXT_CAST pctxt, - ret, facet->node, typeDecl, + ret, facet->node, WXS_BASIC_CAST typeDecl, "The value '%s' of the facet 'pattern' is not a " "valid regular expression", facet->value, NULL); @@ -17582,33 +18597,43 @@ xmlSchemaCheckFacet(xmlSchemaFacetPtr facet, case XML_SCHEMA_FACET_FRACTIONDIGITS: case XML_SCHEMA_FACET_LENGTH: case XML_SCHEMA_FACET_MAXLENGTH: - case XML_SCHEMA_FACET_MINLENGTH:{ + case XML_SCHEMA_FACET_MINLENGTH: + + if (facet->type == XML_SCHEMA_FACET_TOTALDIGITS) { + ret = xmlSchemaValidatePredefinedType( + xmlSchemaGetBuiltInType(XML_SCHEMAS_PINTEGER), + facet->value, &(facet->val)); + } else { ret = xmlSchemaValidatePredefinedType( xmlSchemaGetBuiltInType(XML_SCHEMAS_NNINTEGER), facet->value, &(facet->val)); - if (ret != 0) { - if (ret < 0) { - /* No error message for RelaxNG. */ - if (ctxtGiven) { - PERROR_INT("xmlSchemaCheckFacet", - "validating facet value"); - } - goto internal_error; - } - ret = XML_SCHEMAP_INVALID_FACET_VALUE; + } + if (ret != 0) { + if (ret < 0) { /* No error message for RelaxNG. */ if (ctxtGiven) { - /* error code */ - xmlSchemaCustomErr(ACTXT_CAST pctxt, - ret, facet->node, typeDecl, - "The value '%s' of the facet '%s' is not a valid " - "'nonNegativeInteger'", - facet->value, - xmlSchemaFacetTypeToString(facet->type)); - } - } - break; - } + PERROR_INT("xmlSchemaCheckFacet", + "validating facet value"); + } + goto internal_error; + } + ret = XML_SCHEMAP_INVALID_FACET_VALUE; + /* No error message for RelaxNG. */ + if (ctxtGiven) { + /* error code */ + xmlSchemaCustomErr4(ACTXT_CAST pctxt, + ret, facet->node, WXS_BASIC_CAST typeDecl, + "The value '%s' of the facet '%s' is not a valid '%s'", + facet->value, + xmlSchemaFacetTypeToString(facet->type), + (facet->type != XML_SCHEMA_FACET_TOTALDIGITS) ? + BAD_CAST "nonNegativeInteger" : + BAD_CAST "positiveInteger", + NULL); + } + } + break; + case XML_SCHEMA_FACET_WHITESPACE:{ if (xmlStrEqual(facet->value, BAD_CAST "preserve")) { facet->whitespace = XML_SCHEMAS_FACET_PRESERVE; @@ -17622,7 +18647,7 @@ xmlSchemaCheckFacet(xmlSchemaFacetPtr facet, if (ctxtGiven) { /* error was previously: XML_SCHEMAP_INVALID_WHITE_SPACE */ xmlSchemaCustomErr(ACTXT_CAST pctxt, - ret, facet->node, typeDecl, + ret, facet->node, WXS_BASIC_CAST typeDecl, "The value '%s' of the facet 'whitespace' is not " "valid", facet->value, NULL); } @@ -17779,7 +18804,7 @@ xmlSchemaCheckGroupDefCircular(xmlSchemaModelGroupDefPtr item, */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_MG_PROPS_CORRECT_2, - NULL, NULL, GET_NODE(circ), + NULL, WXS_ITEM_NODE(circ), "Circular reference to the model group definition '%s' " "defined", xmlSchemaFormatQName(&str, item->targetNamespace, item->name)); @@ -17794,114 +18819,115 @@ xmlSchemaCheckGroupDefCircular(xmlSchemaModelGroupDefPtr item, } /** - * xmlSchemaGroupDefReferenceTermFixup: - * @item: the particle with a model group definition as term + * xmlSchemaModelGroupToModelGroupDefFixup: * @ctxt: the parser context - * @name: the name - * - * Checks cos-all-limited. + * @mg: the model group * * Assigns the model group of model group definitions to the "term" * of the referencing particle. - * In xmlSchemaResolveParticleReferences the model group definitions was assigned - * to the "term", since needed for the circularity check. + * In xmlSchemaResolveModelGroupParticleReferences the model group + * definitions were assigned to the "term", since needed for the + * circularity check. + * + * Schema Component Constraint: + * All Group Limited (cos-all-limited) (1.2) */ static void -xmlSchemaGroupDefReferenceTermFixup(xmlSchemaParticlePtr item, - xmlSchemaParserCtxtPtr ctxt ATTRIBUTE_UNUSED, - const xmlChar * name ATTRIBUTE_UNUSED) +xmlSchemaModelGroupToModelGroupDefFixup( + xmlSchemaParserCtxtPtr ctxt ATTRIBUTE_UNUSED, + xmlSchemaModelGroupPtr mg) { - if ((item == NULL) || - (item->type != XML_SCHEMA_TYPE_PARTICLE) || - (item->children == NULL) || - (item->children->type != XML_SCHEMA_TYPE_GROUP) || - (item->children->children == NULL)) - return; - item->children = item->children->children; - /* - * TODO: Not nice, but we will anchor cos-all-limited here. - */ - if ((item->children->type == XML_SCHEMA_TYPE_ALL) && - (item->maxOccurs != 1)) { + xmlSchemaParticlePtr particle = WXS_MODELGROUP_PARTICLE(mg); + + while (particle != NULL) { + if ((WXS_PARTICLE_TERM(particle) == NULL) || + ((WXS_PARTICLE_TERM(particle))->type != + XML_SCHEMA_TYPE_GROUP)) + { + particle = WXS_PTC_CAST particle->next; + continue; + } + if (WXS_MODELGROUPDEF_MODEL(WXS_PARTICLE_TERM(particle)) == NULL) { + /* + * TODO: Remove the particle. + */ + WXS_PARTICLE_TERM(particle) = NULL; + particle = WXS_PTC_CAST particle->next; + continue; + } /* - * SPEC (1.2) "the {term} property of a particle with - * {max occurs}=1which is part of a pair which constitutes the - * {content type} of a complex type definition." + * Assign the model group to the {term} of the particle. */ - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3, - NULL, (xmlSchemaTypePtr) item, item->node, - "The particle's 'maxOccurs' must be 1, since an xs:all model " - "group is its term", NULL); + WXS_PARTICLE_TERM(particle) = + WXS_TREE_CAST WXS_MODELGROUPDEF_MODEL(WXS_PARTICLE_TERM(particle)); + + particle = WXS_PTC_CAST particle->next; } } /** - * xmlSchemaGetCircAttrGrRef: + * xmlSchemaCheckAttrGroupCircularRecur: * @ctxtGr: the searched attribute group * @attr: the current attribute list to be processed * * This one is intended to be used by - * xmlSchemaCheckSRCAttributeGroupCircular only. + * xmlSchemaCheckAttrGroupCircular only. * * Returns the circular attribute grou reference, otherwise NULL. */ -static xmlSchemaAttributeGroupPtr -xmlSchemaGetCircAttrGrRef(xmlSchemaAttributeGroupPtr ctxtGr, - xmlSchemaAttributePtr attr) +static xmlSchemaQNameRefPtr +xmlSchemaCheckAttrGroupCircularRecur(xmlSchemaAttributeGroupPtr ctxtGr, + xmlSchemaItemListPtr list) { - xmlSchemaAttributeGroupPtr circ = NULL, gr; - int marked; + xmlSchemaAttributeGroupPtr gr; + xmlSchemaQNameRefPtr ref, circ; + int i; /* * We will search for an attribute group reference which * references the context attribute group. */ - while (attr != NULL) { - marked = 0; - if (attr->type == XML_SCHEMA_TYPE_ATTRIBUTEGROUP) { - gr = (xmlSchemaAttributeGroupPtr) attr; - if (gr->refItem != NULL) { - if (gr->refItem == ctxtGr) - return (gr); - else if (gr->refItem->flags & - XML_SCHEMAS_ATTRGROUP_MARKED) { - attr = attr->next; - continue; - } else { - /* - * Mark as visited to avoid infinite recursion on - * circular references not yet examined. - */ - gr->refItem->flags |= XML_SCHEMAS_ATTRGROUP_MARKED; - marked = 1; - } - } - if (gr->attributes != NULL) - circ = xmlSchemaGetCircAttrGrRef(ctxtGr, gr->attributes); + for (i = 0; i < list->nbItems; i++) { + ref = list->items[i]; + if ((ref->type == XML_SCHEMA_EXTRA_QNAMEREF) && + (ref->itemType == XML_SCHEMA_TYPE_ATTRIBUTEGROUP) && + (ref->item != NULL)) + { + gr = WXS_ATTR_GROUP_CAST ref->item; + if (gr == ctxtGr) + return(ref); + if (gr->flags & XML_SCHEMAS_ATTRGROUP_MARKED) + continue; /* - * Unmark the visited group's attributes. + * Mark as visited to avoid infinite recursion on + * circular references not yet examined. */ - if (marked) - gr->refItem->flags ^= XML_SCHEMAS_ATTRGROUP_MARKED; - if (circ != NULL) - return (circ); + if ((gr->attrUses) && + (gr->flags & XML_SCHEMAS_ATTRGROUP_HAS_REFS)) + { + gr->flags |= XML_SCHEMAS_ATTRGROUP_MARKED; + circ = xmlSchemaCheckAttrGroupCircularRecur(ctxtGr, + (xmlSchemaItemListPtr) gr->attrUses); + gr->flags ^= XML_SCHEMAS_ATTRGROUP_MARKED; + if (circ != NULL) + return (circ); + } + } - attr = attr->next; } return (NULL); } /** - * xmlSchemaCheckSRCAttributeGroupCircular: + * xmlSchemaCheckAttrGroupCircular: * attrGr: the attribute group definition * @ctxt: the parser context * @name: the name * * Checks for circular references of attribute groups. */ -static void +static int xmlSchemaCheckAttrGroupCircular(xmlSchemaAttributeGroupPtr attrGr, - xmlSchemaParserCtxtPtr ctxt) + xmlSchemaParserCtxtPtr ctxt) { /* * Schema Representation Constraint: @@ -17917,34 +18943,341 @@ xmlSchemaCheckAttrGroupCircular(xmlSchemaAttributeGroupPtr attrGr, * it must not be the case that a ·QName· is encountered at any depth * which resolves to the component corresponding to this . */ - /* - * Only global components can be referenced. - */ - if (((attrGr->flags & XML_SCHEMAS_ATTRGROUP_GLOBAL) == 0) || - (attrGr->attributes == NULL)) - return; + if (attrGr->attrUses == NULL) + return(0); + else if ((attrGr->flags & XML_SCHEMAS_ATTRGROUP_HAS_REFS) == 0) + return(0); else { - xmlSchemaAttributeGroupPtr circ; - - circ = xmlSchemaGetCircAttrGrRef(attrGr, attrGr->attributes); + xmlSchemaQNameRefPtr circ; + + circ = xmlSchemaCheckAttrGroupCircularRecur(attrGr, + (xmlSchemaItemListPtr) attrGr->attrUses); if (circ != NULL) { + xmlChar *str = NULL; /* * TODO: Report the referenced attr group as QName. */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3, - NULL, NULL, circ->node, + NULL, WXS_ITEM_NODE(WXS_BASIC_CAST circ), "Circular reference to the attribute group '%s' " - "defined", attrGr->name); + "defined", xmlSchemaGetComponentQName(&str, attrGr)); + FREE_AND_NULL(str); /* * NOTE: We will cut the reference to avoid further * confusion of the processor. - * BADSPEC: The spec should define how to process in this case. + * BADSPEC TODO: The spec should define how to process in this case. + */ + circ->item = NULL; + return(ctxt->err); + } + } + return(0); +} + +static int +xmlSchemaAttributeGroupExpandRefs(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaAttributeGroupPtr attrGr); + +/** + * xmlSchemaExpandAttributeGroupRefs: + * @pctxt: the parser context + * @node: the node of the component holding the attribute uses + * @completeWild: the intersected wildcard to be returned + * @list: the attribute uses + * + * Substitutes contained attribute group references + * for their attribute uses. Wilcards are intersected. + * Attribute use prohibitions are removed from the list + * and returned via the @prohibs list. + * Pointlessness of attr. prohibs, if a matching attr. decl + * is existent a well, are checked. + */ +static int +xmlSchemaExpandAttributeGroupRefs(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaBasicItemPtr item, + xmlSchemaWildcardPtr *completeWild, + xmlSchemaItemListPtr list, + xmlSchemaItemListPtr prohibs) +{ + xmlSchemaAttributeGroupPtr gr; + xmlSchemaAttributeUsePtr use; + xmlSchemaItemListPtr sublist; + int i, j; + int created = (*completeWild == NULL) ? 0 : 1; + + if (prohibs) + prohibs->nbItems = 0; + + for (i = 0; i < list->nbItems; i++) { + use = list->items[i]; + + if (use->type == XML_SCHEMA_EXTRA_ATTR_USE_PROHIB) { + if (prohibs == NULL) { + PERROR_INT("xmlSchemaExpandAttributeGroupRefs", + "unexpected attr prohibition found"); + return(-1); + } + /* + * Remove from attribute uses. + */ + if (xmlSchemaItemListRemove(list, i) == -1) + return(-1); + i--; + /* + * Note that duplicate prohibitions were already + * handled at parsing time. + */ + /* + * Add to list of prohibitions. + */ + xmlSchemaItemListAddSize(prohibs, 2, use); + continue; + } + if ((use->type == XML_SCHEMA_EXTRA_QNAMEREF) && + ((WXS_QNAME_CAST use)->itemType == XML_SCHEMA_TYPE_ATTRIBUTEGROUP)) + { + if ((WXS_QNAME_CAST use)->item == NULL) + return(-1); + gr = WXS_ATTR_GROUP_CAST (WXS_QNAME_CAST use)->item; + /* + * Expand the referenced attr. group. + * TODO: remove this, this is done in a previous step, so + * already done here. + */ + if ((gr->flags & XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED) == 0) { + if (xmlSchemaAttributeGroupExpandRefs(pctxt, gr) == -1) + return(-1); + } + /* + * Build the 'complete' wildcard; i.e. intersect multiple + * wildcards. + */ + if (gr->attributeWildcard != NULL) { + if (*completeWild == NULL) { + *completeWild = gr->attributeWildcard; + } else { + if (! created) { + xmlSchemaWildcardPtr tmpWild; + + /* + * Copy the first encountered wildcard as context, + * except for the annotation. + * + * Although the complete wildcard might not correspond + * to any node in the schema, we will anchor it on + * the node of the owner component. + */ + tmpWild = xmlSchemaAddWildcard(pctxt, pctxt->schema, + XML_SCHEMA_TYPE_ANY_ATTRIBUTE, + WXS_ITEM_NODE(item)); + if (tmpWild == NULL) + return(-1); + if (xmlSchemaCloneWildcardNsConstraints(pctxt, + tmpWild, *completeWild) == -1) + return (-1); + tmpWild->processContents = (*completeWild)->processContents; + *completeWild = tmpWild; + created = 1; + } + + if (xmlSchemaIntersectWildcards(pctxt, *completeWild, + gr->attributeWildcard) == -1) + return(-1); + } + } + /* + * Just remove the reference if the referenced group does not + * contain any attribute uses. + */ + if (gr->attrUses == NULL) { + if (xmlSchemaItemListRemove(list, i) == -1) + return(-1); + i--; + continue; + } + /* + * Add the attribute uses. + */ + sublist = ((xmlSchemaItemListPtr) gr->attrUses); + if (sublist->nbItems != 0) { + list->items[i] = sublist->items[0]; + if (sublist->nbItems != 1) { + for (j = 1; j < sublist->nbItems; j++) { + i++; + if (xmlSchemaItemListInsert(list, + sublist->items[j], i) == -1) + return(-1); + } + } + } + } + + } + /* + * Handle pointless prohibitions of declared attributes. + */ + if (prohibs && (prohibs->nbItems != 0) && (list->nbItems != 0)) { + xmlSchemaAttributeUseProhibPtr prohib; + + for (i = prohibs->nbItems -1; i >= 0; i--) { + prohib = prohibs->items[i]; + for (j = 0; j < list->nbItems; j++) { + use = list->items[j]; + + if ((prohib->name == WXS_ATTRUSE_DECL_NAME(use)) && + (prohib->targetNamespace == WXS_ATTRUSE_DECL_TNS(use))) + { + xmlChar *str = NULL; + + xmlSchemaCustomWarning(ACTXT_CAST pctxt, + XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, + prohib->node, NULL, + "Skipping pointless attribute use prohibition " + "'%s', since a corresponding attribute use " + "exists already in the type definition", + xmlSchemaFormatQName(&str, + prohib->targetNamespace, prohib->name), + NULL, NULL); + FREE_AND_NULL(str); + /* + * Remove the prohibition. + */ + if (xmlSchemaItemListRemove(prohibs, i) == -1) + return(-1); + break; + } + } + } + } + return(0); +} + +/** + * xmlSchemaAttributeGroupExpandRefs: + * @pctxt: the parser context + * @attrGr: the attribute group definition + * + * Computation of: + * {attribute uses} property + * {attribute wildcard} property + * + * Substitutes contained attribute group references + * for their attribute uses. Wilcards are intersected. + */ +static int +xmlSchemaAttributeGroupExpandRefs(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaAttributeGroupPtr attrGr) +{ + if ((attrGr->attrUses == NULL) || + (attrGr->flags & XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED)) + return(0); + + attrGr->flags |= XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED; + if (xmlSchemaExpandAttributeGroupRefs(pctxt, WXS_BASIC_CAST attrGr, + &(attrGr->attributeWildcard), attrGr->attrUses, NULL) == -1) + return(-1); + return(0); +} + +/** + * xmlSchemaAttributeGroupExpandRefs: + * @pctxt: the parser context + * @attrGr: the attribute group definition + * + * Substitutes contained attribute group references + * for their attribute uses. Wilcards are intersected. + * + * Schema Component Constraint: + * Attribute Group Definition Properties Correct (ag-props-correct) + */ +static int +xmlSchemaCheckAGPropsCorrect(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaAttributeGroupPtr attrGr) +{ + /* + * SPEC ag-props-correct + * (1) "The values of the properties of an attribute group definition + * must be as described in the property tableau in The Attribute + * Group Definition Schema Component (§3.6.1), modulo the impact of + * Missing Sub-components (§5.3);" + */ + + if ((attrGr->attrUses != NULL) && + (WXS_LIST_CAST attrGr->attrUses)->nbItems > 1) + { + xmlSchemaItemListPtr uses = WXS_LIST_CAST attrGr->attrUses; + xmlSchemaAttributeUsePtr use, tmp; + int i, j, hasId = 0; + + for (i = uses->nbItems -1; i >= 0; i--) { + use = uses->items[i]; + /* + * SPEC ag-props-correct + * (2) "Two distinct members of the {attribute uses} must not have + * {attribute declaration}s both of whose {name}s match and whose + * {target namespace}s are identical." + */ + if (i > 0) { + for (j = i -1; j >= 0; j--) { + tmp = uses->items[j]; + if ((WXS_ATTRUSE_DECL_NAME(use) == + WXS_ATTRUSE_DECL_NAME(tmp)) && + (WXS_ATTRUSE_DECL_TNS(use) == + WXS_ATTRUSE_DECL_TNS(tmp))) + { + xmlChar *str = NULL; + + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_AG_PROPS_CORRECT, + attrGr->node, WXS_BASIC_CAST attrGr, + "Duplicate %s", + xmlSchemaGetComponentDesignation(&str, use), + NULL); + FREE_AND_NULL(str); + /* + * Remove the duplicate. + */ + if (xmlSchemaItemListRemove(uses, i) == -1) + return(-1); + goto next_use; + } + } + } + /* + * SPEC ag-props-correct + * (3) "Two distinct members of the {attribute uses} must not have + * {attribute declaration}s both of whose {type definition}s are or + * are derived from ID." + * TODO: Does 'derived' include member-types of unions? */ - circ->attributes = NULL; - circ->refItem = NULL; + if (WXS_ATTRUSE_TYPEDEF(use) != NULL) { + if (xmlSchemaIsDerivedFromBuiltInType( + WXS_ATTRUSE_TYPEDEF(use), XML_SCHEMAS_ID)) + { + if (hasId) { + xmlChar *str = NULL; + + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_AG_PROPS_CORRECT, + attrGr->node, WXS_BASIC_CAST attrGr, + "There must not exist more than one attribute " + "declaration of type 'xs:ID' " + "(or derived from 'xs:ID'). The %s violates this " + "constraint", + xmlSchemaGetComponentDesignation(&str, use), + NULL); + FREE_AND_NULL(str); + if (xmlSchemaItemListRemove(uses, i) == -1) + return(-1); + } + hasId = 1; + } + } +next_use: {} } } + return(0); } /** @@ -17953,88 +19286,108 @@ xmlSchemaCheckAttrGroupCircular(xmlSchemaAttributeGroupPtr attrGr, * @ctxt: the schema parser context * @name: the attribute name * - * Fixes finish doing the computations on the attributes definitions + * Resolves references to attribute group definitions. */ -static void -xmlSchemaResolveAttrGroupReferences(xmlSchemaAttributeGroupPtr attrgrp, - xmlSchemaParserCtxtPtr ctxt, const xmlChar * name) +static int +xmlSchemaResolveAttrGroupReferences(xmlSchemaQNameRefPtr ref, + xmlSchemaParserCtxtPtr ctxt) { - if (name == NULL) - name = attrgrp->name; - if (attrgrp->attributes != NULL) - return; - if (attrgrp->ref != NULL) { - xmlSchemaAttributeGroupPtr ref; + xmlSchemaAttributeGroupPtr group; - ref = xmlSchemaGetAttributeGroup(ctxt->schema, attrgrp->ref, - attrgrp->refNs); - if (ref == NULL) { - xmlSchemaPResCompAttrErr(ctxt, - XML_SCHEMAP_SRC_RESOLVE, - (xmlSchemaTypePtr) attrgrp, attrgrp->node, - "ref", attrgrp->ref, attrgrp->refNs, - XML_SCHEMA_TYPE_ATTRIBUTEGROUP, NULL); - return; - } - attrgrp->refItem = ref; - /* - * URGENT TODO: Do we need to resolve refs of the - * referenced attr. group itself first? I don't think so. - * If we need this, then check for circularity first! - * REMOVED: xmlSchemaResolveAttrGroupReferences(ref, ctxt, NULL); - */ - attrgrp->attributes = ref->attributes; - attrgrp->attributeWildcard = ref->attributeWildcard; - } + if (ref->item != NULL) + return(0); + group = xmlSchemaGetAttributeGroup(ctxt->schema, + ref->name, + ref->targetNamespace); + if (group == NULL) { + xmlSchemaPResCompAttrErr(ctxt, + XML_SCHEMAP_SRC_RESOLVE, + NULL, ref->node, + "ref", ref->name, ref->targetNamespace, + ref->itemType, NULL); + return(ctxt->err); + } + ref->item = WXS_BASIC_CAST group; + return(0); } /** - * xmlSchemaAttrCheckValConstr: + * xmlSchemaCheckAttrPropsCorrect: * @item: an schema attribute declaration/use * @ctxt: a schema parser context * @name: the name of the attribute * * - * Schema Component Constraint: Attribute Declaration Properties Correct - * (a-props-correct) - * Validates the value constraints of an attribute declaration/use. + * Schema Component Constraint: + * Attribute Declaration Properties Correct (a-props-correct) * - * Fixes finish doing the computations on the attributes definitions + * Validates the value constraints of an attribute declaration/use. + * NOTE that this needs the simle type definitions to be already + * builded and checked. */ -static void -xmlSchemaCheckAttrValConstr(xmlSchemaAttributePtr item, - xmlSchemaParserCtxtPtr pctxt) +static int +xmlSchemaCheckAttrPropsCorrect(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaAttributePtr attr) { /* - * 2 if there is a {value constraint}, the canonical lexical - * representation of its value must be ·valid· with respect - * to the {type definition} as defined in String Valid (§3.14.4). + * SPEC a-props-correct (1) + * "The values of the properties of an attribute declaration must + * be as described in the property tableau in The Attribute + * Declaration Schema Component (§3.2.1), modulo the impact of + * Missing Sub-components (§5.3)." */ - if (item->defValue != NULL) { + + if (WXS_ATTR_TYPEDEF(attr) == NULL) + return(0); + + if (attr->defValue != NULL) { int ret; - if (item->subtypes == NULL) { - PERROR_INT("xmlSchemaCheckAttrValConstr", - "type is missing"); - return; + /* + * SPEC a-props-correct (3) + * "If the {type definition} is or is derived from ID then there + * must not be a {value constraint}." + */ + if (xmlSchemaIsDerivedFromBuiltInType( + WXS_ATTR_TYPEDEF(attr), XML_SCHEMAS_ID)) + { + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_A_PROPS_CORRECT_3, + NULL, WXS_BASIC_CAST attr, + "Value constraints are not allowed if the type definition " + "is or is derived from xs:ID", + NULL, NULL); + return(pctxt->err); } + /* + * SPEC a-props-correct (2) + * "if there is a {value constraint}, the canonical lexical + * representation of its value must be ·valid· with respect + * to the {type definition} as defined in String Valid (§3.14.4)." + * TODO: Don't care about the *cononical* stuff here, this requirement + * will be removed in WXS 1.1 anyway. + */ ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST pctxt, - item->node, item->subtypes, item->defValue, &(item->defVal), + attr->node, WXS_ATTR_TYPEDEF(attr), + attr->defValue, &(attr->defVal), 1, 1, 0); if (ret != 0) { if (ret < 0) { - PERROR_INT("xmlSchemaAttrCheckValConstr", + PERROR_INT("xmlSchemaCheckAttrPropsCorrect", "calling xmlSchemaVCheckCVCSimpleType()"); - return; + return(-1); } - ret = XML_SCHEMAP_A_PROPS_CORRECT_2; xmlSchemaCustomErr(ACTXT_CAST pctxt, - ret, item->node, (xmlSchemaTypePtr) item, - "The value of the value constraint is not valid", NULL, NULL); - return; + XML_SCHEMAP_A_PROPS_CORRECT_2, + NULL, WXS_BASIC_CAST attr, + "The value of the value constraint is not valid", + NULL, NULL); + return(pctxt->err); } } + + return(0); } static xmlSchemaElementPtr @@ -18043,17 +19396,17 @@ xmlSchemaCheckSubstGroupCircular(xmlSchemaElementPtr elemDecl, { xmlSchemaElementPtr ret; - if (SUBST_GROUP_AFF(ancestor) == NULL) + if (WXS_SUBST_HEAD(ancestor) == NULL) return (NULL); - if (SUBST_GROUP_AFF(ancestor) == elemDecl) + if (WXS_SUBST_HEAD(ancestor) == elemDecl) return (ancestor); - if (SUBST_GROUP_AFF(ancestor)->flags & XML_SCHEMAS_ELEM_CIRCULAR) + if (WXS_SUBST_HEAD(ancestor)->flags & XML_SCHEMAS_ELEM_CIRCULAR) return (NULL); - SUBST_GROUP_AFF(ancestor)->flags |= XML_SCHEMAS_ELEM_CIRCULAR; + WXS_SUBST_HEAD(ancestor)->flags |= XML_SCHEMAS_ELEM_CIRCULAR; ret = xmlSchemaCheckSubstGroupCircular(elemDecl, - SUBST_GROUP_AFF(ancestor)); - SUBST_GROUP_AFF(ancestor)->flags ^= XML_SCHEMAS_ELEM_CIRCULAR; + WXS_SUBST_HEAD(ancestor)); + WXS_SUBST_HEAD(ancestor)->flags ^= XML_SCHEMAS_ELEM_CIRCULAR; return (ret); } @@ -18075,15 +19428,15 @@ xmlSchemaCheckElemPropsCorrect(xmlSchemaParserCtxtPtr pctxt, xmlSchemaElementPtr elemDecl) { int ret = 0; - xmlSchemaTypePtr typeDef = ELEM_TYPE(elemDecl); + xmlSchemaTypePtr typeDef = WXS_ELEM_TYPEDEF(elemDecl); /* * SPEC (1) "The values of the properties of an element declaration * must be as described in the property tableau in The Element * Declaration Schema Component (§3.3.1), modulo the impact of Missing * Sub-components (§5.3)." */ - if (SUBST_GROUP_AFF(elemDecl) != NULL) { - xmlSchemaElementPtr head = SUBST_GROUP_AFF(elemDecl), circ; + if (WXS_SUBST_HEAD(elemDecl) != NULL) { + xmlSchemaElementPtr head = WXS_SUBST_HEAD(elemDecl), circ; xmlSchemaCheckElementDeclComponent(head, pctxt); /* @@ -18093,7 +19446,7 @@ xmlSchemaCheckElemPropsCorrect(xmlSchemaParserCtxtPtr pctxt, if ((elemDecl->flags & XML_SCHEMAS_ELEM_GLOBAL) == 0) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_E_PROPS_CORRECT_3, - NULL, (xmlSchemaTypePtr) elemDecl, elemDecl->node, + WXS_BASIC_CAST elemDecl, NULL, "Only global element declarations can have a " "substitution group affiliation", NULL); ret = XML_SCHEMAP_E_PROPS_CORRECT_3; @@ -18106,7 +19459,7 @@ xmlSchemaCheckElemPropsCorrect(xmlSchemaParserCtxtPtr pctxt, */ if (head == elemDecl) circ = head; - else if (SUBST_GROUP_AFF(head) != NULL) + else if (WXS_SUBST_HEAD(head) != NULL) circ = xmlSchemaCheckSubstGroupCircular(head, head); else circ = NULL; @@ -18115,7 +19468,7 @@ xmlSchemaCheckElemPropsCorrect(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPCustomErrExt(pctxt, XML_SCHEMAP_E_PROPS_CORRECT_6, - NULL, (xmlSchemaTypePtr) circ, circ->node, + WXS_BASIC_CAST circ, NULL, "The element declaration '%s' defines a circular " "substitution group to element declaration '%s'", xmlSchemaGetComponentQName(&strA, circ), @@ -18140,7 +19493,7 @@ xmlSchemaCheckElemPropsCorrect(xmlSchemaParserCtxtPtr pctxt, * attribute "final". */ - if (typeDef != ELEM_TYPE(SUBST_GROUP_AFF(elemDecl))) { + if (typeDef != WXS_ELEM_TYPEDEF(WXS_SUBST_HEAD(elemDecl))) { int set = 0; if (head->flags & XML_SCHEMAS_ELEM_FINAL_EXTENSION) @@ -18148,21 +19501,21 @@ xmlSchemaCheckElemPropsCorrect(xmlSchemaParserCtxtPtr pctxt, if (head->flags & XML_SCHEMAS_ELEM_FINAL_RESTRICTION) set |= SUBSET_RESTRICTION; - if (xmlSchemaCheckCOSDerivedOK(typeDef, - ELEM_TYPE(head), set) != 0) { + if (xmlSchemaCheckCOSDerivedOK(ACTXT_CAST pctxt, typeDef, + WXS_ELEM_TYPEDEF(head), set) != 0) { xmlChar *strA = NULL, *strB = NULL, *strC = NULL; ret = XML_SCHEMAP_E_PROPS_CORRECT_4; xmlSchemaPCustomErrExt(pctxt, XML_SCHEMAP_E_PROPS_CORRECT_4, - NULL, (xmlSchemaTypePtr) elemDecl, elemDecl->node, + WXS_BASIC_CAST elemDecl, NULL, "The type definition '%s' was " "either rejected by the substitution group " "affiliation '%s', or not validly derived from its type " "definition '%s'", xmlSchemaGetComponentQName(&strA, typeDef), xmlSchemaGetComponentQName(&strB, head), - xmlSchemaGetComponentQName(&strC, ELEM_TYPE(head))); + xmlSchemaGetComponentQName(&strC, WXS_ELEM_TYPEDEF(head))); FREE_AND_NULL(strA) FREE_AND_NULL(strB) FREE_AND_NULL(strC) @@ -18177,17 +19530,17 @@ xmlSchemaCheckElemPropsCorrect(xmlSchemaParserCtxtPtr pctxt, * XML 1.0, and should be avoided if backwards compatibility is desired" */ if ((elemDecl->value != NULL) && - ((IS_SIMPLE_TYPE(typeDef) && + ((WXS_IS_SIMPLE(typeDef) && xmlSchemaIsDerivedFromBuiltInType(typeDef, XML_SCHEMAS_ID)) || - (IS_COMPLEX_TYPE(typeDef) && - HAS_SIMPLE_CONTENT(typeDef) && + (WXS_IS_COMPLEX(typeDef) && + WXS_HAS_SIMPLE_CONTENT(typeDef) && xmlSchemaIsDerivedFromBuiltInType(typeDef->contentTypeDef, XML_SCHEMAS_ID)))) { ret = XML_SCHEMAP_E_PROPS_CORRECT_5; xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_E_PROPS_CORRECT_5, - NULL, (xmlSchemaTypePtr) elemDecl, elemDecl->node, + WXS_BASIC_CAST elemDecl, NULL, "The type definition (or type definition's content type) is or " "is derived from ID; value constraints are not allowed in " "conjunction with such a type definition", NULL); @@ -18256,7 +19609,7 @@ static void xmlSchemaCheckElemSubstGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaElementPtr elemDecl) { - if ((SUBST_GROUP_AFF(elemDecl) == NULL) || + if ((WXS_SUBST_HEAD(elemDecl) == NULL) || /* SPEC (1) "Its {abstract} is false." */ (elemDecl->flags & XML_SCHEMAS_ELEM_ABSTRACT)) return; @@ -18269,8 +19622,8 @@ xmlSchemaCheckElemSubstGroup(xmlSchemaParserCtxtPtr ctxt, * {disallowed substitutions} as the blocking constraint, as defined in * Substitution Group OK (Transitive) (§3.3.6)." */ - for (head = SUBST_GROUP_AFF(elemDecl); head != NULL; - head = SUBST_GROUP_AFF(head)) { + for (head = WXS_SUBST_HEAD(elemDecl); head != NULL; + head = WXS_SUBST_HEAD(head)) { set = 0; methSet = 0; /* @@ -18321,7 +19674,7 @@ xmlSchemaCheckElemSubstGroup(xmlSchemaParserCtxtPtr ctxt, */ type = elemDecl->subtypes->baseType; while (type != NULL) { - if (IS_COMPLEX_TYPE(type)) { + if (WXS_IS_COMPLEX(type)) { if ((type->flags & XML_SCHEMAS_TYPE_BLOCK_EXTENSION) && ((set & XML_SCHEMAS_TYPE_BLOCK_EXTENSION) == 0)) @@ -18375,47 +19728,92 @@ xmlSchemaCheckElementDeclComponent(xmlSchemaElementPtr elemDecl, } /** - * xmlSchemaResolveParticleReferences: - * @item: an schema component - * @ctxt: a schema parser context - * @name: the internal name of the component + * xmlSchemaResolveModelGroupParticleReferences: + * @particle: a particle component + * @ctxt: a parser context * - * Resolves references of misc. schema components. + * Resolves references of a model group's {particles} to + * model group definitions and to element declarations. */ static void -xmlSchemaResolveParticleReferences(xmlSchemaTreeItemPtr item, - xmlSchemaParserCtxtPtr ctxt, - const xmlChar * name ATTRIBUTE_UNUSED) +xmlSchemaResolveModelGroupParticleReferences( + xmlSchemaParserCtxtPtr ctxt, + xmlSchemaModelGroupPtr mg) { - if (item->type != XML_SCHEMA_TYPE_PARTICLE) - return; - if ((item->children != NULL) && - (item->children->type == XML_SCHEMA_EXTRA_QNAMEREF)) { - xmlSchemaQNameRefPtr ref = (xmlSchemaQNameRefPtr) item->children; - xmlSchemaBasicItemPtr refItem; + xmlSchemaParticlePtr particle = WXS_MODELGROUP_PARTICLE(mg); + xmlSchemaQNameRefPtr ref; + xmlSchemaBasicItemPtr refItem; + + /* + * URGENT TODO: Test this. + */ + while (particle != NULL) { + if ((WXS_PARTICLE_TERM(particle) == NULL) || + ((WXS_PARTICLE_TERM(particle))->type != + XML_SCHEMA_EXTRA_QNAMEREF)) + { + goto next_particle; + } + ref = WXS_QNAME_CAST WXS_PARTICLE_TERM(particle); /* * Resolve the reference. + * NULL the {term} by default. */ - item->children = NULL; + particle->children = NULL; + refItem = xmlSchemaGetNamedComponent(ctxt->schema, ref->itemType, ref->name, ref->targetNamespace); if (refItem == NULL) { xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE, - NULL, GET_NODE(item), "ref", ref->name, + NULL, WXS_ITEM_NODE(particle), "ref", ref->name, ref->targetNamespace, ref->itemType, NULL); - } else { - if (refItem->type == XML_SCHEMA_TYPE_GROUP) { + /* TODO: remove the particle. */ + goto next_particle; + } + if (refItem->type == XML_SCHEMA_TYPE_GROUP) { + if (WXS_MODELGROUPDEF_MODEL(refItem) == NULL) + /* TODO: remove the particle. */ + goto next_particle; + /* + * NOTE that we will assign the model group definition + * itself to the "term" of the particle. This will ease + * the check for circular model group definitions. After + * that the "term" will be assigned the model group of the + * model group definition. + */ + if ((WXS_MODELGROUPDEF_MODEL(refItem))->type == + XML_SCHEMA_TYPE_ALL) { /* - * NOTE that we will assign the model group definition - * itself to the "term" of the particle. This will ease - * the check for circular model group definitions. After - * that the "term" will be assigned the model group of the - * model group definition. + * SPEC cos-all-limited (1) + * SPEC cos-all-limited (1.2) + * "It appears only as the value of one or both of the + * following properties:" + * (1.1) "the {model group} property of a model group + * definition." + * (1.2) "the {term} property of a particle [... of] the " + * {content type} of a complex type definition." */ - item->children = (xmlSchemaTreeItemPtr) refItem; - } else - item->children = (xmlSchemaTreeItemPtr) refItem; + xmlSchemaCustomErr(ACTXT_CAST ctxt, + /* TODO: error code */ + XML_SCHEMAP_COS_ALL_LIMITED, + WXS_ITEM_NODE(particle), NULL, + "A model group definition is referenced, but " + "it contains an 'all' model group, which " + "cannot be contained by model groups", + NULL, NULL); + /* TODO: remove the particle. */ + goto next_particle; + } + particle->children = (xmlSchemaTreeItemPtr) refItem; + } else { + /* + * TODO: Are referenced element declarations the only + * other components we expect here? + */ + particle->children = (xmlSchemaTreeItemPtr) refItem; } +next_particle: + particle = WXS_PTC_CAST particle->next; } } @@ -18448,7 +19846,7 @@ xmlSchemaAreValuesEqual(xmlSchemaValPtr x, * string comparison for string based types. */ if ((ptx->builtInType == XML_SCHEMAS_STRING) || - IS_ANY_SIMPLE_TYPE(ptx)) { + WXS_IS_ANY_SIMPLE_TYPE(ptx)) { if (! xmlStrEqual( xmlSchemaValueGetAsString(x), xmlSchemaValueGetAsString(y))) @@ -18463,38 +19861,181 @@ xmlSchemaAreValuesEqual(xmlSchemaValPtr x, return(0); } /* - * Lists. + * Lists. + */ + x = xmlSchemaValueGetNext(x); + if (x != NULL) { + y = xmlSchemaValueGetNext(y); + if (y == NULL) + return (0); + } else if (xmlSchemaValueGetNext(y) != NULL) + return (0); + else + return (1); + } + return (0); +} + +/** + * xmlSchemaResolveAttrUseReferences: + * @item: an attribute use + * @ctxt: a parser context + * + * Resolves the referenced attribute declaration. + */ +static int +xmlSchemaResolveAttrUseReferences(xmlSchemaAttributeUsePtr ause, + xmlSchemaParserCtxtPtr ctxt) +{ + if ((ctxt == NULL) || (ause == NULL)) + return(-1); + if ((ause->attrDecl == NULL) || + (ause->attrDecl->type != XML_SCHEMA_EXTRA_QNAMEREF)) + return(0); + + { + xmlSchemaQNameRefPtr ref = WXS_QNAME_CAST ause->attrDecl; + + /* + * TODO: Evaluate, what errors could occur if the declaration is not + * found. + */ + ause->attrDecl = xmlSchemaGetAttributeDecl(ctxt->schema, + ref->name, ref->targetNamespace); + if (ause->attrDecl == NULL) { + xmlSchemaPResCompAttrErr(ctxt, + XML_SCHEMAP_SRC_RESOLVE, + WXS_BASIC_CAST ause, ause->node, + "ref", ref->name, ref->targetNamespace, + XML_SCHEMA_TYPE_ATTRIBUTE, NULL); + return(ctxt->err);; + } + } + return(0); +} + +/** + * xmlSchemaCheckAttrUsePropsCorrect: + * @ctxt: a parser context + * @use: an attribute use + * + * Schema Component Constraint: + * Attribute Use Correct (au-props-correct) + * + */ +static int +xmlSchemaCheckAttrUsePropsCorrect(xmlSchemaParserCtxtPtr ctxt, + xmlSchemaAttributeUsePtr use) +{ + if ((ctxt == NULL) || (use == NULL)) + return(-1); + if ((use->defValue == NULL) || (WXS_ATTRUSE_DECL(use) == NULL) || + ((WXS_ATTRUSE_DECL(use))->type != XML_SCHEMA_TYPE_ATTRIBUTE)) + return(0); + + /* + * SPEC au-props-correct (1) + * "The values of the properties of an attribute use must be as + * described in the property tableau in The Attribute Use Schema + * Component (§3.5.1), modulo the impact of Missing + * Sub-components (§5.3)." + */ + + if (((WXS_ATTRUSE_DECL(use))->defValue != NULL) && + ((WXS_ATTRUSE_DECL(use))->flags & XML_SCHEMAS_ATTR_FIXED) && + ((use->flags & XML_SCHEMA_ATTR_USE_FIXED) == 0)) + { + xmlSchemaPCustomErr(ctxt, + XML_SCHEMAP_AU_PROPS_CORRECT_2, + WXS_BASIC_CAST use, NULL, + "The attribute declaration has a 'fixed' value constraint " + ", thus the attribute use must also have a 'fixed' value " + "constraint", + NULL); + return(ctxt->err); + } + /* + * Compute and check the value constraint's value. + */ + if ((use->defVal != NULL) && (WXS_ATTRUSE_TYPEDEF(use) != NULL)) { + int ret; + /* + * TODO: The spec seems to be missing a check of the + * value constraint of the attribute use. We will do it here. */ - x = xmlSchemaValueGetNext(x); - if (x != NULL) { - y = xmlSchemaValueGetNext(y); - if (y == NULL) - return (0); - } else if (xmlSchemaValueGetNext(y) != NULL) - return (0); - else - return (1); + /* + * SPEC a-props-correct (3) + */ + if (xmlSchemaIsDerivedFromBuiltInType( + WXS_ATTRUSE_TYPEDEF(use), XML_SCHEMAS_ID)) + { + xmlSchemaCustomErr(ACTXT_CAST ctxt, + XML_SCHEMAP_AU_PROPS_CORRECT, + NULL, WXS_BASIC_CAST use, + "Value constraints are not allowed if the type definition " + "is or is derived from xs:ID", + NULL, NULL); + return(ctxt->err); + } + + ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST ctxt, + use->node, WXS_ATTRUSE_TYPEDEF(use), + use->defValue, &(use->defVal), + 1, 1, 0); + if (ret != 0) { + if (ret < 0) { + PERROR_INT2("xmlSchemaCheckAttrUsePropsCorrect", + "calling xmlSchemaVCheckCVCSimpleType()"); + return(-1); + } + xmlSchemaCustomErr(ACTXT_CAST ctxt, + XML_SCHEMAP_AU_PROPS_CORRECT, + NULL, WXS_BASIC_CAST use, + "The value of the value constraint is not valid", + NULL, NULL); + return(ctxt->err); + } } - return (0); + /* + * SPEC au-props-correct (2) + * "If the {attribute declaration} has a fixed + * {value constraint}, then if the attribute use itself has a + * {value constraint}, it must also be fixed and its value must match + * that of the {attribute declaration}'s {value constraint}." + */ + if (((WXS_ATTRUSE_DECL(use))->defVal != NULL) && + (((WXS_ATTRUSE_DECL(use))->flags & XML_SCHEMA_ATTR_USE_FIXED) == 0)) + { + if (! xmlSchemaAreValuesEqual(use->defVal, + (WXS_ATTRUSE_DECL(use))->defVal)) + { + xmlSchemaPCustomErr(ctxt, + XML_SCHEMAP_AU_PROPS_CORRECT_2, + WXS_BASIC_CAST use, NULL, + "The 'fixed' value constraint of the attribute use " + "must match the attribute declaration's value " + "constraint '%s'", + (WXS_ATTRUSE_DECL(use))->defValue); + } + return(ctxt->err); + } + return(0); } + + + /** - * xmlSchemaResolveAttrReferences: - * @item: an schema attribute declaration/use. - * @ctxt: a schema parser context - * @name: the name of the attribute + * xmlSchemaResolveAttrTypeReferences: + * @item: an attribute declaration + * @ctxt: a parser context * - * Fixes finish doing the computations on attribute declarations/uses. + * Resolves the referenced type definition component. */ -static void -xmlSchemaResolveAttrReferences(xmlSchemaAttributePtr item, - xmlSchemaParserCtxtPtr ctxt, - const xmlChar * name ATTRIBUTE_UNUSED) +static int +xmlSchemaResolveAttrTypeReferences(xmlSchemaAttributePtr item, + xmlSchemaParserCtxtPtr ctxt) { - /* - * TODO: If including this is done twice (!) for every attribute. - * -> Hmm, check if this is still done. - */ /* * The simple type definition corresponding to the element * information item in the [children], if present, otherwise the simple @@ -18502,85 +20043,32 @@ xmlSchemaResolveAttrReferences(xmlSchemaAttributePtr item, * [attribute], if present, otherwise the ·simple ur-type definition·. */ if (item->flags & XML_SCHEMAS_ATTR_INTERNAL_RESOLVED) - return; + return(0); item->flags |= XML_SCHEMAS_ATTR_INTERNAL_RESOLVED; if (item->subtypes != NULL) - return; + return(0); if (item->typeName != NULL) { xmlSchemaTypePtr type; type = xmlSchemaGetType(ctxt->schema, item->typeName, item->typeNs); - if ((type == NULL) || (! IS_SIMPLE_TYPE(type))) { + if ((type == NULL) || (! WXS_IS_SIMPLE(type))) { xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE, - (xmlSchemaTypePtr) item, item->node, + WXS_BASIC_CAST item, item->node, "type", item->typeName, item->typeNs, XML_SCHEMA_TYPE_SIMPLE, NULL); + return(ctxt->err); } else item->subtypes = type; - } else if (item->ref != NULL) { - xmlSchemaAttributePtr decl; - - /* - * We have an attribute use here; assign the referenced - * attribute declaration. - */ + } else { /* - * TODO: Evaluate, what errors could occur if the declaration is not - * found. It might be possible that the "typefixup" might crash if - * no ref declaration was found. + * The type defaults to the xs:anySimpleType. */ - decl = xmlSchemaGetAttributeDecl(ctxt->schema, item->ref, item->refNs); - if (decl == NULL) { - xmlSchemaPResCompAttrErr(ctxt, - XML_SCHEMAP_SRC_RESOLVE, - (xmlSchemaTypePtr) item, item->node, - "ref", item->ref, item->refNs, - XML_SCHEMA_TYPE_ATTRIBUTE, NULL); - return; - } - item->refDecl = decl; - xmlSchemaResolveAttrReferences(decl, ctxt, NULL); - item->subtypes = decl->subtypes; - /* - * Attribute Use Correct - * au-props-correct.2: If the {attribute declaration} has a fixed - * {value constraint}, then if the attribute use itself has a - * {value constraint}, it must also be fixed and its value must match - * that of the {attribute declaration}'s {value constraint}. - */ - if ((decl->flags & XML_SCHEMAS_ATTR_FIXED) && - (item->defValue != NULL)) { - if ((item->flags & XML_SCHEMAS_ATTR_FIXED) == 0) { - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_AU_PROPS_CORRECT_2, - NULL, NULL, item->node, - "The attribute declaration has a 'fixed' value constraint " - ", thus it must be 'fixed' in attribute use as well", - NULL); - } else { - if (! xmlSchemaAreValuesEqual(item->defVal, decl->defVal)) { - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_AU_PROPS_CORRECT_2, - NULL, NULL, item->node, - "The 'fixed' value constraint of the attribute use " - "must match the attribute declaration's value " - "constraint '%s'", - decl->defValue); - } - } - /* - * FUTURE: One should change the values of the attr. use - * if ever validation should be attempted even if the - * schema itself was not fully valid. - */ - } - } else { - /* The type of this attribute is the xs:anySimpleType. */ item->subtypes = xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYSIMPLETYPE); } + return(0); } /** @@ -18590,14 +20078,15 @@ xmlSchemaResolveAttrReferences(xmlSchemaAttributePtr item, * @name: the attribute name * * Resolve keyRef references to key/unique IDCs. + * Schema Component Constraint: + * Identity-constraint Definition Properties Correct (c-props-correct) */ -static void +static int xmlSchemaResolveIDCKeyReferences(xmlSchemaIDCPtr idc, - xmlSchemaParserCtxtPtr pctxt, - const xmlChar * name ATTRIBUTE_UNUSED) + xmlSchemaParserCtxtPtr pctxt) { if (idc->type != XML_SCHEMA_TYPE_IDC_KEYREF) - return; + return(0); if (idc->ref->name != NULL) { idc->ref->item = (xmlSchemaBasicItemPtr) xmlSchemaGetIDC(pctxt->schema, idc->ref->name, @@ -18609,11 +20098,22 @@ xmlSchemaResolveIDCKeyReferences(xmlSchemaIDCPtr idc, */ xmlSchemaPResCompAttrErr(pctxt, XML_SCHEMAP_SRC_RESOLVE, - (xmlSchemaTypePtr) idc, idc->node, + WXS_BASIC_CAST idc, idc->node, "refer", idc->ref->name, idc->ref->targetNamespace, XML_SCHEMA_TYPE_IDC_KEY, NULL); - return; + return(pctxt->err); + } else if (idc->ref->item->type == XML_SCHEMA_TYPE_IDC_KEYREF) { + /* + * SPEC c-props-correct (1) + */ + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_C_PROPS_CORRECT, + NULL, WXS_BASIC_CAST idc, + "The keyref references a keyref", + NULL, NULL); + idc->ref->item = NULL; + return(pctxt->err); } else { if (idc->nbFields != ((xmlSchemaIDCPtr) idc->ref->item)->nbFields) { @@ -18627,20 +20127,417 @@ xmlSchemaResolveIDCKeyReferences(xmlSchemaIDCPtr idc, * the cardinality of the {fields} must equal that of * the {fields} of the {referenced key}. */ - xmlSchemaPCustomErr(pctxt, + xmlSchemaCustomErr(ACTXT_CAST pctxt, XML_SCHEMAP_C_PROPS_CORRECT, - NULL, (xmlSchemaTypePtr) idc, idc->node, + NULL, WXS_BASIC_CAST idc, "The cardinality of the keyref differs from the " - "cardinality of the referenced key '%s'", + "cardinality of the referenced key/unique '%s'", xmlSchemaFormatQName(&str, refer->targetNamespace, - refer->name) - ); + refer->name), + NULL); FREE_AND_NULL(str) + return(pctxt->err); } } } + return(0); +} + +static int +xmlSchemaResolveAttrUseProhibReferences(xmlSchemaAttributeUseProhibPtr prohib, + xmlSchemaParserCtxtPtr pctxt) +{ + if (xmlSchemaGetAttributeDecl(pctxt->schema, prohib->name, + prohib->targetNamespace) == NULL) { + + xmlSchemaPResCompAttrErr(pctxt, + XML_SCHEMAP_SRC_RESOLVE, + NULL, prohib->node, + "ref", prohib->name, prohib->targetNamespace, + XML_SCHEMA_TYPE_ATTRIBUTE, NULL); + return(XML_SCHEMAP_SRC_RESOLVE); + } + return(0); +} + +#define WXS_REDEFINED_TYPE(c) \ +(((xmlSchemaTypePtr) item)->flags & XML_SCHEMAS_TYPE_REDEFINED) + +#define WXS_REDEFINED_MODEL_GROUP_DEF(c) \ +(((xmlSchemaModelGroupDefPtr) item)->flags & XML_SCHEMA_MODEL_GROUP_DEF_REDEFINED) + +#define WXS_REDEFINED_ATTR_GROUP(c) \ +(((xmlSchemaAttributeGroupPtr) item)->flags & XML_SCHEMAS_ATTRGROUP_REDEFINED) + +static int +xmlSchemaCheckSRCRedefineFirst(xmlSchemaParserCtxtPtr pctxt) +{ + int err = 0; + xmlSchemaRedefPtr redef = WXS_CONSTRUCTOR(pctxt)->redefs; + xmlSchemaBasicItemPtr prev, item; + int wasRedefined; + + if (redef == NULL) + return(0); + + do { + item = redef->item; + /* + * First try to locate the redefined component in the + * schema graph starting with the redefined schema. + * NOTE: According to this schema bug entry: + * http://lists.w3.org/Archives/Public/www-xml-schema-comments/2005OctDec/0019.html + * it's not clear if the referenced component needs to originate + * from the d schema _document_ or the schema; the latter + * would include all imported and included sub-schemas of the + * d schema. Currenlty we latter approach is used. + * SUPPLEMENT: It seems that the WG moves towards the latter + * approach, so we are doing it right. + * + */ + prev = xmlSchemaFindRedefCompInGraph( + redef->targetBucket, item->type, + redef->refName, redef->refTargetNs); + if (prev == NULL) { + xmlChar *str = NULL; + xmlNodePtr node; + + /* + * SPEC src-redefine: + * (6.2.1) "The ·actual value· of its own name attribute plus + * target namespace must successfully ·resolve· to a model + * group definition in I." + * (7.2.1) "The ·actual value· of its own name attribute plus + * target namespace must successfully ·resolve· to an attribute + * group definition in I." + + * + * Note that, if we are redefining with the use of references + * to components, the spec assumes the src-resolve to be used; + * but this won't assure that we search only *inside* the + * redefined schema. + */ + if (redef->reference) + node = WXS_ITEM_NODE(redef->reference); + else + node = WXS_ITEM_NODE(item); + xmlSchemaCustomErr(ACTXT_CAST pctxt, + /* + * TODO: error code. + * Probably XML_SCHEMAP_SRC_RESOLVE, if this is using the + * reference kind. + */ + XML_SCHEMAP_SRC_REDEFINE, node, NULL, + "The %s '%s' to be redefined could not be found in " + "the redefined schema", + WXS_ITEM_TYPE_NAME(item), + xmlSchemaFormatQName(&str, redef->refTargetNs, + redef->refName)); + FREE_AND_NULL(str); + err = pctxt->err; + redef = redef->next; + continue; + } + /* + * TODO: Obtaining and setting the redefinition state is really + * clumsy. + */ + wasRedefined = 0; + switch (item->type) { + case XML_SCHEMA_TYPE_COMPLEX: + case XML_SCHEMA_TYPE_SIMPLE: + if ((WXS_TYPE_CAST prev)->flags & + XML_SCHEMAS_TYPE_REDEFINED) + { + wasRedefined = 1; + break; + } + /* Mark it as redefined. */ + (WXS_TYPE_CAST prev)->flags |= XML_SCHEMAS_TYPE_REDEFINED; + /* + * Assign the redefined type to the + * base type of the redefining type. + * TODO: How + */ + ((xmlSchemaTypePtr) item)->baseType = + (xmlSchemaTypePtr) prev; + break; + case XML_SCHEMA_TYPE_GROUP: + if ((WXS_MODEL_GROUPDEF_CAST prev)->flags & + XML_SCHEMA_MODEL_GROUP_DEF_REDEFINED) + { + wasRedefined = 1; + break; + } + /* Mark it as redefined. */ + (WXS_MODEL_GROUPDEF_CAST prev)->flags |= + XML_SCHEMA_MODEL_GROUP_DEF_REDEFINED; + if (redef->reference != NULL) { + /* + * Overwrite the QName-reference with the + * referenced model group def. + */ + (WXS_PTC_CAST redef->reference)->children = + WXS_TREE_CAST prev; + } + redef->target = prev; + break; + case XML_SCHEMA_TYPE_ATTRIBUTEGROUP: + if ((WXS_ATTR_GROUP_CAST prev)->flags & + XML_SCHEMAS_ATTRGROUP_REDEFINED) + { + wasRedefined = 1; + break; + } + (WXS_ATTR_GROUP_CAST prev)->flags |= + XML_SCHEMAS_ATTRGROUP_REDEFINED; + if (redef->reference != NULL) { + /* + * Assign the redefined attribute group to the + * QName-reference component. + * This is the easy case, since we will just + * expand the redefined group. + */ + (WXS_QNAME_CAST redef->reference)->item = prev; + redef->target = NULL; + } else { + /* + * This is the complicated case: we need + * to apply src-redefine (7.2.2) at a later + * stage, i.e. when attribute group references + * have beed expanded and simple types have + * beed fixed. + */ + redef->target = prev; + } + break; + default: + PERROR_INT("xmlSchemaResolveRedefReferences", + "Unexpected redefined component type"); + return(-1); + } + if (wasRedefined) { + xmlChar *str = NULL; + xmlNodePtr node; + + if (redef->reference) + node = WXS_ITEM_NODE(redef->reference); + else + node = WXS_ITEM_NODE(redef->item); + + xmlSchemaCustomErr(ACTXT_CAST pctxt, + /* TODO: error code. */ + XML_SCHEMAP_SRC_REDEFINE, + node, NULL, + "The referenced %s was already redefined. Multiple " + "redefinition of the same component is not supported", + xmlSchemaGetComponentDesignation(&str, prev), + NULL); + FREE_AND_NULL(str) + err = pctxt->err; + redef = redef->next; + continue; + } + redef = redef->next; + } while (redef != NULL); + + return(err); +} + +static int +xmlSchemaCheckSRCRedefineSecond(xmlSchemaParserCtxtPtr pctxt) +{ + int err = 0; + xmlSchemaRedefPtr redef = WXS_CONSTRUCTOR(pctxt)->redefs; + xmlSchemaBasicItemPtr item; + + if (redef == NULL) + return(0); + + do { + if (redef->target == NULL) { + redef = redef->next; + continue; + } + item = redef->item; + + switch (item->type) { + case XML_SCHEMA_TYPE_SIMPLE: + case XML_SCHEMA_TYPE_COMPLEX: + /* + * Since the spec wants the {name} of the redefined + * type to be 'absent', we'll NULL it. + */ + (WXS_TYPE_CAST redef->target)->name = NULL; + + /* + * TODO: Seems like there's nothing more to do. The normal + * inheritance mechanism is used. But not 100% sure. + */ + break; + case XML_SCHEMA_TYPE_GROUP: + /* + * URGENT TODO: + * SPEC src-redefine: + * (6.2.2) "The {model group} of the model group definition + * which corresponds to it per XML Representation of Model + * Group Definition Schema Components (§3.7.2) must be a + * ·valid restriction· of the {model group} of that model + * group definition in I, as defined in Particle Valid + * (Restriction) (§3.9.6)." + */ + break; + case XML_SCHEMA_TYPE_ATTRIBUTEGROUP: + /* + * SPEC src-redefine: + * (7.2.2) "The {attribute uses} and {attribute wildcard} of + * the attribute group definition which corresponds to it + * per XML Representation of Attribute Group Definition Schema + * Components (§3.6.2) must be ·valid restrictions· of the + * {attribute uses} and {attribute wildcard} of that attribute + * group definition in I, as defined in clause 2, clause 3 and + * clause 4 of Derivation Valid (Restriction, Complex) + * (§3.4.6) (where references to the base type definition are + * understood as references to the attribute group definition + * in I)." + */ + err = xmlSchemaCheckDerivationOKRestriction2to4(pctxt, + XML_SCHEMA_ACTION_REDEFINE, + item, redef->target, + (WXS_ATTR_GROUP_CAST item)->attrUses, + (WXS_ATTR_GROUP_CAST redef->target)->attrUses, + (WXS_ATTR_GROUP_CAST item)->attributeWildcard, + (WXS_ATTR_GROUP_CAST redef->target)->attributeWildcard); + if (err == -1) + return(-1); + break; + default: + break; + } + redef = redef->next; + } while (redef != NULL); + return(0); } + + +static int +xmlSchemaAddComponents(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaBucketPtr bucket) +{ + xmlSchemaBasicItemPtr item; + int err; + xmlHashTablePtr *table; + const xmlChar *name; + int i; + +#define WXS_GET_GLOBAL_HASH(c, s, slot) { \ + if (WXS_IS_BUCKET_IMPMAIN((c)->type)) \ + table = &(WXS_IMPBUCKET((c))->schema->slot); \ + else \ + table = &(WXS_INCBUCKET((c))->ownerImport->schema->slot); } + /* + * Add global components to the schema's hash tables. + * This is the place where duplicate components will be + * detected. + * TODO: I think normally we should support imports of the + * same namespace from multiple locations. We don't do currently, + * but if we do then according to: + * http://www.w3.org/Bugs/Public/show_bug.cgi?id=2224 + * we would need, if imported directly, to import redefined + * components as well to be able to catch clashing components. + * (I hope I'll still know what this means after some months :-() + */ + if (bucket == NULL) + return(-1); + if (bucket->flags & XML_SCHEMA_BUCKET_COMPS_ADDED) + return(0); + bucket->flags |= XML_SCHEMA_BUCKET_COMPS_ADDED; + + for (i = 0; i < bucket->globals->nbItems; i++) { + item = bucket->globals->items[i]; + table = NULL; + switch (item->type) { + case XML_SCHEMA_TYPE_COMPLEX: + case XML_SCHEMA_TYPE_SIMPLE: + if (WXS_REDEFINED_TYPE(item)) + continue; + name = (WXS_TYPE_CAST item)->name; + WXS_GET_GLOBAL_HASH(bucket, schema, typeDecl) + break; + case XML_SCHEMA_TYPE_ELEMENT: + name = (WXS_ELEM_CAST item)->name; + WXS_GET_GLOBAL_HASH(bucket, schema, elemDecl) + break; + case XML_SCHEMA_TYPE_ATTRIBUTE: + name = (WXS_ATTR_CAST item)->name; + WXS_GET_GLOBAL_HASH(bucket, schema, attrDecl) + break; + case XML_SCHEMA_TYPE_GROUP: + if (WXS_REDEFINED_MODEL_GROUP_DEF(item)) + continue; + name = (WXS_MODEL_GROUPDEF_CAST item)->name; + WXS_GET_GLOBAL_HASH(bucket, schema, groupDecl) + break; + case XML_SCHEMA_TYPE_ATTRIBUTEGROUP: + if (WXS_REDEFINED_ATTR_GROUP(item)) + continue; + name = (WXS_ATTR_GROUP_CAST item)->name; + WXS_GET_GLOBAL_HASH(bucket, schema, attrgrpDecl) + break; + case XML_SCHEMA_TYPE_IDC_KEY: + case XML_SCHEMA_TYPE_IDC_UNIQUE: + case XML_SCHEMA_TYPE_IDC_KEYREF: + name = (WXS_IDC_CAST item)->name; + WXS_GET_GLOBAL_HASH(bucket, schema, idcDef) + break; + case XML_SCHEMA_TYPE_NOTATION: + name = ((xmlSchemaNotationPtr) item)->name; + WXS_GET_GLOBAL_HASH(bucket, schema, notaDecl) + break; + default: + PERROR_INT("xmlSchemaAddComponents", + "Unexpected global component type"); + continue; + } + if (*table == NULL) { + *table = xmlHashCreateDict(10, pctxt->dict); + if (*table == NULL) { + PERROR_INT("xmlSchemaAddComponents", + "failed to create a component hash table"); + return(-1); + } + } + err = xmlHashAddEntry(*table, name, item); + if (err != 0) { + xmlChar *str = NULL; + + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_REDEFINED_TYPE, + WXS_ITEM_NODE(item), + WXS_BASIC_CAST item, + "A global %s '%s' does already exist", + WXS_ITEM_TYPE_NAME(item), + xmlSchemaGetComponentQName(&str, item)); + FREE_AND_NULL(str); + } + } + /* + * Process imported/included schemas. + */ + if (bucket->relations != NULL) { + xmlSchemaSchemaRelationPtr rel = bucket->relations; + do { + if ((rel->bucket != NULL) && + ((rel->bucket->flags & XML_SCHEMA_BUCKET_COMPS_ADDED) == 0)) { + if (xmlSchemaAddComponents(pctxt, rel->bucket) == -1) + return(-1); + } + rel = rel->next; + } while (rel != NULL); + } + return(0); +} static int xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) @@ -18653,10 +20550,27 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) if ((con->pending == NULL) || (con->pending->nbItems == 0)) - return(0); + return(0); + + /* TODO: + * SPEC (src-redefine): + * (6.2) "If it has no such self-reference, then all of the + * following must be true:" + + * (6.2.2) The {model group} of the model group definition which + * corresponds to it per XML Representation of Model Group + * Definition Schema Components (§3.7.2) must be a ·valid + * restriction· of the {model group} of that model group definition + * in I, as defined in Particle Valid (Restriction) (§3.9.6)." + */ + xmlSchemaCheckSRCRedefineFirst(pctxt); + + /* + * Add global components to the schemata's hash tables. + */ + xmlSchemaAddComponents(pctxt, WXS_CONSTRUCTOR(pctxt)->mainBucket); pctxt->ctxtType = NULL; - pctxt->parentItem = NULL; items = (xmlSchemaTreeItemPtr *) con->pending->items; nbItems = con->pending->nbItems; /* @@ -18683,6 +20597,7 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) * - the term of the particle (e.g. a model group) * 6. IDC key-references: * - the referenced IDC 'key' or 'unique' definition + * 7. Attribute prohibitions which had a "ref" attribute. */ for (i = 0; i < nbItems; i++) { item = items[i]; @@ -18695,29 +20610,49 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) case XML_SCHEMA_TYPE_COMPLEX: case XML_SCHEMA_TYPE_SIMPLE: xmlSchemaResolveTypeReferences( - (xmlSchemaTypePtr) item, pctxt, NULL); + (xmlSchemaTypePtr) item, pctxt); FIXHFAILURE; break; case XML_SCHEMA_TYPE_ATTRIBUTE: - xmlSchemaResolveAttrReferences( - (xmlSchemaAttributePtr) item, pctxt, NULL); + xmlSchemaResolveAttrTypeReferences( + (xmlSchemaAttributePtr) item, pctxt); FIXHFAILURE; break; - case XML_SCHEMA_TYPE_ATTRIBUTEGROUP: - xmlSchemaResolveAttrGroupReferences( - (xmlSchemaAttributeGroupPtr) item, pctxt, NULL); + case XML_SCHEMA_TYPE_ATTRIBUTE_USE: + xmlSchemaResolveAttrUseReferences( + (xmlSchemaAttributeUsePtr) item, pctxt); + FIXHFAILURE; + break; + case XML_SCHEMA_EXTRA_QNAMEREF: + if ((WXS_QNAME_CAST item)->itemType == + XML_SCHEMA_TYPE_ATTRIBUTEGROUP) + { + xmlSchemaResolveAttrGroupReferences( + WXS_QNAME_CAST item, pctxt); + } FIXHFAILURE; break; - case XML_SCHEMA_TYPE_PARTICLE: - xmlSchemaResolveParticleReferences( - (xmlSchemaTreeItemPtr) item, pctxt, NULL); + case XML_SCHEMA_TYPE_SEQUENCE: + case XML_SCHEMA_TYPE_CHOICE: + case XML_SCHEMA_TYPE_ALL: + xmlSchemaResolveModelGroupParticleReferences(pctxt, + WXS_MODEL_GROUP_CAST item); FIXHFAILURE; break; case XML_SCHEMA_TYPE_IDC_KEY: case XML_SCHEMA_TYPE_IDC_UNIQUE: case XML_SCHEMA_TYPE_IDC_KEYREF: xmlSchemaResolveIDCKeyReferences( - (xmlSchemaIDCPtr) item, pctxt, NULL); + (xmlSchemaIDCPtr) item, pctxt); + FIXHFAILURE; + break; + case XML_SCHEMA_EXTRA_ATTR_USE_PROHIB: + /* + * Handle attribue prohibition which had a + * "ref" attribute. + */ + xmlSchemaResolveAttrUseProhibReferences( + WXS_ATTR_PROHIB_CAST item, pctxt); FIXHFAILURE; break; default: @@ -18767,6 +20702,8 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) break; } } + if (pctxt->nberrors != 0) + goto exit_error; /* * Model group definition references: * Such a reference is reflected by a particle at the component @@ -18777,26 +20714,39 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) */ for (i = 0; i < nbItems; i++) { item = items[i]; - if ((item->type == XML_SCHEMA_TYPE_PARTICLE) && - (item->children != NULL) && - (item->children->type == XML_SCHEMA_TYPE_GROUP)) { - xmlSchemaGroupDefReferenceTermFixup( - (xmlSchemaParticlePtr) item, pctxt, NULL); - FIXHFAILURE; + switch (item->type) { + case XML_SCHEMA_TYPE_SEQUENCE: + case XML_SCHEMA_TYPE_CHOICE: + xmlSchemaModelGroupToModelGroupDefFixup(pctxt, + WXS_MODEL_GROUP_CAST item); + break; + default: + break; } } if (pctxt->nberrors != 0) goto exit_error; /* - * Now that all references are resolved, no circularity occured - * and the 'term's of particles was fixed we can: - * 1. finish computation of properties of types - * 2. restrict type definitions and check those restrictions - * 3. extend type definitions and check those extensions - * - * This is the most complex part during schema construction. - * TODO: Maybe it would be better to stop at the first error here. + * Expand attribute group references of attribute group definitions. */ + for (i = 0; i < nbItems; i++) { + item = items[i]; + switch (item->type) { + case XML_SCHEMA_TYPE_ATTRIBUTEGROUP: + if ((! WXS_ATTR_GROUP_EXPANDED(item)) && + WXS_ATTR_GROUP_HAS_REFS(item)) + { + xmlSchemaAttributeGroupExpandRefs(pctxt, + WXS_ATTR_GROUP_CAST item); + FIXHFAILURE; + } + break; + default: + break; + } + } + if (pctxt->nberrors != 0) + goto exit_error; /* * First compute the variety of simple types. This is needed as * a seperate step, since otherwise we won't be able to detect @@ -18806,7 +20756,7 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) item = items[i]; switch (item->type) { case XML_SCHEMA_TYPE_SIMPLE: - if (TYPE_IS_NOT_FIXEDUP_1((xmlSchemaTypePtr) item)) { + if (WXS_IS_TYPE_NOT_FIXED_1((xmlSchemaTypePtr) item)) { xmlSchemaFixupSimpleTypeStageOne(pctxt, (xmlSchemaTypePtr) item); FIXHFAILURE; @@ -18816,6 +20766,8 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) break; } } + if (pctxt->nberrors != 0) + goto exit_error; /* * Detect circular union types. Note that this needs the variety to * be already computed. @@ -18836,14 +20788,56 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) } if (pctxt->nberrors != 0) goto exit_error; - /* Now do the complete type fixup. */ + + /* + * Do the complete type fixup for simple types. + */ for (i = 0; i < nbItems; i++) { item = items[i]; switch (item->type) { case XML_SCHEMA_TYPE_SIMPLE: - case XML_SCHEMA_TYPE_COMPLEX: - xmlSchemaTypeFixup((xmlSchemaTypePtr) item, pctxt); + if (WXS_IS_TYPE_NOT_FIXED(WXS_TYPE_CAST item)) { + xmlSchemaFixupSimpleTypeStageTwo(pctxt, WXS_TYPE_CAST item); + FIXHFAILURE; + } + break; + default: + break; + } + } + if (pctxt->nberrors != 0) + goto exit_error; + /* + * At this point we need all simple types to be builded and checked. + */ + /* + * Apply contraints for attribute declarations. + */ + for (i = 0; i < nbItems; i++) { + item = items[i]; + switch (item->type) { + case XML_SCHEMA_TYPE_ATTRIBUTE: + xmlSchemaCheckAttrPropsCorrect(pctxt, WXS_ATTR_CAST item); FIXHFAILURE; + break; + default: + break; + } + } + if (pctxt->nberrors != 0) + goto exit_error; + /* + * Apply constraints for attribute uses. + */ + for (i = 0; i < nbItems; i++) { + item = items[i]; + switch (item->type) { + case XML_SCHEMA_TYPE_ATTRIBUTE_USE: + if (((xmlSchemaAttributeUsePtr)item)->defValue != NULL) { + xmlSchemaCheckAttrUsePropsCorrect(pctxt, + WXS_ATTR_USE_CAST item); + FIXHFAILURE; + } break; default: break; @@ -18851,24 +20845,73 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) } if (pctxt->nberrors != 0) goto exit_error; - + /* - * Now that we are sure the type definitions are finally constructed, - * we can: - * 1. check value contraint values of attribute declarations - * 2. apply various constraints to element declarations + * Apply constraints for attribute group definitions. */ for (i = 0; i < nbItems; i++) { item = items[i]; switch (item->type) { - case XML_SCHEMA_TYPE_ATTRIBUTE: - if (((xmlSchemaAttributePtr)item)->defValue != NULL) { - xmlSchemaCheckAttrValConstr( - (xmlSchemaAttributePtr) item, pctxt); + case XML_SCHEMA_TYPE_ATTRIBUTEGROUP: + if (( (WXS_ATTR_GROUP_CAST item)->attrUses != NULL) && + ( (WXS_LIST_CAST (WXS_ATTR_GROUP_CAST item)->attrUses)->nbItems > 1)) + { + xmlSchemaCheckAGPropsCorrect(pctxt, WXS_ATTR_GROUP_CAST item); + FIXHFAILURE; + } + break; + default: + break; + } + } + if (pctxt->nberrors != 0) + goto exit_error; + + /* + * Apply constraints for redefinitions. + */ + if (WXS_CONSTRUCTOR(pctxt)->redefs != NULL) + xmlSchemaCheckSRCRedefineSecond(pctxt); + if (pctxt->nberrors != 0) + goto exit_error; + + /* + * Fixup complex types. + */ + for (i = 0; i < nbItems; i++) { + item = con->pending->items[i]; + switch (item->type) { + case XML_SCHEMA_TYPE_COMPLEX: + if (WXS_IS_TYPE_NOT_FIXED(WXS_TYPE_CAST item)) { + xmlSchemaFixupComplexType(pctxt, WXS_TYPE_CAST item); FIXHFAILURE; } break; + default: + break; + } + } + if (pctxt->nberrors != 0) + goto exit_error; + + /* + * The list could have changed, since xmlSchemaFixupComplexType() + * will create particles and model groups in some cases. + */ + items = (xmlSchemaTreeItemPtr *) con->pending->items; + nbItems = con->pending->nbItems; + + /* + * At this point all complex types need to be builded and checked. + */ + /* + * Apply some constraints for element declarations. + */ + for (i = 0; i < nbItems; i++) { + item = items[i]; + switch (item->type) { case XML_SCHEMA_TYPE_ELEMENT: + if ((((xmlSchemaElementPtr) item)->flags & XML_SCHEMAS_ELEM_INTERNAL_CHECKED) == 0) { xmlSchemaCheckElementDeclComponent( @@ -18886,12 +20929,13 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) * Finally we can build the automaton from the content model of * complex types. */ + for (i = 0; i < nbItems; i++) { item = items[i]; switch (item->type) { case XML_SCHEMA_TYPE_COMPLEX: xmlSchemaBuildContentModel((xmlSchemaTypePtr) item, pctxt); - FIXHFAILURE; + /* FIXHFAILURE; */ break; default: break; @@ -18899,9 +20943,8 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) } if (pctxt->nberrors != 0) goto exit_error; - /* - * URGENT TODO: cos-element-consistent, cos-all-limited + * URGENT TODO: cos-element-consistent */ con->pending->nbItems = 0; return(0); @@ -18918,7 +20961,6 @@ exit_failure: * * parse a schema definition resource and build an internal * XML Shema struture which can be used to validate instances. - * *WARNING* this interface is highly subject to change * * Returns the internal XML Schema structure built from the resource or * NULL in case of error @@ -18959,7 +21001,7 @@ xmlSchemaParse(xmlSchemaParserCtxtPtr ctxt) /* Take ownership of the constructor to be able to free it. */ ctxt->ownsConstructor = 1; } - ctxt->constructor->schema = schema; + ctxt->constructor->mainSchema = schema; /* * Locate and add the schema document. */ @@ -18969,7 +21011,7 @@ xmlSchemaParse(xmlSchemaParserCtxtPtr ctxt) if (res == -1) goto exit_failure; if (res != 0) - goto exit; + goto exit; if (bucket == NULL) { /* TODO: Error code, actually we failed to *locate* the schema. */ @@ -19060,7 +21102,30 @@ xmlSchemaSetParserErrors(xmlSchemaParserCtxtPtr ctxt, return; ctxt->error = err; ctxt->warning = warn; - ctxt->userData = ctx; + ctxt->errCtxt = ctx; + if (ctxt->vctxt != NULL) + xmlSchemaSetValidErrors(ctxt->vctxt, err, warn, ctx); +} + +/** + * xmlSchemaSetParserStructuredErrors: + * @ctxt: a schema parser context + * @serror: the structured error function + * @ctx: the functions context + * + * Set the structured error callback + */ +void +xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt, + xmlStructuredErrorFunc serror, + void *ctx) +{ + if (ctxt == NULL) + return; + ctxt->serror = serror; + ctxt->errCtxt = ctx; + if (ctxt->vctxt != NULL) + xmlSchemaSetValidStructuredErrors(ctxt->vctxt, serror, ctx); } /** @@ -19076,8 +21141,8 @@ xmlSchemaSetParserErrors(xmlSchemaParserCtxtPtr ctxt, */ int xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt, - xmlSchemaValidityErrorFunc * err, - xmlSchemaValidityWarningFunc * warn, void **ctx) + xmlSchemaValidityErrorFunc * err, + xmlSchemaValidityWarningFunc * warn, void **ctx) { if (ctxt == NULL) return(-1); @@ -19086,7 +21151,7 @@ xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt, if (warn != NULL) *warn = ctxt->warning; if (ctx != NULL) - *ctx = ctxt->userData; + *ctx = ctxt->errCtxt; return(0); } @@ -19158,14 +21223,14 @@ xmlSchemaGetWhiteSpaceFacetValue(xmlSchemaTypePtr type) */ return(XML_SCHEMA_WHITESPACE_COLLAPSE); } - } else if (VARIETY_LIST(type)) { + } else if (WXS_IS_LIST(type)) { /* * For list types the facet "whiteSpace" is fixed to "collapse". */ return (XML_SCHEMA_WHITESPACE_COLLAPSE); - } else if (VARIETY_UNION(type)) { + } else if (WXS_IS_UNION(type)) { return (XML_SCHEMA_WHITESPACE_UNKNOWN); - } else if (VARIETY_ATOMIC(type)) { + } else if (WXS_IS_ATOMIC(type)) { if (type->flags & XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE) return (XML_SCHEMA_WHITESPACE_PRESERVE); else if (type->flags & XML_SCHEMAS_TYPE_WHITESPACE_REPLACE) @@ -19245,7 +21310,7 @@ xmlSchemaAssembleByLocation(xmlSchemaValidCtxtPtr vctxt, return(ret); if (bucket == NULL) { PERROR_INT("xmlSchemaAssembleByLocation", - "no schema bucket aquired"); + "no schema bucket acquired"); return(-1); } /* @@ -19283,6 +21348,13 @@ xmlSchemaAssembleByLocation(xmlSchemaValidCtxtPtr vctxt, * no error yet. */ xmlSchemaFixupComponents(pctxt); + ret = pctxt->err; + /* + * Not nice, but we need somehow to channel the schema parser + * error to the validation context. + */ + if ((ret != 0) && (vctxt->err == 0)) + vctxt->err = ret; vctxt->nberrors += pctxt->nberrors; } else { /* Add to validation error sum. */ @@ -19339,11 +21411,15 @@ xmlSchemaAssembleByXSI(xmlSchemaValidCtxtPtr vctxt) /* * Parse the value; we will assume an even number of values * to be given (this is how Xerces and XSV work). + * + * URGENT TODO: !! This needs to work for both + * @noNamespaceSchemaLocation AND @schemaLocation on the same + * element !! */ iattr = xmlSchemaGetMetaAttrInfo(vctxt, XML_SCHEMA_ATTR_INFO_META_XSI_SCHEMA_LOC); if (iattr == NULL) - xmlSchemaGetMetaAttrInfo(vctxt, + iattr = xmlSchemaGetMetaAttrInfo(vctxt, XML_SCHEMA_ATTR_INFO_META_XSI_NO_NS_SCHEMA_LOC); if (iattr == NULL) return (0); @@ -19572,7 +21648,7 @@ xmlSchemaAugmentIDC(xmlSchemaIDCPtr idcDef, NULL); return; } - aidc->bubbleDepth = -1; + aidc->keyrefDepth = -1; aidc->def = idcDef; aidc->next = NULL; if (vctxt->aidcs == NULL) @@ -19581,6 +21657,12 @@ xmlSchemaAugmentIDC(xmlSchemaIDCPtr idcDef, aidc->next = vctxt->aidcs; vctxt->aidcs = aidc; } + /* + * Save if we have keyrefs at all. + */ + if ((vctxt->hasKeyrefs == 0) && + (idcDef->type == XML_SCHEMA_TYPE_IDC_KEYREF)) + vctxt->hasKeyrefs = 1; } /** @@ -19589,7 +21671,7 @@ xmlSchemaAugmentIDC(xmlSchemaIDCPtr idcDef, * * Creates a new IDC binding. * - * Returns the new binding in case of succeeded, NULL on internal errors. + * Returns the new IDC binding, NULL on internal errors. */ static xmlSchemaPSVIIDCBindingPtr xmlSchemaIDCNewBinding(xmlSchemaIDCPtr idcDef) @@ -19613,7 +21695,7 @@ xmlSchemaIDCNewBinding(xmlSchemaIDCPtr idcDef) * @vctxt: the WXS validation context * @item: the IDC node table item * - * The validation context is used to store an IDC node table items. + * The validation context is used to store IDC node table items. * They are stored to avoid copying them if IDC node-tables are merged * with corresponding parent IDC node-tables (bubbling). * @@ -19730,7 +21812,7 @@ xmlSchemaIDCAppendNodeTableItem(xmlSchemaPSVIIDCBindingPtr bind, } /** - * xmlSchemaIDCAquireBinding: + * xmlSchemaIDCAcquireBinding: * @vctxt: the WXS validation context * @matcher: the IDC matcher * @@ -19741,22 +21823,22 @@ xmlSchemaIDCAppendNodeTableItem(xmlSchemaPSVIIDCBindingPtr bind, * Returns an IDC binding or NULL on internal errors. */ static xmlSchemaPSVIIDCBindingPtr -xmlSchemaIDCAquireBinding(xmlSchemaValidCtxtPtr vctxt, +xmlSchemaIDCAcquireBinding(xmlSchemaValidCtxtPtr vctxt, xmlSchemaIDCMatcherPtr matcher) { - xmlSchemaNodeInfoPtr info; + xmlSchemaNodeInfoPtr ielem; - info = vctxt->elemInfos[matcher->depth]; + ielem = vctxt->elemInfos[matcher->depth]; - if (info->idcTable == NULL) { - info->idcTable = xmlSchemaIDCNewBinding(matcher->aidc->def); - if (info->idcTable == NULL) + if (ielem->idcTable == NULL) { + ielem->idcTable = xmlSchemaIDCNewBinding(matcher->aidc->def); + if (ielem->idcTable == NULL) return (NULL); - return(info->idcTable); + return(ielem->idcTable); } else { xmlSchemaPSVIIDCBindingPtr bind = NULL; - bind = info->idcTable; + bind = ielem->idcTable; do { if (bind->definition == matcher->aidc->def) return(bind); @@ -19772,6 +21854,15 @@ xmlSchemaIDCAquireBinding(xmlSchemaValidCtxtPtr vctxt, return (NULL); } +static xmlSchemaItemListPtr +xmlSchemaIDCAcquireTargetList(xmlSchemaValidCtxtPtr vctxt ATTRIBUTE_UNUSED, + xmlSchemaIDCMatcherPtr matcher) +{ + if (matcher->targets == NULL) + matcher->targets = xmlSchemaItemListCreate(); + return(matcher->targets); +} + /** * xmlSchemaIDCFreeKey: * @key: the IDC key @@ -19795,21 +21886,10 @@ xmlSchemaIDCFreeKey(xmlSchemaPSVIIDCKeyPtr key) static void xmlSchemaIDCFreeBinding(xmlSchemaPSVIIDCBindingPtr bind) { - if (bind->nodeTable != NULL) { - if (bind->definition->type == XML_SCHEMA_TYPE_IDC_KEYREF) { - int i; - /* - * Node-table items for keyrefs are not stored globally - * to the validation context, since they are not bubbled. - * We need to free them here. - */ - for (i = 0; i < bind->nbNodes; i++) { - xmlFree(bind->nodeTable[i]->keys); - xmlFree(bind->nodeTable[i]); - } - } + if (bind->nodeTable != NULL) xmlFree(bind->nodeTable); - } + if (bind->dupls != NULL) + xmlSchemaItemListFree(bind->dupls); xmlFree(bind); } @@ -19849,7 +21929,25 @@ xmlSchemaIDCFreeMatcherList(xmlSchemaIDCMatcherPtr matcher) for (i = 0; i < matcher->sizeKeySeqs; i++) if (matcher->keySeqs[i] != NULL) xmlFree(matcher->keySeqs[i]); - xmlFree(matcher->keySeqs); + xmlFree(matcher->keySeqs); + } + if (matcher->targets != NULL) { + if (matcher->idcType == XML_SCHEMA_TYPE_IDC_KEYREF) { + int i; + xmlSchemaPSVIIDCNodePtr idcNode; + /* + * Node-table items for keyrefs are not stored globally + * to the validation context, since they are not bubbled. + * We need to free them here. + */ + for (i = 0; i < matcher->targets->nbItems; i++) { + idcNode = + (xmlSchemaPSVIIDCNodePtr) matcher->targets->items[i]; + xmlFree(idcNode->keys); + xmlFree(idcNode); + } + } + xmlSchemaItemListFree(matcher->targets); } xmlFree(matcher); matcher = next; @@ -19926,7 +22024,7 @@ xmlSchemaIDCAddStateObject(xmlSchemaValidCtxtPtr vctxt, sto->sel = sel; sto->nbHistory = 0; -#if DEBUG_IDC +#ifdef DEBUG_IDC xmlGenericError(xmlGenericErrorContext, "IDC: STO push '%s'\n", sto->sel->xpath); #endif @@ -19955,7 +22053,7 @@ xmlSchemaXPathEvaluate(xmlSchemaValidCtxtPtr vctxt, if (nodeType == XML_ATTRIBUTE_NODE) depth++; -#if DEBUG_IDC +#ifdef DEBUG_IDC { xmlChar *str = NULL; xmlGenericError(xmlGenericErrorContext, @@ -19971,7 +22069,7 @@ xmlSchemaXPathEvaluate(xmlSchemaValidCtxtPtr vctxt, first = vctxt->xpathStates; sto = first; while (sto != head) { -#if DEBUG_IDC +#ifdef DEBUG_IDC if (sto->type == XPATH_STATE_OBJ_TYPE_IDC_SELECTOR) xmlGenericError(xmlGenericErrorContext, "IDC: ['%s'] selector '%s'\n", sto->matcher->aidc->def->name, sto->sel->xpath); @@ -19996,7 +22094,7 @@ xmlSchemaXPathEvaluate(xmlSchemaValidCtxtPtr vctxt, /* * Full match. */ -#if DEBUG_IDC +#ifdef DEBUG_IDC xmlGenericError(xmlGenericErrorContext, "IDC: " "MATCH\n"); #endif @@ -20034,7 +22132,7 @@ xmlSchemaXPathEvaluate(xmlSchemaValidCtxtPtr vctxt, * Activate state objects for the IDC fields of * the IDC selector. */ -#if DEBUG_IDC +#ifdef DEBUG_IDC xmlGenericError(xmlGenericErrorContext, "IDC: " "activating field states\n"); #endif @@ -20049,7 +22147,7 @@ xmlSchemaXPathEvaluate(xmlSchemaValidCtxtPtr vctxt, /* * An IDC key node was found by the IDC field. */ -#if DEBUG_IDC +#ifdef DEBUG_IDC xmlGenericError(xmlGenericErrorContext, "IDC: key found\n"); #endif @@ -20084,15 +22182,16 @@ xmlSchemaFormatIDCKeySequence(xmlSchemaValidCtxtPtr vctxt, int count) { int i, res; - const xmlChar *value = NULL; + xmlChar *value = NULL; *buf = xmlStrdup(BAD_CAST "["); for (i = 0; i < count; i++) { *buf = xmlStrcat(*buf, BAD_CAST "'"); - res = xmlSchemaGetCanonValueWhtsp(seq[i]->val, &value, - xmlSchemaGetWhiteSpaceFacetValue(seq[i]->type)); + res = xmlSchemaGetCanonValueWhtspExt(seq[i]->val, + xmlSchemaGetWhiteSpaceFacetValue(seq[i]->type), + &value); if (res == 0) - *buf = xmlStrcat(*buf, value); + *buf = xmlStrcat(*buf, BAD_CAST value); else { VERROR_INT("xmlSchemaFormatIDCKeySequence", "failed to compute a canonical value"); @@ -20103,7 +22202,7 @@ xmlSchemaFormatIDCKeySequence(xmlSchemaValidCtxtPtr vctxt, else *buf = xmlStrcat(*buf, BAD_CAST "'"); if (value != NULL) { - xmlFree((xmlChar *) value); + xmlFree(value); value = NULL; } } @@ -20156,13 +22255,13 @@ xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt, xmlSchemaIDCStateObjPtr sto, nextsto; int res, matchDepth; xmlSchemaPSVIIDCKeyPtr key = NULL; - xmlSchemaTypePtr type = vctxt->inode->typeDef; + xmlSchemaTypePtr type = vctxt->inode->typeDef, simpleType = NULL; if (vctxt->xpathStates == NULL) return (0); sto = vctxt->xpathStates; -#if DEBUG_IDC +#ifdef DEBUG_IDC { xmlChar *str = NULL; xmlGenericError(xmlGenericErrorContext, @@ -20182,7 +22281,7 @@ xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt, "calling xmlStreamPop()"); return (-1); } -#if DEBUG_IDC +#ifdef DEBUG_IDC xmlGenericError(xmlGenericErrorContext, "IDC: stream pop '%s'\n", sto->sel->xpath); #endif @@ -20199,16 +22298,39 @@ xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt, continue; } if (sto->type == XPATH_STATE_OBJ_TYPE_IDC_FIELD) { - if (! IS_SIMPLE_TYPE(type)) { + /* + * NOTE: According to + * http://www.w3.org/Bugs/Public/show_bug.cgi?id=2198 + * ... the simple-content of complex types is also allowed. + */ + + if (WXS_IS_COMPLEX(type)) { + if (WXS_HAS_SIMPLE_CONTENT(type)) { + /* + * Sanity check for complex types with simple content. + */ + simpleType = type->contentTypeDef; + if (simpleType == NULL) { + VERROR_INT("xmlSchemaXPathProcessHistory", + "field resolves to a CT with simple content " + "but the CT is missing the ST definition"); + return (-1); + } + } else + simpleType = NULL; + } else + simpleType = type; + if (simpleType == NULL) { xmlChar *str = NULL; + /* * Not qualified if the field resolves to a node of non * simple type. */ xmlSchemaCustomErr(ACTXT_CAST vctxt, XML_SCHEMAV_CVC_IDC, NULL, - (xmlSchemaTypePtr) sto->matcher->aidc->def, - "The field '%s' of %s does evaluate to a node of " + WXS_BASIC_CAST sto->matcher->aidc->def, + "The XPath '%s' of a field of %s does evaluate to a node of " "non-simple type", sto->sel->xpath, xmlSchemaGetIDCDesignation(&str, sto->matcher->aidc->def)); @@ -20216,13 +22338,14 @@ xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt, sto->nbHistory--; goto deregister_check; } + if ((key == NULL) && (vctxt->inode->val == NULL)) { /* * Failed to provide the normalized value; maybe * the value was invalid. */ VERROR(XML_SCHEMAV_CVC_IDC, - (xmlSchemaTypePtr) sto->matcher->aidc->def, + WXS_BASIC_CAST sto->matcher->aidc->def, "Warning: No precomputed value available, the value " "was either invalid or something strange happend"); sto->nbHistory--; @@ -20237,6 +22360,18 @@ xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt, * key-sequences. The position in this list is determined * by the target node's depth relative to the matcher's * depth of creation (i.e. the depth of the scope element). + * + * Element Depth Pos List-entries + * 0 NULL + * 1 NULL + * 2 2 target + * + * + * + * The size of the list is only dependant on the depth of + * the tree. + * An entry will be NULLed in selector_leave, i.e. when + * we hit the target's */ pos = sto->depth - matcher->depth; idx = sto->sel->index; @@ -20289,33 +22424,30 @@ xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt, keySeq = matcher->keySeqs[pos]; if (keySeq == NULL) { goto create_sequence; - } else { - if (keySeq[idx] != NULL) { - xmlChar *str = NULL; - /* - * cvc-identity-constraint: - * 3 For each node in the ·target node set· all - * of the {fields}, with that node as the context - * node, evaluate to either an empty node-set or - * a node-set with exactly one member, which must - * have a simple type. - * - * The key was already set; report an error. - */ - xmlSchemaCustomErr(ACTXT_CAST vctxt, - XML_SCHEMAV_CVC_IDC, NULL, - (xmlSchemaTypePtr) matcher->aidc->def, - "The field '%s' of %s evaluates to a node-set " - "with more than one member", - sto->sel->xpath, - xmlSchemaGetIDCDesignation(&str, matcher->aidc->def)); - FREE_AND_NULL(str); - sto->nbHistory--; - goto deregister_check; - } else { - goto create_key; - } - } + } else if (keySeq[idx] != NULL) { + xmlChar *str = NULL; + /* + * cvc-identity-constraint: + * 3 For each node in the ·target node set· all + * of the {fields}, with that node as the context + * node, evaluate to either an empty node-set or + * a node-set with exactly one member, which must + * have a simple type. + * + * The key was already set; report an error. + */ + xmlSchemaCustomErr(ACTXT_CAST vctxt, + XML_SCHEMAV_CVC_IDC, NULL, + WXS_BASIC_CAST matcher->aidc->def, + "The XPath '%s' of a field of %s evaluates to a " + "node-set with more than one member", + sto->sel->xpath, + xmlSchemaGetIDCDesignation(&str, matcher->aidc->def)); + FREE_AND_NULL(str); + sto->nbHistory--; + goto deregister_check; + } else + goto create_key; create_sequence: /* @@ -20334,7 +22466,7 @@ create_sequence: matcher->keySeqs[pos] = keySeq; create_key: /* - * Created a key once per node only. + * Create a key once per node only. */ if (key == NULL) { key = (xmlSchemaPSVIIDCKeyPtr) xmlMalloc( @@ -20349,7 +22481,7 @@ create_key: /* * Consume the compiled value. */ - key->type = type; + key->type = simpleType; key->val = vctxt->inode->val; vctxt->inode->val = NULL; /* @@ -20365,10 +22497,11 @@ create_key: } else if (sto->type == XPATH_STATE_OBJ_TYPE_IDC_SELECTOR) { xmlSchemaPSVIIDCKeyPtr **keySeq = NULL; - xmlSchemaPSVIIDCBindingPtr bind; + /* xmlSchemaPSVIIDCBindingPtr bind; */ xmlSchemaPSVIIDCNodePtr ntItem; xmlSchemaIDCMatcherPtr matcher; xmlSchemaIDCPtr idc; + xmlSchemaItemListPtr targets; int pos, i, j, nbKeys; /* * Here we have the following scenario: @@ -20432,9 +22565,12 @@ create_key: * Get the IDC binding from the matcher and check for * duplicate key-sequences. */ - bind = xmlSchemaIDCAquireBinding(vctxt, matcher); +#if 0 + bind = xmlSchemaIDCAcquireBinding(vctxt, matcher); +#endif + targets = xmlSchemaIDCAcquireTargetList(vctxt, matcher); if ((idc->type != XML_SCHEMA_TYPE_IDC_KEYREF) && - (bind->nbNodes != 0)) { + (targets->nbItems != 0)) { xmlSchemaPSVIIDCKeyPtr ckey, bkey, *bkeySeq; i = 0; @@ -20443,32 +22579,38 @@ create_key: * Compare the key-sequences, key by key. */ do { - bkeySeq = bind->nodeTable[i]->keys; + bkeySeq = + ((xmlSchemaPSVIIDCNodePtr) targets->items[i])->keys; for (j = 0; j < nbKeys; j++) { ckey = (*keySeq)[j]; bkey = bkeySeq[j]; res = xmlSchemaAreValuesEqual(ckey->val, bkey->val); if (res == -1) { return (-1); - } else if (res == 0) + } else if (res == 0) { + /* + * One of the keys differs, so the key-sequence + * won't be equal; get out. + */ break; + } } if (res == 1) { /* - * Duplicate found. + * Duplicate key-sequence found. */ break; } i++; - } while (i < bind->nbNodes); - if (i != bind->nbNodes) { + } while (i < targets->nbItems); + if (i != targets->nbItems) { xmlChar *str = NULL, *strB = NULL; /* * TODO: Try to report the key-sequence. */ xmlSchemaCustomErr(ACTXT_CAST vctxt, XML_SCHEMAV_CVC_IDC, NULL, - (xmlSchemaTypePtr) idc, + WXS_BASIC_CAST idc, "Duplicate key-sequence %s in %s", xmlSchemaFormatIDCKeySequence(vctxt, &str, (*keySeq), nbKeys), @@ -20493,7 +22635,7 @@ create_key: memset(ntItem, 0, sizeof(xmlSchemaPSVIIDCNode)); /* - * Store the node-table item on global list. + * Store the node-table item in a global list. */ if (idc->type != XML_SCHEMA_TYPE_IDC_KEYREF) { if (xmlSchemaIDCStoreNodeTableItem(vctxt, ntItem) == -1) { @@ -20525,7 +22667,10 @@ create_key: ntItem->nodeLine = vctxt->inode->nodeLine; ntItem->keys = *keySeq; *keySeq = NULL; - if (xmlSchemaIDCAppendNodeTableItem(bind, ntItem) == -1) { +#if 0 + if (xmlSchemaIDCAppendNodeTableItem(bind, ntItem) == -1) { +#endif + if (xmlSchemaItemListAdd(targets, ntItem) == -1) { if (idc->type == XML_SCHEMA_TYPE_IDC_KEYREF) { /* * Free the item, since keyref items won't be @@ -20549,7 +22694,7 @@ selector_key_error: */ xmlSchemaCustomErr(ACTXT_CAST vctxt, XML_SCHEMAV_CVC_IDC, NULL, - (xmlSchemaTypePtr) idc, + WXS_BASIC_CAST idc, "Not all fields of %s evaluate to a node", xmlSchemaGetIDCDesignation(&str, idc), NULL); FREE_AND_NULL(str); @@ -20571,7 +22716,7 @@ deregister_check: * Deregister state objects if they reach the depth of creation. */ if ((sto->nbHistory == 0) && (sto->depth == depth)) { -#if DEBUG_IDC +#ifdef DEBUG_IDC xmlGenericError(xmlGenericErrorContext, "IDC: STO pop '%s'\n", sto->sel->xpath); #endif @@ -20619,7 +22764,7 @@ xmlSchemaIDCRegisterMatchers(xmlSchemaValidCtxtPtr vctxt, if (idc == NULL) return (0); -#if DEBUG_IDC +#ifdef DEBUG_IDC { xmlChar *str = NULL; xmlGenericError(xmlGenericErrorContext, @@ -20640,13 +22785,17 @@ xmlSchemaIDCRegisterMatchers(xmlSchemaValidCtxtPtr vctxt, * Since IDCs bubbles are expensive we need to know the * depth at which the bubbles should stop; this will be * the depth of the top-most keyref IDC. If no keyref - * references a key/unique IDC, the bubbleDepth will + * references a key/unique IDC, the keyrefDepth will * be -1, indicating that no bubbles are needed. */ refIdc = (xmlSchemaIDCPtr) idc->ref->item; if (refIdc != NULL) { /* - * Lookup the augmented IDC. + * Remember that we have keyrefs on this node. + */ + vctxt->inode->hasKeyrefs = 1; + /* + * Lookup the referenced augmented IDC info. */ aidc = vctxt->aidcs; while (aidc != NULL) { @@ -20660,9 +22809,9 @@ xmlSchemaIDCRegisterMatchers(xmlSchemaValidCtxtPtr vctxt, "definition"); return (-1); } - if ((aidc->bubbleDepth == -1) || - (vctxt->depth < aidc->bubbleDepth)) - aidc->bubbleDepth = vctxt->depth; + if ((aidc->keyrefDepth == -1) || + (vctxt->depth < aidc->keyrefDepth)) + aidc->keyrefDepth = vctxt->depth; } } /* @@ -20696,22 +22845,208 @@ xmlSchemaIDCRegisterMatchers(xmlSchemaValidCtxtPtr vctxt, last->next = matcher; last = matcher; - matcher->type = IDC_MATCHER; - matcher->depth = vctxt->depth; - matcher->aidc = aidc; -#if DEBUG_IDC - xmlGenericError(xmlGenericErrorContext, "IDC: register matcher\n"); -#endif - /* - * Init the automaton state object. - */ - if (xmlSchemaIDCAddStateObject(vctxt, matcher, - idc->selector, XPATH_STATE_OBJ_TYPE_IDC_SELECTOR) == -1) - return (-1); + matcher->type = IDC_MATCHER; + matcher->depth = vctxt->depth; + matcher->aidc = aidc; + matcher->idcType = aidc->def->type; +#ifdef DEBUG_IDC + xmlGenericError(xmlGenericErrorContext, "IDC: register matcher\n"); +#endif + /* + * Init the automaton state object. + */ + if (xmlSchemaIDCAddStateObject(vctxt, matcher, + idc->selector, XPATH_STATE_OBJ_TYPE_IDC_SELECTOR) == -1) + return (-1); + + idc = idc->next; + } while (idc != NULL); + return (0); +} + +static int +xmlSchemaIDCFillNodeTables(xmlSchemaValidCtxtPtr vctxt, + xmlSchemaNodeInfoPtr ielem) +{ + xmlSchemaPSVIIDCBindingPtr bind; + int res, i, j, k, nbTargets, nbFields, nbDupls, nbNodeTable; + xmlSchemaPSVIIDCKeyPtr *keys, *ntkeys; + xmlSchemaPSVIIDCNodePtr *targets, *dupls; + + xmlSchemaIDCMatcherPtr matcher = ielem->idcMatchers; + /* vctxt->createIDCNodeTables */ + while (matcher != NULL) { + /* + * Skip keyref IDCs and empty IDC target-lists. + */ + if ((matcher->aidc->def->type == XML_SCHEMA_TYPE_IDC_KEYREF) || + WXS_ILIST_IS_EMPTY(matcher->targets)) + { + matcher = matcher->next; + continue; + } + /* + * If we _want_ the IDC node-table to be created in any case + * then do so. Otherwise create them only if keyrefs need them. + */ + if ((! vctxt->createIDCNodeTables) && + ((matcher->aidc->keyrefDepth == -1) || + (matcher->aidc->keyrefDepth > vctxt->depth))) + { + matcher = matcher->next; + continue; + } + /* + * Get/create the IDC binding on this element for the IDC definition. + */ + bind = xmlSchemaIDCAcquireBinding(vctxt, matcher); + + if (! WXS_ILIST_IS_EMPTY(bind->dupls)) { + dupls = (xmlSchemaPSVIIDCNodePtr *) bind->dupls->items; + nbDupls = bind->dupls->nbItems; + } else { + dupls = NULL; + nbDupls = 0; + } + if (bind->nodeTable != NULL) { + nbNodeTable = bind->nbNodes; + } else { + nbNodeTable = 0; + } + + if ((nbNodeTable == 0) && (nbDupls == 0)) { + /* + * Transfer all IDC target-nodes to the IDC node-table. + */ + bind->nodeTable = + (xmlSchemaPSVIIDCNodePtr *) matcher->targets->items; + bind->sizeNodes = matcher->targets->sizeItems; + bind->nbNodes = matcher->targets->nbItems; + + matcher->targets->items = NULL; + matcher->targets->sizeItems = 0; + matcher->targets->nbItems = 0; + } else { + /* + * Compare the key-sequences and add to the IDC node-table. + */ + nbTargets = matcher->targets->nbItems; + targets = (xmlSchemaPSVIIDCNodePtr *) matcher->targets->items; + nbFields = matcher->aidc->def->nbFields; + i = 0; + do { + keys = targets[i]->keys; + if (nbDupls) { + /* + * Search in already found duplicates first. + */ + j = 0; + do { + if (nbFields == 1) { + res = xmlSchemaAreValuesEqual(keys[0]->val, + dupls[j]->keys[0]->val); + if (res == -1) + goto internal_error; + if (res == 1) { + /* + * Equal key-sequence. + */ + goto next_target; + } + } else { + res = 0; + ntkeys = dupls[j]->keys; + for (k = 0; k < nbFields; k++) { + res = xmlSchemaAreValuesEqual(keys[k]->val, + ntkeys[k]->val); + if (res == -1) + goto internal_error; + if (res == 0) { + /* + * One of the keys differs. + */ + break; + } + } + if (res == 1) { + /* + * Equal key-sequence found. + */ + goto next_target; + } + } + j++; + } while (j < nbDupls); + } + if (nbNodeTable) { + j = 0; + do { + if (nbFields == 1) { + res = xmlSchemaAreValuesEqual(keys[0]->val, + bind->nodeTable[j]->keys[0]->val); + if (res == -1) + goto internal_error; + if (res == 0) { + /* + * The key-sequence differs. + */ + goto next_node_table_entry; + } + } else { + res = 0; + ntkeys = bind->nodeTable[j]->keys; + for (k = 0; k < nbFields; k++) { + res = xmlSchemaAreValuesEqual(keys[k]->val, + ntkeys[k]->val); + if (res == -1) + goto internal_error; + if (res == 0) { + /* + * One of the keys differs. + */ + goto next_node_table_entry; + } + } + } + /* + * Add the duplicate to the list of duplicates. + */ + if (bind->dupls == NULL) { + bind->dupls = xmlSchemaItemListCreate(); + if (bind->dupls == NULL) + goto internal_error; + } + if (xmlSchemaItemListAdd(bind->dupls, bind->nodeTable[j]) == -1) + goto internal_error; + /* + * Remove the duplicate entry from the IDC node-table. + */ + bind->nodeTable[j] = bind->nodeTable[bind->nbNodes -1]; + bind->nbNodes--; + + goto next_target; - idc = idc->next; - } while (idc != NULL); - return (0); +next_node_table_entry: + j++; + } while (j < nbNodeTable); + } + /* + * If everything is fine, then add the IDC target-node to + * the IDC node-table. + */ + if (xmlSchemaIDCAppendNodeTableItem(bind, targets[i]) == -1) + goto internal_error; + +next_target: + i++; + } while (i < nbTargets); + } + matcher = matcher->next; + } + return(0); + +internal_error: + return(-1); } /** @@ -20729,26 +23064,11 @@ static int xmlSchemaBubbleIDCNodeTables(xmlSchemaValidCtxtPtr vctxt) { xmlSchemaPSVIIDCBindingPtr bind; /* IDC bindings of the current node. */ - xmlSchemaPSVIIDCBindingPtr *parTable, parBind = NULL, lastParBind = NULL; /* parent IDC bindings. */ - xmlSchemaPSVIIDCNodePtr node, parNode = NULL; /* node-table entries. */ - xmlSchemaPSVIIDCKeyPtr key, parKey; /* keys of in a key-sequence. */ + xmlSchemaPSVIIDCBindingPtr *parTable, parBind = NULL; /* parent IDC bindings. */ + xmlSchemaPSVIIDCNodePtr node, parNode = NULL, *dupls, *parNodes; /* node-table entries. */ xmlSchemaIDCAugPtr aidc; - int i, j, k, ret = 0, oldNum, newDupls; - int duplTop; + int i, j, k, ret = 0, nbFields, oldNum, oldDupls; - /* - * The node table has the following sections: - * - * O --> old node-table entries (first) - * O - * + --> new node-table entries - * + - * % --> new duplicate node-table entries - * % - * # --> old duplicate node-table entries - * # (last) - * - */ bind = vctxt->inode->idcTable; if (bind == NULL) { /* Fine, no table, no bubbles. */ @@ -20760,136 +23080,160 @@ xmlSchemaBubbleIDCNodeTables(xmlSchemaValidCtxtPtr vctxt) * Walk all bindings; create new or add to existing bindings. * Remove duplicate key-sequences. */ -start_binding: while (bind != NULL) { - /* - * Skip keyref IDCs. - */ - if (bind->definition->type == XML_SCHEMA_TYPE_IDC_KEYREF) { - bind = bind->next; - continue; - } + + if ((bind->nbNodes == 0) && WXS_ILIST_IS_EMPTY(bind->dupls)) + goto next_binding; /* * Check if the key/unique IDC table needs to be bubbled. */ - aidc = vctxt->aidcs; - do { - if (aidc->def == bind->definition) { - if ((aidc->bubbleDepth == -1) || - (aidc->bubbleDepth >= vctxt->depth)) { - bind = bind->next; - goto start_binding; + if (! vctxt->createIDCNodeTables) { + aidc = vctxt->aidcs; + do { + if (aidc->def == bind->definition) { + if ((aidc->keyrefDepth == -1) || + (aidc->keyrefDepth >= vctxt->depth)) { + goto next_binding; + } + break; } - break; - } - aidc = aidc->next; - } while (aidc != NULL); + aidc = aidc->next; + } while (aidc != NULL); + } if (parTable != NULL) parBind = *parTable; - while (parBind != NULL) { + /* + * Search a matching parent binding for the + * IDC definition. + */ + while (parBind != NULL) { + if (parBind->definition == bind->definition) + break; + parBind = parBind->next; + } + + if (parBind != NULL) { /* - * Search a matching parent binding for the - * IDC definition. + * Compare every node-table entry of the child node, + * i.e. the key-sequence within, ... */ - if (parBind->definition == bind->definition) { + oldNum = parBind->nbNodes; /* Skip newly added items. */ + if (! WXS_ILIST_IS_EMPTY(parBind->dupls)) { + oldDupls = parBind->dupls->nbItems; + dupls = (xmlSchemaPSVIIDCNodePtr *) parBind->dupls->items; + } else { + dupls = NULL; + oldDupls = 0; + } + + parNodes = parBind->nodeTable; + nbFields = bind->definition->nbFields; + + for (i = 0; i < bind->nbNodes; i++) { + node = bind->nodeTable[i]; + if (node == NULL) + continue; /* - * Compare every node-table entry of the child node, - * i.e. the key-sequence within, ... + * ...with every key-sequence of the parent node, already + * evaluated to be a duplicate key-sequence. */ - oldNum = parBind->nbNodes; /* Skip newly added items. */ - duplTop = oldNum + parBind->nbDupls; - newDupls = 0; - - for (i = 0; i < bind->nbNodes; i++) { - node = bind->nodeTable[i]; - if (node == NULL) - continue; - /* - * ...with every key-sequence of the parent node, already - * evaluated to be a duplicate key-sequence. - */ - if (parBind->nbDupls != 0) { - j = bind->nbNodes + newDupls; - while (j < duplTop) { - parNode = parBind->nodeTable[j]; - for (k = 0; k < bind->definition->nbFields; k++) { - key = node->keys[k]; - parKey = parNode->keys[k]; - ret = xmlSchemaAreValuesEqual(key->val, - parKey->val); - if (ret == -1) { - /* TODO: Internal error */ - return(-1); - } else if (ret == 0) + if (oldDupls) { + j = 0; + while (j < oldDupls) { + if (nbFields == 1) { + ret = xmlSchemaAreValuesEqual( + node->keys[0]->val, + dupls[j]->keys[0]->val); + if (ret == -1) + goto internal_error; + if (ret == 0) { + j++; + continue; + } + } else { + parNode = dupls[j]; + for (k = 0; k < nbFields; k++) { + ret = xmlSchemaAreValuesEqual( + node->keys[k]->val, + parNode->keys[k]->val); + if (ret == -1) + goto internal_error; + if (ret == 0) break; - } - if (ret == 1) - /* Duplicate found. */ - break; - j++; } - if (j != duplTop) { + if (ret == 1) /* Duplicate found. */ - continue; - } - } - /* - * ... and with every key-sequence of the parent node. - */ - j = 0; + break; + j++; + } + if (j != oldDupls) { + /* Duplicate found. Skip this entry. */ + continue; + } + } + /* + * ... and with every key-sequence of the parent node. + */ + if (oldNum) { + j = 0; while (j < oldNum) { - parNode = parBind->nodeTable[j]; - /* - * Compare key by key. - */ - for (k = 0; k < parBind->definition->nbFields; k++) { - key = node->keys[k]; - parKey = parNode->keys[k]; - - ret = xmlSchemaAreValuesEqual(key->val, - parKey->val); - if (ret == -1) { - /* TODO: Internal error */ - } else if (ret == 0) - break; - + parNode = parNodes[j]; + if (nbFields == 1) { + ret = xmlSchemaAreValuesEqual( + node->keys[0]->val, + parNode->keys[0]->val); + if (ret == -1) + goto internal_error; + if (ret == 0) { + j++; + continue; + } + } else { + for (k = 0; k < nbFields; k++) { + ret = xmlSchemaAreValuesEqual( + node->keys[k]->val, + parNode->keys[k]->val); + if (ret == -1) + goto internal_error; + if (ret == 0) + break; + } } if (ret == 1) - /* - * The key-sequences are equal. - */ + /* Duplicate found. */ break; j++; } if (j != oldNum) { /* - * Handle duplicates. - */ - newDupls++; + * Handle duplicates. Move the duplicate in + * the parent's node-table to the list of + * duplicates. + */ oldNum--; parBind->nbNodes--; /* * Move last old item to pos of duplicate. */ - parBind->nodeTable[j] = - parBind->nodeTable[oldNum]; + parNodes[j] = parNodes[oldNum]; if (parBind->nbNodes != oldNum) { /* * If new items exist, move last new item to * last of old items. */ - parBind->nodeTable[oldNum] = - parBind->nodeTable[parBind->nbNodes]; + parNodes[oldNum] = + parNodes[parBind->nbNodes]; } - /* - * Move duplicate to last pos of new/old items. - */ - parBind->nodeTable[parBind->nbNodes] = parNode; - + if (parBind->dupls == NULL) { + parBind->dupls = xmlSchemaItemListCreate(); + if (parBind->dupls == NULL) + goto internal_error; + } + xmlSchemaItemListAdd(parBind->dupls, parNode); } else { /* * Add the node-table entry (node and key-sequence) of @@ -20901,10 +23245,10 @@ start_binding: if (parBind->nodeTable == NULL) { xmlSchemaVErrMemory(NULL, "allocating IDC list of node-table items", NULL); - return(-1); + goto internal_error; } parBind->sizeNodes = 1; - } else if (duplTop >= parBind->sizeNodes) { + } else if (parBind->nbNodes >= parBind->sizeNodes) { parBind->sizeNodes *= 2; parBind->nodeTable = (xmlSchemaPSVIIDCNodePtr *) xmlRealloc(parBind->nodeTable, parBind->sizeNodes * @@ -20912,71 +23256,94 @@ start_binding: if (parBind->nodeTable == NULL) { xmlSchemaVErrMemory(NULL, "re-allocating IDC list of node-table items", NULL); - return(-1); - } - } - - /* - * Move first old duplicate to last position - * of old duplicates +1. - */ - if (parBind->nbDupls != 0) { - parBind->nodeTable[duplTop] = - parBind->nodeTable[parBind->nbNodes + newDupls]; - } - /* - * Move first new duplicate to last position of - * new duplicates +1. - */ - if (newDupls != 0) { - parBind->nodeTable[parBind->nbNodes + newDupls] = - parBind->nodeTable[parBind->nbNodes]; + goto internal_error; + } } + parNodes = parBind->nodeTable; /* * Append the new node-table entry to the 'new node-table * entries' section. */ - parBind->nodeTable[parBind->nbNodes] = node; - parBind->nbNodes++; - duplTop++; + parNodes[parBind->nbNodes++] = node; } - } - parBind->nbDupls += newDupls; - break; - } - if (parBind->next == NULL) - lastParBind = parBind; - parBind = parBind->next; - } - if ((parBind == NULL) && (bind->nbNodes != 0)) { + + } + + } + } else { /* * No binding for the IDC was found: create a new one and * copy all node-tables. */ parBind = xmlSchemaIDCNewBinding(bind->definition); if (parBind == NULL) - return(-1); - - parBind->nodeTable = (xmlSchemaPSVIIDCNodePtr *) - xmlMalloc(bind->nbNodes * sizeof(xmlSchemaPSVIIDCNodePtr)); - if (parBind->nodeTable == NULL) { - xmlSchemaVErrMemory(NULL, - "allocating an array of IDC node-table items", NULL); - xmlSchemaIDCFreeBinding(parBind); - return(-1); + goto internal_error; + + /* + * TODO: Hmm, how to optimize the initial number of + * allocated entries? + */ + if (bind->nbNodes != 0) { + /* + * Add all IDC node-table entries. + */ + if (! vctxt->psviExposeIDCNodeTables) { + /* + * Just move the entries. + * NOTE: this is quite save here, since + * all the keyref lookups have already been + * performed. + */ + parBind->nodeTable = bind->nodeTable; + bind->nodeTable = NULL; + parBind->sizeNodes = bind->sizeNodes; + bind->sizeNodes = 0; + parBind->nbNodes = bind->nbNodes; + bind->nbNodes = 0; + } else { + /* + * Copy the entries. + */ + parBind->nodeTable = (xmlSchemaPSVIIDCNodePtr *) + xmlMalloc(bind->nbNodes * + sizeof(xmlSchemaPSVIIDCNodePtr)); + if (parBind->nodeTable == NULL) { + xmlSchemaVErrMemory(NULL, + "allocating an array of IDC node-table " + "items", NULL); + xmlSchemaIDCFreeBinding(parBind); + goto internal_error; + } + parBind->sizeNodes = bind->nbNodes; + parBind->nbNodes = bind->nbNodes; + memcpy(parBind->nodeTable, bind->nodeTable, + bind->nbNodes * sizeof(xmlSchemaPSVIIDCNodePtr)); + } + } + if (bind->dupls) { + /* + * Move the duplicates. + */ + if (parBind->dupls != NULL) + xmlSchemaItemListFree(parBind->dupls); + parBind->dupls = bind->dupls; + bind->dupls = NULL; } - parBind->sizeNodes = bind->nbNodes; - parBind->nbNodes = bind->nbNodes; - memcpy(parBind->nodeTable, bind->nodeTable, - bind->nbNodes * sizeof(xmlSchemaPSVIIDCNodePtr)); if (*parTable == NULL) *parTable = parBind; - else - lastParBind->next = parBind; - } + else { + parBind->next = *parTable; + *parTable = parBind; + } + } + +next_binding: bind = bind->next; - } + } return (0); + +internal_error: + return(-1); } /** @@ -20989,45 +23356,48 @@ start_binding: static int xmlSchemaCheckCVCIDCKeyRef(xmlSchemaValidCtxtPtr vctxt) { - xmlSchemaPSVIIDCBindingPtr refbind, bind; - - refbind = vctxt->inode->idcTable; + xmlSchemaIDCMatcherPtr matcher; + xmlSchemaPSVIIDCBindingPtr bind; + + matcher = vctxt->inode->idcMatchers; /* * Find a keyref. */ - while (refbind != NULL) { - if (refbind->definition->type == XML_SCHEMA_TYPE_IDC_KEYREF) { - int i, j, k, res; + while (matcher != NULL) { + if ((matcher->idcType == XML_SCHEMA_TYPE_IDC_KEYREF) && + matcher->targets && + matcher->targets->nbItems) + { + int i, j, k, res, nbFields, hasDupls; xmlSchemaPSVIIDCKeyPtr *refKeys, *keys; - xmlSchemaPSVIIDCKeyPtr refKey, key; xmlSchemaPSVIIDCNodePtr refNode = NULL; + nbFields = matcher->aidc->def->nbFields; + /* - * Find the referred key/unique. + * Find the IDC node-table for the referenced IDC key/unique. */ bind = vctxt->inode->idcTable; - do { - if ((xmlSchemaIDCPtr) refbind->definition->ref->item == + while (bind != NULL) { + if ((xmlSchemaIDCPtr) matcher->aidc->def->ref->item == bind->definition) break; bind = bind->next; - } while (bind != NULL); - + } + hasDupls = (bind && bind->dupls && bind->dupls->nbItems) ? 1 : 0; /* * Search for a matching key-sequences. */ - for (i = 0; i < refbind->nbNodes; i++) { + for (i = 0; i < matcher->targets->nbItems; i++) { res = 0; - refNode = refbind->nodeTable[i]; + refNode = matcher->targets->items[i]; if (bind != NULL) { refKeys = refNode->keys; for (j = 0; j < bind->nbNodes; j++) { keys = bind->nodeTable[j]->keys; - for (k = 0; k < bind->definition->nbFields; k++) { - refKey = refKeys[k]; - key = keys[k]; - res = xmlSchemaAreValuesEqual(key->val, - refKey->val); + for (k = 0; k < nbFields; k++) { + res = xmlSchemaAreValuesEqual(keys[k]->val, + refKeys[k]->val); if (res == 0) break; else if (res == -1) { @@ -21041,27 +23411,61 @@ xmlSchemaCheckCVCIDCKeyRef(xmlSchemaValidCtxtPtr vctxt) break; } } + if ((res == 0) && hasDupls) { + /* + * Search in duplicates + */ + for (j = 0; j < bind->dupls->nbItems; j++) { + keys = ((xmlSchemaPSVIIDCNodePtr) + bind->dupls->items[j])->keys; + for (k = 0; k < nbFields; k++) { + res = xmlSchemaAreValuesEqual(keys[k]->val, + refKeys[k]->val); + if (res == 0) + break; + else if (res == -1) { + return (-1); + } + } + if (res == 1) { + /* + * Match in duplicates found. + */ + xmlChar *str = NULL, *strB = NULL; + xmlSchemaKeyrefErr(vctxt, + XML_SCHEMAV_CVC_IDC, refNode, + (xmlSchemaTypePtr) matcher->aidc->def, + "More than one match found for " + "key-sequence %s of keyref '%s'", + xmlSchemaFormatIDCKeySequence(vctxt, &str, + refNode->keys, nbFields), + xmlSchemaGetComponentQName(&strB, + matcher->aidc->def)); + FREE_AND_NULL(str); + FREE_AND_NULL(strB); + break; + } + } + } } + if (res == 0) { xmlChar *str = NULL, *strB = NULL; xmlSchemaKeyrefErr(vctxt, XML_SCHEMAV_CVC_IDC, refNode, - (xmlSchemaTypePtr) refbind->definition, - "No match found for key-sequence %s of key " - "reference '%s'", + (xmlSchemaTypePtr) matcher->aidc->def, + "No match found for key-sequence %s of keyref '%s'", xmlSchemaFormatIDCKeySequence(vctxt, &str, - refbind->nodeTable[i]->keys, - refbind->definition->nbFields), - xmlSchemaFormatQName(&strB, - refbind->definition->targetNamespace, - refbind->definition->name)); + refNode->keys, nbFields), + xmlSchemaGetComponentQName(&strB, matcher->aidc->def)); FREE_AND_NULL(str); FREE_AND_NULL(strB); } } } - refbind = refbind->next; + matcher = matcher->next; } + /* TODO: Return an error if any error encountered. */ return (0); } @@ -21183,6 +23587,8 @@ xmlSchemaValidatorPushAttribute(xmlSchemaValidCtxtPtr vctxt, static void xmlSchemaClearElemInfo(xmlSchemaNodeInfoPtr ielem) { + ielem->hasKeyrefs = 0; + ielem->appliedXPath = 0; if (ielem->flags & XML_SCHEMA_NODE_INFO_FLAG_OWNED_NAMES) { FREE_AND_NULL(ielem->localName); FREE_AND_NULL(ielem->nsName); @@ -21196,14 +23602,24 @@ xmlSchemaClearElemInfo(xmlSchemaNodeInfoPtr ielem) ielem->value = NULL; } if (ielem->val != NULL) { + /* + * PSVI TODO: Be careful not to free it when the value is + * exposed via PSVI. + */ xmlSchemaFreeValue(ielem->val); ielem->val = NULL; } if (ielem->idcMatchers != NULL) { + /* + * URGENT OPTIMIZE TODO: Use a pool of IDC matchers. + */ xmlSchemaIDCFreeMatcherList(ielem->idcMatchers); ielem->idcMatchers = NULL; } if (ielem->idcTable != NULL) { + /* + * OPTIMIZE TODO: Use a pool of IDC tables??. + */ xmlSchemaIDCFreeIDCTable(ielem->idcTable); ielem->idcTable = NULL; } @@ -21328,9 +23744,9 @@ xmlSchemaValidateFacets(xmlSchemaAbstractCtxtPtr actxt, if (type->facetSet == NULL) goto pattern_and_enum; - if (! VARIETY_ATOMIC(type)) { - if (VARIETY_LIST(type)) - goto variety_list; + if (! WXS_IS_ATOMIC(type)) { + if (WXS_IS_LIST(type)) + goto WXS_IS_LIST; else goto pattern_and_enum; } @@ -21340,7 +23756,7 @@ xmlSchemaValidateFacets(xmlSchemaAbstractCtxtPtr actxt, */ tmpType = xmlSchemaGetPrimitiveType(type); if ((tmpType->builtInType == XML_SCHEMAS_STRING) || - IS_ANY_SIMPLE_TYPE(tmpType)) { + WXS_IS_ANY_SIMPLE_TYPE(tmpType)) { ws = xmlSchemaGetWhiteSpaceFacetValue(type); } else ws = XML_SCHEMA_WHITESPACE_COLLAPSE; @@ -21393,8 +23809,8 @@ xmlSchemaValidateFacets(xmlSchemaAbstractCtxtPtr actxt, ret = 0; } -variety_list: - if (! VARIETY_LIST(type)) +WXS_IS_LIST: + if (! WXS_IS_LIST(type)) goto pattern_and_enum; /* * "length", "minLength" and "maxLength" of list types. @@ -21579,7 +23995,7 @@ xmlSchemaValidateQName(xmlSchemaValidCtxtPtr vctxt, if (nsName == NULL) { ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1; xmlSchemaCustomErr(ACTXT_CAST vctxt, ret, NULL, - xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME), + WXS_BASIC_CAST xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME), "The QName value '%s' has no " "corresponding namespace declaration in " "scope", value, NULL); @@ -21615,7 +24031,7 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt, { int ret = 0, valNeeded = (retVal) ? 1 : 0; xmlSchemaValPtr val = NULL; - xmlSchemaWhitespaceValueType ws; + /* xmlSchemaWhitespaceValueType ws; */ xmlChar *normValue = NULL; #define NORMALIZE(atype) \ @@ -21657,7 +24073,7 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt, valNeeded = 1; if (value == NULL) value = BAD_CAST ""; - if (IS_ANY_SIMPLE_TYPE(type) || VARIETY_ATOMIC(type)) { + if (WXS_IS_ANY_SIMPLE_TYPE(type) || WXS_IS_ATOMIC(type)) { xmlSchemaTypePtr biType; /* The built-in type. */ /* * SPEC (1.2.1) "if {variety} is ·atomic· then the string must ·match· @@ -21700,7 +24116,7 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt, value, &val, valNeeded); break; default: - ws = xmlSchemaGetWhiteSpaceFacetValue(type); + /* ws = xmlSchemaGetWhiteSpaceFacetValue(type); */ if (valNeeded) ret = xmlSchemaValPredefTypeNodeNoNorm(biType, value, &val, NULL); @@ -21717,7 +24133,7 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt, value, &val, valNeeded); break; default: - ws = xmlSchemaGetWhiteSpaceFacetValue(type); + /* ws = xmlSchemaGetWhiteSpaceFacetValue(type); */ if (valNeeded) ret = xmlSchemaValPredefTypeNodeNoNorm(biType, value, &val, node); @@ -21739,7 +24155,7 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt, "validating against a built-in type"); goto internal_error; } - if (VARIETY_LIST(type)) + if (WXS_IS_LIST(type)) ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2; else ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1; @@ -21757,7 +24173,7 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt, "validating facets of atomic simple type"); goto internal_error; } - if (VARIETY_LIST(type)) + if (WXS_IS_LIST(type)) ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2; else ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1; @@ -21765,7 +24181,7 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt, } if (fireErrors && (ret > 0)) xmlSchemaSimpleTypeErr(actxt, ret, node, value, type, 1); - } else if (VARIETY_LIST(type)) { + } else if (WXS_IS_LIST(type)) { xmlSchemaTypePtr itemType; const xmlChar *cur, *end; @@ -21785,7 +24201,7 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt, * VAL TODO: Optimize validation of empty values. * VAL TODO: We do not have computed values for lists. */ - itemType = GET_LIST_ITEM_TYPE(type); + itemType = WXS_LIST_ITEMTYPE(type); cur = value; do { while (IS_BLANK_CH(*cur)) @@ -21852,7 +24268,7 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt, NORMALIZE(type); xmlSchemaSimpleTypeErr(actxt, ret, node, value, type, 1); } - } else if (VARIETY_UNION(type)) { + } else if (WXS_IS_UNION(type)) { xmlSchemaTypeLinkPtr memberLink; /* * TODO: For all datatypes ·derived· by ·union· whiteSpace does @@ -21993,7 +24409,7 @@ xmlSchemaVExpandQName(xmlSchemaValidCtxtPtr vctxt, if (*nsName == NULL) { xmlSchemaCustomErr(ACTXT_CAST vctxt, XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, NULL, - xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME), + WXS_BASIC_CAST xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME), "The QName value '%s' has no " "corresponding namespace declaration in scope", value, NULL); @@ -22055,7 +24471,7 @@ xmlSchemaProcessXSIType(xmlSchemaValidCtxtPtr vctxt, xmlSchemaCustomErr(ACTXT_CAST vctxt, XML_SCHEMAV_CVC_ELT_4_2, NULL, - xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME), + WXS_BASIC_CAST xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME), "The QName value '%s' of the xsi:type attribute does not " "resolve to a type definition", xmlSchemaFormatQName(&str, nsName, local), NULL); @@ -22081,6 +24497,11 @@ xmlSchemaProcessXSIType(xmlSchemaValidCtxtPtr vctxt, * {disallowed substitutions}: the "block" on the element decl. * {prohibited substitutions}: the "block" on the type def. */ + /* + * OPTIMIZE TODO: We could map types already evaluated + * to be validly derived from other types to avoid checking + * this over and over for the same types. + */ if ((elemDecl->flags & XML_SCHEMAS_ELEM_BLOCK_EXTENSION) || (elemDecl->subtypes->flags & XML_SCHEMAS_TYPE_BLOCK_EXTENSION)) @@ -22091,7 +24512,18 @@ xmlSchemaProcessXSIType(xmlSchemaValidCtxtPtr vctxt, XML_SCHEMAS_TYPE_BLOCK_RESTRICTION)) set |= SUBSET_RESTRICTION; - if (xmlSchemaCheckCOSDerivedOK(*localType, + /* + * REMOVED and CHANGED since this produced a parser context + * which adds to the string dict of the schema. So this would + * change the schema and we don't want this. We don't need + * the parser context anymore. + * + * if ((vctxt->pctxt == NULL) && + * (xmlSchemaCreatePCtxtOnVCtxt(vctxt) == -1)) + * return (-1); + */ + + if (xmlSchemaCheckCOSDerivedOK(ACTXT_CAST vctxt, *localType, elemDecl->subtypes, set) != 0) { xmlChar *str = NULL; @@ -22122,7 +24554,7 @@ static int xmlSchemaValidateElemDecl(xmlSchemaValidCtxtPtr vctxt) { xmlSchemaElementPtr elemDecl = vctxt->inode->decl; - xmlSchemaTypePtr actualType = ELEM_TYPE(elemDecl); + xmlSchemaTypePtr actualType = WXS_ELEM_TYPEDEF(elemDecl); /* * cvc-elt (3.3.4) : 1 @@ -22318,11 +24750,12 @@ xmlSchemaClearAttrInfos(xmlSchemaValidCtxtPtr vctxt) static int xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) { - xmlSchemaTypePtr type = vctxt->inode->typeDef; - xmlSchemaAttributeLinkPtr attrUseLink; - xmlSchemaAttributePtr attrUse = NULL, attrDecl = NULL; - xmlSchemaAttrInfoPtr attr, tmpAttr; - int i, found, nbAttrs; + xmlSchemaTypePtr type = vctxt->inode->typeDef; + xmlSchemaItemListPtr attrUseList; + xmlSchemaAttributeUsePtr attrUse = NULL; + xmlSchemaAttributePtr attrDecl = NULL; + xmlSchemaAttrInfoPtr iattr, tmpiattr; + int i, j, found, nbAttrs, nbUses; int xpathRes = 0, res, wildIDs = 0, fixed; /* @@ -22343,33 +24776,33 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * noNamespaceSchemaLocation, the appropriate case among the following * must be true: * - */ + */ + attrUseList = (xmlSchemaItemListPtr) type->attrUses; + /* + * @nbAttrs is the number of attributes present in the instance. + */ nbAttrs = vctxt->nbAttrInfos; - for (attrUseLink = type->attributeUses; attrUseLink != NULL; - attrUseLink = attrUseLink->next) { - + if (attrUseList != NULL) + nbUses = attrUseList->nbItems; + else + nbUses = 0; + for (i = 0; i < nbUses; i++) { found = 0; - attrUse = attrUseLink->attr; - /* - * VAL TODO: Implement a real "attribute use" component. - */ - if (attrUse->refDecl != NULL) - attrDecl = attrUse->refDecl; - else - attrDecl = attrUse; - for (i = 0; i < nbAttrs; i++) { - attr = vctxt->attrInfos[i]; + attrUse = attrUseList->items[i]; + attrDecl = WXS_ATTRUSE_DECL(attrUse); + for (j = 0; j < nbAttrs; j++) { + iattr = vctxt->attrInfos[j]; /* * SPEC (cvc-complex-type) (3) * Skip meta attributes. */ - if (attr->metaType) + if (iattr->metaType) continue; - if (attr->localName[0] != attrDecl->name[0]) + if (iattr->localName[0] != attrDecl->name[0]) continue; - if (!xmlStrEqual(attr->localName, attrDecl->name)) + if (!xmlStrEqual(iattr->localName, attrDecl->name)) continue; - if (!xmlStrEqual(attr->nsName, attrDecl->targetNamespace)) + if (!xmlStrEqual(iattr->nsName, attrDecl->targetNamespace)) continue; found = 1; /* @@ -22388,13 +24821,13 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * Assessment (Attribute) (§3.2.4) and * Assessment Outcome (Attribute) (§3.2.5). */ - attr->state = XML_SCHEMAS_ATTR_ASSESSED; - attr->use = attrUse; + iattr->state = XML_SCHEMAS_ATTR_ASSESSED; + iattr->use = attrUse; /* * Context-determined declaration. */ - attr->decl = attrDecl; - attr->typeDef = attrDecl->subtypes; + iattr->decl = attrDecl; + iattr->typeDef = attrDecl->subtypes; break; } @@ -22411,39 +24844,41 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * of the attribute information items in the element information * item's [attributes] as per clause 3.1 above." */ - tmpAttr = xmlSchemaGetFreshAttrInfo(vctxt); - if (tmpAttr == NULL) { + tmpiattr = xmlSchemaGetFreshAttrInfo(vctxt); + if (tmpiattr == NULL) { VERROR_INT( "xmlSchemaVAttributesComplex", "calling xmlSchemaGetFreshAttrInfo()"); return (-1); } - tmpAttr->state = XML_SCHEMAS_ATTR_ERR_MISSING; - tmpAttr->use = attrUse; - tmpAttr->decl = attrDecl; + tmpiattr->state = XML_SCHEMAS_ATTR_ERR_MISSING; + tmpiattr->use = attrUse; + tmpiattr->decl = attrDecl; } else if ((attrUse->occurs == XML_SCHEMAS_ATTR_USE_OPTIONAL) && ((attrUse->defValue != NULL) || (attrDecl->defValue != NULL))) { /* * Handle non-existent, optional, default/fixed attributes. */ - tmpAttr = xmlSchemaGetFreshAttrInfo(vctxt); - if (tmpAttr == NULL) { + tmpiattr = xmlSchemaGetFreshAttrInfo(vctxt); + if (tmpiattr == NULL) { VERROR_INT( "xmlSchemaVAttributesComplex", "calling xmlSchemaGetFreshAttrInfo()"); return (-1); } - tmpAttr->state = XML_SCHEMAS_ATTR_DEFAULT; - tmpAttr->use = attrUse; - tmpAttr->decl = attrDecl; - tmpAttr->typeDef = attrDecl->subtypes; - tmpAttr->localName = attrDecl->name; - tmpAttr->nsName = attrDecl->targetNamespace; + tmpiattr->state = XML_SCHEMAS_ATTR_DEFAULT; + tmpiattr->use = attrUse; + tmpiattr->decl = attrDecl; + tmpiattr->typeDef = attrDecl->subtypes; + tmpiattr->localName = attrDecl->name; + tmpiattr->nsName = attrDecl->targetNamespace; } } + if (vctxt->nbAttrInfos == 0) return (0); + nbUses = vctxt->nbAttrInfos; /* * Validate against the wildcard. */ @@ -22453,12 +24888,12 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * (3.2.1) "There must be an {attribute wildcard}." */ for (i = 0; i < nbAttrs; i++) { - attr = vctxt->attrInfos[i]; + iattr = vctxt->attrInfos[i]; /* * SPEC (cvc-complex-type) (3) * Skip meta attributes. */ - if (attr->state != XML_SCHEMAS_ATTR_UNKNOWN) + if (iattr->state != XML_SCHEMAS_ATTR_UNKNOWN) continue; /* * SPEC (cvc-complex-type) @@ -22471,7 +24906,7 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * Namespace Name (§3.10.4)." */ if (xmlSchemaCheckCVCWildcardNamespace(type->attributeWildcard, - attr->nsName)) { + iattr->nsName) == 0) { /* * Handle processContents. * @@ -22490,16 +24925,16 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * [validity] = "notKnown" * [validation attempted] = "none" */ - attr->state = XML_SCHEMAS_ATTR_WILD_SKIP; + iattr->state = XML_SCHEMAS_ATTR_WILD_SKIP; continue; } /* * Find an attribute declaration. */ - attr->decl = xmlSchemaGetAttributeDecl(vctxt->schema, - attr->localName, attr->nsName); - if (attr->decl != NULL) { - attr->state = XML_SCHEMAS_ATTR_ASSESSED; + iattr->decl = xmlSchemaGetAttributeDecl(vctxt->schema, + iattr->localName, iattr->nsName); + if (iattr->decl != NULL) { + iattr->state = XML_SCHEMAS_ATTR_ASSESSED; /* * SPEC (cvc-complex-type) * (5) "Let [Definition:] the wild IDs be the set of @@ -22513,16 +24948,16 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * or is derived from ID. Then all of the following * must be true:" */ - attr->typeDef = attr->decl->subtypes; + iattr->typeDef = WXS_ATTR_TYPEDEF(iattr->decl); if (xmlSchemaIsDerivedFromBuiltInType( - attr->typeDef, XML_SCHEMAS_ID)) { + iattr->typeDef, XML_SCHEMAS_ID)) { /* * SPEC (5.1) "There must be no more than one * item in ·wild IDs·." */ if (wildIDs != 0) { /* VAL TODO */ - attr->state = XML_SCHEMAS_ATTR_ERR_WILD_DUPLICATE_ID; + iattr->state = XML_SCHEMAS_ATTR_ERR_WILD_DUPLICATE_ID; TODO continue; } @@ -22534,34 +24969,32 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * whose {attribute declaration}'s {type definition} * is or is derived from ID." */ - for (attrUseLink = type->attributeUses; - attrUseLink != NULL; - attrUseLink = attrUseLink->next) { + for (j = 0; j < attrUseList->nbItems; j++) { if (xmlSchemaIsDerivedFromBuiltInType( - attrUseLink->attr->subtypes, + WXS_ATTRUSE_TYPEDEF(attrUseList->items[j]), XML_SCHEMAS_ID)) { - /* VAL TODO */ - attr->state = XML_SCHEMAS_ATTR_ERR_WILD_AND_USE_ID; + /* URGENT VAL TODO: implement */ + iattr->state = XML_SCHEMAS_ATTR_ERR_WILD_AND_USE_ID; TODO + break; } } } } else if (type->attributeWildcard->processContents == XML_SCHEMAS_ANY_LAX) { - attr->state = XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL; + iattr->state = XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL; /* * SPEC PSVI Assessment Outcome (Attribute) * [validity] = "notKnown" * [validation attempted] = "none" */ } else { - attr->state = XML_SCHEMAS_ATTR_ERR_WILD_STRICT_NO_DECL; + iattr->state = XML_SCHEMAS_ATTR_ERR_WILD_STRICT_NO_DECL; } } } } - if (vctxt->nbAttrInfos == 0) return (0); @@ -22569,24 +25002,24 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * Validate values, create default attributes, evaluate IDCs. */ for (i = 0; i < vctxt->nbAttrInfos; i++) { - attr = vctxt->attrInfos[i]; + iattr = vctxt->attrInfos[i]; /* * VAL TODO: Note that we won't try to resolve IDCs to * "lax" and "skip" validated attributes. Check what to * do in this case. */ - if ((attr->state != XML_SCHEMAS_ATTR_ASSESSED) && - (attr->state != XML_SCHEMAS_ATTR_DEFAULT)) + if ((iattr->state != XML_SCHEMAS_ATTR_ASSESSED) && + (iattr->state != XML_SCHEMAS_ATTR_DEFAULT)) continue; /* * VAL TODO: What to do if the type definition is missing? */ - if (attr->typeDef == NULL) { - attr->state = XML_SCHEMAS_ATTR_ERR_NO_TYPE; + if (iattr->typeDef == NULL) { + iattr->state = XML_SCHEMAS_ATTR_ERR_NO_TYPE; continue; } - ACTIVATE_ATTRIBUTE(attr); + ACTIVATE_ATTRIBUTE(iattr); fixed = 0; xpathRes = 0; @@ -22603,30 +25036,30 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) } } - if (attr->state == XML_SCHEMAS_ATTR_DEFAULT) { + if (iattr->state == XML_SCHEMAS_ATTR_DEFAULT) { /* * Default/fixed attributes. */ if (xpathRes) { - if (attr->use->defValue == NULL) { - attr->value = (xmlChar *) attr->use->defValue; - attr->val = attr->use->defVal; + if (iattr->use->defValue != NULL) { + iattr->value = (xmlChar *) iattr->use->defValue; + iattr->val = iattr->use->defVal; } else { - attr->value = (xmlChar *) attr->decl->defValue; - attr->val = attr->decl->defVal; + iattr->value = (xmlChar *) iattr->decl->defValue; + iattr->val = iattr->decl->defVal; } /* * IDCs will consume the precomputed default value, * so we need to clone it. */ - if (attr->val == NULL) { + if (iattr->val == NULL) { VERROR_INT("xmlSchemaVAttributesComplex", "default/fixed value on an attribute use was " "not precomputed"); goto internal_error; } - attr->val = xmlSchemaCopyValue(attr->val); - if (attr->val == NULL) { + iattr->val = xmlSchemaCopyValue(iattr->val); + if (iattr->val == NULL) { VERROR_INT("xmlSchemaVAttributesComplex", "calling xmlSchemaCopyValue()"); goto internal_error; @@ -22638,22 +25071,22 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * uses the *initial* value. */ if ((vctxt->options & XML_SCHEMA_VAL_VC_I_CREATE) && - (attr->node != NULL) && (attr->node->doc != NULL)) { + (iattr->node != NULL) && (iattr->node->doc != NULL)) { xmlChar *normValue; const xmlChar *value; - value = attr->value; + value = iattr->value; /* * Normalize the value. */ - normValue = xmlSchemaNormalizeValue(attr->typeDef, - attr->value); + normValue = xmlSchemaNormalizeValue(iattr->typeDef, + iattr->value); if (normValue != NULL) value = BAD_CAST normValue; - if (attr->nsName == NULL) { - if (xmlNewProp(attr->node->parent, - attr->localName, value) == NULL) { + if (iattr->nsName == NULL) { + if (xmlNewProp(iattr->node->parent, + iattr->localName, value) == NULL) { VERROR_INT("xmlSchemaVAttributesComplex", "callling xmlNewProp()"); if (normValue != NULL) @@ -22663,8 +25096,8 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) } else { xmlNsPtr ns; - ns = xmlSearchNsByHref(attr->node->doc, - attr->node->parent, attr->nsName); + ns = xmlSearchNsByHref(iattr->node->doc, + iattr->node->parent, iattr->nsName); if (ns == NULL) { xmlChar prefix[12]; int counter = 0; @@ -22675,8 +25108,8 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) */ do { snprintf((char *) prefix, 12, "p%d", counter++); - ns = xmlSearchNs(attr->node->doc, - attr->node->parent, BAD_CAST prefix); + ns = xmlSearchNs(iattr->node->doc, + iattr->node->parent, BAD_CAST prefix); if (counter > 1000) { VERROR_INT( "xmlSchemaVAttributesComplex", @@ -22688,10 +25121,16 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) } } while (ns != NULL); ns = xmlNewNs(vctxt->validationRoot, - attr->nsName, BAD_CAST prefix); + iattr->nsName, BAD_CAST prefix); } - xmlNewNsProp(attr->node->parent, ns, - attr->localName, value); + /* + * TODO: + * http://lists.w3.org/Archives/Public/www-xml-schema-comments/2005JulSep/0406.html + * If we have QNames: do we need to ensure there's a + * prefix defined for the QName? + */ + xmlNewNsProp(iattr->node->parent, ns, + iattr->localName, value); } if (normValue != NULL) xmlFree(normValue); @@ -22715,9 +25154,9 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * Note that the attribute *use* can be unavailable, if * the attribute was a wild attribute. */ - if ((attr->decl->flags & XML_SCHEMAS_ATTR_FIXED) || - ((attr->use != NULL) && - (attr->use->flags & XML_SCHEMAS_ATTR_FIXED))) + if ((iattr->decl->flags & XML_SCHEMAS_ATTR_FIXED) || + ((iattr->use != NULL) && + (iattr->use->flags & XML_SCHEMAS_ATTR_FIXED))) fixed = 1; else fixed = 0; @@ -22731,18 +25170,18 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * "normalized attribute value" here? */ if (xpathRes || fixed) { - attr->flags |= XML_SCHEMA_NODE_INFO_VALUE_NEEDED; + iattr->flags |= XML_SCHEMA_NODE_INFO_VALUE_NEEDED; /* * Request a computed value. */ res = xmlSchemaVCheckCVCSimpleType( ACTXT_CAST vctxt, - attr->node, attr->typeDef, attr->value, &(attr->val), + iattr->node, iattr->typeDef, iattr->value, &(iattr->val), 1, 1, 0); } else { res = xmlSchemaVCheckCVCSimpleType( ACTXT_CAST vctxt, - attr->node, attr->typeDef, attr->value, NULL, + iattr->node, iattr->typeDef, iattr->value, NULL, 1, 0, 0); } @@ -22752,7 +25191,7 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) "calling xmlSchemaStreamValidateSimpleTypeValue()"); goto internal_error; } - attr->state = XML_SCHEMAS_ATTR_INVALID_VALUE; + iattr->state = XML_SCHEMAS_ATTR_INVALID_VALUE; /* * SPEC PSVI Assessment Outcome (Attribute) * [validity] = "invalid" @@ -22760,8 +25199,7 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) goto eval_idcs; } - if (fixed) { - int ws; + if (fixed) { /* * SPEC Attribute Locally Valid (Use) (cvc-au) * "For an attribute information item to be·valid· @@ -22778,43 +25216,42 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * (4) "The item's *actual* value· must match the *value* of * the {value constraint}, if it is present and fixed." */ - ws = xmlSchemaGetWhiteSpaceFacetValue(attr->typeDef); - if (attr->val == NULL) { + if (iattr->val == NULL) { /* VAL TODO: A value was not precomputed. */ TODO goto eval_idcs; } - if ((attr->use != NULL) && - (attr->use->defValue != NULL)) { - if (attr->use->defVal == NULL) { + if ((iattr->use != NULL) && + (iattr->use->defValue != NULL)) { + if (iattr->use->defVal == NULL) { /* VAL TODO: A default value was not precomputed. */ TODO goto eval_idcs; } - attr->vcValue = attr->use->defValue; + iattr->vcValue = iattr->use->defValue; /* if (xmlSchemaCompareValuesWhtsp(attr->val, (xmlSchemaWhitespaceValueType) ws, attr->use->defVal, (xmlSchemaWhitespaceValueType) ws) != 0) { */ - if (! xmlSchemaAreValuesEqual(attr->val, attr->use->defVal)) - attr->state = XML_SCHEMAS_ATTR_ERR_FIXED_VALUE; + if (! xmlSchemaAreValuesEqual(iattr->val, iattr->use->defVal)) + iattr->state = XML_SCHEMAS_ATTR_ERR_FIXED_VALUE; } else { - if (attr->decl->defVal == NULL) { + if (iattr->decl->defVal == NULL) { /* VAL TODO: A default value was not precomputed. */ TODO goto eval_idcs; } - attr->vcValue = attr->decl->defValue; + iattr->vcValue = iattr->decl->defValue; /* if (xmlSchemaCompareValuesWhtsp(attr->val, (xmlSchemaWhitespaceValueType) ws, attrDecl->defVal, (xmlSchemaWhitespaceValueType) ws) != 0) { */ - if (! xmlSchemaAreValuesEqual(attr->val, attr->decl->defVal)) - attr->state = XML_SCHEMAS_ATTR_ERR_FIXED_VALUE; + if (! xmlSchemaAreValuesEqual(iattr->val, iattr->decl->defVal)) + iattr->state = XML_SCHEMAS_ATTR_ERR_FIXED_VALUE; } /* * [validity] = "valid" @@ -22839,14 +25276,14 @@ eval_idcs: * Report errors. */ for (i = 0; i < vctxt->nbAttrInfos; i++) { - attr = vctxt->attrInfos[i]; - if ((attr->state == XML_SCHEMAS_ATTR_META) || - (attr->state == XML_SCHEMAS_ATTR_ASSESSED) || - (attr->state == XML_SCHEMAS_ATTR_WILD_SKIP) || - (attr->state == XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL)) + iattr = vctxt->attrInfos[i]; + if ((iattr->state == XML_SCHEMAS_ATTR_META) || + (iattr->state == XML_SCHEMAS_ATTR_ASSESSED) || + (iattr->state == XML_SCHEMAS_ATTR_WILD_SKIP) || + (iattr->state == XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL)) continue; - ACTIVATE_ATTRIBUTE(attr); - switch (attr->state) { + ACTIVATE_ATTRIBUTE(iattr); + switch (iattr->state) { case XML_SCHEMAS_ATTR_ERR_MISSING: { xmlChar *str = NULL; ACTIVATE_ELEM; @@ -22854,8 +25291,8 @@ eval_idcs: XML_SCHEMAV_CVC_COMPLEX_TYPE_4, NULL, NULL, "The attribute '%s' is required but missing", xmlSchemaFormatQName(&str, - attr->decl->targetNamespace, - attr->decl->name), + iattr->decl->targetNamespace, + iattr->decl->name), NULL); FREE_AND_NULL(str) break; @@ -22869,7 +25306,7 @@ eval_idcs: XML_SCHEMAV_CVC_AU, NULL, NULL, "The value '%s' does not match the fixed " "value constraint '%s'", - attr->value, attr->vcValue); + iattr->value, iattr->vcValue); break; case XML_SCHEMAS_ATTR_ERR_WILD_STRICT_NO_DECL: VERROR(XML_SCHEMAV_CVC_WILDCARD, NULL, @@ -22877,7 +25314,7 @@ eval_idcs: "demanded by the strict wildcard"); break; case XML_SCHEMAS_ATTR_UNKNOWN: - if (attr->metaType) + if (iattr->metaType) break; /* * MAYBE VAL TODO: One might report different error messages @@ -22885,10 +25322,10 @@ eval_idcs: */ if (type->attributeWildcard == NULL) { xmlSchemaIllegalAttrErr(ACTXT_CAST vctxt, - XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, attr, NULL); + XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, iattr, NULL); } else { xmlSchemaIllegalAttrErr(ACTXT_CAST vctxt, - XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, attr, NULL); + XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, iattr, NULL); } break; default: @@ -22939,7 +25376,7 @@ xmlSchemaValidateElemWildcard(xmlSchemaValidCtxtPtr vctxt, } if (wild->processContents == XML_SCHEMAS_ANY_STRICT) { /* VAL TODO: Change to proper error code. */ - VERROR(XML_SCHEMAV_CVC_ELT_1, (xmlSchemaTypePtr) wild, + VERROR(XML_SCHEMAV_CVC_ELT_1, NULL, /* WXS_BASIC_CAST wild */ "No matching global element declaration available, but " "demanded by the strict wildcard"); return (vctxt->err); @@ -22999,7 +25436,7 @@ xmlSchemaCheckCOSValidDefault(xmlSchemaValidCtxtPtr vctxt, * For a string to be a valid default with respect to a type * definition the appropriate case among the following must be true: */ - if IS_COMPLEX_TYPE(inode->typeDef) { + if WXS_IS_COMPLEX(inode->typeDef) { /* * Complex type. * @@ -23009,9 +25446,9 @@ xmlSchemaCheckCOSValidDefault(xmlSchemaValidCtxtPtr vctxt, * type}'s particle must be ·emptiable· as defined by * Particle Emptiable (§3.9.6)." */ - if ((! HAS_SIMPLE_CONTENT(inode->typeDef)) && - ((! HAS_MIXED_CONTENT(inode->typeDef)) || - (! IS_PARTICLE_EMPTIABLE(inode->typeDef)))) { + if ((! WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) && + ((! WXS_HAS_MIXED_CONTENT(inode->typeDef)) || + (! WXS_EMPTIABLE(inode->typeDef)))) { ret = XML_SCHEMAP_COS_VALID_DEFAULT_2_1; /* NOTE that this covers (2.2.2) as well. */ VERROR(ret, NULL, @@ -23032,12 +25469,12 @@ xmlSchemaCheckCOSValidDefault(xmlSchemaValidCtxtPtr vctxt, * string must be ·valid· with respect to that simple type definition * as defined by String Valid (§3.14.4). */ - if (IS_SIMPLE_TYPE(inode->typeDef)) { + if (WXS_IS_SIMPLE(inode->typeDef)) { ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST vctxt, NULL, inode->typeDef, value, val, 1, 1, 0); - } else if (HAS_SIMPLE_CONTENT(inode->typeDef)) { + } else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) { ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST vctxt, NULL, inode->typeDef->contentTypeDef, value, val, 1, 1, 0); @@ -23224,10 +25661,10 @@ character_content: /* * Speedup if no declaration exists. */ - if (IS_SIMPLE_TYPE(inode->typeDef)) { + if (WXS_IS_SIMPLE(inode->typeDef)) { ret = xmlSchemaVCheckINodeDataType(vctxt, inode, inode->typeDef, inode->value); - } else if (HAS_SIMPLE_CONTENT(inode->typeDef)) { + } else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) { ret = xmlSchemaVCheckINodeDataType(vctxt, inode, inode->typeDef->contentTypeDef, inode->value); @@ -23260,7 +25697,7 @@ character_content: * defined in Element Default Valid (Immediate) (§3.3.6). */ /* - * NOTE: 'local' above means types aquired by xsi:type. + * NOTE: 'local' above means types acquired by xsi:type. * NOTE: Although the *canonical* value is stated, it is not * relevant if canonical or not. Additionally XML Schema 1.1 * will removed this requirement as well. @@ -23291,10 +25728,10 @@ character_content: * ·actual type definition· as defined by Element Locally Valid (Type) * (§3.3.4). */ - if (IS_SIMPLE_TYPE(inode->typeDef)) { + if (WXS_IS_SIMPLE(inode->typeDef)) { ret = xmlSchemaVCheckINodeDataType(vctxt, inode, inode->typeDef, inode->decl->value); - } else if (HAS_SIMPLE_CONTENT(inode->typeDef)) { + } else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) { ret = xmlSchemaVCheckINodeDataType(vctxt, inode, inode->typeDef->contentTypeDef, inode->decl->value); @@ -23340,7 +25777,7 @@ default_psvi: * to the ·actual type definition· as defined by Element Locally * Valid (Type) (§3.3.4). */ - if (IS_SIMPLE_TYPE(inode->typeDef)) { + if (WXS_IS_SIMPLE(inode->typeDef)) { /* * SPEC (cvc-type) (3.1) * "If the type definition is a simple type definition, ..." @@ -23351,7 +25788,7 @@ default_psvi: */ ret = xmlSchemaVCheckINodeDataType(vctxt, inode, inode->typeDef, inode->value); - } else if (HAS_SIMPLE_CONTENT(inode->typeDef)) { + } else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) { /* * SPEC (cvc-type) (3.2) "If the type definition is a complex type * definition, then the element information item must be @@ -23402,7 +25839,7 @@ default_psvi: * 5.2.2.2 The appropriate case among the following must * be true: */ - if (HAS_MIXED_CONTENT(inode->typeDef)) { + if (WXS_HAS_MIXED_CONTENT(inode->typeDef)) { /* * 5.2.2.2.1 If the {content type} of the ·actual type * definition· is mixed, then the *initial value* of the @@ -23427,7 +25864,7 @@ default_psvi: inode->value, inode->decl->value); goto end_elem; } - } else if (HAS_SIMPLE_CONTENT(inode->typeDef)) { + } else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) { /* * 5.2.2.2.2 If the {content type} of the ·actual type * definition· is a simple type definition, then the @@ -23466,29 +25903,50 @@ end_elem: /* * Evaluate the history of XPath state objects. */ - if (xmlSchemaXPathProcessHistory(vctxt, vctxt->depth) == -1) + if (inode->appliedXPath && + (xmlSchemaXPathProcessHistory(vctxt, vctxt->depth) == -1)) goto internal_error; /* - * TODO: 6 The element information item must be ·valid· with respect to each of - * the {identity-constraint definitions} as per Identity-constraint - * Satisfied (§3.11.4). + * MAYBE TODO: + * SPEC (6) "The element information item must be ·valid· with + * respect to each of the {identity-constraint definitions} as per + * Identity-constraint Satisfied (§3.11.4)." + */ + /* + * PSVI TODO: If we expose IDC node-tables via PSVI then the tables + * need to be built in any case. + * We will currently build IDC node-tables and bubble them only if + * keyrefs do exist. + */ + + /* + * Add the current IDC target-nodes to the IDC node-tables. */ + if ((inode->idcMatchers != NULL) && + (vctxt->hasKeyrefs || vctxt->createIDCNodeTables)) + { + if (xmlSchemaIDCFillNodeTables(vctxt, inode) == -1) + goto internal_error; + } /* * Validate IDC keyrefs. */ - if (xmlSchemaCheckCVCIDCKeyRef(vctxt) == -1) - goto internal_error; + if (vctxt->inode->hasKeyrefs) + if (xmlSchemaCheckCVCIDCKeyRef(vctxt) == -1) + goto internal_error; /* * Merge/free the IDC table. */ if (inode->idcTable != NULL) { -#ifdef DEBUG_IDC +#ifdef DEBUG_IDC_NODE_TABLE xmlSchemaDebugDumpIDCTable(stdout, inode->nsName, inode->localName, inode->idcTable); #endif - if (vctxt->depth > 0) { + if ((vctxt->depth > 0) && + (vctxt->hasKeyrefs || vctxt->createIDCNodeTables)) + { /* * Merge the IDC node table with the table of the parent node. */ @@ -23511,18 +25969,18 @@ end_elem: return (0); } /* - * Reset the bubbleDepth if needed. + * Reset the keyrefDepth if needed. */ if (vctxt->aidcs != NULL) { xmlSchemaIDCAugPtr aidc = vctxt->aidcs; do { - if (aidc->bubbleDepth == vctxt->depth) { + if (aidc->keyrefDepth == vctxt->depth) { /* - * A bubbleDepth of a key/unique IDC matches the current + * A 'keyrefDepth' of a key/unique IDC matches the current * depth, this means that we are leaving the scope of the - * top-most keyref IDC. + * top-most keyref IDC which refers to this IDC. */ - aidc->bubbleDepth = -1; + aidc->keyrefDepth = -1; } aidc = aidc->next; } while (aidc != NULL); @@ -23727,7 +26185,7 @@ xmlSchemaValidateChildElem(xmlSchemaValidCtxtPtr vctxt) case XML_SCHEMA_CONTENT_SIMPLE: case XML_SCHEMA_CONTENT_BASIC: ACTIVATE_PARENT_ELEM - if (IS_COMPLEX_TYPE(ptype)) { + if (WXS_IS_COMPLEX(ptype)) { /* * SPEC (cvc-complex-type) (2.2) * "If the {content type} is a simple type definition, then @@ -23879,7 +26337,9 @@ xmlSchemaVPushText(xmlSchemaValidCtxtPtr vctxt, default: break; } - } else { + } else { + if (len < 0) + len = xmlStrlen(value); /* * Concat the value. */ @@ -23909,11 +26369,22 @@ xmlSchemaValidateElem(xmlSchemaValidCtxtPtr vctxt) } if (vctxt->xsiAssemble) { /* - * URGENT TODO: Better to fully stop validation - * if there was an error during dynamic schema construction. + * We will stop validation if there was an error during + * dynamic schema construction. + * Note that we simply set @skipDepth to 0, this could + * mean that a streaming document via SAX would be + * still read to the end but it won't be validated any more. + * TODO: If we are sure how to stop the validation at once + * for all input scenarios, then this should be changed to + * instantly stop the validation. */ - if (xmlSchemaAssembleByXSI(vctxt) == -1) - goto internal_error; + ret = xmlSchemaAssembleByXSI(vctxt); + if (ret != 0) { + if (ret == -1) + goto internal_error; + vctxt->skipDepth = 0; + return(ret); + } } if (vctxt->depth > 0) { /* @@ -24025,6 +26496,7 @@ type_validation: */ if (vctxt->xpathStates != NULL) { ret = xmlSchemaXPathEvaluate(vctxt, XML_ELEMENT_NODE); + vctxt->inode->appliedXPath = 1; if (ret == -1) { VERROR_INT("xmlSchemaValidateElem", "calling xmlSchemaXPathEvaluate()"); @@ -24034,9 +26506,9 @@ type_validation: /* * Validate attributes. */ - if (IS_COMPLEX_TYPE(vctxt->inode->typeDef)) { + if (WXS_IS_COMPLEX(vctxt->inode->typeDef)) { if ((vctxt->nbAttrInfos != 0) || - (vctxt->inode->typeDef->attributeUses != NULL)) { + (vctxt->inode->typeDef->attrUses != NULL)) { ret = xmlSchemaVAttributesComplex(vctxt); } @@ -24558,12 +27030,19 @@ xmlSchemaClearValidCtxt(xmlSchemaValidCtxtPtr vctxt) if (vctxt == NULL) return; + /* + * TODO: Should we clear the flags? + * Might be problematic if one reuses the context + * and assumes that the options remain the same. + */ vctxt->flags = 0; vctxt->validationRoot = NULL; vctxt->doc = NULL; #ifdef LIBXML_READER_ENABLED vctxt->reader = NULL; #endif + vctxt->hasKeyrefs = 0; + if (vctxt->value != NULL) { xmlSchemaFreeValue(vctxt->value); vctxt->value = NULL; @@ -24622,6 +27101,10 @@ xmlSchemaClearValidCtxt(xmlSchemaValidCtxtPtr vctxt) xmlSchemaItemListClear(vctxt->nodeQNames); /* Recreate the dict. */ xmlDictFree(vctxt->dict); + /* + * TODO: Is is save to recreate it? Do we have a scenario + * where the user provides the dict? + */ vctxt->dict = xmlDictCreate(); } @@ -24742,7 +27225,7 @@ xmlSchemaSetValidErrors(xmlSchemaValidCtxtPtr ctxt, return; ctxt->error = err; ctxt->warning = warn; - ctxt->userData = ctx; + ctxt->errCtxt = ctx; if (ctxt->pctxt != NULL) xmlSchemaSetParserErrors(ctxt->pctxt, err, warn, ctx); } @@ -24757,14 +27240,16 @@ xmlSchemaSetValidErrors(xmlSchemaValidCtxtPtr ctxt, */ void xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt, - xmlStructuredErrorFunc serror, void *ctx) + xmlStructuredErrorFunc serror, void *ctx) { if (ctxt == NULL) return; ctxt->serror = serror; ctxt->error = NULL; ctxt->warning = NULL; - ctxt->userData = ctx; + ctxt->errCtxt = ctx; + if (ctxt->pctxt != NULL) + xmlSchemaSetParserStructuredErrors(ctxt->pctxt, serror, ctx); } /** @@ -24780,8 +27265,8 @@ xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt, */ int xmlSchemaGetValidErrors(xmlSchemaValidCtxtPtr ctxt, - xmlSchemaValidityErrorFunc * err, - xmlSchemaValidityWarningFunc * warn, void **ctx) + xmlSchemaValidityErrorFunc * err, + xmlSchemaValidityWarningFunc * warn, void **ctx) { if (ctxt == NULL) return (-1); @@ -24790,7 +27275,7 @@ xmlSchemaGetValidErrors(xmlSchemaValidCtxtPtr ctxt, if (warn != NULL) *warn = ctxt->warning; if (ctx != NULL) - *ctx = ctxt->userData; + *ctx = ctxt->errCtxt; return (0); } @@ -25009,12 +27494,18 @@ static int xmlSchemaPreRun(xmlSchemaValidCtxtPtr vctxt) { /* * Some initialization. - */ + */ vctxt->err = 0; vctxt->nberrors = 0; vctxt->depth = -1; vctxt->skipDepth = -1; vctxt->xsiAssemble = 0; + vctxt->hasKeyrefs = 0; +#ifdef ENABLE_IDC_NODE_TABLES_TEST + vctxt->createIDCNodeTables = 1; +#else + vctxt->createIDCNodeTables = 0; +#endif /* * Create a schema + parser if necessary. */ @@ -25045,7 +27536,7 @@ xmlSchemaPreRun(xmlSchemaValidCtxtPtr vctxt) { pctxt->constructor = xmlSchemaConstructionCtxtCreate(pctxt->dict); if (pctxt->constructor == NULL) return(-1); - pctxt->constructor->schema = vctxt->schema; + pctxt->constructor->mainSchema = vctxt->schema; /* * Take ownership of the constructor to be able to free it. */ diff --git a/xmlschemastypes.c b/xmlschemastypes.c index 9d99bbb..ffb2505 100644 --- a/xmlschemastypes.c +++ b/xmlschemastypes.c @@ -434,9 +434,7 @@ xmlSchemaInitTypes(void) } memset(wild, 0, sizeof(xmlSchemaWildcard)); wild->type = XML_SCHEMA_TYPE_ANY; - wild->any = 1; - wild->minOccurs = 1; - wild->maxOccurs = 1; + wild->any = 1; wild->processContents = XML_SCHEMAS_ANY_LAX; particle->children = (xmlSchemaTreeItemPtr) wild; /* @@ -450,9 +448,7 @@ xmlSchemaInitTypes(void) } memset(wild, 0, sizeof(xmlSchemaWildcard)); wild->any = 1; - wild->processContents = XML_SCHEMAS_ANY_LAX; - wild->minOccurs = 1; - wild->maxOccurs = 1; + wild->processContents = XML_SCHEMAS_ANY_LAX; xmlSchemaTypeAnyTypeDef->attributeWildcard = wild; } xmlSchemaTypeAnySimpleTypeDef = xmlSchemaInitBasicType("anySimpleType", @@ -1700,7 +1696,7 @@ xmlSchemaValidateDates (xmlSchemaValType type, ret = _xmlSchemaParseTimeZone(&(dt->value.date), &cur); if (collapse) while IS_WSP_BLANK_CH(*cur) cur++; - if ((ret != 0) || (*cur != 0) || !VALID_DATETIME((&(dt->value.date)))) + if ((ret != 0) || (*cur != 0) || (!(VALID_DATETIME((&(dt->value.date)))))) goto error; @@ -2248,100 +2244,122 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value, } case XML_SCHEMAS_DECIMAL:{ const xmlChar *cur = value; - unsigned int len, neg = 0; + unsigned int len, neg, integ, hasLeadingZeroes; xmlChar cval[25]; - xmlChar *cptr = cval; - unsigned int dec = ~0u; + xmlChar *cptr = cval; - if (cur == NULL) + if ((cur == NULL) || (*cur == 0)) goto return1; + /* + * xs:decimal has a whitespace-facet value of 'collapse'. + */ if (normOnTheFly) while IS_WSP_BLANK_CH(*cur) cur++; - /* First we handle an optional sign */ - if (*cur == '+') + /* + * First we handle an optional sign. + */ + neg = 0; + if (*cur == '-') { + neg = 1; cur++; - else if (*cur == '-') { - neg = 1; + } else if (*cur == '+') cur++; - } + /* + * Disallow: "", "-", "- " + */ + if (*cur == 0) + goto return1; /* * Next we "pre-parse" the number, in preparation for calling * the common routine xmlSchemaParseUInt. We get rid of any * leading zeroes (because we have reserved only 25 chars), - * and note the position of any decimal point. + * and note the position of a decimal point. */ len = 0; + integ = ~0u; + hasLeadingZeroes = 0; /* * Skip leading zeroes. */ - while (*cur == '0') + while (*cur == '0') { cur++; + hasLeadingZeroes = 1; + } if (*cur != 0) { - while (len < 24) { + do { if ((*cur >= '0') && (*cur <= '9')) { *cptr++ = *cur++; len++; } else if (*cur == '.') { - if (len == 0) - len++; - if (dec != ~0u) - goto return1; /* multiple decimal points */ cur++; - if ((*cur == 0) && (cur -1 == value)) + integ = len; + do { + if ((*cur >= '0') && (*cur <= '9')) { + *cptr++ = *cur++; + len++; + } else + break; + } while (len < 24); + /* + * Disallow "." but allow "00." + */ + if ((len == 0) && (!hasLeadingZeroes)) goto return1; - - dec = len; - while ((len < 24) && (*cur >= '0') && - (*cur <= '9')) { - *cptr++ = *cur++; - len++; - } break; } else break; - } + } while (len < 24); } if (normOnTheFly) while IS_WSP_BLANK_CH(*cur) cur++; if (*cur != 0) - goto return1; /* error if any extraneous chars */ + goto return1; /* error if any extraneous chars */ if (val != NULL) { v = xmlSchemaNewValue(XML_SCHEMAS_DECIMAL); if (v != NULL) { /* - * If a mixed decimal, get rid of trailing zeroes + * Now evaluate the significant digits of the number */ - if (dec != ~0u) { - while ((len > dec) && (cptr > cval) && - (*(cptr-1) == '0')) { - cptr--; - len--; + if (len != 0) { + + if (integ != ~0u) { + /* + * Get rid of trailing zeroes in the + * fractional part. + */ + while ((len != integ) && (*(cptr-1) == '0')) { + cptr--; + len--; + } + } + /* + * Terminate the (preparsed) string. + */ + if (len != 0) { + *cptr = 0; + cptr = cval; + + xmlSchemaParseUInt((const xmlChar **)&cptr, + &v->value.decimal.lo, + &v->value.decimal.mi, + &v->value.decimal.hi); } } - *cptr = 0; /* Terminate our (preparsed) string */ - cptr = cval; - /* - * Now evaluate the significant digits of the number - */ - if (*cptr != 0) - xmlSchemaParseUInt((const xmlChar **)&cptr, - &v->value.decimal.lo, - &v->value.decimal.mi, - &v->value.decimal.hi); /* * Set the total digits to 1 if a zero value. */ - if (len == 0) - len++; v->value.decimal.sign = neg; - if (dec == ~0u) { - v->value.decimal.frac = 0; - v->value.decimal.total = len; + if (len == 0) { + /* Speedup for zero values. */ + v->value.decimal.total = 1; } else { - v->value.decimal.frac = len - dec; v->value.decimal.total = len; + if (integ == ~0u) + v->value.decimal.frac = 0; + else + v->value.decimal.frac = len - integ; } *val = v; } @@ -3406,10 +3424,42 @@ xmlSchemaCompareDecimals(xmlSchemaValPtr x, xmlSchemaValPtr y) */ integx = x->value.decimal.total - x->value.decimal.frac; integy = y->value.decimal.total - y->value.decimal.frac; + /* + * NOTE: We changed the "total" for values like "0.1" + * (or "-0.1" or ".1") to be 1, which was 2 previously. + * Therefore the special case, when such values are + * compared with 0, needs to be handled separately; + * otherwise a zero would be recognized incorrectly as + * greater than those values. This has the nice side effect + * that we gain an overall optimized comparison with zeroes. + * Note that a "0" has a "total" of 1 already. + */ + if (integx == 1) { + if (x->value.decimal.lo == 0) { + if (integy != 1) + return -order; + else if (y->value.decimal.lo != 0) + return -order; + else + return(0); + } + } + if (integy == 1) { + if (y->value.decimal.lo == 0) { + if (integx != 1) + return order; + else if (x->value.decimal.lo != 0) + return order; + else + return(0); + } + } + if (integx > integy) return order; else if (integy > integx) return -order; + /* * If the number of integral digits is the same for both numbers, * then things get a little more complicated. We need to "normalize" @@ -3763,8 +3813,8 @@ _xmlSchemaDateAdd (xmlSchemaValPtr dt, xmlSchemaValPtr dur) while (1) { if (tempdays < 1) { - long tmon = (long) MODULO_RANGE(r->mon-1, 1, 13); - long tyr = r->year + (long)FQUOTIENT_RANGE(r->mon-1, 1, 13); + long tmon = (long) MODULO_RANGE((int)r->mon-1, 1, 13); + long tyr = r->year + (long)FQUOTIENT_RANGE((int)r->mon-1, 1, 13); if (tyr == 0) tyr--; tempdays += MAX_DAYINMONTH(tyr, tmon); @@ -5377,7 +5427,7 @@ xmlSchemaValidateFacetInternal(xmlSchemaFacetPtr facet, case XML_SCHEMA_FACET_FRACTIONDIGITS: if ((facet->val == NULL) || - ((facet->val->type != XML_SCHEMAS_DECIMAL) && + ((facet->val->type != XML_SCHEMAS_PINTEGER) && (facet->val->type != XML_SCHEMAS_NNINTEGER)) || (facet->val->value.decimal.frac != 0)) { return(-1); diff --git a/xmlstring.c b/xmlstring.c index 67a20b9..4f3b373 100644 --- a/xmlstring.c +++ b/xmlstring.c @@ -147,8 +147,8 @@ xmlStrcmp(const xmlChar *str1, const xmlChar *str2) { * @str1: the first xmlChar * * @str2: the second xmlChar * * - * Check if both string are equal of have same content - * Should be a bit more readable and faster than xmlStrEqual() + * Check if both strings are equal of have same content. + * Should be a bit more readable and faster than xmlStrcmp() * * Returns 1 if they are equal, 0 if they are different */ @@ -437,7 +437,8 @@ xmlStrlen(const xmlChar *str) { * @len: the length of @add * * a strncat for array of xmlChar's, it will extend @cur with the len - * first bytes of @add. + * first bytes of @add. Note that if @len < 0 then this is an API error + * and NULL will be returned. * * Returns a new xmlChar *, the original @cur is reallocated if needed * and should not be freed @@ -450,6 +451,8 @@ xmlStrncat(xmlChar *cur, const xmlChar *add, int len) { if ((add == NULL) || (len == 0)) return(cur); + if (len < 0) + return(NULL); if (cur == NULL) return(xmlStrndup(add, len)); @@ -468,10 +471,11 @@ xmlStrncat(xmlChar *cur, const xmlChar *add, int len) { * xmlStrncatNew: * @str1: first xmlChar string * @str2: second xmlChar string - * @len: the len of @str2 + * @len: the len of @str2 or < 0 * * same as xmlStrncat, but creates a new string. The original - * two strings are not freed. + * two strings are not freed. If @len is < 0 then the length + * will be calculated automatically. * * Returns a new xmlChar * or NULL */ diff --git a/xmlwriter.c b/xmlwriter.c index 6227398..37b7945 100644 --- a/xmlwriter.c +++ b/xmlwriter.c @@ -24,6 +24,25 @@ #define B64LINELEN 72 #define B64CRLF "\r\n" +/* + * The following VA_COPY was coded following an example in + * the Samba project. It may not be sufficient for some + * esoteric implementations of va_list (i.e. it may need + * something involving a memcpy) but (hopefully) will be + * sufficient for libxml2. + */ +#ifndef VA_COPY + #ifdef HAVE_VA_COPY + #define VA_COPY(dest, src) va_copy(dest, src) + #else + #ifdef HAVE___VA_COPY + #define VA_COPY(dest,src) __va_copy(dest, src) + #else + #define VA_COPY(dest,src) (dest) = (src) + #endif + #endif +#endif + /* * Types are kept private */ @@ -80,9 +99,6 @@ static int xmlCmpTextWriterStackEntry(const void *data0, static void xmlFreeTextWriterNsStackEntry(xmlLinkPtr lk); static int xmlCmpTextWriterNsStackEntry(const void *data0, const void *data1); -static int xmlTextWriterWriteMemCallback(void *context, - const xmlChar * str, int len); -static int xmlTextWriterCloseMemCallback(void *context); static int xmlTextWriterWriteDocCallback(void *context, const xmlChar * str, int len); static int xmlTextWriterCloseDocCallback(void *context); @@ -256,11 +272,8 @@ xmlNewTextWriterMemory(xmlBufferPtr buf, int compression ATTRIBUTE_UNUSED) xmlOutputBufferPtr out; /*::todo handle compression */ - out = xmlOutputBufferCreateIO((xmlOutputWriteCallback) - xmlTextWriterWriteMemCallback, - (xmlOutputCloseCallback) - xmlTextWriterCloseMemCallback, - (void *) buf, NULL); + out = xmlOutputBufferCreateBuffer(buf, NULL); + if (out == NULL) { xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY, "xmlNewTextWriterMemory : out of memory!\n"); @@ -2842,8 +2855,11 @@ xmlTextWriterStartDTD(xmlTextWriterPtr writer, if (count < 0) return -1; sum += count; - } else if (writer->indent) { + } else { + if (writer->indent) count = xmlOutputBufferWriteString(writer->out, "\n "); + else + count = xmlOutputBufferWrite(writer->out, 1, " "); if (count < 0) return -1; sum += count; @@ -4274,40 +4290,6 @@ xmlCmpTextWriterNsStackEntry(const void *data0, const void *data1) return rc; } -/** - * xmlTextWriterWriteMemCallback: - * @context: the xmlBufferPtr - * @str: the data to write - * @len: the length of the data - * - * Write callback for the xmlOutputBuffer with target xmlBuffer - * - * Returns -1, 0, 1 - */ -static int -xmlTextWriterWriteMemCallback(void *context, const xmlChar * str, int len) -{ - xmlBufferPtr buf = (xmlBufferPtr) context; - - xmlBufferAdd(buf, str, len); - - return len; -} - -/** - * xmlTextWriterCloseMemCallback: - * @context: the xmlBufferPtr - * - * Close callback for the xmlOutputBuffer with target xmlBuffer - * - * Returns -1, 0, 1 - */ -static int -xmlTextWriterCloseMemCallback(void *context ATTRIBUTE_UNUSED) -{ - return 0; -} - /** * xmlTextWriterWriteDocCallback: * @context: the xmlBufferPtr @@ -4373,6 +4355,7 @@ xmlTextWriterVSprintf(const char *format, va_list argptr) int size; int count; xmlChar *buf; + va_list locarg; size = BUFSIZ; buf = (xmlChar *) xmlMalloc(size); @@ -4382,8 +4365,10 @@ xmlTextWriterVSprintf(const char *format, va_list argptr) return NULL; } - while (((count = vsnprintf((char *) buf, size, format, argptr)) < 0) + VA_COPY(locarg, argptr); + while (((count = vsnprintf((char *) buf, size, format, locarg)) < 0) || (count == size - 1) || (count == size) || (count > size)) { + va_end(locarg); xmlFree(buf); size += BUFSIZ; buf = (xmlChar *) xmlMalloc(size); @@ -4392,7 +4377,9 @@ xmlTextWriterVSprintf(const char *format, va_list argptr) "xmlTextWriterVSprintf : out of memory!\n"); return NULL; } + VA_COPY(locarg, argptr); } + va_end(locarg); return buf; } diff --git a/xpath.c b/xpath.c index f57ba8c..f01b94d 100644 --- a/xpath.c +++ b/xpath.c @@ -64,13 +64,24 @@ "Unimplemented block at %s:%d\n", \ __FILE__, __LINE__); +/* +* XP_PATTERN_TO_ANY_NODE_ENABLED: when an XPath expression can be +* evaluated using the streaming mode (pattern.c) then this is used to +* enable resolution to nodes of type text-node, cdata-section-node, +* comment-node and pi-node. The only known scenario where this is +* needed is an expression like "foo//.", "//.", etc.; i.e. an expression +* where the final node to be selected can be of any type. +* Disabling this #define will result in an incorrect evaluation to +* only element-nodes and the document node. +*/ +#define XP_PATTERN_TO_ANY_NODE_ENABLED /* * TODO: * There are a few spots where some tests are done which depend upon ascii * data. These should be enhanced for full UTF8 support (see particularly * any use of the macros IS_ASCII_CHARACTER and IS_ASCII_DIGIT) */ - + #if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) /************************************************************************ * * @@ -808,7 +819,8 @@ xmlXPathDebugDumpObject(FILE *output, xmlXPathObjectPtr cur, int depth) { shift[2 * i] = shift[2 * i + 1] = ' '; shift[2 * i] = shift[2 * i + 1] = 0; - fprintf(output, shift); + + fprintf(output, shift); if (cur == NULL) { fprintf(output, "Object is empty (NULL)\n"); @@ -10998,13 +11010,16 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op) static xmlXPathObjectPtr xmlXPathRunStreamEval(xmlXPathContextPtr ctxt, xmlPatternPtr comp) { int max_depth, min_depth; - int from_root; + int from_root; int ret, depth; +#ifdef XP_PATTERN_TO_ANY_NODE_ENABLED + int eval_all_nodes; +#endif xmlNodePtr cur = NULL, limit = NULL; xmlXPathObjectPtr retval; xmlStreamCtxtPtr patstream; - - int nb_nodes = 0; + + int nb_nodes = 0; if ((ctxt == NULL) || (comp == NULL)) return(NULL); @@ -11082,6 +11097,10 @@ xmlXPathRunStreamEval(xmlXPathContextPtr ctxt, xmlPatternPtr comp) { return(retval); } +#ifdef XP_PATTERN_TO_ANY_NODE_ENABLED + eval_all_nodes = xmlStreamWantsAnyNode(patstream); +#endif + if (from_root) { ret = xmlStreamPush(patstream, NULL, NULL); if (ret < 0) { @@ -11089,34 +11108,53 @@ xmlXPathRunStreamEval(xmlXPathContextPtr ctxt, xmlPatternPtr comp) { xmlXPathNodeSetAddUnique(retval->nodesetval, cur); } } - depth = 0; goto scan_children; do { next_node: nb_nodes++; - if (cur->type == XML_ELEMENT_NODE) { - ret = xmlStreamPush(patstream, cur->name, + + switch (cur->type) { + case XML_ELEMENT_NODE: +#ifdef XP_PATTERN_TO_ANY_NODE_ENABLED + case XML_TEXT_NODE: + case XML_CDATA_SECTION_NODE: + case XML_COMMENT_NODE: + case XML_PI_NODE: +#endif + if (cur->type == XML_ELEMENT_NODE) { + ret = xmlStreamPush(patstream, cur->name, (cur->ns ? cur->ns->href : NULL)); - if (ret < 0) { - } else if (ret == 1) { - xmlXPathNodeSetAddUnique(retval->nodesetval, cur); - } - if ((cur->children == NULL) || (depth >= max_depth)) { - ret = xmlStreamPop(patstream); - while (cur->next != NULL) { - cur = cur->next; - if ((cur->type != XML_ENTITY_DECL) && - (cur->type != XML_DTD_NODE)) - goto next_node; } - } - } +#ifdef XP_PATTERN_TO_ANY_NODE_ENABLED + else if (eval_all_nodes) + ret = xmlStreamPushNode(patstream, NULL, NULL, cur->type); + else + break; +#endif + + if (ret < 0) { + /* NOP. */ + } else if (ret == 1) { + xmlXPathNodeSetAddUnique(retval->nodesetval, cur); + } + if ((cur->children == NULL) || (depth >= max_depth)) { + ret = xmlStreamPop(patstream); + while (cur->next != NULL) { + cur = cur->next; + if ((cur->type != XML_ENTITY_DECL) && + (cur->type != XML_DTD_NODE)) + goto next_node; + } + } + default: + break; + } scan_children: if ((cur->children != NULL) && (depth < max_depth)) { /* - * Do not descend on entities declarations + * Do not descend on entities declarations */ if (cur->children->type != XML_ENTITY_DECL) { cur = cur->children; @@ -11144,8 +11182,19 @@ scan_children: depth--; if ((cur == NULL) || (cur == limit)) goto done; - if (cur->type == XML_ELEMENT_NODE) - ret = xmlStreamPop(patstream); + if (cur->type == XML_ELEMENT_NODE) { + ret = xmlStreamPop(patstream); + } +#ifdef XP_PATTERN_TO_ANY_NODE_ENABLED + else if ((eval_all_nodes) && + ((cur->type == XML_TEXT_NODE) || + (cur->type == XML_CDATA_SECTION_NODE) || + (cur->type == XML_COMMENT_NODE) || + (cur->type == XML_PI_NODE))) + { + ret = xmlStreamPop(patstream); + } +#endif if (cur->next != NULL) { cur = cur->next; break; -- cgit v1.2.3 From c3e4f3c26035bc93a69e5aa2ad435809e8be8a4e Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Thu, 10 Sep 2009 22:10:39 +0200 Subject: Import upstream version 2.7.4 --- ChangeLog | 134 +- HTMLparser.c | 647 +- HTMLtree.c | 75 +- INSTALL | 2 +- Makefile.am | 29 +- Makefile.in | 605 +- README | 2 +- SAX2.c | 57 +- TODO | 2 +- VxWorks/Makefile | 68 + VxWorks/README | 86 + VxWorks/build.sh | 85 + aclocal.m4 | 10600 +++++----- bakefile/Bakefiles.bkgen | 2 +- bakefile/libxml2.bkl | 4 +- c14n.c | 431 +- config.guess | 85 +- config.h.in | 7 + config.sub | 100 +- configure | 32460 ++++++++++++------------------ configure.in | 53 +- debugXML.c | 15 +- depcomp | 87 +- dict.c | 1 - doc/APIchunk0.html | 10 +- doc/APIchunk1.html | 10 +- doc/APIchunk10.html | 47 +- doc/APIchunk11.html | 16 +- doc/APIchunk12.html | 21 +- doc/APIchunk13.html | 13 +- doc/APIchunk14.html | 12 +- doc/APIchunk15.html | 16 +- doc/APIchunk16.html | 15 +- doc/APIchunk17.html | 18 +- doc/APIchunk18.html | 24 +- doc/APIchunk19.html | 17 +- doc/APIchunk2.html | 10 +- doc/APIchunk20.html | 47 +- doc/APIchunk21.html | 10 +- doc/APIchunk22.html | 18 +- doc/APIchunk23.html | 12 +- doc/APIchunk24.html | 24 +- doc/APIchunk25.html | 11 +- doc/APIchunk26.html | 14 +- doc/APIchunk27.html | 13 +- doc/APIchunk28.html | 10 +- doc/APIchunk29.html | 12 +- doc/APIchunk3.html | 16 +- doc/APIchunk4.html | 10 +- doc/APIchunk5.html | 10 +- doc/APIchunk6.html | 10 +- doc/APIchunk7.html | 10 +- doc/APIchunk8.html | 10 +- doc/APIchunk9.html | 36 +- doc/APIconstructors.html | 2 +- doc/APIfiles.html | 16 +- doc/APIfunctions.html | 7 +- doc/APIsymbols.html | 14 +- doc/DOM.html | 4 +- doc/FAQ.html | 6 +- doc/Makefile.am | 6 +- doc/Makefile.in | 271 +- doc/README.docs | 2 +- doc/XMLinfo.html | 2 +- doc/XSLT.html | 2 +- doc/apibuild.py | 2 + doc/architecture.html | 2 +- doc/bugs.html | 2 +- doc/catalog.html | 2 +- doc/checkapisym.xsl | 48 + doc/contribs.html | 2 +- doc/devhelp/Makefile.in | 68 +- doc/devhelp/libxml2-c14n.html | 33 +- doc/devhelp/libxml2-globals.html | 5 + doc/devhelp/libxml2-parser.html | 6 +- doc/devhelp/libxml2-threads.html | 4 +- doc/devhelp/libxml2-tree.html | 2 +- doc/devhelp/libxml2-xinclude.html | 5 + doc/devhelp/libxml2-xmlreader.html | 14 +- doc/devhelp/libxml2-xmlstring.html | 4 +- doc/devhelp/libxml2-xmlversion.html | 28 +- doc/devhelp/libxml2-xpathInternals.html | 2 +- doc/devhelp/libxml2.devhelp | 10 +- doc/docs.html | 4 +- doc/downloads.html | 24 +- doc/encoding.html | 14 +- doc/entities.html | 2 +- doc/example.html | 2 +- doc/examples/Makefile.in | 112 +- doc/examples/io2.c | 2 +- doc/guidelines.html | 2 +- doc/help.html | 2 +- doc/html/book1.html | 2 +- doc/html/index.html | 2 +- doc/html/libxml-DOCBparser.html | 2 +- doc/html/libxml-HTMLparser.html | 2 +- doc/html/libxml-HTMLtree.html | 2 +- doc/html/libxml-SAX.html | 2 +- doc/html/libxml-SAX2.html | 2 +- doc/html/libxml-c14n.html | 24 +- doc/html/libxml-catalog.html | 2 +- doc/html/libxml-chvalid.html | 2 +- doc/html/libxml-debugXML.html | 2 +- doc/html/libxml-dict.html | 2 +- doc/html/libxml-encoding.html | 2 +- doc/html/libxml-entities.html | 2 +- doc/html/libxml-globals.html | 3 +- doc/html/libxml-hash.html | 2 +- doc/html/libxml-lib.html | 2 +- doc/html/libxml-list.html | 2 +- doc/html/libxml-nanoftp.html | 2 +- doc/html/libxml-nanohttp.html | 2 +- doc/html/libxml-parser.html | 8 +- doc/html/libxml-parserInternals.html | 2 +- doc/html/libxml-pattern.html | 2 +- doc/html/libxml-relaxng.html | 2 +- doc/html/libxml-schemasInternals.html | 2 +- doc/html/libxml-schematron.html | 2 +- doc/html/libxml-threads.html | 6 +- doc/html/libxml-tree.html | 4 +- doc/html/libxml-uri.html | 2 +- doc/html/libxml-valid.html | 2 +- doc/html/libxml-xinclude.html | 7 +- doc/html/libxml-xlink.html | 2 +- doc/html/libxml-xmlIO.html | 2 +- doc/html/libxml-xmlautomata.html | 2 +- doc/html/libxml-xmlerror.html | 2 +- doc/html/libxml-xmlexports.html | 2 +- doc/html/libxml-xmlmemory.html | 2 +- doc/html/libxml-xmlmodule.html | 2 +- doc/html/libxml-xmlreader.html | 16 +- doc/html/libxml-xmlregexp.html | 2 +- doc/html/libxml-xmlsave.html | 2 +- doc/html/libxml-xmlschemas.html | 2 +- doc/html/libxml-xmlschemastypes.html | 2 +- doc/html/libxml-xmlstring.html | 6 +- doc/html/libxml-xmlunicode.html | 2 +- doc/html/libxml-xmlversion.html | 6 +- doc/html/libxml-xmlwriter.html | 2 +- doc/html/libxml-xpath.html | 2 +- doc/html/libxml-xpathInternals.html | 4 +- doc/html/libxml-xpointer.html | 2 +- doc/index.html | 7 +- doc/interface.html | 2 +- doc/intro.html | 2 +- doc/library.html | 2 +- doc/libxml2-api.xml | 85 +- doc/libxml2.xsa | 24 +- doc/namespaces.html | 2 +- doc/news.html | 164 +- doc/python.html | 4 +- doc/search.php | 4 +- doc/site.xsl | 2 +- doc/syms.xsl | 99 + doc/threads.html | 2 +- doc/tree.html | 2 +- doc/upgrade.html | 2 +- doc/xml.html | 233 +- doc/xmlcatalog.1 | 2 +- doc/xmlcatalog_man.xml | 2 +- doc/xmldtd.html | 2 +- doc/xmlio.html | 2 +- doc/xmllint.1 | 2 +- doc/xmllint.xml | 2 +- doc/xmlmem.html | 2 +- doc/xmlreader.html | 2 +- elfgcchack.h | 12 + encoding.c | 72 +- entities.c | 4 +- error.c | 20 +- example/Makefile.in | 112 +- globals.c | 25 +- hash.c | 1 - include/Makefile.in | 158 +- include/libxml/Makefile.in | 133 +- include/libxml/c14n.h | 19 +- include/libxml/globals.h | 11 + include/libxml/parser.h | 13 +- include/libxml/relaxng.h | 4 +- include/libxml/valid.h | 4 +- include/libxml/xinclude.h | 14 +- include/libxml/xmlerror.h | 12 +- include/libxml/xmlexports.h | 7 +- include/libxml/xmlmemory.h | 18 +- include/libxml/xmlschemas.h | 4 +- include/libxml/xmlstring.h | 2 +- include/libxml/xmlversion.h | 38 +- include/libxml/xmlversion.h.in | 28 +- include/libxml/xmlwriter.h | 52 +- include/wsockcompat.h | 1 + libxml.spec.in | 23 +- libxml2.spec | 29 +- libxml2.syms | 2233 ++ ltmain.sh | 13216 ++++++------ macos/src/XMLTestPrefix.h.orig | 1 - nanohttp.c | 419 +- parser.c | 339 +- parserInternals.c | 130 +- python/Makefile.in | 271 +- python/TODO | 2 +- python/libxml.c | 1 + python/libxml.py | 2 +- python/setup.py | 2 +- python/tests/Makefile.in | 107 +- python/tests/readererr.py | 2 +- relaxng.c | 220 +- runsuite.c | 4 +- runtest.c | 110 +- schematron.c | 2 +- testC14N.c | 35 +- testapi.c | 128 +- threads.c | 60 +- tree.c | 49 +- trio.c | 4 +- trio.h | 4 +- triodef.h | 2 +- trionan.c | 4 +- trionan.h | 2 +- triop.h | 2 +- triostr.c | 4 +- triostr.h | 2 +- uri.c | 2 +- valid.c | 71 +- win32/Makefile.bcb | 4 +- win32/Makefile.msvc.orig | 462 - win32/libxml2.def.src | 4 + xinclude.c | 67 +- xmlIO.c | 145 +- xmlcatalog.c | 3 - xmllint.c | 259 +- xmlreader.c | 726 +- xmlregexp.c | 87 +- xmlsave.c | 5 +- xmlschemas.c | 562 +- xmlschemastypes.c | 13 +- xmlstring.c | 2 +- xmlwriter.c | 73 +- xpath.c | 46 +- xpointer.c | 28 +- xstc/Makefile.in | 68 +- 240 files changed, 34783 insertions(+), 33707 deletions(-) create mode 100644 VxWorks/Makefile create mode 100644 VxWorks/README create mode 100644 VxWorks/build.sh create mode 100644 doc/checkapisym.xsl create mode 100644 doc/syms.xsl create mode 100644 libxml2.syms mode change 100644 => 100755 ltmain.sh delete mode 100644 macos/src/XMLTestPrefix.h.orig delete mode 100644 win32/Makefile.msvc.orig (limited to 'doc/devhelp/libxml2-xmlstring.html') diff --git a/ChangeLog b/ChangeLog index 5b64949..36045e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,139 @@ +Fri Jul 10 16:11:34 CEST 2009 Daniel Veillard + + * parser.c: fix a regression in entity parsing when using the reader + introduced because we were not reusing _private on entities parsing + context + +Thu Jul 9 10:21:00 CEST 2009 Daniel Veillard + + Aleksey Sanin support for c14n 1.1 + * c14n.c include/libxml/c14n.h: adds support for C14N 1.1, + new flags at the API level + * runtest.c Makefile.am testC14N.c xmllint.c: add support in CLI + tools and test binaries + * result/c14n/1-1-without-comments/* test/c14n/1-1-without-comments/*: + add a new batch of tests + +Thu Jul 9 08:52:35 CEST 2009 Daniel Veillard + + * config.h.in: update of libtool seems to have modified it + * python/libxml2class.txt: python update modified the order + of classes apparently + +Thu Jul 9 08:43:06 CEST 2009 Daniel Veillard + + * tree.c: avoid calling xmlAddID with NULL values + * parser.c: add a few xmlInitParser in some entry points + +Fri Jun 19 19:51:08 CEST 2009 Rob Richards + + * parser.c: use options from current parser context when creating + a parser context within xmlParseCtxtExternalEntity + * xmlwriter.c: fix error message when unable to create output file + +Thu Jun 4 11:17:23 CEST 2009 Daniel Veillard + + * c14n.c debugXML.c doc/examples/io2.c parser.c schematron.c + valid.c xmlschemas.c xmlwriter.c xpath.c: use %s to printf string + patch by Christian Persch, fixes #581612 + +Thu Jun 4 11:06:07 CEST 2009 Daniel Veillard + + * parser.c threads.c: change the threading initialization sequence + as suggested by Igor Novoseltsev to avoid crash if xmlInitParser() + is called from a thread which is not the main one, should fix + #584605 + +Fri May 15 17:54:48 CEST 2009 Daniel Veillard + + * HTMLparser.c: make sure we keep line numbers fixes #580705 + based Aaron Patterson patch + +Tue May 12 09:13:58 CEST 2009 Daniel Veillard + + * HTMLparser.c: a broken HTML table attributes initialization, + fixes #581803, by Roland Steiner + +Tue May 12 08:54:20 CEST 2009 Daniel Veillard + + * libxml2.doap: adding RDF dope file. + +Tue May 12 08:42:52 CEST 2009 Daniel Veillard + + * configure.in: adapt the extra version detection code to git + +Wed Apr 29 16:09:38 CEST 2009 Rob Richards + + * parser.c: do not set error code in xmlNsWarn + +Wed Apr 15 11:18:24 CEST 2009 Daniel Veillard + + * include/libxml/parser.h include/libxml/xmlwriter.h + include/libxml/relaxng.h include/libxml/xmlversion.h.in + include/libxml/xmlwin32version.h.in include/libxml/valid.h + include/libxml/xmlschemas.h include/libxml/xmlerror.h: change + ATTRIBUTE_PRINTF into LIBXML_ATTR_FORMAT to avoid macro name + collisions with other packages and headers as reported by + Belgabor and Mike Hommey + +Thu Apr 2 13:57:15 CEST 2009 Daniel Veillard + + * error.c: fix structured error handling problems #564217 + +Thu Mar 26 19:08:08 CET 2009 Rob Richards + + * parser.c: use options from current parser context when creating + an entity parser context + +Wed Mar 25 11:40:34 CET 2009 Daniel Veillard + + * doc/*: updated SVN URL for GNOME as pointed by Vincent Lefevre + and regenerated docs + +Wed Mar 25 11:21:26 CET 2009 Daniel Veillard + + * parser.c: hide the nbParse* variables used for debugging + as pointed by Mike Hommey + +Wed Mar 25 10:50:05 CET 2009 Daniel Veillard + + * include/wsockcompat.h win32/Makefile.bcb xpath.c: fixes for + Borland/CodeGear/Embarcadero compilers by Eric Zurcher + +Wed Mar 25 10:43:07 CET 2009 Daniel Veillard + + * xpath.c: xmlXPathRegisterNs should not allow enpty prefixes + +Mon Mar 23 20:27:15 CET 2009 Daniel Veillard + + * tree.c: add a missing check in xmlAddSibling, patch by Kris Breuker + * xmlIO.c: avoid xmlAllocOutputBuffer using XML_BUFFER_EXACT which + leads to performances problems especially on Windows. + +Tue Mar 3 14:30.28 HKT 2009 William Brack + + * trio.h: changed include of config.h to be surrounded by + quotation marks #570806 + +Sat Feb 21 10:20:34 CET 2009 Daniel Veillard + + * threads.c parser.c: more warnings about xmlCleanupThreads and + xmlCleanupParser to avoid troubles like #571409 + +Fri Feb 20 09:40:04 CET 2009 Daniel Veillard + + * xmlwriter.c: cleanups and error reports when xmlTextWriterVSprintf + fails, by Jinmei Tatuya + +Fri Feb 20 09:18:56 CET 2009 Daniel Veillard + + * xmlwriter.c: remove a couple of leaks on errors reported by + Jinmei Tatuya + Sun Jan 18 22:37:59 CET 2009 Daniel Veillard * configure.in doc/xml.html doc/*: preparing 0.7.3 release - * include/libxml/parserInternals.h SAX2.c: fix a typo in an name + * include/libxml/parserInternals.h SAX2.c: fix a typo in a name Sun Jan 18 21:48:28 CET 2009 Daniel Veillard diff --git a/HTMLparser.c b/HTMLparser.c index 24b0fc0..f638511 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -59,7 +59,7 @@ static void htmlParseComment(htmlParserCtxtPtr ctxt); /************************************************************************ * * - * Some factorized error routines * + * Some factorized error routines * * * ************************************************************************/ @@ -147,7 +147,7 @@ htmlParseErrInt(xmlParserCtxtPtr ctxt, xmlParserErrors error, /************************************************************************ * * - * Parser stacks related functions and macros * + * Parser stacks related functions and macros * * * ************************************************************************/ @@ -163,6 +163,10 @@ htmlParseErrInt(xmlParserCtxtPtr ctxt, xmlParserErrors error, static int htmlnamePush(htmlParserCtxtPtr ctxt, const xmlChar * value) { + if ((ctxt->html < 3) && (xmlStrEqual(value, BAD_CAST "head"))) + ctxt->html = 3; + if ((ctxt->html < 10) && (xmlStrEqual(value, BAD_CAST "body"))) + ctxt->html = 10; if (ctxt->nameNr >= ctxt->nameMax) { ctxt->nameMax *= 2; ctxt->nameTab = (const xmlChar * *) @@ -273,7 +277,7 @@ htmlnamePop(htmlParserCtxtPtr ctxt) } else ctxt->input->col++; \ ctxt->token = 0; ctxt->input->cur += l; ctxt->nbChars++; \ } while (0) - + /************ \ if (*ctxt->input->cur == '%') xmlParserHandlePEReference(ctxt); \ @@ -287,6 +291,58 @@ htmlnamePop(htmlParserCtxtPtr ctxt) if (l == 1) b[i++] = (xmlChar) v; \ else i += xmlCopyChar(l,&b[i],v) +/** + * htmlFindEncoding: + * @the HTML parser context + * + * Ty to find and encoding in the current data available in the input + * buffer this is needed to try to switch to the proper encoding when + * one face a character error. + * That's an heuristic, since it's operating outside of parsing it could + * try to use a meta which had been commented out, that's the reason it + * should only be used in case of error, not as a default. + * + * Returns an encoding string or NULL if not found, the string need to + * be freed + */ +static xmlChar * +htmlFindEncoding(xmlParserCtxtPtr ctxt) { + const xmlChar *start, *cur, *end; + + if ((ctxt == NULL) || (ctxt->input == NULL) || + (ctxt->input->encoding != NULL) || (ctxt->input->buf == NULL) || + (ctxt->input->buf->encoder != NULL)) + return(NULL); + if ((ctxt->input->cur == NULL) || (ctxt->input->end == NULL)) + return(NULL); + + start = ctxt->input->cur; + end = ctxt->input->end; + /* we also expect the input buffer to be zero terminated */ + if (*end != 0) + return(NULL); + + cur = xmlStrcasestr(start, BAD_CAST "HTTP-EQUIV"); + if (cur == NULL) + return(NULL); + cur = xmlStrcasestr(cur, BAD_CAST "CONTENT"); + if (cur == NULL) + return(NULL); + cur = xmlStrcasestr(cur, BAD_CAST "CHARSET="); + if (cur == NULL) + return(NULL); + cur += 8; + start = cur; + while (((*cur >= 'A') && (*cur <= 'Z')) || + ((*cur >= 'a') && (*cur <= 'z')) || + ((*cur >= '0') && (*cur <= '9')) || + (*cur == '-') || (*cur == '_') || (*cur == ':') || (*cur == '/')) + cur++; + if (cur == start) + return(NULL); + return(xmlStrndup(start, cur - start)); +} + /** * htmlCurrentChar: * @ctxt: the HTML parser context @@ -309,7 +365,7 @@ htmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) { if (ctxt->token != 0) { *len = 0; return(ctxt->token); - } + } if (ctxt->charset == XML_CHAR_ENCODING_UTF8) { /* * We are supposed to handle UTF8, check it's valid @@ -318,7 +374,7 @@ htmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) { * UCS-4 range (hex.) UTF-8 octet sequence (binary) * 0000 0000-0000 007F 0xxxxxxx * 0000 0080-0000 07FF 110xxxxx 10xxxxxx - * 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx + * 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx * * Check for the 0x110000 limit too */ @@ -328,19 +384,25 @@ htmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) { c = *cur; if (c & 0x80) { - if (cur[1] == 0) + if (cur[1] == 0) { xmlParserInputGrow(ctxt->input, INPUT_CHUNK); + cur = ctxt->input->cur; + } if ((cur[1] & 0xc0) != 0x80) goto encoding_error; if ((c & 0xe0) == 0xe0) { - if (cur[2] == 0) + if (cur[2] == 0) { xmlParserInputGrow(ctxt->input, INPUT_CHUNK); + cur = ctxt->input->cur; + } if ((cur[2] & 0xc0) != 0x80) goto encoding_error; if ((c & 0xf0) == 0xf0) { - if (cur[3] == 0) + if (cur[3] == 0) { xmlParserInputGrow(ctxt->input, INPUT_CHUNK); + cur = ctxt->input->cur; + } if (((c & 0xf8) != 0xf0) || ((cur[3] & 0xc0) != 0x80)) goto encoding_error; @@ -366,9 +428,16 @@ htmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) { if (!IS_CHAR(val)) { htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR, "Char 0x%X out of allowed range\n", val); - } + } return(val); } else { + if ((*ctxt->input->cur == 0) && + (ctxt->input->cur < ctxt->input->end)) { + htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR, + "Char 0x%X out of allowed range\n", 0); + *len = 1; + return(' '); + } /* 1-byte code */ *len = 1; return((int) *ctxt->input->cur); @@ -386,8 +455,28 @@ htmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) { /* * Humm this is bad, do an automatic flow conversion */ - xmlSwitchEncoding(ctxt, XML_CHAR_ENCODING_8859_1); - ctxt->charset = XML_CHAR_ENCODING_UTF8; + { + xmlChar * guess; + xmlCharEncodingHandlerPtr handler; + + guess = htmlFindEncoding(ctxt); + if (guess == NULL) { + xmlSwitchEncoding(ctxt, XML_CHAR_ENCODING_8859_1); + } else { + if (ctxt->input->encoding != NULL) + xmlFree((xmlChar *) ctxt->input->encoding); + ctxt->input->encoding = guess; + handler = xmlFindCharEncodingHandler((const char *) guess); + if (handler != NULL) { + xmlSwitchToEncoding(ctxt, handler); + } else { + htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING, + "Unsupported encoding %s", guess, NULL); + } + } + ctxt->charset = XML_CHAR_ENCODING_UTF8; + } + return(xmlCurrentChar(ctxt, len)); encoding_error: @@ -413,7 +502,7 @@ encoding_error: BAD_CAST buffer, NULL); } - ctxt->charset = XML_CHAR_ENCODING_8859_1; + ctxt->charset = XML_CHAR_ENCODING_8859_1; *len = 1; return((int) *ctxt->input->cur); } @@ -453,7 +542,7 @@ htmlSkipBlankChars(xmlParserCtxtPtr ctxt) { /************************************************************************ * * - * The list of HTML elements and their properties * + * The list of HTML elements and their properties * * * ************************************************************************/ @@ -606,7 +695,7 @@ static const char* const language_attr[] = { "language", NULL } ; static const char* const select_content[] = { "optgroup", "option", NULL } ; static const char* const select_attrs[] = { ATTRS, "name", "size", "multiple", "disabled", "tabindex", "onfocus", "onblur", "onchange", NULL } ; static const char* const style_attrs[] = { I18N, "media", "title", NULL } ; -static const char* const table_attrs[] = { ATTRS "summary", "width", "border", "frame", "rules", "cellspacing", "cellpadding", "datapagesize", NULL } ; +static const char* const table_attrs[] = { ATTRS, "summary", "width", "border", "frame", "rules", "cellspacing", "cellpadding", "datapagesize", NULL } ; static const char* const table_depr[] = { "align", "bgcolor", NULL } ; static const char* const table_contents[] = { "caption", "col", "colgroup", "thead", "tfoot", "tbody", "tr", NULL} ; static const char* const tr_elt[] = { "tr", NULL } ; @@ -938,7 +1027,7 @@ static const char * const htmlStartClose[] = { "listing", "xmp", NULL, "ol", "p", "head", "ul", NULL, "menu", "p", "head", "ul", NULL, -"p", "p", "head", "h1", "h2", "h3", "h4", "h5", "h6", NULL, +"p", "p", "head", "h1", "h2", "h3", "h4", "h5", "h6", FONTSTYLE, NULL, "div", "p", "head", NULL, "noscript", "p", "head", NULL, "center", "font", "b", "i", "p", "head", NULL, @@ -949,7 +1038,7 @@ static const char * const htmlStartClose[] = { "table", "p", "head", "h1", "h2", "h3", "h4", "h5", "h6", "pre", "listing", "xmp", "a", NULL, "th", "th", "td", "p", "span", "font", "a", "b", "i", "u", NULL, -"td", "th", "td", "p", "span", "font", "a", "b", "i", "u", NULL, +"td", "th", "td", "p", "span", "font", "a", "b", "i", "u", NULL, "tr", "th", "td", "tr", "caption", "col", "colgroup", "p", NULL, "thead", "caption", "col", "colgroup", NULL, "tfoot", "th", "td", "tr", "caption", "col", "colgroup", "thead", @@ -1008,7 +1097,7 @@ static const char *const htmlScriptAttributes[] = { * elements the parser can decide how to handle extra endtags. * Endtags are only allowed to close elements with lower or equal * priority. - */ + */ typedef struct { const char *name; @@ -1035,7 +1124,7 @@ static int htmlStartCloseIndexinitialized = 0; /************************************************************************ * * - * functions to handle HTML specific data * + * functions to handle HTML specific data * * * ************************************************************************/ @@ -1085,7 +1174,7 @@ htmlTagLookup(const xmlChar *tag) { /** * htmlGetEndPriority: * @name: The name of the element to look up the priority for. - * + * * Return value: The "endtag" priority. **/ static int @@ -1164,7 +1253,7 @@ htmlAutoCloseOnClose(htmlParserCtxtPtr ctxt, const xmlChar * newtag) * A missplaced endtag can only close elements with lower * or equal priority, so if we find an element with higher * priority before we find an element with - * matching name, we just ignore this endtag + * matching name, we just ignore this endtag */ if (htmlGetEndPriority(ctxt->nameTab[i]) > priority) return; @@ -1215,7 +1304,7 @@ htmlAutoCloseOnEnd(htmlParserCtxtPtr ctxt) * called when a new tag has been detected and generates the * appropriates closes if possible/needed. * If newtag is NULL this mean we are at the end of the resource - * and we should check + * and we should check */ static void htmlAutoClose(htmlParserCtxtPtr ctxt, const xmlChar * newtag) @@ -1303,6 +1392,8 @@ htmlIsAutoClosed(htmlDocPtr doc, htmlNodePtr elem) { */ static void htmlCheckImplied(htmlParserCtxtPtr ctxt, const xmlChar *newtag) { + int i; + if (!htmlOmittedDefaultValue) return; if (xmlStrEqual(newtag, BAD_CAST"html")) @@ -1314,24 +1405,31 @@ htmlCheckImplied(htmlParserCtxtPtr ctxt, const xmlChar *newtag) { } if ((xmlStrEqual(newtag, BAD_CAST"body")) || (xmlStrEqual(newtag, BAD_CAST"head"))) return; - if ((ctxt->nameNr <= 1) && + if ((ctxt->nameNr <= 1) && ((xmlStrEqual(newtag, BAD_CAST"script")) || (xmlStrEqual(newtag, BAD_CAST"style")) || (xmlStrEqual(newtag, BAD_CAST"meta")) || (xmlStrEqual(newtag, BAD_CAST"link")) || (xmlStrEqual(newtag, BAD_CAST"title")) || (xmlStrEqual(newtag, BAD_CAST"base")))) { - /* - * dropped OBJECT ... i you put it first BODY will be - * assumed ! - */ - htmlnamePush(ctxt, BAD_CAST"head"); - if ((ctxt->sax != NULL) && (ctxt->sax->startElement != NULL)) - ctxt->sax->startElement(ctxt->userData, BAD_CAST"head", NULL); + if (ctxt->html >= 3) { + /* we already saw or generated an before */ + return; + } + /* + * dropped OBJECT ... i you put it first BODY will be + * assumed ! + */ + htmlnamePush(ctxt, BAD_CAST"head"); + if ((ctxt->sax != NULL) && (ctxt->sax->startElement != NULL)) + ctxt->sax->startElement(ctxt->userData, BAD_CAST"head", NULL); } else if ((!xmlStrEqual(newtag, BAD_CAST"noframes")) && (!xmlStrEqual(newtag, BAD_CAST"frame")) && (!xmlStrEqual(newtag, BAD_CAST"frameset"))) { - int i; + if (ctxt->html >= 10) { + /* we already saw or generated a before */ + return; + } for (i = 0;i < ctxt->nameNr;i++) { if (xmlStrEqual(ctxt->nameTab[i], BAD_CAST"body")) { return; @@ -1340,7 +1438,7 @@ htmlCheckImplied(htmlParserCtxtPtr ctxt, const xmlChar *newtag) { return; } } - + htmlnamePush(ctxt, BAD_CAST"body"); if ((ctxt->sax != NULL) && (ctxt->sax->startElement != NULL)) ctxt->sax->startElement(ctxt->userData, BAD_CAST"body", NULL); @@ -1402,12 +1500,12 @@ htmlIsScriptAttribute(const xmlChar *name) { unsigned int i; if (name == NULL) - return(0); + return(0); /* * all script attributes start with 'on' */ if ((name[0] != 'o') || (name[1] != 'n')) - return(0); + return(0); for (i = 0; i < sizeof(htmlScriptAttributes)/sizeof(htmlScriptAttributes[0]); i++) { @@ -1419,7 +1517,7 @@ htmlIsScriptAttribute(const xmlChar *name) { /************************************************************************ * * - * The list of HTML predefined entities * + * The list of HTML predefined entities * * * ************************************************************************/ @@ -1833,7 +1931,7 @@ UTF8ToHtml(unsigned char* out, int *outlen, if (inend - in < trailing) { break; - } + } for ( ; trailing; trailing--) { if ((in >= inend) || (((d= *in++) & 0xC0) != 0x80)) @@ -2023,7 +2121,7 @@ htmlNewInputStream(htmlParserCtxtPtr ctxt) { * * ************************************************************************/ /* - * all tags allowing pc data from the html 4.01 loose dtd + * all tags allowing pc data from the html 4.01 loose dtd * NOTE: it might be more apropriate to integrate this information * into the html40ElementTable array but I don't want to risk any * binary incomptibility @@ -2083,7 +2181,7 @@ static int areBlanks(htmlParserCtxtPtr ctxt, const xmlChar *str, int len) { if (lastChild == NULL) { if ((ctxt->node->type != XML_ELEMENT_NODE) && (ctxt->node->content != NULL)) return(0); - /* keep ws in constructs like ... ... + /* keep ws in constructs like ... ... for all tags "b" allowing PCDATA */ for ( i = 0; i < sizeof(allowPCData)/sizeof(allowPCData[0]); i++ ) { if ( xmlStrEqual(ctxt->name, BAD_CAST allowPCData[i]) ) { @@ -2093,7 +2191,7 @@ static int areBlanks(htmlParserCtxtPtr ctxt, const xmlChar *str, int len) { } else if (xmlNodeIsText(lastChild)) { return(0); } else { - /* keep ws in constructs like

                          xy z

                          + /* keep ws in constructs like

                          xy z

                          for all tags "p" allowing PCDATA */ for ( i = 0; i < sizeof(allowPCData)/sizeof(allowPCData[0]); i++ ) { if ( xmlStrEqual(lastChild->name, BAD_CAST allowPCData[i]) ) { @@ -2133,7 +2231,7 @@ htmlNewDocNoDtD(const xmlChar *URI, const xmlChar *ExternalID) { cur->intSubset = NULL; cur->doc = cur; cur->name = NULL; - cur->children = NULL; + cur->children = NULL; cur->extSubset = NULL; cur->oldNs = NULL; cur->encoding = NULL; @@ -2201,18 +2299,19 @@ htmlParseHTMLName(htmlParserCtxtPtr ctxt) { xmlChar loc[HTML_PARSER_BUFFER_SIZE]; if (!IS_ASCII_LETTER(CUR) && (CUR != '_') && - (CUR != ':')) return(NULL); + (CUR != ':') && (CUR != '.')) return(NULL); while ((i < HTML_PARSER_BUFFER_SIZE) && ((IS_ASCII_LETTER(CUR)) || (IS_ASCII_DIGIT(CUR)) || - (CUR == ':') || (CUR == '-') || (CUR == '_'))) { + (CUR == ':') || (CUR == '-') || (CUR == '_') || + (CUR == '.'))) { if ((CUR >= 'A') && (CUR <= 'Z')) loc[i] = CUR + 0x20; else loc[i] = CUR; i++; - + NEXT; } - + return(xmlDictLookup(ctxt->dict, loc, i)); } @@ -2235,7 +2334,7 @@ htmlParseHTMLName_nonInvasive(htmlParserCtxtPtr ctxt) { if (!IS_ASCII_LETTER(NXT(1)) && (NXT(1) != '_') && (NXT(1) != ':')) return(NULL); - + while ((i < HTML_PARSER_BUFFER_SIZE) && ((IS_ASCII_LETTER(NXT(1+i))) || (IS_ASCII_DIGIT(NXT(1+i))) || (NXT(1+i) == ':') || (NXT(1+i) == '-') || (NXT(1+i) == '_'))) { @@ -2243,7 +2342,7 @@ htmlParseHTMLName_nonInvasive(htmlParserCtxtPtr ctxt) { else loc[i] = NXT(1+i); i++; } - + return(xmlDictLookup(ctxt->dict, loc, i)); } @@ -2311,7 +2410,7 @@ htmlParseNameComplex(xmlParserCtxtPtr ctxt) { while ((c != ' ') && (c != '>') && (c != '/') && /* test bigname.xml */ ((IS_LETTER(c)) || (IS_DIGIT(c)) || (c == '.') || (c == '-') || - (c == '_') || (c == ':') || + (c == '_') || (c == ':') || (IS_COMBINING(c)) || (IS_EXTENDER(c)))) { if (count++ > 100) { @@ -2330,7 +2429,7 @@ htmlParseNameComplex(xmlParserCtxtPtr ctxt) { * htmlParseHTMLAttribute: * @ctxt: an HTML parser context * @stop: a char stop value - * + * * parse an HTML attribute value till the stop (quote), if * stop is 0 then it stops at the first space * @@ -2375,13 +2474,13 @@ htmlParseHTMLAttribute(htmlParserCtxtPtr ctxt, const xmlChar stop) { { *out++ =((c >> 6) & 0x1F) | 0xC0; bits= 0; } else if (c < 0x10000) { *out++ =((c >> 12) & 0x0F) | 0xE0; bits= 6; } - else + else { *out++ =((c >> 18) & 0x07) | 0xF0; bits= 12; } - + for ( ; bits >= 0; bits-= 6) { *out++ = ((c >> bits) & 0x3F) | 0x80; } - + if (out - buffer > buffer_size - 100) { int indx = out - buffer; @@ -2427,9 +2526,9 @@ htmlParseHTMLAttribute(htmlParserCtxtPtr ctxt, const xmlChar stop) { { *out++ =((c >> 6) & 0x1F) | 0xC0; bits= 0; } else if (c < 0x10000) { *out++ =((c >> 12) & 0x0F) | 0xE0; bits= 6; } - else + else { *out++ =((c >> 18) & 0x07) | 0xF0; bits= 12; } - + for ( ; bits >= 0; bits-= 6) { *out++ = ((c >> bits) & 0x3F) | 0x80; } @@ -2452,16 +2551,16 @@ htmlParseHTMLAttribute(htmlParserCtxtPtr ctxt, const xmlChar stop) { { *out++ =((c >> 6) & 0x1F) | 0xC0; bits= 0; } else if (c < 0x10000) { *out++ =((c >> 12) & 0x0F) | 0xE0; bits= 6; } - else + else { *out++ =((c >> 18) & 0x07) | 0xF0; bits= 12; } - + for ( ; bits >= 0; bits-= 6) { *out++ = ((c >> bits) & 0x3F) | 0x80; } NEXT; } } - *out++ = 0; + *out = 0; return(buffer); } @@ -2522,7 +2621,7 @@ htmlParseEntityRef(htmlParserCtxtPtr ctxt, const xmlChar **str) { * parse a value for an attribute * Note: the parser won't do substitution of entities here, this * will be handled later in xmlStringGetNodeList, unless it was - * asked for ctxt->replaceEntities != 0 + * asked for ctxt->replaceEntities != 0 * * Returns the AttValue parsed or NULL. */ @@ -2563,7 +2662,7 @@ htmlParseAttValue(htmlParserCtxtPtr ctxt) { /** * htmlParseSystemLiteral: * @ctxt: an HTML parser context - * + * * parse an HTML Literal * * [11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'") @@ -2604,7 +2703,7 @@ htmlParseSystemLiteral(htmlParserCtxtPtr ctxt) { htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_STARTED, " or ' expected\n", NULL, NULL); } - + return(ret); } @@ -2653,7 +2752,7 @@ htmlParsePubidLiteral(htmlParserCtxtPtr ctxt) { htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_STARTED, "PubidLiteral \" or ' expected\n", NULL, NULL); } - + return(ret); } @@ -2700,8 +2799,8 @@ htmlParseScript(htmlParserCtxtPtr ctxt) { * CDATA. */ if (ctxt->recovery) { - if (xmlStrncasecmp(ctxt->name, ctxt->input->cur+2, - xmlStrlen(ctxt->name)) == 0) + if (xmlStrncasecmp(ctxt->name, ctxt->input->cur+2, + xmlStrlen(ctxt->name)) == 0) { break; /* while */ } else { @@ -2711,7 +2810,7 @@ htmlParseScript(htmlParserCtxtPtr ctxt) { } } else { if (((NXT(2) >= 'A') && (NXT(2) <= 'Z')) || - ((NXT(2) >= 'a') && (NXT(2) <= 'z'))) + ((NXT(2) >= 'a') && (NXT(2) <= 'z'))) { break; /* while */ } @@ -2773,7 +2872,7 @@ htmlParseCharData(htmlParserCtxtPtr ctxt) { SHRINK; cur = CUR_CHAR(l); while (((cur != '<') || (ctxt->token == '<')) && - ((cur != '&') || (ctxt->token == '&')) && + ((cur != '&') || (ctxt->token == '&')) && (cur != 0)) { if (!(IS_CHAR(cur))) { htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR, @@ -2999,7 +3098,7 @@ htmlParsePI(htmlParserCtxtPtr ctxt) { } xmlFree(buf); } else { - htmlParseErr(ctxt, XML_ERR_PI_NOT_STARTED, + htmlParseErr(ctxt, XML_ERR_PI_NOT_STARTED, "PI is not started correctly", NULL, NULL); } ctxt->instate = state; @@ -3115,7 +3214,7 @@ htmlParseCharRef(htmlParserCtxtPtr ctxt) { ((NXT(2) == 'x') || NXT(2) == 'X')) { SKIP(3); while (CUR != ';') { - if ((CUR >= '0') && (CUR <= '9')) + if ((CUR >= '0') && (CUR <= '9')) val = val * 16 + (CUR - '0'); else if ((CUR >= 'a') && (CUR <= 'f')) val = val * 16 + (CUR - 'a') + 10; @@ -3134,7 +3233,7 @@ htmlParseCharRef(htmlParserCtxtPtr ctxt) { } else if ((CUR == '&') && (NXT(1) == '#')) { SKIP(2); while (CUR != ';') { - if ((CUR >= '0') && (CUR <= '9')) + if ((CUR >= '0') && (CUR <= '9')) val = val * 10 + (CUR - '0'); else { htmlParseErr(ctxt, XML_ERR_INVALID_DEC_CHARREF, @@ -3170,7 +3269,7 @@ htmlParseCharRef(htmlParserCtxtPtr ctxt) { * * parse a DOCTYPE declaration * - * [28] doctypedecl ::= '' */ @@ -3302,7 +3401,7 @@ htmlCheckEncoding(htmlParserCtxtPtr ctxt, const xmlChar *attvalue) { if ((ctxt == NULL) || (attvalue == NULL)) return; - /* do not change encoding */ + /* do not change encoding */ if (ctxt->input->encoding != NULL) return; @@ -3329,7 +3428,7 @@ htmlCheckEncoding(htmlParserCtxtPtr ctxt, const xmlChar *attvalue) { * registered set of known encodings */ if (enc != XML_CHAR_ENCODING_ERROR) { - if (((enc == XML_CHAR_ENCODING_UTF16LE) || + if (((enc == XML_CHAR_ENCODING_UTF16LE) || (enc == XML_CHAR_ENCODING_UTF16BE) || (enc == XML_CHAR_ENCODING_UCS4LE) || (enc == XML_CHAR_ENCODING_UCS4BE)) && @@ -3417,7 +3516,7 @@ htmlCheckMeta(htmlParserCtxtPtr ctxt, const xmlChar **atts) { /** * htmlParseStartTag: * @ctxt: an HTML parser context - * + * * parse a start of tag either for rule element or * EmptyElement. In both case we don't parse the tag closing chars. * @@ -3446,6 +3545,8 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) { int i; int discardtag = 0; + if (ctxt->instate == XML_PARSER_EOF) + return(-1); if ((ctxt == NULL) || (ctxt->input == NULL)) { htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR, "htmlParseStartTag: context error\n", NULL, NULL); @@ -3464,7 +3565,8 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) { "htmlParseStartTag: invalid element name\n", NULL, NULL); /* Dump the bogus tag like browsers do */ - while ((IS_CHAR_CH(CUR)) && (CUR != '>')) + while ((IS_CHAR_CH(CUR)) && (CUR != '>') && + (ctxt->instate != XML_PARSER_EOF)) NEXT; return -1; } @@ -3492,7 +3594,7 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) { discardtag = 1; ctxt->depth++; } - if ((ctxt->nameNr != 1) && + if ((ctxt->nameNr != 1) && (xmlStrEqual(name, BAD_CAST"head"))) { htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR, "htmlParseStartTag: misplaced tag\n", @@ -3520,7 +3622,7 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) { */ SKIP_BLANKS; while ((IS_CHAR_CH(CUR)) && - (CUR != '>') && + (CUR != '>') && ((CUR != '/') || (NXT(1) != '>'))) { long cons = ctxt->nbChars; @@ -3744,7 +3846,7 @@ htmlParseEndTag(htmlParserCtxtPtr ctxt) /** * htmlParseReference: * @ctxt: an HTML parser context - * + * * parse and handle entity references in content, * this will end-up in a call to character() since this is either a * CharRef, or a predefined entity. @@ -3768,7 +3870,7 @@ htmlParseReference(htmlParserCtxtPtr ctxt) { else if (c < 0x800) { out[i++]=((c >> 6) & 0x1F) | 0xC0; bits= 0; } else if (c < 0x10000) { out[i++]=((c >> 12) & 0x0F) | 0xE0; bits= 6; } else { out[i++]=((c >> 18) & 0x07) | 0xF0; bits= 12; } - + for ( ; bits >= 0; bits-= 6) { out[i++]= ((c >> bits) & 0x3F) | 0x80; } @@ -3803,9 +3905,9 @@ htmlParseReference(htmlParserCtxtPtr ctxt) { { out[i++]=((c >> 6) & 0x1F) | 0xC0; bits= 0; } else if (c < 0x10000) { out[i++]=((c >> 12) & 0x0F) | 0xE0; bits= 6; } - else + else { out[i++]=((c >> 18) & 0x07) | 0xF0; bits= 12; } - + for ( ; bits >= 0; bits-= 6) { out[i++]= ((c >> bits) & 0x3F) | 0x80; } @@ -3837,6 +3939,10 @@ htmlParseContent(htmlParserCtxtPtr ctxt) { long cons = ctxt->nbChars; GROW; + + if (ctxt->instate == XML_PARSER_EOF) + break; + /* * Our tag or one of it's parent or children is ending. */ @@ -3859,7 +3965,7 @@ htmlParseContent(htmlParserCtxtPtr ctxt) { "htmlParseStartTag: invalid element name\n", NULL, NULL); /* Dump the bogus tag like browsers do */ - while ((IS_CHAR_CH(CUR)) && (CUR != '>')) + while ((IS_CHAR_CH(CUR)) && (CUR != '>')) NEXT; if (currentNode != NULL) @@ -3872,7 +3978,7 @@ htmlParseContent(htmlParserCtxtPtr ctxt) { htmlAutoClose(ctxt, name); continue; } - } + } } /* @@ -3931,7 +4037,7 @@ htmlParseContent(htmlParserCtxtPtr ctxt) { /* * Fourth case : a reference. If if has not been resolved, - * parsing returns it's Name, create the node + * parsing returns it's Name, create the node */ else if (CUR == '&') { htmlParseReference(ctxt); @@ -4005,6 +4111,10 @@ htmlParseElement(htmlParserCtxtPtr ctxt) { "htmlParseElement: context error\n", NULL, NULL); return; } + + if (ctxt->instate == XML_PARSER_EOF) + return; + /* Capture start position */ if (ctxt->record_info) { node_info.begin_pos = ctxt->input->consumed + @@ -4049,10 +4159,10 @@ htmlParseElement(htmlParserCtxtPtr ctxt) { /* * end of parsing of this node. */ - if (xmlStrEqual(name, ctxt->name)) { + if (xmlStrEqual(name, ctxt->name)) { nodePop(ctxt); htmlnamePop(ctxt); - } + } /* * Capture end position and add node @@ -4086,8 +4196,8 @@ htmlParseElement(htmlParserCtxtPtr ctxt) { oldptr = ctxt->input->cur; htmlParseContent(ctxt); if (oldptr==ctxt->input->cur) break; - if (ctxt->nameNr < depth) break; - } + if (ctxt->nameNr < depth) break; + } /* * Capture end position and add node @@ -4110,7 +4220,7 @@ htmlParseElement(htmlParserCtxtPtr ctxt) { /** * htmlParseDocument: * @ctxt: an HTML parser context - * + * * parse an HTML document (and build a tree if using the standard SAX * interface). * @@ -4134,6 +4244,7 @@ htmlParseDocument(htmlParserCtxtPtr ctxt) { return(XML_ERR_INTERNAL_ERROR); } ctxt->html = 1; + ctxt->linenumbers = 1; GROW; /* * SAX: beginning of the document processing. @@ -4163,7 +4274,7 @@ htmlParseDocument(htmlParserCtxtPtr ctxt) { */ SKIP_BLANKS; if (CUR == 0) { - htmlParseErr(ctxt, XML_ERR_DOCUMENT_EMPTY, + htmlParseErr(ctxt, XML_ERR_DOCUMENT_EMPTY, "Document is empty\n", NULL, NULL); } @@ -4202,10 +4313,10 @@ htmlParseDocument(htmlParserCtxtPtr ctxt) { while (((CUR == '<') && (NXT(1) == '!') && (NXT(2) == '-') && (NXT(3) == '-')) || ((CUR == '<') && (NXT(1) == '?'))) { - htmlParseComment(ctxt); - htmlParsePI(ctxt); + htmlParseComment(ctxt); + htmlParsePI(ctxt); SKIP_BLANKS; - } + } /* * Time to start parsing the tree itself @@ -4228,8 +4339,8 @@ htmlParseDocument(htmlParserCtxtPtr ctxt) { if (ctxt->myDoc != NULL) { dtd = xmlGetIntSubset(ctxt->myDoc); if (dtd == NULL) - ctxt->myDoc->intSubset = - xmlCreateIntSubset(ctxt->myDoc, BAD_CAST "html", + ctxt->myDoc->intSubset = + xmlCreateIntSubset(ctxt->myDoc, BAD_CAST "html", BAD_CAST "-//W3C//DTD HTML 4.0 Transitional//EN", BAD_CAST "http://www.w3.org/TR/REC-html40/loose.dtd"); } @@ -4275,7 +4386,7 @@ htmlInitParserCtxt(htmlParserCtxtPtr ctxt) memset(sax, 0, sizeof(htmlSAXHandler)); /* Allocate the Input stack */ - ctxt->inputTab = (htmlParserInputPtr *) + ctxt->inputTab = (htmlParserInputPtr *) xmlMalloc(5 * sizeof(htmlParserInputPtr)); if (ctxt->inputTab == NULL) { htmlErrMemory(NULL, "htmlInitParserCtxt: out of memory\n"); @@ -4473,7 +4584,7 @@ htmlCreateDocParserCtxt(const xmlChar *cur, const char *encoding) { xmlSwitchEncoding(ctxt, enc); if (ctxt->errNo == XML_ERR_UNSUPPORTED_ENCODING) { htmlParseErr(ctxt, XML_ERR_UNSUPPORTED_ENCODING, - "Unsupported encoding %s\n", + "Unsupported encoding %s\n", (const xmlChar *) encoding, NULL); } } else { @@ -4496,7 +4607,7 @@ htmlCreateDocParserCtxt(const xmlChar *cur, const char *encoding) { #ifdef LIBXML_PUSH_ENABLED /************************************************************************ * * - * Progressive parsing interfaces * + * Progressive parsing interfaces * * * ************************************************************************/ @@ -4520,85 +4631,190 @@ htmlCreateDocParserCtxt(const xmlChar *cur, const char *encoding) { */ static int htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first, - xmlChar next, xmlChar third, int iscomment) { + xmlChar next, xmlChar third, int iscomment, + int ignoreattrval) +{ int base, len; htmlParserInputPtr in; const xmlChar *buf; int incomment = 0; + int invalue = 0; + char valdellim = 0x0; in = ctxt->input; - if (in == NULL) return(-1); + if (in == NULL) + return (-1); + base = in->cur - in->base; - if (base < 0) return(-1); + if (base < 0) + return (-1); + if (ctxt->checkIndex > base) base = ctxt->checkIndex; + if (in->buf == NULL) { - buf = in->base; - len = in->length; + buf = in->base; + len = in->length; } else { - buf = in->buf->buffer->content; - len = in->buf->buffer->use; + buf = in->buf->buffer->content; + len = in->buf->buffer->use; } + /* take into account the sequence length */ - if (third) len -= 2; - else if (next) len --; - for (;base < len;base++) { - if (!incomment && (base + 4 < len) && !iscomment) { - if ((buf[base] == '<') && (buf[base + 1] == '!') && - (buf[base + 2] == '-') && (buf[base + 3] == '-')) { - incomment = 1; - /* do not increment past */ - base += 2; - } - } - if (incomment) { - if (base + 3 > len) - return(-1); - if ((buf[base] == '-') && (buf[base + 1] == '-') && - (buf[base + 2] == '>')) { - incomment = 0; - base += 2; - } - continue; - } + if (third) + len -= 2; + else if (next) + len--; + for (; base < len; base++) { + if ((!incomment) && (base + 4 < len) && (!iscomment)) { + if ((buf[base] == '<') && (buf[base + 1] == '!') && + (buf[base + 2] == '-') && (buf[base + 3] == '-')) { + incomment = 1; + /* do not increment past */ + base += 2; + } + } + if (ignoreattrval) { + if (buf[base] == '"' || buf[base] == '\'') { + if (invalue) { + if (buf[base] == valdellim) { + invalue = 0; + continue; + } + } else { + valdellim = buf[base]; + invalue = 1; + continue; + } + } else if (invalue) { + continue; + } + } + if (incomment) { + if (base + 3 > len) + return (-1); + if ((buf[base] == '-') && (buf[base + 1] == '-') && + (buf[base + 2] == '>')) { + incomment = 0; + base += 2; + } + continue; + } if (buf[base] == first) { - if (third != 0) { - if ((buf[base + 1] != next) || - (buf[base + 2] != third)) continue; - } else if (next != 0) { - if (buf[base + 1] != next) continue; - } - ctxt->checkIndex = 0; + if (third != 0) { + if ((buf[base + 1] != next) || (buf[base + 2] != third)) + continue; + } else if (next != 0) { + if (buf[base + 1] != next) + continue; + } + ctxt->checkIndex = 0; #ifdef DEBUG_PUSH - if (next == 0) - xmlGenericError(xmlGenericErrorContext, - "HPP: lookup '%c' found at %d\n", - first, base); - else if (third == 0) - xmlGenericError(xmlGenericErrorContext, - "HPP: lookup '%c%c' found at %d\n", - first, next, base); - else - xmlGenericError(xmlGenericErrorContext, - "HPP: lookup '%c%c%c' found at %d\n", - first, next, third, base); + if (next == 0) + xmlGenericError(xmlGenericErrorContext, + "HPP: lookup '%c' found at %d\n", + first, base); + else if (third == 0) + xmlGenericError(xmlGenericErrorContext, + "HPP: lookup '%c%c' found at %d\n", + first, next, base); + else + xmlGenericError(xmlGenericErrorContext, + "HPP: lookup '%c%c%c' found at %d\n", + first, next, third, base); #endif - return(base - (in->cur - in->base)); - } + return (base - (in->cur - in->base)); + } } - ctxt->checkIndex = base; + if ((!incomment) && (!invalue)) + ctxt->checkIndex = base; #ifdef DEBUG_PUSH if (next == 0) - xmlGenericError(xmlGenericErrorContext, - "HPP: lookup '%c' failed\n", first); + xmlGenericError(xmlGenericErrorContext, + "HPP: lookup '%c' failed\n", first); else if (third == 0) - xmlGenericError(xmlGenericErrorContext, - "HPP: lookup '%c%c' failed\n", first, next); - else - xmlGenericError(xmlGenericErrorContext, - "HPP: lookup '%c%c%c' failed\n", first, next, third); + xmlGenericError(xmlGenericErrorContext, + "HPP: lookup '%c%c' failed\n", first, next); + else + xmlGenericError(xmlGenericErrorContext, + "HPP: lookup '%c%c%c' failed\n", first, next, + third); #endif - return(-1); + return (-1); +} + +/** + * htmlParseLookupChars: + * @ctxt: an HTML parser context + * @stop: Array of chars, which stop the lookup. + * @stopLen: Length of stop-Array + * + * Try to find if any char of the stop-Array is available in the input + * stream. + * This function has a side effect of (possibly) incrementing ctxt->checkIndex + * to avoid rescanning sequences of bytes, it DOES change the state of the + * parser, do not use liberally. + * + * Returns the index to the current parsing point if a stopChar + * is available, -1 otherwise. + */ +static int +htmlParseLookupChars(htmlParserCtxtPtr ctxt, const xmlChar * stop, + int stopLen) +{ + int base, len; + htmlParserInputPtr in; + const xmlChar *buf; + int incomment = 0; + int i; + + in = ctxt->input; + if (in == NULL) + return (-1); + + base = in->cur - in->base; + if (base < 0) + return (-1); + + if (ctxt->checkIndex > base) + base = ctxt->checkIndex; + + if (in->buf == NULL) { + buf = in->base; + len = in->length; + } else { + buf = in->buf->buffer->content; + len = in->buf->buffer->use; + } + + for (; base < len; base++) { + if (!incomment && (base + 4 < len)) { + if ((buf[base] == '<') && (buf[base + 1] == '!') && + (buf[base + 2] == '-') && (buf[base + 3] == '-')) { + incomment = 1; + /* do not increment past */ + base += 2; + } + } + if (incomment) { + if (base + 3 > len) + return (-1); + if ((buf[base] == '-') && (buf[base + 1] == '-') && + (buf[base + 2] == '>')) { + incomment = 0; + base += 2; + } + continue; + } + for (i = 0; i < stopLen; ++i) { + if (buf[base] == stop[i]) { + ctxt->checkIndex = 0; + return (base - (in->cur - in->base)); + } + } + } + ctxt->checkIndex = base; + return (-1); } /** @@ -4680,7 +4896,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { avail = in->buf->buffer->use - (in->cur - in->base); if ((avail == 0) && (terminate)) { htmlAutoCloseOnEnd(ctxt); - if ((ctxt->nameNr == 0) && (ctxt->instate != XML_PARSER_EOF)) { + if ((ctxt->nameNr == 0) && (ctxt->instate != XML_PARSER_EOF)) { /* * SAX: end of the document processing. */ @@ -4730,7 +4946,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { (UPP(6) == 'Y') && (UPP(7) == 'P') && (UPP(8) == 'E')) { if ((!terminate) && - (htmlParseLookupSequence(ctxt, '>', 0, 0, 0) < 0)) + (htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0)) goto done; #ifdef DEBUG_PUSH xmlGenericError(xmlGenericErrorContext, @@ -4763,7 +4979,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if ((cur == '<') && (next == '!') && (in->cur[2] == '-') && (in->cur[3] == '-')) { if ((!terminate) && - (htmlParseLookupSequence(ctxt, '-', '-', '>', 1) < 0)) + (htmlParseLookupSequence(ctxt, '-', '-', '>', 1, 1) < 0)) goto done; #ifdef DEBUG_PUSH xmlGenericError(xmlGenericErrorContext, @@ -4773,7 +4989,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { ctxt->instate = XML_PARSER_MISC; } else if ((cur == '<') && (next == '?')) { if ((!terminate) && - (htmlParseLookupSequence(ctxt, '>', 0, 0, 0) < 0)) + (htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0)) goto done; #ifdef DEBUG_PUSH xmlGenericError(xmlGenericErrorContext, @@ -4787,7 +5003,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { (UPP(6) == 'Y') && (UPP(7) == 'P') && (UPP(8) == 'E')) { if ((!terminate) && - (htmlParseLookupSequence(ctxt, '>', 0, 0, 0) < 0)) + (htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0)) goto done; #ifdef DEBUG_PUSH xmlGenericError(xmlGenericErrorContext, @@ -4816,14 +5032,14 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { avail = in->length - (in->cur - in->base); else avail = in->buf->buffer->use - (in->cur - in->base); - if (avail < 2) + if (avail < 2) goto done; cur = in->cur[0]; next = in->cur[1]; if ((cur == '<') && (next == '!') && (in->cur[2] == '-') && (in->cur[3] == '-')) { if ((!terminate) && - (htmlParseLookupSequence(ctxt, '-', '-', '>', 1) < 0)) + (htmlParseLookupSequence(ctxt, '-', '-', '>', 1, 1) < 0)) goto done; #ifdef DEBUG_PUSH xmlGenericError(xmlGenericErrorContext, @@ -4833,7 +5049,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { ctxt->instate = XML_PARSER_PROLOG; } else if ((cur == '<') && (next == '?')) { if ((!terminate) && - (htmlParseLookupSequence(ctxt, '>', 0, 0, 0) < 0)) + (htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0)) goto done; #ifdef DEBUG_PUSH xmlGenericError(xmlGenericErrorContext, @@ -4870,7 +5086,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if ((cur == '<') && (next == '!') && (in->cur[2] == '-') && (in->cur[3] == '-')) { if ((!terminate) && - (htmlParseLookupSequence(ctxt, '-', '-', '>', 1) < 0)) + (htmlParseLookupSequence(ctxt, '-', '-', '>', 1, 1) < 0)) goto done; #ifdef DEBUG_PUSH xmlGenericError(xmlGenericErrorContext, @@ -4880,7 +5096,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { ctxt->instate = XML_PARSER_EPILOG; } else if ((cur == '<') && (next == '?')) { if ((!terminate) && - (htmlParseLookupSequence(ctxt, '>', 0, 0, 0) < 0)) + (htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0)) goto done; #ifdef DEBUG_PUSH xmlGenericError(xmlGenericErrorContext, @@ -4930,7 +5146,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { break; } if ((!terminate) && - (htmlParseLookupSequence(ctxt, '>', 0, 0, 0) < 0)) + (htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0)) goto done; failed = htmlParseStartTag(ctxt); @@ -4977,10 +5193,10 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { /* * end of parsing of this node. */ - if (xmlStrEqual(name, ctxt->name)) { + if (xmlStrEqual(name, ctxt->name)) { nodePop(ctxt); htmlnamePop(ctxt); - } + } ctxt->instate = XML_PARSER_CONTENT; #ifdef DEBUG_PUSH @@ -5055,7 +5271,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { int idx; xmlChar val; - idx = htmlParseLookupSequence(ctxt, '<', '/', 0, 0); + idx = htmlParseLookupSequence(ctxt, '<', '/', 0, 0, 1); if (idx < 0) goto done; val = in->cur[idx + 2]; @@ -5082,7 +5298,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { (UPP(6) == 'Y') && (UPP(7) == 'P') && (UPP(8) == 'E')) { if ((!terminate) && - (htmlParseLookupSequence(ctxt, '>', 0, 0, 0) < 0)) + (htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0)) goto done; htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR, "Misplaced DOCTYPE declaration\n", @@ -5092,7 +5308,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { (in->cur[2] == '-') && (in->cur[3] == '-')) { if ((!terminate) && (htmlParseLookupSequence( - ctxt, '-', '-', '>', 1) < 0)) + ctxt, '-', '-', '>', 1, 1) < 0)) goto done; #ifdef DEBUG_PUSH xmlGenericError(xmlGenericErrorContext, @@ -5102,7 +5318,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { ctxt->instate = XML_PARSER_CONTENT; } else if ((cur == '<') && (next == '?')) { if ((!terminate) && - (htmlParseLookupSequence(ctxt, '>', 0, 0, 0) < 0)) + (htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0)) goto done; #ifdef DEBUG_PUSH xmlGenericError(xmlGenericErrorContext, @@ -5130,7 +5346,8 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { break; } else if (cur == '&') { if ((!terminate) && - (htmlParseLookupSequence(ctxt, ';', 0, 0, 0) < 0)) + (htmlParseLookupChars(ctxt, + BAD_CAST "; >/", 4) < 0)) goto done; #ifdef DEBUG_PUSH xmlGenericError(xmlGenericErrorContext, @@ -5146,7 +5363,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { * data detection. */ if ((!terminate) && - (htmlParseLookupSequence(ctxt, '<', 0, 0, 0) < 0)) + (htmlParseLookupChars(ctxt, BAD_CAST "<&", 2) < 0)) goto done; ctxt->checkIndex = 0; #ifdef DEBUG_PUSH @@ -5172,7 +5389,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if (avail < 2) goto done; if ((!terminate) && - (htmlParseLookupSequence(ctxt, '>', 0, 0, 0) < 0)) + (htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0)) goto done; htmlParseEndTag(ctxt); if (ctxt->nameNr == 0) { @@ -5299,10 +5516,10 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { } } -done: +done: if ((avail == 0) && (terminate)) { htmlAutoCloseOnEnd(ctxt); - if ((ctxt->nameNr == 0) && (ctxt->instate != XML_PARSER_EOF)) { + if ((ctxt->nameNr == 0) && (ctxt->instate != XML_PARSER_EOF)) { /* * SAX: end of the document processing. */ @@ -5317,8 +5534,8 @@ done: xmlDtdPtr dtd; dtd = xmlGetIntSubset(ctxt->myDoc); if (dtd == NULL) - ctxt->myDoc->intSubset = - xmlCreateIntSubset(ctxt->myDoc, BAD_CAST "html", + ctxt->myDoc->intSubset = + xmlCreateIntSubset(ctxt->myDoc, BAD_CAST "html", BAD_CAST "-//W3C//DTD HTML 4.0 Transitional//EN", BAD_CAST "http://www.w3.org/TR/REC-html40/loose.dtd"); } @@ -5352,8 +5569,8 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size, int base = ctxt->input->base - ctxt->input->buf->buffer->content; int cur = ctxt->input->cur - ctxt->input->base; int res; - - res = xmlParserInputBufferPush(ctxt->input->buf, size, chunk); + + res = xmlParserInputBufferPush(ctxt->input->buf, size, chunk); if (res < 0) { ctxt->errNo = XML_PARSER_EOF; ctxt->disableSAX = 1; @@ -5377,7 +5594,7 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size, if ((in->encoder != NULL) && (in->buffer != NULL) && (in->raw != NULL)) { int nbchars; - + nbchars = xmlCharEncInFunc(in->encoder, in->buffer, in->raw); if (nbchars < 0) { htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING, @@ -5394,14 +5611,14 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size, (ctxt->instate != XML_PARSER_MISC)) { ctxt->errNo = XML_ERR_DOCUMENT_END; ctxt->wellFormed = 0; - } + } if (ctxt->instate != XML_PARSER_EOF) { if ((ctxt->sax) && (ctxt->sax->endDocument != NULL)) ctxt->sax->endDocument(ctxt->userData); } ctxt->instate = XML_PARSER_EOF; } - return((xmlParserErrors) ctxt->errNo); + return((xmlParserErrors) ctxt->errNo); } /************************************************************************ @@ -5426,7 +5643,7 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size, * Returns the new parser context or NULL */ htmlParserCtxtPtr -htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data, +htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data, const char *chunk, int size, const char *filename, xmlCharEncoding enc) { htmlParserCtxtPtr ctxt; @@ -5457,7 +5674,7 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data, memcpy(ctxt->sax, sax, sizeof(htmlSAXHandler)); if (user_data != NULL) ctxt->userData = user_data; - } + } if (filename == NULL) { ctxt->directory = NULL; } else { @@ -5479,17 +5696,17 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data, inputStream->buf = buf; inputStream->base = inputStream->buf->buffer->content; inputStream->cur = inputStream->buf->buffer->content; - inputStream->end = + inputStream->end = &inputStream->buf->buffer->content[inputStream->buf->buffer->use]; inputPush(ctxt, inputStream); if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) && - (ctxt->input->buf != NULL)) { + (ctxt->input->buf != NULL)) { int base = ctxt->input->base - ctxt->input->buf->buffer->content; int cur = ctxt->input->cur - ctxt->input->base; - xmlParserInputBufferPush(ctxt->input->buf, size, chunk); + xmlParserInputBufferPush(ctxt->input->buf, size, chunk); ctxt->input->base = ctxt->input->buf->buffer->content + base; ctxt->input->cur = ctxt->input->base + cur; @@ -5510,12 +5727,12 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data, * @cur: a pointer to an array of xmlChar * @encoding: a free form C string describing the HTML document encoding, or NULL * @sax: the SAX handler block - * @userData: if using SAX, this pointer will be provided on callbacks. + * @userData: if using SAX, this pointer will be provided on callbacks. * * Parse an HTML in-memory document. If sax is not NULL, use the SAX callbacks * to handle parse events. If sax is NULL, fallback to the default DOM * behavior and return a tree. - * + * * Returns the resulting document tree unless SAX is NULL or the document is * not well formed. */ @@ -5532,7 +5749,7 @@ htmlSAXParseDoc(xmlChar *cur, const char *encoding, htmlSAXHandlerPtr sax, void ctxt = htmlCreateDocParserCtxt(cur, encoding); if (ctxt == NULL) return(NULL); - if (sax != NULL) { + if (sax != NULL) { if (ctxt->sax != NULL) xmlFree (ctxt->sax); ctxt->sax = sax; ctxt->userData = userData; @@ -5545,7 +5762,7 @@ htmlSAXParseDoc(xmlChar *cur, const char *encoding, htmlSAXHandlerPtr sax, void ctxt->userData = NULL; } htmlFreeParserCtxt(ctxt); - + return(ret); } @@ -5555,7 +5772,7 @@ htmlSAXParseDoc(xmlChar *cur, const char *encoding, htmlSAXHandlerPtr sax, void * @encoding: a free form C string describing the HTML document encoding, or NULL * * parse an HTML in-memory document and build a tree. - * + * * Returns the resulting document tree */ @@ -5570,7 +5787,7 @@ htmlParseDoc(xmlChar *cur, const char *encoding) { * @filename: the filename * @encoding: a free form C string describing the HTML document encoding, or NULL * - * Create a parser context for a file content. + * Create a parser context for a file content. * Automatic support for ZLIB/Compress compressed document is provided * by default if found at compile-time. * @@ -5602,7 +5819,7 @@ htmlCreateFileParserCtxt(const char *filename, const char *encoding) xmlFreeParserCtxt(ctxt); return(NULL); } - + inputStream = xmlLoadExternalEntity(canonicFilename, NULL, ctxt); xmlFree(canonicFilename); if (inputStream == NULL) { @@ -5615,14 +5832,14 @@ htmlCreateFileParserCtxt(const char *filename, const char *encoding) /* set encoding */ if (encoding) { content = xmlMallocAtomic (xmlStrlen(content_line) + strlen(encoding) + 1); - if (content) { + if (content) { strcpy ((char *)content, (char *)content_line); strcat ((char *)content, (char *)encoding); htmlCheckEncoding (ctxt, content); xmlFree (content); } } - + return(ctxt); } @@ -5631,7 +5848,7 @@ htmlCreateFileParserCtxt(const char *filename, const char *encoding) * @filename: the filename * @encoding: a free form C string describing the HTML document encoding, or NULL * @sax: the SAX handler block - * @userData: if using SAX, this pointer will be provided on callbacks. + * @userData: if using SAX, this pointer will be provided on callbacks. * * parse an HTML file and build a tree. Automatic support for ZLIB/Compress * compressed document is provided by default if found at compile-time. @@ -5643,7 +5860,7 @@ htmlCreateFileParserCtxt(const char *filename, const char *encoding) */ htmlDocPtr -htmlSAXParseFile(const char *filename, const char *encoding, htmlSAXHandlerPtr sax, +htmlSAXParseFile(const char *filename, const char *encoding, htmlSAXHandlerPtr sax, void *userData) { htmlDocPtr ret; htmlParserCtxtPtr ctxt; @@ -5667,7 +5884,7 @@ htmlSAXParseFile(const char *filename, const char *encoding, htmlSAXHandlerPtr s ctxt->userData = NULL; } htmlFreeParserCtxt(ctxt); - + return(ret); } @@ -5689,7 +5906,7 @@ htmlParseFile(const char *filename, const char *encoding) { /** * htmlHandleOmittedElem: - * @val: int 0 or 1 + * @val: int 0 or 1 * * Set and return the previous value for handling HTML omitted tags. * @@ -5829,7 +6046,7 @@ htmlNodeStatus(const htmlNodePtr node, int legacy) { * current scope */ #define DICT_FREE(str) \ - if ((str) && ((!dict) || \ + if ((str) && ((!dict) || \ (xmlDictOwns(dict, (const xmlChar *)(str)) == 0))) \ xmlFree((char *)(str)); @@ -5844,7 +6061,7 @@ htmlCtxtReset(htmlParserCtxtPtr ctxt) { xmlParserInputPtr input; xmlDictPtr dict; - + if (ctxt == NULL) return; @@ -5971,6 +6188,10 @@ htmlCtxtUseOptions(htmlParserCtxtPtr ctxt, int options) ctxt->options |= HTML_PARSE_COMPACT; options -= HTML_PARSE_COMPACT; } + if (options & XML_PARSE_HUGE) { + ctxt->options |= XML_PARSE_HUGE; + options -= XML_PARSE_HUGE; + } ctxt->dictNames = 0; return (options); } @@ -5984,7 +6205,7 @@ htmlCtxtUseOptions(htmlParserCtxtPtr ctxt, int options) * @reuse: keep the context for reuse * * Common front-end for the htmlRead functions - * + * * Returns the resulting document tree or NULL */ static htmlDocPtr @@ -5992,7 +6213,7 @@ htmlDoRead(htmlParserCtxtPtr ctxt, const char *URL, const char *encoding, int options, int reuse) { htmlDocPtr ret; - + htmlCtxtUseOptions(ctxt, options); ctxt->html = 1; if (encoding != NULL) { @@ -6030,7 +6251,7 @@ htmlDoRead(htmlParserCtxtPtr ctxt, const char *URL, const char *encoding, * @options: a combination of htmlParserOption(s) * * parse an XML in-memory document and build a tree. - * + * * Returns the resulting document tree */ htmlDocPtr @@ -6055,7 +6276,7 @@ htmlReadDoc(const xmlChar * cur, const char *URL, const char *encoding, int opti * @options: a combination of htmlParserOption(s) * * parse an XML file from the filesystem or the network. - * + * * Returns the resulting document tree */ htmlDocPtr @@ -6079,7 +6300,7 @@ htmlReadFile(const char *filename, const char *encoding, int options) * @options: a combination of htmlParserOption(s) * * parse an XML in-memory document and build a tree. - * + * * Returns the resulting document tree */ htmlDocPtr @@ -6105,7 +6326,7 @@ htmlReadMemory(const char *buffer, int size, const char *URL, const char *encodi * @options: a combination of htmlParserOption(s) * * parse an XML from a file descriptor and build a tree. - * + * * Returns the resulting document tree */ htmlDocPtr @@ -6147,7 +6368,7 @@ htmlReadFd(int fd, const char *URL, const char *encoding, int options) * @options: a combination of htmlParserOption(s) * * parse an HTML document from I/O functions and source and build a tree. - * + * * Returns the resulting document tree */ htmlDocPtr @@ -6191,7 +6412,7 @@ htmlReadIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, * * parse an XML in-memory document and build a tree. * This reuses the existing @ctxt parser context - * + * * Returns the resulting document tree */ htmlDocPtr @@ -6224,7 +6445,7 @@ htmlCtxtReadDoc(htmlParserCtxtPtr ctxt, const xmlChar * cur, * * parse an XML file from the filesystem or the network. * This reuses the existing @ctxt parser context - * + * * Returns the resulting document tree */ htmlDocPtr @@ -6259,7 +6480,7 @@ htmlCtxtReadFile(htmlParserCtxtPtr ctxt, const char *filename, * * parse an XML in-memory document and build a tree. * This reuses the existing @ctxt parser context - * + * * Returns the resulting document tree */ htmlDocPtr @@ -6301,7 +6522,7 @@ htmlCtxtReadMemory(htmlParserCtxtPtr ctxt, const char *buffer, int size, * * parse an XML from a file descriptor and build a tree. * This reuses the existing @ctxt parser context - * + * * Returns the resulting document tree */ htmlDocPtr @@ -6343,7 +6564,7 @@ htmlCtxtReadFd(htmlParserCtxtPtr ctxt, int fd, * * parse an HTML document from I/O functions and source and build a tree. * This reuses the existing @ctxt parser context - * + * * Returns the resulting document tree */ htmlDocPtr diff --git a/HTMLtree.c b/HTMLtree.c index 37999f7..b508583 100644 --- a/HTMLtree.c +++ b/HTMLtree.c @@ -160,14 +160,18 @@ found_content: */ int htmlSetMetaEncoding(htmlDocPtr doc, const xmlChar *encoding) { - htmlNodePtr cur, meta; - const xmlChar *content; + htmlNodePtr cur, meta = NULL, head = NULL; + const xmlChar *content = NULL; char newcontent[100]; if (doc == NULL) return(-1); + /* html isn't a real encoding it's just libxml2 way to get entities */ + if (!xmlStrcasecmp(encoding, BAD_CAST "html")) + return(-1); + if (encoding != NULL) { snprintf(newcontent, sizeof(newcontent), "text/html; charset=%s", (char *)encoding); @@ -201,39 +205,24 @@ htmlSetMetaEncoding(htmlDocPtr doc, const xmlChar *encoding) { if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) { if (xmlStrcasecmp(cur->name, BAD_CAST"head") == 0) break; - if (xmlStrcasecmp(cur->name, BAD_CAST"meta") == 0) + if (xmlStrcasecmp(cur->name, BAD_CAST"meta") == 0) { + head = cur->parent; goto found_meta; + } } cur = cur->next; } if (cur == NULL) return(-1); found_head: - if (cur->children == NULL) { - if (encoding == NULL) - return(0); - meta = xmlNewDocNode(doc, NULL, BAD_CAST"meta", NULL); - xmlAddChild(cur, meta); - xmlNewProp(meta, BAD_CAST"http-equiv", BAD_CAST"Content-Type"); - xmlNewProp(meta, BAD_CAST"content", BAD_CAST newcontent); - return(0); - } + head = cur; + if (cur->children == NULL) + goto create; cur = cur->children; found_meta: - if (encoding != NULL) { - /* - * Create a new Meta element with the right attributes - */ - - meta = xmlNewDocNode(doc, NULL, BAD_CAST"meta", NULL); - xmlAddPrevSibling(cur, meta); - xmlNewProp(meta, BAD_CAST"http-equiv", BAD_CAST"Content-Type"); - xmlNewProp(meta, BAD_CAST"content", BAD_CAST newcontent); - } - /* - * Search and destroy all the remaining the meta elements carrying + * Search and update all the remaining the meta elements carrying * encoding informations */ while (cur != NULL) { @@ -253,11 +242,11 @@ found_meta: if ((!xmlStrcasecmp(attr->name, BAD_CAST"http-equiv")) && (!xmlStrcasecmp(value, BAD_CAST"Content-Type"))) http = 1; - else + else { if ((value != NULL) && - (!xmlStrcasecmp(attr->name, BAD_CAST"content"))) - content = value; + (!xmlStrcasecmp(attr->name, BAD_CAST"content"))) + content = value; } if ((http != 0) && (content != NULL)) break; @@ -266,16 +255,36 @@ found_meta: } if ((http != 0) && (content != NULL)) { meta = cur; - cur = cur->next; - xmlUnlinkNode(meta); - xmlFreeNode(meta); - continue; + break; } } } cur = cur->next; } +create: + if (meta == NULL) { + if ((encoding != NULL) && (head != NULL)) { + /* + * Create a new Meta element with the right attributes + */ + + meta = xmlNewDocNode(doc, NULL, BAD_CAST"meta", NULL); + if (head->children == NULL) + xmlAddChild(head, meta); + else + xmlAddPrevSibling(head->children, meta); + xmlNewProp(meta, BAD_CAST"http-equiv", BAD_CAST"Content-Type"); + xmlNewProp(meta, BAD_CAST"content", BAD_CAST newcontent); + } + } else { + /* change the document only if there is a real encoding change */ + if (xmlStrcasestr(content, encoding) == NULL) { + xmlSetProp(meta, BAD_CAST"content", BAD_CAST newcontent); + } + } + + return(0); } @@ -1155,7 +1164,7 @@ htmlSaveFileFormat(const char *filename, xmlDocPtr cur, if ((cur == NULL) || (filename == NULL)) return(-1); - + xmlInitParser(); if (encoding != NULL) { @@ -1173,8 +1182,8 @@ htmlSaveFileFormat(const char *filename, xmlDocPtr cur, handler = xmlFindCharEncodingHandler(encoding); if (handler == NULL) return(-1); - htmlSetMetaEncoding(cur, (const xmlChar *) encoding); } + htmlSetMetaEncoding(cur, (const xmlChar *) encoding); } else { htmlSetMetaEncoding(cur, (const xmlChar *) "UTF-8"); } diff --git a/INSTALL b/INSTALL index 92f92dd..3b004ae 100644 --- a/INSTALL +++ b/INSTALL @@ -58,4 +58,4 @@ Compilation Daniel veillard@redhat.com -$Id: INSTALL,v 1.4 2006/03/24 14:02:54 veillard Exp $ +$Id$ diff --git a/Makefile.am b/Makefile.am index 800a766..807e21d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,7 +18,16 @@ bin_SCRIPTS=xml2-config lib_LTLIBRARIES = libxml2.la libxml2_la_LIBADD = @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@ -libxml2_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ -version-info @LIBXML_VERSION_INFO@ @MODULE_PLATFORM_LIBS@ +if USE_VERSION_SCRIPT +LIBXML2_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxml2.syms +else +LIBXML2_VERSION_SCRIPT = +endif + +libxml2_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ \ + $(LIBXML2_VERSION_SCRIPT) \ + -version-info @LIBXML_VERSION_INFO@ \ + @MODULE_PLATFORM_LIBS@ if WITH_TRIO_SOURCES libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ @@ -923,7 +932,7 @@ VTimingtests: xmllint$(EXEEXT) C14Ntests : testC14N$(EXEEXT) @echo "## C14N and XPath regression tests" - -@(for m in with-comments without-comments exc-without-comments ; do \ + -@(for m in with-comments without-comments 1-1-without-comments exc-without-comments ; do \ for i in $(srcdir)/test/c14n/$$m/*.xml ; do \ if [ ! -d $$i ] ; then \ name=`basename $$i .xml`; \ @@ -1044,7 +1053,7 @@ Relaxtests: xmllint$(EXEEXT) > res.$$name 2> err.$$name;\ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ diff $(srcdir)/result/relaxng/"$$name"_"$$xno" res.$$name;\ - if [ "$$name" != "tutor10_1" -a "$$name" != "tutor10_2" -a "$$name" != "tutor3_2" -a "$$name" != "307377" ] ; then \ + if [ "$$name" != "tutor10_1" -a "$$name" != "tutor10_2" -a "$$name" != "tutor3_2" -a "$$name" != "307377" -a "$$name" != "tutor8_2" ] ; then \ diff $(srcdir)/result/relaxng/"$$name"_"$$xno".err \ err.$$name | grep -v "error detected at";\ fi ; grep Unimplemented err.$$name`; \ @@ -1141,7 +1150,7 @@ cleanup: dist-hook: cleanup libxml2.spec -cp libxml2.spec $(distdir) - (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn win32 macos vms bakefile test result) | (cd $(distdir); tar xf -) + (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn win32 macos vms VxWorks bakefile test result) | (cd $(distdir); tar xf -) dist-source: distdir $(AMTAR) -chof - --exclude Tests --exclude test --exclude result $(distdir) | GZIP=$(GZIP_ENV) gzip -c >`echo "$(distdir)" | sed "s+libxml2+libxml2-sources+"`.tar.gz @@ -1187,7 +1196,7 @@ EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \ triop.h triodef.h libxml.h elfgcchack.h \ testThreadsWin32.c genUnicode.py TODO_SCHEMAS \ dbgen.pl dbgenattr.pl regressions.py regressions.xml \ - README.tests Makefile.tests \ + README.tests Makefile.tests libxml2.syms \ $(CVS_EXTRA_DIST) @@ -1211,12 +1220,12 @@ install-data-local: -@INSTALL@ -m 0644 $(srcdir)/testXPath.c $(DESTDIR)$(EXAMPLES_DIR) uninstall-local: - rm $(DESTDIR)$(EXAMPLES_DIR)/testXPath.c - rm $(DESTDIR)$(EXAMPLES_DIR)/testHTML.c - rm $(DESTDIR)$(EXAMPLES_DIR)/testSAX.c - rm $(DESTDIR)$(EXAMPLES_DIR)/xmllint.c + rm -f $(DESTDIR)$(EXAMPLES_DIR)/testXPath.c + rm -f $(DESTDIR)$(EXAMPLES_DIR)/testHTML.c + rm -f $(DESTDIR)$(EXAMPLES_DIR)/testSAX.c + rm -f $(DESTDIR)$(EXAMPLES_DIR)/xmllint.c rm -rf $(DESTDIR)$(EXAMPLES_DIR) - rm $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)/Copyright + rm -f $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)/Copyright rm -rf $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) tst: tst.c diff --git a/Makefile.in b/Makefile.in index ddcfd91..37da8f9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @@ -19,8 +20,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -62,17 +64,32 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = libxml2.spec xml2-config libxml-2.0.pc \ libxml-2.0-uninstalled.pc +CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(confexecdir)" \ "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(pkgconfigdir)" -libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = libxml2_la_DEPENDENCIES = $(am__DEPENDENCIES_1) @@ -126,7 +143,6 @@ testdso_la_OBJECTS = $(am_testdso_la_OBJECTS) testdso_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(testdso_la_LDFLAGS) $(LDFLAGS) -o $@ -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am_runsuite_OBJECTS = runsuite.$(OBJEXT) runsuite_OBJECTS = $(am_runsuite_OBJECTS) @@ -234,11 +250,11 @@ xmllint_OBJECTS = $(am_xmllint_OBJECTS) xmllint_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(xmllint_LDFLAGS) \ $(LDFLAGS) -o $@ -binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ @@ -279,21 +295,46 @@ man1dir = $(mandir)/man1 man3dir = $(mandir)/man3 NROFF = nroff MANS = $(man_MANS) -confexecDATA_INSTALL = $(INSTALL_DATA) -m4dataDATA_INSTALL = $(INSTALL_DATA) -pkgconfigDATA_INSTALL = $(INSTALL_DATA) DATA = $(confexec_DATA) $(m4data_DATA) $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } + { test ! -d "$(distdir)" \ + || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr "$(distdir)"; }; } +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print @@ -314,10 +355,6 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@ @@ -326,14 +363,14 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOCB_OBJ = @DOCB_OBJ@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FTP_OBJ = @FTP_OBJ@ GREP = @GREP@ HAVE_ISINF = @HAVE_ISINF@ @@ -347,6 +384,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -358,6 +396,7 @@ LIBXML_VERSION = @LIBXML_VERSION@ LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@ LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@ LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ @@ -366,8 +405,12 @@ MODULE_EXTENSION = @MODULE_EXTENSION@ MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@ MV = @MV@ M_LIBS = @M_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -416,6 +459,7 @@ THREAD_CFLAGS = @THREAD_CFLAGS@ THREAD_LIBS = @THREAD_LIBS@ U = @U@ VERSION = @VERSION@ +VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@ WGET = @WGET@ WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@ WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@ @@ -466,8 +510,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -498,6 +541,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -511,6 +555,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = include . doc example xstc @PYTHON_SUBDIR@ @@ -519,7 +564,13 @@ INCLUDES = -I$(top_builddir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAG bin_SCRIPTS = xml2-config lib_LTLIBRARIES = libxml2.la libxml2_la_LIBADD = @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@ -libxml2_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ -version-info @LIBXML_VERSION_INFO@ @MODULE_PLATFORM_LIBS@ +@USE_VERSION_SCRIPT_FALSE@LIBXML2_VERSION_SCRIPT = +@USE_VERSION_SCRIPT_TRUE@LIBXML2_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxml2.syms +libxml2_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ \ + $(LIBXML2_VERSION_SCRIPT) \ + -version-info @LIBXML_VERSION_INFO@ \ + @MODULE_PLATFORM_LIBS@ + @WITH_TRIO_SOURCES_FALSE@libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ @WITH_TRIO_SOURCES_FALSE@ parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \ @WITH_TRIO_SOURCES_FALSE@ valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \ @@ -646,7 +697,7 @@ EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \ triop.h triodef.h libxml.h elfgcchack.h \ testThreadsWin32.c genUnicode.py TODO_SCHEMAS \ dbgen.pl dbgenattr.pl regressions.py regressions.xml \ - README.tests Makefile.tests \ + README.tests Makefile.tests libxml2.syms \ $(CVS_EXTRA_DIST) pkgconfigdir = $(libdir)/pkgconfig @@ -676,15 +727,15 @@ $(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 \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -700,9 +751,10 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) + $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ @@ -714,7 +766,7 @@ stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) $(top_srcdir)/acconfig.h - cd $(top_srcdir) && $(AUTOHEADER) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ @@ -731,20 +783,24 @@ libxml-2.0-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/libxml-2.0-un install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + list2="$$list2 $$p"; \ else :; fi; \ - done + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: @@ -771,38 +827,55 @@ testdso.la: $(testdso_la_OBJECTS) $(testdso_la_DEPENDENCIES) 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) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; 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 + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list 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 + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list runsuite$(EXEEXT): $(runsuite_OBJECTS) $(runsuite_DEPENDENCIES) @rm -f runsuite$(EXEEXT) $(runsuite_LINK) $(runsuite_OBJECTS) $(runsuite_LDADD) $(LIBS) @@ -869,22 +942,37 @@ xmllint$(EXEEXT): $(xmllint_OBJECTS) $(xmllint_DEPENDENCIES) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_SCRIPTS)'; for p in $$list; do \ + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + 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 + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-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 + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -962,21 +1050,21 @@ distclean-compile: .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -988,148 +1076,143 @@ clean-libtool: -rm -rf .libs _libs distclean-libtool: - -rm -f libtool -install-man1: $(man1_MANS) $(man_MANS) + -rm -f libtool config.lt +install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ + @list=''; test -n "$(man1dir)" || exit 0; \ + { for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ - done + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + uninstall-man1: @$(NORMAL_UNINSTALL) - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ - done -install-man3: $(man3_MANS) $(man_MANS) + @list=''; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + test -z "$$files" || { \ + echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } +install-man3: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" - @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.3*) list="$$list $$i" ;; \ - esac; \ + @list=''; test -n "$(man3dir)" || exit 0; \ + { for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.3[a-z]*$$/p'; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ + fi; \ done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 3*) ;; \ - *) ext='3' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \ - done + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ + done; } + uninstall-man3: @$(NORMAL_UNINSTALL) - @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.3*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 3*) ;; \ - *) ext='3' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man3dir)/$$inst"; \ - done + @list=''; test -n "$(man3dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.3[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + test -z "$$files" || { \ + echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(man3dir)" && rm -f $$files; } install-confexecDATA: $(confexec_DATA) @$(NORMAL_INSTALL) test -z "$(confexecdir)" || $(MKDIR_P) "$(DESTDIR)$(confexecdir)" - @list='$(confexec_DATA)'; for p in $$list; do \ + @list='$(confexec_DATA)'; test -n "$(confexecdir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(confexecDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(confexecdir)/$$f'"; \ - $(confexecDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(confexecdir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(confexecdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(confexecdir)" || exit $$?; \ done uninstall-confexecDATA: @$(NORMAL_UNINSTALL) - @list='$(confexec_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(confexecdir)/$$f'"; \ - rm -f "$(DESTDIR)$(confexecdir)/$$f"; \ - done + @list='$(confexec_DATA)'; test -n "$(confexecdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(confexecdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(confexecdir)" && rm -f $$files install-m4dataDATA: $(m4data_DATA) @$(NORMAL_INSTALL) test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)" - @list='$(m4data_DATA)'; for p in $$list; do \ + @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(m4dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(m4datadir)/$$f'"; \ - $(m4dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(m4datadir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(m4datadir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(m4datadir)" || exit $$?; \ done uninstall-m4dataDATA: @$(NORMAL_UNINSTALL) - @list='$(m4data_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(m4datadir)/$$f'"; \ - rm -f "$(DESTDIR)$(m4datadir)/$$f"; \ - done + @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(m4datadir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(m4datadir)" && rm -f $$files install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" - @list='$(pkgconfig_DATA)'; for p in $$list; do \ + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -1155,7 +1238,7 @@ $(RECURSIVE_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ @@ -1189,16 +1272,16 @@ $(RECURSIVE_CLEAN_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -1206,14 +1289,14 @@ ID: $(HEADERS) $(SOURCES) $(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; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -1225,7 +1308,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ @@ -1234,36 +1317,54 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) + @list='$(MANS)'; if test -n "$$list"; then \ + list=`for p in $$list; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ + if test -n "$$list" && \ + grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ + echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ + grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ + echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ + echo " typically \`make maintainer-clean' will remove them" >&2; \ + exit 1; \ + else :; fi; \ + else :; fi $(am__remove_distdir) - test -d $(distdir) || mkdir $(distdir) + test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -1279,29 +1380,44 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ @@ -1309,11 +1425,12 @@ distdir: $(DISTFILES) $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) + || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) @@ -1326,6 +1443,10 @@ dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) @@ -1354,6 +1475,8 @@ distcheck: dist bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ @@ -1365,9 +1488,11 @@ distcheck: dist mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ @@ -1389,13 +1514,15 @@ distcheck: dist && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @cd $(distuninstallcheck_dir) \ + @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ @@ -1444,6 +1571,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -1467,6 +1595,8 @@ dvi-am: html: html-recursive +html-am: + info: info-recursive info-am: @@ -1476,19 +1606,29 @@ install-data-am: install-data-local install-m4dataDATA install-man \ install-dvi: install-dvi-recursive +install-dvi-am: + install-exec-am: install-binPROGRAMS install-binSCRIPTS \ install-confexecDATA install-libLTLIBRARIES install-html: install-html-recursive +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: install-man1 install-man3 install-pdf: install-pdf-recursive +install-pdf-am: + install-ps: install-ps-recursive +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -1518,16 +1658,16 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-man: uninstall-man1 uninstall-man3 -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ + ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-binPROGRAMS \ clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstLTLIBRARIES clean-noinstPROGRAMS ctags \ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \ - dist-lzma dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-compile distclean-generic distclean-hdr \ + dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \ + distclean distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-binSCRIPTS \ @@ -2311,7 +2451,7 @@ VTimingtests: xmllint$(EXEEXT) C14Ntests : testC14N$(EXEEXT) @echo "## C14N and XPath regression tests" - -@(for m in with-comments without-comments exc-without-comments ; do \ + -@(for m in with-comments without-comments 1-1-without-comments exc-without-comments ; do \ for i in $(srcdir)/test/c14n/$$m/*.xml ; do \ if [ ! -d $$i ] ; then \ name=`basename $$i .xml`; \ @@ -2432,7 +2572,7 @@ Relaxtests: xmllint$(EXEEXT) > res.$$name 2> err.$$name;\ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ diff $(srcdir)/result/relaxng/"$$name"_"$$xno" res.$$name;\ - if [ "$$name" != "tutor10_1" -a "$$name" != "tutor10_2" -a "$$name" != "tutor3_2" -a "$$name" != "307377" ] ; then \ + if [ "$$name" != "tutor10_1" -a "$$name" != "tutor10_2" -a "$$name" != "tutor3_2" -a "$$name" != "307377" -a "$$name" != "tutor8_2" ] ; then \ diff $(srcdir)/result/relaxng/"$$name"_"$$xno".err \ err.$$name | grep -v "error detected at";\ fi ; grep Unimplemented err.$$name`; \ @@ -2529,7 +2669,7 @@ cleanup: dist-hook: cleanup libxml2.spec -cp libxml2.spec $(distdir) - (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn win32 macos vms bakefile test result) | (cd $(distdir); tar xf -) + (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn win32 macos vms VxWorks bakefile test result) | (cd $(distdir); tar xf -) dist-source: distdir $(AMTAR) -chof - --exclude Tests --exclude test --exclude result $(distdir) | GZIP=$(GZIP_ENV) gzip -c >`echo "$(distdir)" | sed "s+libxml2+libxml2-sources+"`.tar.gz @@ -2564,12 +2704,12 @@ install-data-local: -@INSTALL@ -m 0644 $(srcdir)/testXPath.c $(DESTDIR)$(EXAMPLES_DIR) uninstall-local: - rm $(DESTDIR)$(EXAMPLES_DIR)/testXPath.c - rm $(DESTDIR)$(EXAMPLES_DIR)/testHTML.c - rm $(DESTDIR)$(EXAMPLES_DIR)/testSAX.c - rm $(DESTDIR)$(EXAMPLES_DIR)/xmllint.c + rm -f $(DESTDIR)$(EXAMPLES_DIR)/testXPath.c + rm -f $(DESTDIR)$(EXAMPLES_DIR)/testHTML.c + rm -f $(DESTDIR)$(EXAMPLES_DIR)/testSAX.c + rm -f $(DESTDIR)$(EXAMPLES_DIR)/xmllint.c rm -rf $(DESTDIR)$(EXAMPLES_DIR) - rm $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)/Copyright + rm -f $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)/Copyright rm -rf $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) tst: tst.c @@ -2594,6 +2734,7 @@ cov: clean-cov clean-cov: rm -rf $(top_builddir)/coverage + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/README b/README index e1bbb8d..f1817aa 100644 --- a/README +++ b/README @@ -36,4 +36,4 @@ required and justified. Daniel Veillard -$Id: README,v 1.13 2005/07/10 21:38:25 veillard Exp $ +$Id$ diff --git a/SAX2.c b/SAX2.c index 164409c..1ed148f 100644 --- a/SAX2.c +++ b/SAX2.c @@ -1246,30 +1246,32 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname, } if (ns != NULL) { - xmlAttrPtr prop; namespace = xmlSearchNs(ctxt->myDoc, ctxt->node, ns); + if (namespace == NULL) { xmlNsErrMsg(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE, "Namespace prefix %s of attribute %s is not defined\n", ns, name); - } - - prop = ctxt->node->properties; - while (prop != NULL) { - if (prop->ns != NULL) { - if ((xmlStrEqual(name, prop->name)) && - ((namespace == prop->ns) || - (xmlStrEqual(namespace->href, prop->ns->href)))) { - xmlNsErrMsg(ctxt, XML_ERR_ATTRIBUTE_REDEFINED, - "Attribute %s in %s redefined\n", - name, namespace->href); - ctxt->wellFormed = 0; - if (ctxt->recovery == 0) ctxt->disableSAX = 1; - goto error; - } - } - prop = prop->next; - } + } else { + xmlAttrPtr prop; + + prop = ctxt->node->properties; + while (prop != NULL) { + if (prop->ns != NULL) { + if ((xmlStrEqual(name, prop->name)) && + ((namespace == prop->ns) || + (xmlStrEqual(namespace->href, prop->ns->href)))) { + xmlNsErrMsg(ctxt, XML_ERR_ATTRIBUTE_REDEFINED, + "Attribute %s in %s redefined\n", + name, namespace->href); + ctxt->wellFormed = 0; + if (ctxt->recovery == 0) ctxt->disableSAX = 1; + goto error; + } + } + prop = prop->next; + } + } } else { namespace = NULL; } @@ -1420,6 +1422,10 @@ process_external_subset: } else { fulln = xmlStrdup(attr->name); } + if (fulln == NULL) { + xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement"); + break; + } /* * Check that the attribute is not declared in the @@ -1442,6 +1448,7 @@ process_external_subset: (const char *)fulln, (const char *)attr->elem); } + xmlFree(fulln); } attr = attr->nexth; } @@ -2278,9 +2285,14 @@ xmlSAX2StartElementNs(void *ctx, xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs"); return; } - xmlNsWarnMsg(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE, - "Namespace prefix %s was not found\n", - prefix, NULL); + if (prefix != NULL) + xmlNsWarnMsg(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE, + "Namespace prefix %s was not found\n", + prefix, NULL); + else + xmlNsWarnMsg(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE, + "Namespace default prefix was not found\n", + NULL, NULL); } } @@ -2554,7 +2566,6 @@ xmlSAX2ProcessingInstruction(void *ctx, const xmlChar *target, ret = xmlNewDocPI(ctxt->myDoc, target, data); if (ret == NULL) return; - parent = ctxt->node; if (ctxt->linenumbers) { if (ctxt->input != NULL) { diff --git a/TODO b/TODO index bde7c53..9c32224 100644 --- a/TODO +++ b/TODO @@ -5,7 +5,7 @@ TODO for the XML parser and stuff: ================================== - $Id: TODO,v 1.44 2005/01/07 13:56:19 veillard Exp $ + $Id$ this tend to be outdated :-\ ... diff --git a/VxWorks/Makefile b/VxWorks/Makefile new file mode 100644 index 0000000..a1f6902 --- /dev/null +++ b/VxWorks/Makefile @@ -0,0 +1,68 @@ +##---------------------------------------------------------------- +## +##-- Filename: Makefile +## +##-- $Date: 2008/02/23 02:56:17 $ +##-- $Revision: 1.2 $ +##-- $Name: $ +## +##---------------------------------------------------------------- + +NAME = xml2 +TOOL_FAMILY=gnu + +include $(WIND_USR)/tool/gnu/make.$(VXCPU) + +FLAGS = -Wall -g -Isrc -Isrc/include -D_REENTRANT=1 +#FLAGS = -Wall -O2 -Isrc -Isrc/include -D_REENTRANT=1 + +FLAGS += $(DEFINE_CC) $(CC_ARCH_SPEC) -MD -MP -D_VX_CPU=_VX_$(CPU) -D_VX_TOOL_FAMILY=gnu -D_VX_TOOL=$(TOOL) +ifeq ($(VXTYPE),RTP) +FLAGS += -mrtp -fpic -I$(WIND_USR)/h -I$(WIND_USR)/h/wrn/coreip +else +FLAGS += -D_WRS_KERNEL -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip +endif + +ifeq ($(VXTYPE),RTP) +ifeq ($(CPU),SH32) +LIB_LDFLAGS += -L$(WIND_USR)/lib/sh/SH32/commonle/PIC +else +LIB_LDFLAGS += $(LD_LINK_PATH_ATEND) $(LD_PARTIAL_LAST_FLAGS) +endif +endif + +OBJS = c14n.o catalog.o chvalid.o \ + debugXML.o dict.o DOCBparser.o \ + encoding.o entities.o error.o \ + globals.o \ + hash.o \ + legacy.o list.o \ + parser.o parserInternals.o pattern.o \ + relaxng.o \ + SAX2.o SAX.o schematron.o \ + threads.o tree.o \ + uri.o \ + valid.o \ + xinclude.o xlink.o xmlcatalog.o xmlIO.o \ + xmlmemory.o xmlmodule.o xmlreader.o xmlregexp.o \ + xmlsave.o xmlschemas.o xmlschemastypes.o xmlstring.o \ + xmlunicode.o xmlwriter.o xpath.o xpointer.o + +all : lib$(NAME).so + +init : + mkdir -p objs + +.PHONY : lib$(NAME).so + +lib$(NAME).so : init $(patsubst %.o, objs/%.o, $(OBJS)) + $(CC) $(FLAGS) $(LIB_LDFLAGS) -shared -o $@ $(patsubst %.o, objs/%.o, $(OBJS)) + +(NAME).out : init $(patsubst %.o, objs/%.o, $(OBJS)) + $(CC) $(FLAGS) -o $@ $(patsubst %.o, objs/%.o, $(OBJS)) + +objs/%.o: src/%.c + $(CC) $(FLAGS) -o $@ -c $< + +clean: + rm -fR *.so objs diff --git a/VxWorks/README b/VxWorks/README new file mode 100644 index 0000000..b756677 --- /dev/null +++ b/VxWorks/README @@ -0,0 +1,86 @@ + libxml2 on VxWorks 6.4+ + +Here are my instructions for building on VxWorks.... I am very ashamed of +how I did this because it is a complete hack, but it works great, so I +can't complain too much. + +General Information + +1. The only way to build for VxWorks is to cross compile from a windows or +linux system. We use a RedHat 5.1 workstation system as our build +environment. + +2. VxWorks 6.X has two main types of executable, DKMs (dynamic kernel +modules), and RTPs (real-time processes). Kernel modules are the bread +and butter of VxWorks, but they look nothing like processes/threads in +normal UNIX/Windows systems. RTPs are more like processes that have +memory protection, threads, etc. VxWorks 6.X also introduces some level +of POSIX conformance to their environment. The POSIX conformance was the +key for us to be able to port libxml2. We support accessing libxml2 from +both DKMs and RTPs. + +3. There are 2 compilers for VxWorks, the WindRiver compiler, and a port +of the GNU toolchain, we have only tested and built with the GNU +toolchain. + +How To Build + +1. Run the configure on your native linux system (this is the cheesy +hack). Since the VxWorks GNU toolchain is very close in version to the +one in red hat, it generates a good config.h file. We configured libxml2 +with the following to keep the size down, (but we have done basic testing +with everything compiled in). + +./configure --with-minimum --with-reader --with-writer --with-regexps +--with-threads --with-thread-alloc + +2. Rename the libxml2 folder to "src". This step is required for our +replacement makefile to work. + +3. Run the replacement makefile. I wrote a new makefile that sets all the +proper vxworks defines and uses the correct compilers. The two defines on +the make command line are to tell it which VxWorks Target (SH3.2 little +endian), and the executable type. We have tested this code on PENTIUM2gnu +and SH32gnule. + +This makefile creates a shared library that runs on VxWorks: (libxml2.so) +make -f Makefile.vxworks clean all VXCPU=SH32gnule VXTYPE=RTP + +This makefile creates a kernel module that runs on VxWorks: (xml2.out) +make -f Makefile.vxworks clean all VXCPU=SH32gnule VXTYPE=DKM + +Important Notes + +1. There are several ways that this process could be improved, but at the +end of the day, we make products, not port libraries, so we did a meets +minimum for our needs. + +2. VxWorks is the devil, give me embedded linux every day. + +3. No matter what I tried, I couldn't get the configure to pick up the +VxWorks toolchain, and in my investigation, it has something to do with +automake/autoconf, not any individual package. VxWorks doesn't play by +the normal rules for building toolchains. + +4. The PIC flag in VxWorks (especially for SH processors) is very +important, and very troublesome. On linux, you can liberally use the PIC +flag when compiling and the compiler/linker will ignore it as needed, on +VxWorks if must always be on for shared libraries, and always be off for +static libraries and executables. + +5. If anyone wants to work on a better way to do the build of libxml2 for +VxWorks, I'm happy to help as much as I can, but I'm not looking to +support it myself. + +Attached Files + +1. To use my Makefile for vxworks, you should enter the vxworks +environment (/opt/windriver/wrenv.linux -p vxworks-6.4 for me). +2. Run: build.sh libxml2-2.6.32 SH32gnule RTP (where you have +libxml2-2.6.32.tar.gz and the Makefile in the same directory as the script +file). + +Thanks, + +Jim Wert Jr. +JWert@ILSTechnology.com diff --git a/VxWorks/build.sh b/VxWorks/build.sh new file mode 100644 index 0000000..c195062 --- /dev/null +++ b/VxWorks/build.sh @@ -0,0 +1,85 @@ +LIBXML2=$1 +TARGETCPU=$2 +TARGETTYPE=$3 + +if [ -z "$2" ]; then + TARGETCPU=SIMPENTIUMgnu +fi + +if [ -z "$3" ]; then + TARGETTYPE=RTP +fi + +echo "LIBXML2 Version: ${LIBXML2}" +echo "LIBXML2 Target CPU: ${TARGETCPU}" +echo "LIBXML2 Target Type: ${TARGETTYPE}" + +rm -fR src +tar xvzf ${LIBXML2}.tar.gz +mv ${LIBXML2} src +cd src + +./configure --with-minimum --with-reader --with-writer --with-regexps --with-threads --with-thread-alloc + +find . -name '*.in' -exec rm -fR {} + +find . -name '*.am' -exec rm -fR {} + +rm -fR *.m4 +rm -fR *.pc +rm -fR *.pl +rm -fR *.py +rm -fR *.spec +rm -fR .deps +rm -fR AUTHORS +rm -fR bakefile +rm -fR ChangeLog +rm -fR config.guess +rm -fR config.log +rm -fR config.status +rm -fR config.stub +rm -fR config.sub +rm -fR configure +rm -fR COPYING +rm -fR Copyright +rm -fR depcomp +rm -fR doc +rm -fR example +rm -fR INSTALL +rm -fR install-sh +rm -fR libxml.3 +rm -fR ltmain.sh +rm -fR Makefile +rm -fR Makefile.tests +rm -fR macos +rm -fR mkinstalldirs +rm -fR missing +rm -fR nanoftp.c +rm -fR nanohttp.c +rm -fR NEWS +rm -fR python +rm -fR README +rm -fR README.tests +rm -fR regressions.xml +rm -fR result +rm -fR runsuite.c +rm -fR runtest.c +rm -fR test +rm -fR test*.c +rm -fR TODO* +rm -fR trio* +rm -fR vms +rm -fR win32 +rm -fR xml2* +rm -fR xmllint.c +rm -fR xstc + +cd .. + +make clean all VXCPU=${TARGETCPU} VXTYPE=${TARGETTYPE} + +if [ "${TARGETTYPE}" = "RTP" ]; then + cp libxml2.so ../../lib/. +else + cp xml2.out ../../bin/. +fi + +cp -R src/include/libxml ../../include/. \ No newline at end of file diff --git a/aclocal.m4 b/aclocal.m4 index 190c670..d5db020 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.10.1 -*- Autoconf -*- +# generated automatically by aclocal 1.11 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,109 +13,194 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(AC_AUTOCONF_VERSION, [2.61],, -[m4_warning([this file was generated for autoconf 2.61. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, +[m4_warning([this file was generated for autoconf 2.63. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) -# serial 51 AC_PROG_LIBTOOL +# serial 56 LT_INIT -# 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])])]) +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) -# 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 +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" +LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl -# Prevent multiple expansion -define([AC_PROG_LIBTOOL], []) -])# _AC_PROG_LIBTOOL +_LT_SETUP +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT -# 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 +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl -AC_REQUIRE([AC_PROG_NM])dnl - +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +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 +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi -AC_LIBTOOL_SYS_MAX_CMD_LEN -AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -AC_LIBTOOL_OBJDIR +_LT_CHECK_OBJDIR -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -_LT_AC_PROG_ECHO_BACKSLASH +m4_require([_LT_TAG_COMPILER])dnl +_LT_PROG_ECHO_BACKSLASH case $host_os in aix3*) @@ -131,114 +216,653 @@ esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. -Xsed='sed -e 1s/^X//' -[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. -[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] +double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' -# Constants: -rm="rm -f" - # Global variables: -default_ofile=libtool +ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" -AC_CHECK_TOOL(AR, ar, false) -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(STRIP, strip, :) +with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - AC_PATH_MAGIC + _LT_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) +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP -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 +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN -# Use C for the default configuration in the libtool script -tagname= -AC_LIBTOOL_LANG_C_CONFIG -_LT_AC_TAGCONFIG -])# AC_LIBTOOL_SETUP -# _LT_AC_SYS_COMPILER +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS # ------------------- -AC_DEFUN([_LT_AC_SYS_COMPILER], +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\[$]0 --fallback-echo"')dnl " + lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` + ;; +esac + +_LT_OUTPUT_LIBTOOL_INIT +]) + + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +cat >"$CONFIG_LT" <<_LTEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate a libtool stub with the current configuration. + +lt_cl_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AS_SHELL_SANITIZE +_AS_PREPARE + +exec AS_MESSAGE_FD>&1 +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +if test "$no_create" != yes; then + lt_cl_success=: + test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" + exec AS_MESSAGE_LOG_FD>/dev/null + $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false + exec AS_MESSAGE_LOG_FD>>config.log + $lt_cl_success || AS_EXIT(1) +fi +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_XSI_SHELLFNS + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} @@ -247,36 +871,20 @@ LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC -])# _LT_AC_SYS_COMPILER - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -AC_DEFUN([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) +])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. -AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_SED])dnl +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* +$RM conftest* ])# _LT_COMPILER_BOILERPLATE @@ -284,26 +892,150 @@ $rm conftest* # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. -AC_DEFUN([_LT_LINKER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_SED])dnl +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` -$rm conftest* +$RM -r conftest* ])# _LT_LINKER_BOILERPLATE - -# _LT_AC_SYS_LIBPATH_AIX -# ---------------------- +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES +# -------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX +# ----------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. -AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_REQUIRE([LT_AC_PROG_SED])dnl +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -318,45 +1050,45 @@ if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_AC_SYS_LIBPATH_AIX +])# _LT_SYS_MODULE_PATH_AIX -# _LT_AC_SHELL_INIT(ARG) -# ---------------------- -AC_DEFUN([_LT_AC_SHELL_INIT], +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_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_SHELL_INIT -# _LT_AC_PROG_ECHO_BACKSLASH -# -------------------------- +# _LT_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([ +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[_LT_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} -case X$ECHO in +case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac -echo=${ECHO-echo} +ECHO=${lt_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! +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! : else # Restart under the correct shell. @@ -366,9 +1098,9 @@ 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 -z "$lt_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 && + { 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. + 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 + 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 -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" + 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 - # maybe with a smaller string... - prev=: + # 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 + 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 + 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 -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" +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi -AC_SUBST(ECHO) -])])# _LT_AC_PROG_ECHO_BACKSLASH +AC_SUBST(lt_ECHO) +]) +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], + [An echo program that does not interpret backslashes]) +])# _LT_PROG_ECHO_BACKSLASH -# _LT_AC_LOCK -# ----------- -AC_DEFUN([_LT_AC_LOCK], +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good @@ -504,12 +1239,12 @@ ia64-*-hpux*) 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" - ;; + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; esac fi rm -rf conftest* @@ -518,80 +1253,79 @@ ia64-*-hpux*) # 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 + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|sparc*-*linux*) +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - libsuff=64 - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; esac fi rm -rf conftest* @@ -603,7 +1337,7 @@ s390*-*linux*|sparc*-*linux*) 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_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf @@ -618,37 +1352,74 @@ sparc*-*solaris*) *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; esac ;; esac fi rm -rf conftest* ;; - -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw* | *-*-pw32*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; - ]) esac need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[AC_CHECK_TOOL(AR, ar, false) +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1]) + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= -])# _LT_AC_LOCK +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +])# _LT_CMD_OLD_ARCHIVE -# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# _LT_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_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no - ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or @@ -668,29 +1439,35 @@ AC_CACHE_CHECK([$1], [$2], if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi - $rm conftest* + $RM conftest* ]) if test x"[$]$2" = xyes; then - ifelse([$5], , :, [$5]) + m4_if([$5], , :, [$5]) else - ifelse([$6], , :, [$6]) + m4_if([$6], , :, [$6]) fi -])# AC_LIBTOOL_COMPILER_OPTION +])# _LT_COMPILER_OPTION +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) -# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ------------------------------------------------------------ -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED])dnl + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" @@ -702,7 +1479,7 @@ AC_CACHE_CHECK([$1], [$2], if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes @@ -711,22 +1488,28 @@ AC_CACHE_CHECK([$1], [$2], $2=yes fi fi - $rm conftest* + $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then - ifelse([$4], , :, [$4]) + m4_if([$4], , :, [$4]) else - ifelse([$5], , :, [$5]) + m4_if([$5], , :, [$5]) fi -])# AC_LIBTOOL_LINKER_OPTION +])# _LT_LINKER_OPTION +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) -# AC_LIBTOOL_SYS_MAX_CMD_LEN -# -------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], -[# find the maximum length of command line arguments + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 @@ -748,7 +1531,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=-1; ;; - cygwin* | mingw*) + cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, @@ -803,7 +1586,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -814,20 +1597,28 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - 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 && + # 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$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; @@ -838,27 +1629,35 @@ if test -n $lt_cv_sys_max_cmd_len ; then else AC_MSG_RESULT(none) fi -])# AC_LIBTOOL_SYS_MAX_CMD_LEN +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) -# _LT_AC_CHECK_DLFCN -# ------------------ -AC_DEFUN([_LT_AC_CHECK_DLFCN], -[AC_CHECK_HEADERS(dlfcn.h)dnl -])# _LT_AC_CHECK_DLFCN + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_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 +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown - cat > conftest.$ac_ext < conftest.$ac_ext <<_LT_EOF [#line __oline__ "configure" #include "confdefs.h" @@ -900,10 +1699,6 @@ else # endif #endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif - void fnord() { int i=42;} int main () { @@ -919,9 +1714,9 @@ int main () else puts (dlerror ()); - exit (status); + return status; }] -EOF +_LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? @@ -936,13 +1731,13 @@ EOF fi fi rm -fr conftest* -])# _LT_AC_TRY_DLOPEN_SELF +])# _LT_TRY_DLOPEN_SELF -# AC_LIBTOOL_DLOPEN_SELF -# ---------------------- -AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown @@ -958,15 +1753,15 @@ else lt_cv_dlopen_self=yes ;; - mingw* | pw32*) + mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= - ;; + ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= - ;; + ;; darwin*) # if libdl is installed we need to link against it @@ -976,13 +1771,13 @@ else 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"], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], @@ -990,7 +1785,7 @@ else [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"]) + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) @@ -1018,7 +1813,7 @@ else AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl - _LT_AC_TRY_DLOPEN_SELF( + _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) @@ -1026,8 +1821,8 @@ else if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) @@ -1049,19 +1844,32 @@ else *) enable_dlopen_self_static=unknown ;; esac fi -])# AC_LIBTOOL_DLOPEN_SELF +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) -# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) -# --------------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler -AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_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 + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out @@ -1085,37 +1893,41 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD - $rm conftest* + $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 + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out cd .. - rmdir conftest - $rm conftest* + $RM -r conftest + $RM conftest* ]) -])# AC_LIBTOOL_PROG_CC_C_O +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O -# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) -# ----------------------------------------- +# _LT_COMPILER_FILE_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 +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) hard_links="nottested" -if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes - $rm conftest* + $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 @@ -1128,12 +1940,13 @@ if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" else need_locks=no fi -])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS -# AC_LIBTOOL_OBJDIR -# ----------------- -AC_DEFUN([AC_LIBTOOL_OBJDIR], +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null @@ -1145,40 +1958,46 @@ else fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir -])# AC_LIBTOOL_OBJDIR +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR -# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) -# ---------------------------------------------- +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- # Check hardcoding attributes. -AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +m4_defun([_LT_LINKER_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 +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - # We can hardcode non-existant directories. - if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. - _LT_AC_TAGVAR(hardcode_action, $1)=relink + _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_AC_TAGVAR(hardcode_action, $1)=immediate + _LT_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 + _LT_TAGVAR(hardcode_action, $1)=unsupported fi -AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) -if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || @@ -1186,73 +2005,70 @@ elif test "$shlibpath_overrides_runpath" = yes || # Fast installation is not necessary enable_fast_install=needless fi -])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH -# AC_LIBTOOL_SYS_LIB_STRIP -# ------------------------ -AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], -[striplib= +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) -fi - ;; - *) - AC_MSG_RESULT([no]) + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) ;; esac fi -])# AC_LIBTOOL_SYS_LIB_STRIP +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB -# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics -AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([LT_AC_PROG_SED])dnl +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -m4_if($1,[],[ +m4_if([$1], + [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. @@ -1266,7 +2082,7 @@ if test "$GCC" = yes; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done - lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; @@ -1286,10 +2102,23 @@ BEGIN {RS=" "; FS="/|\n";} { if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` - sys_lib_search_path_spec=`echo $lt_search_path_spec` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no @@ -1307,7 +2136,7 @@ aix3*) soname_spec='${libname}${release}${shared_ext}$major' ;; -aix4* | aix5*) +aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no @@ -1326,7 +2155,7 @@ aix4* | aix5*) 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 + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no @@ -1352,9 +2181,18 @@ aix4* | aix5*) ;; 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' + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$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' + ;; + esac ;; beos*) @@ -1377,25 +2215,28 @@ bsdi[[45]]*) # libtool to hard-code these into programs ;; -cygwin* | mingw* | pw32*) +cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 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'\''`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ - $rm \$dlpath' + $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in @@ -1404,20 +2245,20 @@ cygwin* | mingw* | pw32*) 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* | cegcc*) # 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 + 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'` + 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"` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) @@ -1441,13 +2282,13 @@ darwin* | rhapsody*) 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' + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -1540,18 +2381,18 @@ hpux9* | hpux10* | hpux11*) 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 - ;; - *) + 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 @@ -1628,16 +2469,28 @@ linux* | k*bsd*-gnu) finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi @@ -1654,7 +2507,7 @@ netbsd*) version_type=sunos need_lib_prefix=no need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + 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' @@ -1675,14 +2528,16 @@ newsos6) shlibpath_overrides_runpath=yes ;; -nto-qnx*) - version_type=linux +*nto* | *qnx*) + version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' ;; openbsd*) @@ -1691,13 +2546,13 @@ openbsd*) need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + 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 @@ -1769,7 +2624,6 @@ sysv4 | sysv4.3*) sni) shlibpath_overrides_runpath=no need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) @@ -1800,13 +2654,12 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" @@ -1816,9 +2669,20 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) sys_lib_dlsearch_path_spec='/usr/lib' ;; -uts4*) +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + 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 ;; @@ -1834,277 +2698,54 @@ variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -])# AC_LIBTOOL_SYS_DYNAMIC_LINKER - - -# _LT_AC_TAGCONFIG -# ---------------- -AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_ARG_WITH([tags], - [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], - [include additional configurations @<:@automatic@:>@])], - [tagnames="$withval"]) - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - AC_MSG_WARN([output file `$ofile' does not exist]) - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) - else - AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in - "") ;; - *) AC_MSG_ERROR([invalid tag name: $tagname]) - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - AC_MSG_ERROR([tag name \"$tagname\" already exists]) - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - CXX) - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_LIBTOOL_LANG_CXX_CONFIG - else - tagname="" - fi - ;; - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - AC_LIBTOOL_LANG_F77_CONFIG - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - AC_LIBTOOL_LANG_GCJ_CONFIG - else - tagname="" - fi - ;; - - RC) - AC_LIBTOOL_LANG_RC_CONFIG - ;; - - *) - AC_MSG_ERROR([Unsupported tag name: $tagname]) - ;; - esac - - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - AC_MSG_ERROR([unable to update list of available tagged configurations.]) - fi +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi -])# _LT_AC_TAGCONFIG - - -# AC_LIBTOOL_DLOPEN -# ----------------- -# enable checks for dlopen support -AC_DEFUN([AC_LIBTOOL_DLOPEN], - [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_DLOPEN - - -# AC_LIBTOOL_WIN32_DLL -# -------------------- -# declare package support for building win32 DLLs -AC_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_WIN32_DLL - - -# AC_ENABLE_SHARED([DEFAULT]) -# --------------------------- -# implement the --enable-shared flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_SHARED], -[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([shared], - [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]AC_ENABLE_SHARED_DEFAULT) -])# AC_ENABLE_SHARED - - -# AC_DISABLE_SHARED -# ----------------- -# set the default shared flag to --disable-shared -AC_DEFUN([AC_DISABLE_SHARED], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no) -])# AC_DISABLE_SHARED - - -# AC_ENABLE_STATIC([DEFAULT]) -# --------------------------- -# implement the --enable-static flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_STATIC], -[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([static], - [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]AC_ENABLE_STATIC_DEFAULT) -])# AC_ENABLE_STATIC - - -# AC_DISABLE_STATIC -# ----------------- -# set the default static flag to --disable-static -AC_DEFUN([AC_DISABLE_STATIC], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no) -])# AC_DISABLE_STATIC - - -# AC_ENABLE_FAST_INSTALL([DEFAULT]) -# --------------------------------- -# implement the --enable-fast-install flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_FAST_INSTALL], -[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([fast-install], - [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) -])# AC_ENABLE_FAST_INSTALL - - -# AC_DISABLE_FAST_INSTALL -# ----------------------- -# set the default to --disable-fast-install -AC_DEFUN([AC_DISABLE_FAST_INSTALL], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no) -])# AC_DISABLE_FAST_INSTALL - -# AC_LIBTOOL_PICMODE([MODE]) +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- -# implement the --with-pic flag -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -AC_DEFUN([AC_LIBTOOL_PICMODE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -pic_mode=ifelse($#,1,$1,default) -])# AC_LIBTOOL_PICMODE - - -# AC_PROG_EGREP -# ------------- -# This is predefined starting with Autoconf 2.54, so this conditional -# definition can be removed once we require Autoconf 2.54 or later. -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], -[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], - [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi]) - EGREP=$ac_cv_prog_egrep - AC_SUBST([EGREP]) -])]) - - -# AC_PATH_TOOL_PREFIX -# ------------------- # find a file program which can recognize shared library -AC_DEFUN([AC_PATH_TOOL_PREFIX], -[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in @@ -2117,7 +2758,7 @@ AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 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])" + ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. @@ -2132,7 +2773,7 @@ dnl not every word. This closes a longstanding sh security hole. $EGREP "$file_magic_regex" > /dev/null; then : else - cat <&2 + cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. @@ -2143,7 +2784,7 @@ dnl not every word. This closes a longstanding sh security hole. *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org -EOF +_LT_EOF fi ;; esac fi @@ -2160,37 +2801,47 @@ if test -n "$MAGIC_CMD"; then else AC_MSG_RESULT(no) fi -])# AC_PATH_TOOL_PREFIX +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) -# AC_PATH_MAGIC -# ------------- + +# _LT_PATH_MAGIC +# -------------- # find a file program which can recognize a shared library -AC_DEFUN([AC_PATH_MAGIC], -[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi -])# AC_PATH_MAGIC +])# _LT_PATH_MAGIC -# AC_PROG_LD +# LT_PATH_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_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. @@ -2207,9 +2858,9 @@ if test "$GCC" = yes; then [[\\/]]* | ?:[[\\/]]*) 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%/%"` + 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" ;; @@ -2259,15 +2910,24 @@ else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_PROG_LD_GNU -])# AC_PROG_LD +_LT_PATH_LD_GNU +AC_SUBST([LD]) +_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) +])# LT_PATH_LD -# AC_PROG_LD_GNU -# -------------- -AC_DEFUN([AC_PROG_LD_GNU], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, +# Old names: +AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) +AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_LD], []) +dnl AC_DEFUN([AC_PROG_LD], []) + + +# _LT_PATH_LD_GNU +#- -------------- +m4_defun([_LT_PATH_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &1 /dev/null; then + 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. @@ -2425,7 +3095,7 @@ linux* | k*bsd*-gnu) ;; netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + 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)$' @@ -2438,12 +3108,12 @@ newos6*) lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; -nto-qnx*) - lt_cv_deplibs_check_method=unknown +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all ;; openbsd*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + 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)$' @@ -2462,6 +3132,10 @@ solaris*) lt_cv_deplibs_check_method=pass_all ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + sysv4 | sysv4.3*) case $host_vendor in motorola) @@ -2489,7 +3163,7 @@ sysv4 | sysv4.3*) esac ;; -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) +tpf*) lt_cv_deplibs_check_method=pass_all ;; esac @@ -2497,14 +3171,20 @@ 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 +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method == "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD -# AC_PROG_NM + +# LT_PATH_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, +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" @@ -2546,16 +3226,51 @@ else done IFS="$lt_save_ifs" done - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm + : ${lt_cv_path_NM=no} fi]) -NM="$lt_cv_path_NM" -])# AC_PROG_NM +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) -# AC_CHECK_LIBM -# ------------- + +# LT_LIB_M +# -------- # check for math library -AC_DEFUN([AC_CHECK_LIBM], +AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in @@ -2570,4024 +3285,4690 @@ case $host in AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac -])# AC_CHECK_LIBM - +AC_SUBST([LIBM]) +])# LT_LIB_M -# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl convenience library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-convenience to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# it is assumed to be `libltdl'. LIBLTDL will be prefixed with -# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' -# (note the single quotes!). If your package is not flat and you're not -# using automake, define top_builddir and top_srcdir appropriately in -# the Makefiles. -AC_DEFUN([AC_LIBLTDL_CONVENIENCE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case $enable_ltdl_convenience in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_CONVENIENCE - - -# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl installable library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-install to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# and an installed libltdl is not found, it is assumed to be `libltdl'. -# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and top_srcdir -# appropriately in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN([AC_LIBLTDL_INSTALLABLE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, lt_dlinit, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - LTDLINCL= - fi - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_INSTALLABLE +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) -# AC_LIBTOOL_CXX -# -------------- -# enable support for C++ libraries -AC_DEFUN([AC_LIBTOOL_CXX], -[AC_REQUIRE([_LT_AC_LANG_CXX]) -])# AC_LIBTOOL_CXX +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -# _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 +if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' -# _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 + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi -])# _LT_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 +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI -# 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;" +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' +# 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?!! ;)] -_LT_AC_SYS_COMPILER +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF - -# Report which library types will actually be built -AC_MSG_CHECKING([if libtool supports shared libraries]) -AC_MSG_RESULT([$can_build_shared]) - -AC_MSG_CHECKING([whether to build shared libraries]) -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. +# Define system-specific variables. 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' +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' fi ;; - -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; esac -AC_MSG_RESULT([$enable_shared]) -AC_MSG_CHECKING([whether to build static libraries]) -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -AC_MSG_RESULT([$enable_static]) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_C_CONFIG - - -# AC_LIBTOOL_LANG_CXX_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) -AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], -[AC_LANG_PUSH(C++) -AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac -# 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)= +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" -# Source file extension for C++ test sources. -ac_ext=cpp +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" -# Object file extension for compiled C++ test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext +# 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 -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE + # Check to see that the pipe works correctly. + pipe_works=no -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_LD=$LD -lt_save_GCC=$GCC -GCC=$GXX -lt_save_with_gnu_ld=$with_gnu_ld -lt_save_path_LD=$lt_cv_path_LD -if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx -else - $as_unset lt_cv_prog_gnu_ld -fi -if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX -else - $as_unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF -# 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 AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi -if test "$GXX" = yes; then - # Set up default GNU C++ configuration + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif - AC_PROG_LD +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - # 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' + cat <<_LT_EOF >> conftest.$ac_ext - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; - # 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}' +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif - # 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' +#ifdef __cplusplus +} +#endif +_LT_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_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 - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 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' + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 fi + rm -rf conftest* conftst* - # 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"' - + # 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 - GXX=no - with_gnu_ld=no - wlarc= + AC_MSG_RESULT(ok) 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 +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +]) # _LT_CMD_GLOBAL_SYMBOLS - # 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 +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi +AC_MSG_CHECKING([for $compiler option to produce PIC]) +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else + case $host_os in + aix*) + # All AIX code is PIC. if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - freebsd-elf*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - ;; - gnu*) - ;; - hpux9*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + amigaos*) case $host_cpu in - hppa*64*|ia64*) ;; - *) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac - # 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 + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + hppa*64*|ia64*) + # +Z the default ;; *) - _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' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac - fi - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - interix[[3-9]]*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc*) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; + ;; + *) + ;; esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; - pgCC*) - # Portland Group C++ compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; esac ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - m88k*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - osf3*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC*) + # IBM XL 8.0 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + lynxos*) ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi + m88k*) ;; - 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' + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no + netbsd*) ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ - $rm $lib.exp' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi + psos*) ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + vxworks*) ;; *) - # 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' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - # 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' + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; - # 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 + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default ;; *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; esac - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default ;; *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac ;; - 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" + esac + ;; -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) + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; -AC_LIBTOOL_CONFIG($1) + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; -AC_LANG_POP -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -with_gnu_ld=$lt_save_with_gnu_ld -lt_cv_path_LDCXX=$lt_cv_path_LD -lt_cv_path_LD=$lt_save_path_LD -lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld -lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -])# AC_LIBTOOL_LANG_CXX_CONFIG - -# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) -# ------------------------------------ -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - # - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - if test "$solaris_use_stlport4" != yes; then - _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_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_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 ;; - esac + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; + cygwin* | mingw* | cegcc*) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no fi ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; esac - ;; -esac -]) -case " $_LT_AC_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac -])# AC_LIBTOOL_POSTDEP_PREDEP + _LT_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}' -# AC_LIBTOOL_LANG_F77_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) -AC_DEFUN([_LT_AC_LANG_F77_CONFIG], -[AC_REQUIRE([AC_PROG_F77]) -AC_LANG_PUSH(Fortran 77) + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *\ [[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 -_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 + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 -# Source file extension for f77 test sources. -ac_ext=f +*** 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. -# Object file extension for compiled f77 test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext +_LT_EOF + fi + ;; -# Code to be used in simple compile tests -lt_simple_compile_test_code="\ - subroutine t - return - end -" + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; -# Code to be used in simple link tests -lt_simple_link_test_code="\ - program t - end -" + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${F77-"f77"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) + gnu* | linux* | tpf* | k*bsd*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -AC_MSG_CHECKING([if libtool supports shared libraries]) -AC_MSG_RESULT([$can_build_shared]) + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi -AC_MSG_CHECKING([whether to build shared libraries]) -test "$can_build_shared" = "no" && enable_shared=no + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; -# 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]) + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; -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]) + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 -_LT_AC_TAGVAR(GCC, $1)="$G77" -_LT_AC_TAGVAR(LD, $1)="$LD" +*** 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. -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) +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; -AC_LIBTOOL_CONFIG($1) + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_F77_CONFIG +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; -# AC_LIBTOOL_LANG_GCJ_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) -AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], -[AC_LANG_SAVE + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -# Source file extension for Java test sources. -ac_ext=java + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac -# Object file extension for compiled Java test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_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_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 -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE + # 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. -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${GCJ-"gcj"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; -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) + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; -AC_LIBTOOL_CONFIG($1) + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; -AC_LANG_RESTORE -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_GCJ_CONFIG + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; -# AC_LIBTOOL_LANG_RC_CONFIG -# ------------------------- -# Ensure that the configuration vars for the Windows resource compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) -AC_DEFUN([_LT_AC_LANG_RC_CONFIG], -[AC_LANG_SAVE + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -# Source file extension for RC test sources. -ac_ext=rc + freebsd1*) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; -# Object file extension for compiled RC test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER + hpux9*) + if test "$GCC" = yes; then + _LT_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_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${RC-"windres"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; -AC_LIBTOOL_CONFIG($1) + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: -AC_LANG_RESTORE -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_RC_CONFIG + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; -# AC_LIBTOOL_CONFIG([TAGNAME]) -# ---------------------------- -# If TAGNAME is not passed, then create an initial libtool script -# with a default configuration from the untagged config vars. Otherwise -# add code to config.status for appending the configuration named by -# TAGNAME from the matching tagged config vars. -AC_DEFUN([AC_LIBTOOL_CONFIG], -[# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - _LT_AC_TAGVAR(compiler, $1) \ - _LT_AC_TAGVAR(CC, $1) \ - _LT_AC_TAGVAR(LD, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ - _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ - _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ - _LT_AC_TAGVAR(old_archive_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ - _LT_AC_TAGVAR(predep_objects, $1) \ - _LT_AC_TAGVAR(postdep_objects, $1) \ - _LT_AC_TAGVAR(predeps, $1) \ - _LT_AC_TAGVAR(postdeps, $1) \ - _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ - _LT_AC_TAGVAR(archive_cmds, $1) \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ - _LT_AC_TAGVAR(postinstall_cmds, $1) \ - _LT_AC_TAGVAR(postuninstall_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ - _LT_AC_TAGVAR(allow_undefined_flag, $1) \ - _LT_AC_TAGVAR(no_undefined_flag, $1) \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ - _LT_AC_TAGVAR(hardcode_automatic, $1) \ - _LT_AC_TAGVAR(module_cmds, $1) \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) \ - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ - _LT_AC_TAGVAR(fix_srcfile_path, $1) \ - _LT_AC_TAGVAR(exclude_expsyms, $1) \ - _LT_AC_TAGVAR(include_expsyms, $1); do - - case $var in - _LT_AC_TAGVAR(old_archive_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ - _LT_AC_TAGVAR(archive_cmds, $1) | \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(module_cmds, $1) | \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE(int foo(void) {}, + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + ) + LDFLAGS="$save_LDFLAGS" + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - 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 + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -ifelse([$1], [], - [cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - AC_MSG_NOTICE([creating $ofile])], - [cfgfile="$ofile"]) + *nto* | *qnx*) + ;; - cat <<__EOF__ >> "$cfgfile" -ifelse([$1], [], -[#! $SHELL + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e 1s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# The names of the tagged configurations supported by this script. -available_tags= - -# ### BEGIN LIBTOOL CONFIG], -[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; -# Whether or not to build static libraries. -build_old_libs=$enable_static + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -# 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) + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' -# An echo program that does not interpret backslashes. -echo=$lt_echo + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' -# A C compiler. -LTCC=$lt_LTCC + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -# A language-specific compiler. -CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac -# Is the compiler the GNU C compiler? -with_gcc=$_LT_AC_TAGVAR(GCC, $1) + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no -# An ERE matcher. -EGREP=$lt_EGREP +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld -# The linker used to build libraries. -LD=$lt_[]_LT_AC_TAGVAR(LD, $1) +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) -# Whether we need hard or soft links. -LN_S=$lt_LN_S +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes -# A BSD-compatible nm program. -NM=$lt_NM + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext -# A symbol stripping program -STRIP=$lt_STRIP + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [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]]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [fix_srcfile_path], [1], + [Fix the shell variable $srcfile for the compiler]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" +# Source file extension for C test sources. +ac_ext=c -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext -# Used on cygwin: assembler. -AS="$AS" +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" -# The name of the directory that contains temporary libtool files. -objdir=$objdir +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC -# How to pass a linker flag through the compiler. -wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE -# Object file suffix (normally "o"). -objext="$ac_objext" +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; -# Old archive suffix (normally "a"). -libext="$libext" + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' + 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]) -# Executable file suffix (normally ""). -exeext="$exeext" + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG -# 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 +# _LT_PROG_CXX +# ------------ +# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ +# compiler, we have our own version here. +m4_defun([_LT_PROG_CXX], +[ +pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) +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 +else + _lt_caught_CXX_error=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_CXX -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_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 +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[AC_REQUIRE([_LT_PROG_CXX])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no -# Do we need a version for libraries? -need_version=$need_version +# Source file extension for C++ test sources. +ac_ext=cpp -# Whether dlopen is supported. -dlopen_support=$enable_dlopen +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static + if test "$GXX" = yes; then + # Set up default GNU C++ configuration -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) + LT_PATH_LD -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_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' -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) + # 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}' -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi -# Library versioning type. -version_type=$version_type + # 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"' -# Format of library name prefix. -libname_spec=$lt_libname_spec + else + GXX=no + with_gnu_ld=no + wlarc= + fi -# 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 + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi -# 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 + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; -# 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) + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; -# 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 + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; -# 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) + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) + gnu*) + ;; -# 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) + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + _LT_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_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_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_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 will use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds + # 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 "X$templist" | $Xsed -e "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 "X$list" | $Xsed' + ;; + xl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; -# 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 + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; -# 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 + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; -# This is the shared library runtime path variable. -runpath_var=$runpath_var + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; -# This is the shared library path variable. -shlibpath_var=$shlibpath_var + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=echo + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; -# How to hardcode a shared library path into an executable. -hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs + _LT_TAGVAR(hardcode_libdir_separator, $1)=: -# 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) + # 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 "X$templist" | $Xsed -e "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 "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_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" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; -# 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) + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; -# 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) + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes -# 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) + output_verbose_link_cmd='echo' -# 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) + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' -# 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) + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared -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_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; -# Set to yes if exported symbols are required. -always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; -# The commands to list exported symbols. -export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG -# 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]) +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= -__EOF__ +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +]) +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. -ifelse([$1],[], [ - case $host_os in - aix3*) - cat <<\EOF >> "$cfgfile" + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no -# 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 + for p in `eval "$output_verbose_link_cmd"`; do + case $p in - # 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) + -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 - 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 + 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 "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + ;; + *.$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 -# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; -_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + *) ;; # Ignore the rest. -if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + esac + done - 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"]) + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" fi -])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI +$RM -f confest.$objext -# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -# --------------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], -[AC_REQUIRE([AC_CANONICAL_HOST]) -AC_REQUIRE([LT_AC_PROG_SED]) -AC_REQUIRE([AC_PROG_NM]) -AC_REQUIRE([AC_OBJEXT]) -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; -# 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'" +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 -# 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'" + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) # Its linker distinguishes data from code symbols - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux* | k*bsd*-gnu) - if test "$host_cpu" = ia64; then - symcode='[[ABCDGIRSTW]]' - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac ;; + solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac -# 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 + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac ;; esac +]) -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_PROG_F77 +# ------------ +# Since AC_PROG_F77 is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_F77], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) +AC_PROG_F77 +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_F77 -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_F77], []) - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_REQUIRE([_LT_PROG_F77])dnl +AC_LANG_PUSH(Fortran 77) - # Check to see that the pipe works correctly. - pipe_works=no +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=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 +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" - # 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 + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE -/* 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} -}; + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${F77-"f77"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) -#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 + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no fi - 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* + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_F77" != yes - # 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) +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_PROG_FC +# ----------- +# Since AC_PROG_FC is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_FC], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) +AC_PROG_FC +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes fi -]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +popdef([AC_MSG_ERROR]) +])# _LT_PROG_FC +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_FC], []) -# 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' +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_REQUIRE([_LT_PROG_FC])dnl +AC_LANG_PUSH(Fortran) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${FC-"f95"} + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix4* | aix5*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC*) - # Portland Group C++ compiler. - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; + ;; esac - fi -], -[ - if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE - 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 - ;; +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) - 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' - ;; +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) - 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' - ;; + _LT_CONFIG($1) +fi - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; +AC_LANG_RESTORE - 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 - ;; +GCC=$lt_save_GCC +CC="$lt_save_CC" +])# _LT_LANG_GCJ_CONFIG - 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_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE - *) - _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 - ;; +# Source file extension for RC test sources. +ac_ext=rc - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext - 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' - ;; +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - 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' - ;; +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" - newsos6) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE - 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' - ;; +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - rdos*) - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi - solaris*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC="$lt_save_CC" +])# _LT_LANG_RC_CONFIG - sunos4*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) - 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 - ;; +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - unicos*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) - uts4*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) ]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then - AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], - _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), - [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" - ;; -esac -# -# Check to make sure the static flag actually works. -# -wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" -AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) ]) -# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) -# ------------------------------------ -# See if the linker supports building shared libraries. -AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -ifelse([$1],[CXX],[ - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix4* | aix5*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - else - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' ;; - *) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_XSI_SHELLFNS +# --------------------- +# Bourne and XSI compatible variants of some useful shell functions. +m4_defun([_LT_PROG_XSI_SHELLFNS], +[case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; esac -],[ - runpath_var= - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)= - _LT_AC_TAGVAR(archive_expsym_cmds, $1)= - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_minus_L, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown - _LT_AC_TAGVAR(hardcode_automatic, $1)=no - _LT_AC_TAGVAR(module_cmds, $1)= - _LT_AC_TAGVAR(module_expsym_cmds, $1)= - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_AC_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - _LT_CC_BASENAME([$compiler]) - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; esac + func_basename_result="${1##*/}" +} - _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}' +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} - # 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 +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} -*** 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. +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} -EOF - fi - ;; +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $[*] )) +} - 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 - ;; +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} - 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 - ;; +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} - interix[[3-9]]*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +dnl func_dirname_and_basename +dnl A portable version of this function is already defined in general.m4sh +dnl so there is no need for it here. + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + 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 '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; +# sed scripts: +my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[[^=]]*=//' - 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 - ;; +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <&2 +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} -*** 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. +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` +} -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 - ;; +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$[@]"` +} - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` +} -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]+=\$[2]" +} _LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; + ;; + *) + cat << \_LT_EOF >> "$cfgfile" - 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 - ;; +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]=\$$[1]\$[2]" +} - *) - 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 +_LT_EOF + ;; + esac +]) - if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. - 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 +# serial 6 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - # 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 +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - # 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 +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) - 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 - ;; +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - dgux*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - 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 - ;; +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) - 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 +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) - # 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' - ;; +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=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 - fi - ;; +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: +test -z "$AS" && AS=as +_LT_DECL([], [AS], [0], [Assembler program])dnl - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl - # 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 - ;; +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl +])# win32-dll - 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 - ;; +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) - 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 - ;; +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - newsos6) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - 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' - ;; + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED - 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)=: - ;; +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) - # 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)=: - ;; +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) - solaris*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - 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 +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - 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 - ;; + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC - 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' - ;; +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - 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 - ;; +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - uts4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; *) - _LT_AC_TAGVAR(ld_shlibs, $1)=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 - fi + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) ]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no -# -# Do we need to explicitly link libc? -# -case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_AC_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) - then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac -])# AC_LIBTOOL_PROG_LD_SHLIBS +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) -# _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 +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) + +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# #ifdef __CYGWIN__ -# #include -# DECLARE_CYGWIN_DLL( DllMain ); -# #endif -# HINSTANCE __hDllInstance_base; +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 # -# BOOL APIENTRY -# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -# { -# __hDllInstance_base = hInst; -# return TRUE; -# } -# /* ltdll.c ends here */ -])# _LT_AC_FILE_LTDLL_C +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# serial 6 ltsugar.m4 -# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) -# --------------------------------- -AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) -# 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]) +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + -# This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL]) +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) -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) +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. -# Cheap backport of AS_EXECUTABLE_P and required macros -# from Autoconf 2.59; we should not use $as_executable_p directly. +# Generated from ltversion.in. -# _AS_TEST_PREPARE -# ---------------- -m4_ifndef([_AS_TEST_PREPARE], -[m4_defun([_AS_TEST_PREPARE], -[if test -x / >/dev/null 2>&1; then - as_executable_p='test -x' -else - as_executable_p='test -f' -fi -])])# _AS_TEST_PREPARE +# serial 3012 ltversion.m4 +# This file is part of GNU Libtool -# AS_EXECUTABLE_P -# --------------- -# Check whether a file is executable. -m4_ifndef([AS_EXECUTABLE_P], -[m4_defun([AS_EXECUTABLE_P], -[AS_REQUIRE([_AS_TEST_PREPARE])dnl -$as_executable_p $1[]dnl -])])# AS_EXECUTABLE_P +m4_define([LT_PACKAGE_VERSION], [2.2.6]) +m4_define([LT_PACKAGE_REVISION], [1.3012]) -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -# LT_AC_PROG_SED -# -------------- -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -AC_DEFUN([LT_AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.2.6' +macro_revision='1.3012' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) ]) -# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 4 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -6599,10 +7980,10 @@ AC_MSG_RESULT([$SED]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.10' +[am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.10.1], [], +m4_if([$1], [1.11], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -6616,12 +7997,12 @@ m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10.1])dnl +[AM_AUTOMAKE_VERSION([1.11])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- @@ -6678,14 +8059,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 +# serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -6698,6 +8079,7 @@ AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' @@ -6711,14 +8093,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 9 +# serial 10 # 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, @@ -6775,6 +8157,16 @@ AC_CACHE_CHECK([dependency style of $depcc], if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -6792,7 +8184,17 @@ AC_CACHE_CHECK([dependency style of $depcc], done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested @@ -6802,19 +8204,23 @@ AC_CACHE_CHECK([dependency style of $depcc], break fi ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # 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} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -6871,57 +8277,68 @@ _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 3 +#serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done done -done +} ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -6953,13 +8370,13 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008 Free Software Foundation, Inc. +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 13 +# serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. @@ -6976,7 +8393,7 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.60])dnl +[AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -7027,8 +8444,8 @@ AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. @@ -7036,24 +8453,37 @@ AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_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 + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header @@ -7076,7 +8506,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -7087,7 +8517,14 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. @@ -7113,13 +8550,13 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 4 # AM_MAKE_INCLUDE() # ----------------- @@ -7128,7 +8565,7 @@ AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo done + @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. @@ -7138,24 +8575,24 @@ 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 +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) @@ -7165,14 +8602,14 @@ rm -f confinc confmf # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 +# serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -7189,7 +8626,14 @@ AC_SUBST($1)]) AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " @@ -7227,13 +8671,13 @@ esac # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -7250,7 +8694,7 @@ AC_DEFUN([_AM_SET_OPTION], # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- @@ -7286,14 +8730,14 @@ AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 # AM_SANITY_CHECK # --------------- @@ -7302,16 +8746,29 @@ AC_DEFUN([AM_SANITY_CHECK], # Just in case sleep 1 echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + 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` + set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ @@ -7364,18 +8821,25 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006 Free Software Foundation, Inc. +# Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 2 + # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) +# AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. diff --git a/bakefile/Bakefiles.bkgen b/bakefile/Bakefiles.bkgen index f258ae5..8342de3 100644 --- a/bakefile/Bakefiles.bkgen +++ b/bakefile/Bakefiles.bkgen @@ -1,5 +1,5 @@ - + diff --git a/bakefile/libxml2.bkl b/bakefile/libxml2.bkl index 8efe472..f314465 100644 --- a/bakefile/libxml2.bkl +++ b/bakefile/libxml2.bkl @@ -481,10 +481,10 @@ $(value) $(XMLBASEDIR)\include\$(CONFIG_SRCNAME) -Creating the configuration file ..\$(CONFIG_DSTNAME) from ..\include\win32\$(CONFIG_SRCNAME) +Creating the configuration file ..\$(CONFIG_DSTNAME) from ..\include\$(CONFIG_SRCNAME) InputPath=..\include\$(CONFIG_SRCNAME) -"..\include\$(CONFIG_SRCNAME)" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)" +"..\$(CONFIG_DSTNAME)" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)" $(TAB)copy "$(DOLLAR)(InputPath)" ..\$(CONFIG_DSTNAME) diff --git a/c14n.c b/c14n.c index bb7c9ba..9c3cad2 100644 --- a/c14n.c +++ b/c14n.c @@ -60,9 +60,11 @@ typedef struct _xmlC14NCtx { xmlC14NPosition pos; int parent_is_doc; xmlC14NVisibleNsStackPtr ns_rendered; + + /* C14N mode */ + xmlC14NMode mode; /* exclusive canonicalization */ - int exclusive; xmlChar **inclusive_ns_prefixes; /* error number */ @@ -117,6 +119,9 @@ static xmlChar *xmlC11NNormalizeString(const xmlChar * input, (ctx)->is_visible_callback((ctx)->user_data, \ (xmlNodePtr)(node), (xmlNodePtr)(parent)) : 1) +#define xmlC14NIsExclusive( ctx ) \ + ( (ctx)->mode == XML_C14N_EXCLUSIVE_1_0 ) + /************************************************************************ * * * Some factorized error routines * @@ -234,7 +239,7 @@ xmlC14NErr(xmlC14NCtxPtr ctxt, xmlNodePtr node, int error, __xmlRaiseError(NULL, NULL, NULL, ctxt, node, XML_FROM_C14N, error, XML_ERR_ERROR, NULL, 0, - NULL, NULL, NULL, 0, 0, msg); + NULL, NULL, NULL, 0, 0, "%s", msg); } /************************************************************************ @@ -492,9 +497,7 @@ xmlC14NIsXmlNs(xmlNsPtr ns) { return ((ns != NULL) && (xmlStrEqual(ns->prefix, BAD_CAST "xml")) && - (xmlStrEqual(ns->href, - BAD_CAST - "http://www.w3.org/XML/1998/namespace"))); + (xmlStrEqual(ns->href, XML_XML_NAMESPACE))); } @@ -713,7 +716,7 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) return (-1); } - if(!ctx->exclusive) { + if(!xmlC14NIsExclusive(ctx)) { xmlC14NErrParam("processing namespaces axis (exc c14n)"); return (-1); @@ -844,6 +847,25 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) } +/** + * xmlC14NIsXmlAttr: + * @attr: the attr to check + * + * Checks whether the given attribute is a default "xml:" namespace + * with href="http://www.w3.org/XML/1998/namespace" + * + * Returns 1 if the node is default or 0 otherwise + */ + +/* todo: make it a define? */ +static int +xmlC14NIsXmlAttr(xmlAttrPtr attr) +{ + return ((attr->ns != NULL) && + (xmlC14NIsXmlNs(attr->ns) != 0)); +} + + /** * xmlC14NAttrsCompare: * @attr1: the pointer tls o first attr @@ -925,7 +947,7 @@ xmlC14NPrintAttrs(const xmlAttrPtr attr, xmlC14NCtxPtr ctx) xmlOutputBufferWriteString(ctx->buf, (const char *) attr->name); xmlOutputBufferWriteString(ctx->buf, "=\""); - value = xmlNodeListGetString(attr->doc, attr->children, 1); + value = xmlNodeListGetString(ctx->doc, attr->children, 1); /* todo: should we log an error if value==NULL ? */ if (value != NULL) { buffer = xmlC11NNormalizeAttr(value); @@ -942,11 +964,134 @@ xmlC14NPrintAttrs(const xmlAttrPtr attr, xmlC14NCtxPtr ctx) return (1); } +/** + * xmlC14NFindHiddenParentAttr: + * + * Finds an attribute in a hidden parent node. + * + * Returns a pointer to the attribute node (if found) or NULL otherwise. + */ +static xmlAttrPtr +xmlC14NFindHiddenParentAttr(xmlC14NCtxPtr ctx, xmlNodePtr cur, const xmlChar * name, const xmlChar * ns) +{ + xmlAttrPtr res; + while((cur != NULL) && (!xmlC14NIsVisible(ctx, cur, cur->parent))) { + res = xmlHasNsProp(cur, name, ns); + if(res != NULL) { + return res; + } + + cur = cur->parent; + } + + return NULL; +} + +/** + * xmlC14NFixupBaseAttr: + * + * Fixes up the xml:base attribute + * + * Returns the newly created attribute or NULL + */ +static xmlAttrPtr +xmlC14NFixupBaseAttr(xmlC14NCtxPtr ctx, xmlAttrPtr xml_base_attr) +{ + xmlChar * res = NULL; + xmlNodePtr cur; + xmlAttrPtr attr; + xmlChar * tmp_str; + xmlChar * tmp_str2; + int tmp_str_len; + + if ((ctx == NULL) || (xml_base_attr == NULL) || (xml_base_attr->parent == NULL)) { + xmlC14NErrParam("processing xml:base attribute"); + return (NULL); + } + + /* start from current value */ + res = xmlNodeListGetString(ctx->doc, xml_base_attr->children, 1); + if(res == NULL) { + xmlC14NErrInternal("processing xml:base attribute - can't get attr value"); + return (NULL); + } + + /* go up the stack until we find a node that we rendered already */ + cur = xml_base_attr->parent->parent; + while((cur != NULL) && (!xmlC14NIsVisible(ctx, cur, cur->parent))) { + attr = xmlHasNsProp(cur, BAD_CAST "base", XML_XML_NAMESPACE); + if(attr != NULL) { + /* get attr value */ + tmp_str = xmlNodeListGetString(ctx->doc, attr->children, 1); + if(tmp_str == NULL) { + xmlFree(res); + + xmlC14NErrInternal("processing xml:base attribute - can't get attr value"); + return (NULL); + } + + /* we need to add '/' if our current base uri ends with '..' or '.' + to ensure that we are forced to go "up" all the time */ + tmp_str_len = xmlStrlen(tmp_str); + if(tmp_str_len > 1 && tmp_str[tmp_str_len - 2] == '.') { + tmp_str2 = xmlStrcat(tmp_str, BAD_CAST "/"); + if(tmp_str2 == NULL) { + xmlFree(tmp_str); + xmlFree(res); + + xmlC14NErrInternal("processing xml:base attribute - can't modify uri"); + return (NULL); + } + + tmp_str = tmp_str2; + } + + /* build uri */ + tmp_str2 = xmlBuildURI(res, tmp_str); + if(tmp_str2 == NULL) { + xmlFree(tmp_str); + xmlFree(res); + + xmlC14NErrInternal("processing xml:base attribute - can't construct uri"); + return (NULL); + } + + /* cleanup and set the new res */ + xmlFree(tmp_str); + xmlFree(res); + res = tmp_str2; + } + + /* next */ + cur = cur->parent; + } + + /* check if result uri is empty or not */ + if((res == NULL) || xmlStrEqual(res, BAD_CAST "")) { + xmlFree(res); + return (NULL); + } + + /* create and return the new attribute node */ + attr = xmlNewNsProp(NULL, xml_base_attr->ns, BAD_CAST "base", res); + if(attr == NULL) { + xmlFree(res); + + xmlC14NErrInternal("processing xml:base attribute - can't construct attribute"); + return (NULL); + } + + /* done */ + xmlFree(res); + return (attr); +} + /** * xmlC14NProcessAttrsAxis: * @ctx: the C14N context * @cur: the current node * @parent_visible: the visibility of parent node + * @all_parents_visible: the visibility of all parent nodes * * Prints out canonical attribute axis of the current node to the * buffer from C14N context as follows @@ -978,7 +1123,13 @@ static int xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible) { xmlAttrPtr attr; - xmlListPtr list; + xmlListPtr list; + xmlAttrPtr attrs_to_delete = NULL; + + /* special processing for 1.1 spec */ + xmlAttrPtr xml_base_attr = NULL; + xmlAttrPtr xml_lang_attr = NULL; + xmlAttrPtr xml_space_attr = NULL; if ((ctx == NULL) || (cur == NULL) || (cur->type != XML_ELEMENT_NODE)) { xmlC14NErrParam("processing attributes axis"); @@ -994,42 +1145,184 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible) return (-1); } - /* - * Add all visible attributes from current node. - */ - attr = cur->properties; - while (attr != NULL) { - /* check that attribute is visible */ - if (xmlC14NIsVisible(ctx, attr, cur)) { - xmlListInsert(list, attr); + switch(ctx->mode) { + case XML_C14N_1_0: + /* The processing of an element node E MUST be modified slightly when an XPath node-set is + * given as input and the element's parent is omitted from the node-set. The method for processing + * the attribute axis of an element E in the node-set is enhanced. All element nodes along E's + * ancestor axis are examined for nearest occurrences of attributes in the xml namespace, such + * as xml:lang and xml:space (whether or not they are in the node-set). From this list of attributes, + * remove any that are in E's attribute axis (whether or not they are in the node-set). Then, + * lexicographically merge this attribute list with the nodes of E's attribute axis that are in + * the node-set. The result of visiting the attribute axis is computed by processing the attribute + * nodes in this merged attribute list. + */ + + /* + * Add all visible attributes from current node. + */ + attr = cur->properties; + while (attr != NULL) { + /* check that attribute is visible */ + if (xmlC14NIsVisible(ctx, attr, cur)) { + xmlListInsert(list, attr); + } + attr = attr->next; } - attr = attr->next; - } - /* - * include attributes in "xml" namespace defined in ancestors - * (only for non-exclusive XML Canonicalization) - */ - if (parent_visible && (!ctx->exclusive) && (cur->parent != NULL) - && (!xmlC14NIsVisible(ctx, cur->parent, cur->parent->parent))) { - /* - * If XPath node-set is not specified then the parent is always - * visible! + /* + * Handle xml attributes */ - cur = cur->parent; - while (cur != NULL) { - attr = cur->properties; - while (attr != NULL) { - if ((attr->ns != NULL) - && (xmlStrEqual(attr->ns->prefix, BAD_CAST "xml"))) { - if (xmlListSearch(list, attr) == NULL) { - xmlListInsert(list, attr); + if (parent_visible && (cur->parent != NULL) && + (!xmlC14NIsVisible(ctx, cur->parent, cur->parent->parent))) + { + xmlNodePtr tmp; + + /* + * If XPath node-set is not specified then the parent is always + * visible! + */ + tmp = cur->parent; + while (tmp != NULL) { + attr = tmp->properties; + while (attr != NULL) { + if (xmlC14NIsXmlAttr(attr) != 0) { + if (xmlListSearch(list, attr) == NULL) { + xmlListInsert(list, attr); + } } + attr = attr->next; } - attr = attr->next; + tmp = tmp->parent; + } + } + + /* done */ + break; + case XML_C14N_EXCLUSIVE_1_0: + /* attributes in the XML namespace, such as xml:lang and xml:space + * are not imported into orphan nodes of the document subset + */ + + /* + * Add all visible attributes from current node. + */ + attr = cur->properties; + while (attr != NULL) { + /* check that attribute is visible */ + if (xmlC14NIsVisible(ctx, attr, cur)) { + xmlListInsert(list, attr); } - cur = cur->parent; + attr = attr->next; } + + /* do nothing special for xml attributes */ + break; + case XML_C14N_1_1: + /* The processing of an element node E MUST be modified slightly when an XPath node-set is + * given as input and some of the element's ancestors are omitted from the node-set. + * + * Simple inheritable attributes are attributes that have a value that requires at most a simple + * redeclaration. This redeclaration is done by supplying a new value in the child axis. The + * redeclaration of a simple inheritable attribute A contained in one of E's ancestors is done + * by supplying a value to an attribute Ae inside E with the same name. Simple inheritable attributes + * are xml:lang and xml:space. + * + * The method for processing the attribute axis of an element E in the node-set is hence enhanced. + * All element nodes along E's ancestor axis are examined for the nearest occurrences of simple + * inheritable attributes in the xml namespace, such as xml:lang and xml:space (whether or not they + * are in the node-set). From this list of attributes, any simple inheritable attributes that are + * already in E's attribute axis (whether or not they are in the node-set) are removed. Then, + * lexicographically merge this attribute list with the nodes of E's attribute axis that are in + * the node-set. The result of visiting the attribute axis is computed by processing the attribute + * nodes in this merged attribute list. + * + * The xml:id attribute is not a simple inheritable attribute and no processing of these attributes is + * performed. + * + * The xml:base attribute is not a simple inheritable attribute and requires special processing beyond + * a simple redeclaration. + * + * Attributes in the XML namespace other than xml:base, xml:id, xml:lang, and xml:space MUST be processed + * as ordinary attributes. + */ + + /* + * Add all visible attributes from current node. + */ + attr = cur->properties; + while (attr != NULL) { + /* special processing for XML attribute kiks in only when we have invisible parents */ + if ((!parent_visible) || (xmlC14NIsXmlAttr(attr) == 0)) { + /* check that attribute is visible */ + if (xmlC14NIsVisible(ctx, attr, cur)) { + xmlListInsert(list, attr); + } + } else { + int matched = 0; + + /* check for simple inheritance attributes */ + if((!matched) && (xml_lang_attr == NULL) && xmlStrEqual(attr->name, BAD_CAST "lang")) { + xml_lang_attr = attr; + matched = 1; + } + if((!matched) && (xml_space_attr == NULL) && xmlStrEqual(attr->name, BAD_CAST "space")) { + xml_space_attr = attr; + matched = 1; + } + + /* check for base attr */ + if((!matched) && (xml_base_attr == NULL) && xmlStrEqual(attr->name, BAD_CAST "base")) { + xml_base_attr = attr; + matched = 1; + } + + /* otherwise, it is a normal attribute, so just check if it is visible */ + if((!matched) && xmlC14NIsVisible(ctx, attr, cur)) { + xmlListInsert(list, attr); + } + } + + /* move to the next one */ + attr = attr->next; + } + + /* special processing for XML attribute kiks in only when we have invisible parents */ + if ((parent_visible)) { + + /* simple inheritance attributes - copy */ + if(xml_lang_attr == NULL) { + xml_lang_attr = xmlC14NFindHiddenParentAttr(ctx, cur->parent, BAD_CAST "lang", XML_XML_NAMESPACE); + } + if(xml_lang_attr != NULL) { + xmlListInsert(list, xml_lang_attr); + } + if(xml_space_attr == NULL) { + xml_space_attr = xmlC14NFindHiddenParentAttr(ctx, cur->parent, BAD_CAST "space", XML_XML_NAMESPACE); + } + if(xml_space_attr != NULL) { + xmlListInsert(list, xml_space_attr); + } + + /* base uri attribute - fix up */ + if(xml_base_attr == NULL) { + /* if we don't have base uri attribute, check if we have a "hidden" one above */ + xml_base_attr = xmlC14NFindHiddenParentAttr(ctx, cur->parent, BAD_CAST "base", XML_XML_NAMESPACE); + } + if(xml_base_attr != NULL) { + xml_base_attr = xmlC14NFixupBaseAttr(ctx, xml_base_attr); + if(xml_base_attr != NULL) { + xmlListInsert(list, xml_base_attr); + + /* note that we MUST delete returned attr node ourselves! */ + xml_base_attr->next = attrs_to_delete; + attrs_to_delete = xml_base_attr; + } + } + } + + /* done */ + break; } /* @@ -1040,6 +1333,7 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible) /* * Cleanup */ + xmlFreePropList(attrs_to_delete); xmlListDelete(list); return (0); } @@ -1096,6 +1390,8 @@ xmlC14NCheckForRelativeNamespaces(xmlC14NCtxPtr ctx, xmlNodePtr cur) * xmlC14NProcessElementNode: * @ctx: the pointer to C14N context object * @cur: the node to process + * @visible: this node is visible + * @all_parents_visible: whether all the parents of this node are visible * * Canonical XML v 1.0 (http://www.w3.org/TR/xml-c14n) * @@ -1159,7 +1455,7 @@ xmlC14NProcessElementNode(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) xmlOutputBufferWriteString(ctx->buf, (const char *) cur->name); } - if (!ctx->exclusive) { + if (!xmlC14NIsExclusive(ctx)) { ret = xmlC14NProcessNamespacesAxis(ctx, cur, visible); } else { ret = xmlExcC14NProcessNamespacesAxis(ctx, cur, visible); @@ -1457,9 +1753,10 @@ xmlC14NFreeCtx(xmlC14NCtxPtr ctx) * or not * @user_data: the first parameter for @is_visible_callback function * (in most cases, it is nodes set) + * @mode: the c14n mode (see @xmlC14NMode) * @inclusive_ns_prefixe the list of inclusive namespace prefixes * ended with a NULL or NULL if there is no - * inclusive namespaces (only for exclusive + * inclusive namespaces (only for ` * canonicalization) * @with_comments: include comments in the result (!=0) or not (==0) * @buf: the output buffer to store canonical XML; this @@ -1473,7 +1770,7 @@ xmlC14NFreeCtx(xmlC14NCtxPtr ctx) static xmlC14NCtxPtr xmlC14NNewCtx(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback, void* user_data, - int exclusive, xmlChar ** inclusive_ns_prefixes, + xmlC14NMode mode, xmlChar ** inclusive_ns_prefixes, int with_comments, xmlOutputBufferPtr buf) { xmlC14NCtxPtr ctx = NULL; @@ -1531,11 +1828,11 @@ xmlC14NNewCtx(xmlDocPtr doc, } /* - * Set "exclusive" flag, create a nodes set for namespaces - * stack and remember list of incluseve prefixes + * Set "mode" flag and remember list of incluseve prefixes + * for exclusive c14n */ - if (exclusive) { - ctx->exclusive = 1; + ctx->mode = mode; + if(xmlC14NIsExclusive(ctx)) { ctx->inclusive_ns_prefixes = inclusive_ns_prefixes; } return (ctx); @@ -1548,8 +1845,7 @@ xmlC14NNewCtx(xmlDocPtr doc, * or not * @user_data: the first parameter for @is_visible_callback function * (in most cases, it is nodes set) - * @exclusive: the exclusive flag (0 - non-exclusive canonicalization; - * otherwise - exclusive canonicalization) + * @mode: the c14n mode (see @xmlC14NMode) * @inclusive_ns_prefixes: the list of inclusive namespace prefixes * ended with a NULL or NULL if there is no * inclusive namespaces (only for exclusive @@ -1567,10 +1863,11 @@ xmlC14NNewCtx(xmlDocPtr doc, */ int xmlC14NExecute(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback, - void* user_data, int exclusive, xmlChar **inclusive_ns_prefixes, + void* user_data, int mode, xmlChar **inclusive_ns_prefixes, int with_comments, xmlOutputBufferPtr buf) { xmlC14NCtxPtr ctx; + xmlC14NMode c14n_mode = XML_C14N_1_0; int ret; if ((buf == NULL) || (doc == NULL)) { @@ -1578,6 +1875,19 @@ xmlC14NExecute(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback, return (-1); } + /* for backward compatibility, we have to have "mode" as "int" + and here we check that user gives valid value */ + switch(mode) { + case XML_C14N_1_0: + case XML_C14N_EXCLUSIVE_1_0: + case XML_C14N_1_1: + c14n_mode = (xmlC14NMode)mode; + break; + default: + xmlC14NErrParam("invalid mode for executing c14n"); + return (-1); + } + /* * Validate the encoding output buffer encoding */ @@ -1588,8 +1898,8 @@ xmlC14NExecute(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback, } ctx = xmlC14NNewCtx(doc, is_visible_callback, user_data, - exclusive, inclusive_ns_prefixes, - with_comments, buf); + c14n_mode, inclusive_ns_prefixes, + with_comments, buf); if (ctx == NULL) { xmlC14NErr(NULL, (xmlNodePtr) doc, XML_C14N_CREATE_CTXT, "xmlC14NExecute: unable to create C14N context\n"); @@ -1637,8 +1947,7 @@ xmlC14NExecute(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback, * @doc: the XML document for canonization * @nodes: the nodes set to be included in the canonized image * or NULL if all document nodes should be included - * @exclusive: the exclusive flag (0 - non-exclusive canonicalization; - * otherwise - exclusive canonicalization) + * @mode: the c14n mode (see @xmlC14NMode) * @inclusive_ns_prefixes: the list of inclusive namespace prefixes * ended with a NULL or NULL if there is no * inclusive namespaces (only for exclusive @@ -1656,12 +1965,12 @@ xmlC14NExecute(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback, */ int xmlC14NDocSaveTo(xmlDocPtr doc, xmlNodeSetPtr nodes, - int exclusive, xmlChar ** inclusive_ns_prefixes, + int mode, xmlChar ** inclusive_ns_prefixes, int with_comments, xmlOutputBufferPtr buf) { return(xmlC14NExecute(doc, (xmlC14NIsVisibleCallback)xmlC14NIsNodeInNodeset, nodes, - exclusive, + mode, inclusive_ns_prefixes, with_comments, buf)); @@ -1673,8 +1982,7 @@ xmlC14NDocSaveTo(xmlDocPtr doc, xmlNodeSetPtr nodes, * @doc: the XML document for canonization * @nodes: the nodes set to be included in the canonized image * or NULL if all document nodes should be included - * @exclusive: the exclusive flag (0 - non-exclusive canonicalization; - * otherwise - exclusive canonicalization) + * @mode: the c14n mode (see @xmlC14NMode) * @inclusive_ns_prefixes: the list of inclusive namespace prefixes * ended with a NULL or NULL if there is no * inclusive namespaces (only for exclusive @@ -1692,7 +2000,7 @@ xmlC14NDocSaveTo(xmlDocPtr doc, xmlNodeSetPtr nodes, */ int xmlC14NDocDumpMemory(xmlDocPtr doc, xmlNodeSetPtr nodes, - int exclusive, xmlChar ** inclusive_ns_prefixes, + int mode, xmlChar ** inclusive_ns_prefixes, int with_comments, xmlChar ** doc_txt_ptr) { int ret; @@ -1717,7 +2025,7 @@ xmlC14NDocDumpMemory(xmlDocPtr doc, xmlNodeSetPtr nodes, /* * canonize document and write to buffer */ - ret = xmlC14NDocSaveTo(doc, nodes, exclusive, inclusive_ns_prefixes, + ret = xmlC14NDocSaveTo(doc, nodes, mode, inclusive_ns_prefixes, with_comments, buf); if (ret < 0) { xmlC14NErrInternal("saving doc to output buffer"); @@ -1743,8 +2051,7 @@ xmlC14NDocDumpMemory(xmlDocPtr doc, xmlNodeSetPtr nodes, * @doc: the XML document for canonization * @nodes: the nodes set to be included in the canonized image * or NULL if all document nodes should be included - * @exclusive: the exclusive flag (0 - non-exclusive canonicalization; - * otherwise - exclusive canonicalization) + * @mode: the c14n mode (see @xmlC14NMode) * @inclusive_ns_prefixes: the list of inclusive namespace prefixes * ended with a NULL or NULL if there is no * inclusive namespaces (only for exclusive @@ -1764,7 +2071,7 @@ xmlC14NDocDumpMemory(xmlDocPtr doc, xmlNodeSetPtr nodes, */ int xmlC14NDocSave(xmlDocPtr doc, xmlNodeSetPtr nodes, - int exclusive, xmlChar ** inclusive_ns_prefixes, + int mode, xmlChar ** inclusive_ns_prefixes, int with_comments, const char *filename, int compression) { xmlOutputBufferPtr buf; @@ -1791,7 +2098,7 @@ xmlC14NDocSave(xmlDocPtr doc, xmlNodeSetPtr nodes, /* * canonize document and write to buffer */ - ret = xmlC14NDocSaveTo(doc, nodes, exclusive, inclusive_ns_prefixes, + ret = xmlC14NDocSaveTo(doc, nodes, mode, inclusive_ns_prefixes, with_comments, buf); if (ret < 0) { xmlC14NErrInternal("cannicanize document to buffer"); @@ -1919,7 +2226,7 @@ xmlC11NNormalizeString(const xmlChar * input, } cur++; } - *out++ = 0; + *out = 0; return (buffer); } #endif /* LIBXML_OUTPUT_ENABLED */ diff --git a/config.guess b/config.guess index 951383e..da83314 100755 --- a/config.guess +++ b/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. -timestamp='2007-05-17' +timestamp='2009-04-27' # 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 @@ -56,8 +56,8 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -324,14 +324,30 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; - i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize @@ -532,7 +548,7 @@ EOF echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[45]) + *:AIX:*:[456]) 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 @@ -793,12 +809,15 @@ EOF exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in - x86) + x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; - EM64T | authenticamd) + EM64T | authenticamd | genuineintel) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks @@ -833,7 +852,14 @@ EOF echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -925,6 +951,9 @@ EOF if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-gnu + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -954,8 +983,8 @@ EOF x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; - xtensa:Linux:*:*) - echo xtensa-unknown-linux-gnu + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so @@ -975,9 +1004,6 @@ EOF a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. @@ -1092,8 +1118,11 @@ EOF 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 + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 @@ -1131,6 +1160,16 @@ EOF 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; @@ -1206,6 +1245,9 @@ EOF BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1314,6 +1356,9 @@ EOF i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1474,9 +1519,9 @@ This script, last modified $timestamp, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD and - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD If the version you run ($0) is already up to date, please send the following data and any information you think might be diff --git a/config.h.in b/config.h.in index 1285789..6f45c6c 100644 --- a/config.h.in +++ b/config.h.in @@ -136,6 +136,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H +/* Define to 1 if you have the header file. */ +#undef HAVE_POLL_H + /* Define to 1 if you have the `printf' function. */ #undef HAVE_PRINTF @@ -252,6 +255,10 @@ /* Define as const if the declaration of iconv() needs const. */ #undef ICONV_CONST +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + /* Name of package */ #undef PACKAGE diff --git a/config.sub b/config.sub index c060f44..a39437d 100755 --- a/config.sub +++ b/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. -timestamp='2007-04-29' +timestamp='2009-04-17' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -72,8 +72,8 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -122,6 +122,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` @@ -249,13 +250,16 @@ case $basic_machine in | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep \ + | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ - | mips64vr | mips64vrel \ + | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ @@ -268,6 +272,7 @@ case $basic_machine in | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | moxie \ | mt \ | msp430 \ | nios | nios2 \ @@ -277,7 +282,7 @@ case $basic_machine in | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ @@ -286,7 +291,7 @@ case $basic_machine in | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) + | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) @@ -329,14 +334,17 @@ case $basic_machine in | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ + | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ @@ -358,20 +366,24 @@ case $basic_machine in | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ + | xstormy16-* | xtensa*-* \ | ymp-* \ - | z8k-*) + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -435,6 +447,10 @@ case $basic_machine in basic_machine=m68k-apollo os=-bsd ;; + aros) + basic_machine=i386-pc + os=-aros + ;; aux) basic_machine=m68k-apple os=-aux @@ -443,10 +459,22 @@ case $basic_machine in basic_machine=ns32k-sequent os=-dynix ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; c90) basic_machine=c90-cray os=-unicos ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -475,8 +503,8 @@ case $basic_machine in basic_machine=craynv-cray os=-unicosmp ;; - cr16c) - basic_machine=cr16c-unknown + cr16) + basic_machine=cr16-unknown os=-elf ;; crds | unos) @@ -514,6 +542,10 @@ case $basic_machine in basic_machine=m88k-motorola os=-sysv3 ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp @@ -668,6 +700,14 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; m88k-omron*) basic_machine=m88k-omron ;; @@ -813,6 +853,14 @@ case $basic_machine in basic_machine=i860-intel os=-osf ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; pbd) basic_machine=sparc-tti ;; @@ -1021,6 +1069,10 @@ case $basic_machine in basic_machine=tic6x-unknown os=-coff ;; + tile*) + basic_machine=tile-unknown + os=-linux-gnu + ;; tx39) basic_machine=mipstx39-unknown ;; @@ -1096,6 +1148,10 @@ case $basic_machine in basic_machine=z8k-unknown os=-sim ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; none) basic_machine=none-none os=-none @@ -1134,7 +1190,7 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) @@ -1206,8 +1262,9 @@ case $os in -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ + | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ @@ -1216,7 +1273,7 @@ case $os in | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ + | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ @@ -1356,6 +1413,9 @@ case $os in -zvmoe) os=-zvmoe ;; + -dicos*) + os=-dicos + ;; -none) ;; *) diff --git a/configure b/configure index b6a50ee..0035cb9 100755 --- a/configure +++ b/configure @@ -1,9 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61. +# Generated by GNU Autoconf 2.63. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -15,7 +15,7 @@ DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -37,17 +37,45 @@ 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=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi # Support unset when possible. @@ -63,8 +91,6 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. @@ -87,7 +113,7 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -100,17 +126,10 @@ PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -132,7 +151,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -158,7 +177,7 @@ else as_have_required=no fi - if test $as_have_required = yes && (eval ": + if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } @@ -240,7 +259,7 @@ IFS=$as_save_IFS 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 + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -261,7 +280,7 @@ _ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -341,10 +360,10 @@ fi if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi @@ -413,9 +432,10 @@ fi test \$exitcode = 0") || { echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message + echo Please tell bug-autoconf@gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. } @@ -451,7 +471,7 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { $as_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 @@ -479,7 +499,6 @@ case `echo -n x` in *) ECHO_N='-n';; esac - if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -492,19 +511,22 @@ if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -529,10 +551,10 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -553,22 +575,22 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} -case X$ECHO in +case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac -echo=${ECHO-echo} +ECHO=${lt_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! +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! : else # Restart under the correct shell. @@ -578,9 +600,9 @@ 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 -z "$lt_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 && + { 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. + 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 + 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 -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" + 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 - # maybe with a smaller string... - prev=: + # 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 + 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 + 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 -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" +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi -tagnames=${tagnames+${tagnames},}CXX - -tagnames=${tagnames+${tagnames},}F77 - exec 7<&0 &1 # Name of the host. @@ -767,227 +784,283 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -build -build_cpu -build_vendor -build_os -host -host_cpu -host_vendor -host_os -LIBXML_MAJOR_VERSION -LIBXML_MINOR_VERSION -LIBXML_MICRO_VERSION -LIBXML_VERSION -LIBXML_VERSION_INFO -LIBXML_VERSION_NUMBER -LIBXML_VERSION_EXTRA -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -am__isrc -CYGPATH_W -PACKAGE -VERSION -ACLOCAL -AUTOCONF -AUTOMAKE -AUTOHEADER -MAKEINFO -install_sh -STRIP -INSTALL_STRIP_PROGRAM -mkdir_p -AWK -SET_MAKE -am__leading_dot -AMTAR -am__tar -am__untar -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -DEPDIR -am__include -am__quote -AMDEP_TRUE -AMDEP_FALSE -AMDEPBACKSLASH -CCDEPMODE -am__fastdepCC_TRUE -am__fastdepCC_FALSE -CPP -RM -MV -TAR -PERL -WGET -XMLLINT -XSLTPROC -GREP -EGREP -U -ANSI2KNR -SED -LN_S -ECHO -AR -RANLIB -DLLTOOL -AS -OBJDUMP -CXX -CXXFLAGS -ac_ct_CXX -CXXDEPMODE -am__fastdepCXX_TRUE -am__fastdepCXX_FALSE -CXXCPP -F77 -FFLAGS -ac_ct_F77 -LIBTOOL -HTML_DIR -REBUILD_DOCS_TRUE -REBUILD_DOCS_FALSE -Z_CFLAGS -Z_LIBS -WITH_ZLIB -PYTHON -WITH_PYTHON_TRUE -WITH_PYTHON_FALSE -pythondir -PYTHON_SUBDIR -WITH_MODULES -MODULE_PLATFORM_LIBS -MODULE_EXTENSION -TEST_MODULES -STATIC_BINARIES -WITH_TRIO_SOURCES_TRUE -WITH_TRIO_SOURCES_FALSE -WITH_TRIO -THREAD_LIBS -BASE_THREAD_LIBS -WITH_THREADS -THREAD_CFLAGS -TEST_THREADS -THREADS_W32 -WITH_TREE -WITH_FTP -FTP_OBJ -WITH_HTTP -HTTP_OBJ -WITH_LEGACY -WITH_READER -READER_TEST -WITH_WRITER -WITH_PATTERN -TEST_PATTERN -WITH_SAX1 -TEST_SAX -WITH_PUSH -TEST_PUSH -WITH_HTML -HTML_OBJ -TEST_HTML -TEST_PHTML -WITH_VALID -TEST_VALID -TEST_VTIME -WITH_CATALOG -CATALOG_OBJ -TEST_CATALOG -WITH_DOCB -DOCB_OBJ -WITH_XPTR -XPTR_OBJ -TEST_XPTR -WITH_C14N -C14N_OBJ -TEST_C14N -WITH_XINCLUDE -XINCLUDE_OBJ -TEST_XINCLUDE -WITH_XPATH -XPATH_OBJ -TEST_XPATH -WITH_OUTPUT -WITH_ICONV -WITH_ISO8859X -WITH_SCHEMATRON -TEST_SCHEMATRON -WITH_SCHEMAS -TEST_SCHEMAS -WITH_REGEXPS -TEST_REGEXPS -WITH_DEBUG -DEBUG_OBJ -TEST_DEBUG -WITH_MEM_DEBUG -WITH_RUN_DEBUG -WIN32_EXTRA_LIBADD -WIN32_EXTRA_LDFLAGS -CYGWIN_EXTRA_LDFLAGS -CYGWIN_EXTRA_PYTHON_LIBADD -XML_CFLAGS -XML_LIBDIR -XML_LIBS -XML_LIBTOOLLIBS -ICONV_LIBS -XML_INCLUDEDIR -HAVE_ISNAN -HAVE_ISINF -PYTHON_VERSION -PYTHON_INCLUDES -PYTHON_SITE_PACKAGES -M_LIBS -RDL_LIBS -RELDATE -PYTHON_TESTS +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS LIBOBJS -LTLIBOBJS' +PYTHON_TESTS +RELDATE +RDL_LIBS +M_LIBS +PYTHON_SITE_PACKAGES +PYTHON_INCLUDES +PYTHON_VERSION +HAVE_ISINF +HAVE_ISNAN +XML_INCLUDEDIR +ICONV_LIBS +XML_LIBTOOLLIBS +XML_LIBS +XML_LIBDIR +XML_CFLAGS +CYGWIN_EXTRA_PYTHON_LIBADD +CYGWIN_EXTRA_LDFLAGS +WIN32_EXTRA_LDFLAGS +WIN32_EXTRA_LIBADD +WITH_RUN_DEBUG +WITH_MEM_DEBUG +TEST_DEBUG +DEBUG_OBJ +WITH_DEBUG +TEST_REGEXPS +WITH_REGEXPS +TEST_SCHEMAS +WITH_SCHEMAS +TEST_SCHEMATRON +WITH_SCHEMATRON +WITH_ISO8859X +WITH_ICONV +WITH_OUTPUT +TEST_XPATH +XPATH_OBJ +WITH_XPATH +TEST_XINCLUDE +XINCLUDE_OBJ +WITH_XINCLUDE +TEST_C14N +C14N_OBJ +WITH_C14N +TEST_XPTR +XPTR_OBJ +WITH_XPTR +DOCB_OBJ +WITH_DOCB +TEST_CATALOG +CATALOG_OBJ +WITH_CATALOG +TEST_VTIME +TEST_VALID +WITH_VALID +TEST_PHTML +TEST_HTML +HTML_OBJ +WITH_HTML +TEST_PUSH +WITH_PUSH +TEST_SAX +WITH_SAX1 +TEST_PATTERN +WITH_PATTERN +WITH_WRITER +READER_TEST +WITH_READER +WITH_LEGACY +HTTP_OBJ +WITH_HTTP +FTP_OBJ +WITH_FTP +WITH_TREE +THREADS_W32 +TEST_THREADS +THREAD_CFLAGS +WITH_THREADS +BASE_THREAD_LIBS +THREAD_LIBS +WITH_TRIO +WITH_TRIO_SOURCES_FALSE +WITH_TRIO_SOURCES_TRUE +STATIC_BINARIES +TEST_MODULES +MODULE_EXTENSION +MODULE_PLATFORM_LIBS +WITH_MODULES +PYTHON_SUBDIR +pythondir +WITH_PYTHON_FALSE +WITH_PYTHON_TRUE +PYTHON +WITH_ZLIB +Z_LIBS +Z_CFLAGS +REBUILD_DOCS_FALSE +REBUILD_DOCS_TRUE +HTML_DIR +USE_VERSION_SCRIPT_FALSE +USE_VERSION_SCRIPT_TRUE +VERSION_SCRIPT_FLAGS +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +lt_ECHO +RANLIB +AR +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +SED +LIBTOOL +OBJDUMP +DLLTOOL +AS +ANSI2KNR +U +EGREP +GREP +XSLTPROC +XMLLINT +WGET +PERL +TAR +MV +RM +CPP +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +LIBXML_VERSION_EXTRA +LIBXML_VERSION_NUMBER +LIBXML_VERSION_INFO +LIBXML_VERSION +LIBXML_MICRO_VERSION +LIBXML_MINOR_VERSION +LIBXML_MAJOR_VERSION +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_dependency_tracking +enable_shared +enable_static +with_pic +enable_fast_install +with_gnu_ld +enable_libtool_lock +with_c14n +with_catalog +with_debug +with_docbook +with_fexceptions +with_ftp +with_history +with_html +with_html_dir +with_html_subdir +with_http +with_iconv +with_iso8859x +with_legacy +with_mem_debug +with_minimum +with_output +with_pattern +with_push +with_python +with_reader +with_readline +with_regexps +with_run_debug +with_sax1 +with_schemas +with_schematron +with_threads +with_thread_alloc +with_tree +with_valid +with_writer +with_xinclude +with_xpath +with_xptr +with_modules +with_zlib +with_coverage +enable_rebuild_docs +enable_ipv6 +' ac_precious_vars='build_alias host_alias target_alias @@ -996,18 +1069,14 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -CPP -CXX -CXXFLAGS -CCC -CXXCPP -F77 -FFLAGS' +CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -1106,13 +1175,21 @@ do datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`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 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -1125,13 +1202,21 @@ do dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`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 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -1322,22 +1407,38 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`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 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`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 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -1357,7 +1458,7 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -1366,16 +1467,16 @@ Try \`$0 --help' for more information." >&2 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 + { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_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 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1384,22 +1485,38 @@ 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 + { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi -# Be sure to have absolute directory names. +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 + { (exit 1); exit 1; }; } ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done @@ -1414,7 +1531,7 @@ target=$target_alias 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. + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -1430,10 +1547,10 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 + { $as_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } @@ -1441,12 +1558,12 @@ test "X$ac_ls_di" = "X$ac_pwd_ls_di" || if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X"$0" | + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1473,12 +1590,12 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. @@ -1527,9 +1644,9 @@ Configuration: Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1539,25 +1656,25 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -1578,6 +1695,7 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build @@ -1593,10 +1711,9 @@ Optional Features: 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-gnu-ld assume the C compiler uses GNU ld [default=no] --with-c14n add the Canonicalization support (on) --with-catalog add the Catalog support (on) --with-debug add the debugging module (on) @@ -1647,11 +1764,6 @@ Some influential environment variables: CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CXXCPP C++ preprocessor - F77 Fortran 77 compiler command - FFLAGS Fortran 77 compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1663,15 +1775,17 @@ fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1707,7 +1821,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1717,10 +1831,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.61 +generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1731,7 +1845,7 @@ 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.61. Invocation command line was +generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -1767,7 +1881,7 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -1802,7 +1916,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; @@ -1854,11 +1968,12 @@ _ASBOX case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -1888,9 +2003,9 @@ _ASBOX do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo @@ -1905,9 +2020,9 @@ _ASBOX do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1923,8 +2038,8 @@ _ASBOX echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -1966,21 +2081,24 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -shift -for ac_site_file +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do + test "x$ac_site_file" = xNONE && continue 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;} + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1990,16 +2108,16 @@ 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;} + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -2013,29 +2131,38 @@ for ac_var in $ac_precious_vars; do 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;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { 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;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { 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=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -2045,10 +2172,12 @@ echo "$as_me: current value: $ac_new_val" >&2;} 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;} + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -2094,8 +2223,8 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do 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;} + { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi @@ -2110,34 +2239,34 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } -{ echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - { { 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;} + { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi -{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -echo "$as_me: error: invalid value of canonical build" >&2;} +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +$as_echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build @@ -2154,27 +2283,27 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -echo "$as_me: error: invalid value of canonical host" >&2;} +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +$as_echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host @@ -2194,7 +2323,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac LIBXML_MAJOR_VERSION=2 LIBXML_MINOR_VERSION=7 -LIBXML_MICRO_VERSION=3 +LIBXML_MICRO_VERSION=4 LIBXML_MICRO_VERSION_SUFFIX= LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION @@ -2215,6 +2344,14 @@ else if test -d .svn ; then then LIBXML_VERSION_EXTRA="-SVN$extra" fi +else if test -d .git ; then + extra=`git describe | sed 's+LIBXML[0-9.]*-++'` + echo extra=$extra + if test "$extra" != "" + then + LIBXML_VERSION_EXTRA="-GIT$extra" + fi +fi fi fi @@ -2227,7 +2364,7 @@ fi VERSION=${LIBXML_VERSION} -am__api_version='1.10' +am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2242,11 +2379,12 @@ am__api_version='1.10' # 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; } +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -2275,17 +2413,29 @@ case $as_dir/ in # 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 + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi fi fi done done ;; esac + done IFS=$as_save_IFS +rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then @@ -2298,8 +2448,8 @@ fi INSTALL=$ac_install_sh fi fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -2309,21 +2459,38 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 +$as_echo "$as_me: error: unsafe absolute working directory name" >&2;} + { (exit 1); exit 1; }; };; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 +$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} + { (exit 1); exit 1; }; };; +esac + +# Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + 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` + set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ @@ -2333,9 +2500,9 @@ if ( # 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 + { { $as_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 +$as_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 @@ -2346,45 +2513,158 @@ then # Ok. : else - { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! + { { $as_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! +$as_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; } +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. echo might interpret backslashes. +# Double any \ or $. # By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm -f conftest.sed +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin @@ -2419,8 +2699,8 @@ fi MKDIR_P="$ac_install_sh -d" fi fi -{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -echo "${ECHO_T}$MKDIR_P" >&6; } +{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in @@ -2432,10 +2712,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. @@ -2448,7 +2728,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2459,22 +2739,23 @@ fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6; } + { $as_echo "$as_me:$LINENO: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi test -n "$AWK" && break done -{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } -set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh @@ -2491,12 +2772,12 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2515,8 +2796,8 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi @@ -2561,112 +2842,6 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. @@ -2688,10 +2863,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2704,7 +2879,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2715,11 +2890,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2728,10 +2903,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2744,7 +2919,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2755,11 +2930,11 @@ 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; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -2767,12 +2942,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2785,10 +2956,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2801,7 +2972,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2812,11 +2983,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2825,10 +2996,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2846,7 +3017,7 @@ do continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2869,11 +3040,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2884,10 +3055,10 @@ if test -z "$CC"; then 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2900,7 +3071,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2911,11 +3082,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2928,10 +3099,10 @@ if test -z "$CC"; then 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2944,7 +3115,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2955,11 +3126,11 @@ 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; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2971,12 +3142,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2986,44 +3153,50 @@ fi fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_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 +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (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` +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF @@ -3042,27 +3215,22 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. +{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + ac_rmfiles= for ac_file in $ac_files do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done @@ -3073,10 +3241,11 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' @@ -3087,7 +3256,7 @@ for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most @@ -3114,25 +3283,27 @@ else ac_file='' fi -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } if test -z "$ac_file"; then - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_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 +$as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&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 @@ -3141,49 +3312,53 @@ if test "$cross_compiling" != yes; then *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_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. + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_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. +$as_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; }; } + { (exit 1); exit 1; }; }; } fi fi fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -rm -f a.out a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_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 @@ -3192,31 +3367,33 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_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 +$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3239,40 +3416,43 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 + $as_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 +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_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 +$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3298,20 +3478,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no @@ -3321,15 +3502,19 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes @@ -3356,20 +3541,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" @@ -3394,20 +3580,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag @@ -3433,20 +3620,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3461,8 +3649,8 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -3478,10 +3666,10 @@ else CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC @@ -3552,20 +3740,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3581,15 +3770,15 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac @@ -3606,40 +3795,40 @@ ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo done + @echo this is the am__doit target .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; } +{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi -{ echo "$as_me:$LINENO: result: $_am_result" >&5 -echo "${ECHO_T}$_am_result" >&6; } +{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. @@ -3663,10 +3852,10 @@ fi depcc="$CC" am_compiler_list= -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up @@ -3691,6 +3880,11 @@ else if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -3708,7 +3902,17 @@ else done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested @@ -3718,19 +3922,23 @@ else break fi ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # 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} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -3754,8 +3962,8 @@ else fi fi -{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -3782,11 +3990,12 @@ fi # 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; } +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -3815,17 +4024,29 @@ case $as_dir/ in # 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 + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi fi fi done done ;; esac + done IFS=$as_save_IFS +rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then @@ -3838,8 +4059,8 @@ fi INSTALL=$ac_install_sh fi fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -3854,15 +4075,15 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -3894,20 +4115,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -3931,13 +4153,14 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err @@ -3945,7 +4168,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -3970,8 +4193,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3999,20 +4222,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -4036,13 +4260,14 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err @@ -4050,7 +4275,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -4066,11 +4291,13 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_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 +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi ac_ext=c @@ -4081,10 +4308,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_RM+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $RM in [\\/]* | ?:[\\/]*) @@ -4099,7 +4326,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4112,20 +4339,20 @@ esac fi RM=$ac_cv_path_RM if test -n "$RM"; then - { echo "$as_me:$LINENO: result: $RM" >&5 -echo "${ECHO_T}$RM" >&6; } + { $as_echo "$as_me:$LINENO: result: $RM" >&5 +$as_echo "$RM" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "mv", so it can be a program name with args. set dummy mv; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MV+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $MV in [\\/]* | ?:[\\/]*) @@ -4140,7 +4367,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4153,20 +4380,20 @@ esac fi MV=$ac_cv_path_MV if test -n "$MV"; then - { echo "$as_me:$LINENO: result: $MV" >&5 -echo "${ECHO_T}$MV" >&6; } + { $as_echo "$as_me:$LINENO: result: $MV" >&5 +$as_echo "$MV" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "tar", so it can be a program name with args. set dummy tar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_TAR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $TAR in [\\/]* | ?:[\\/]*) @@ -4181,7 +4408,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4194,20 +4421,20 @@ esac fi TAR=$ac_cv_path_TAR if test -n "$TAR"; then - { echo "$as_me:$LINENO: result: $TAR" >&5 -echo "${ECHO_T}$TAR" >&6; } + { $as_echo "$as_me:$LINENO: result: $TAR" >&5 +$as_echo "$TAR" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi # 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PERL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $PERL in [\\/]* | ?:[\\/]*) @@ -4222,7 +4449,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4235,20 +4462,20 @@ esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then - { echo "$as_me:$LINENO: result: $PERL" >&5 -echo "${ECHO_T}$PERL" >&6; } + { $as_echo "$as_me:$LINENO: result: $PERL" >&5 +$as_echo "$PERL" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "wget", so it can be a program name with args. set dummy wget; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_WGET+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $WGET in [\\/]* | ?:[\\/]*) @@ -4263,7 +4490,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_WGET="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4276,20 +4503,20 @@ esac fi WGET=$ac_cv_path_WGET if test -n "$WGET"; then - { echo "$as_me:$LINENO: result: $WGET" >&5 -echo "${ECHO_T}$WGET" >&6; } + { $as_echo "$as_me:$LINENO: result: $WGET" >&5 +$as_echo "$WGET" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "xmllint", so it can be a program name with args. set dummy xmllint; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_XMLLINT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $XMLLINT in [\\/]* | ?:[\\/]*) @@ -4304,7 +4531,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4317,20 +4544,20 @@ esac fi XMLLINT=$ac_cv_path_XMLLINT if test -n "$XMLLINT"; then - { echo "$as_me:$LINENO: result: $XMLLINT" >&5 -echo "${ECHO_T}$XMLLINT" >&6; } + { $as_echo "$as_me:$LINENO: result: $XMLLINT" >&5 +$as_echo "$XMLLINT" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "xsltproc", so it can be a program name with args. set dummy xsltproc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_XSLTPROC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $XSLTPROC in [\\/]* | ?:[\\/]*) @@ -4345,7 +4572,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4358,20 +4585,20 @@ esac fi XSLTPROC=$ac_cv_path_XSLTPROC if test -n "$XSLTPROC"; then - { echo "$as_me:$LINENO: result: $XSLTPROC" >&5 -echo "${ECHO_T}$XSLTPROC" >&6; } + { $as_echo "$as_me:$LINENO: result: $XSLTPROC" >&5 +$as_echo "$XSLTPROC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking for function prototypes" >&5 -echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for function prototypes" >&5 +$as_echo_n "checking for function prototypes... " >&6; } if test "$ac_cv_prog_cc_c89" != no; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define PROTOTYPES 1 @@ -4383,48 +4610,43 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else + if test -z "$GREP"; then ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` @@ -4439,74 +4661,60 @@ case `"$ac_path_GREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_GREP_found && break 3 + $ac_path_GREP_found && break 3 + done done done - -done IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + if test -z "$ac_cv_path_GREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } -fi - + fi else ac_cv_path_GREP=$GREP fi - fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else + if test -z "$EGREP"; then ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` @@ -4521,40 +4729,31 @@ case `"$ac_path_EGREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_EGREP_found && break 3 + $ac_path_EGREP_found && break 3 + done done done - -done IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + if test -z "$ac_cv_path_EGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } -fi - + fi else ac_cv_path_EGREP=$EGREP fi - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4581,20 +4780,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no @@ -4686,37 +4886,40 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_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 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -4738,11 +4941,11 @@ fi 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; } +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4760,20 +4963,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" @@ -4781,12 +4985,15 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -4805,20 +5012,21 @@ fi for ac_header in string.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4834,32 +5042,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4873,69 +5082,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -4943,862 +5156,691 @@ fi done -test "x$U" != "x" && { { echo "$as_me:$LINENO: error: Compiler not ANSI compliant" >&5 -echo "$as_me: error: Compiler not ANSI compliant" >&2;} +test "x$U" != "x" && { { $as_echo "$as_me:$LINENO: error: Compiler not ANSI compliant" >&5 +$as_echo "$as_me: error: Compiler not ANSI compliant" >&2;} { (exit 1); exit 1; }; } +enable_win32_dll=yes - -# Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AS+set}" = set; then + $as_echo_n "(cached) " >&6 else - enable_shared=yes -fi - - -# Check whether --enable-static was given. -if test "${enable_static+set}" = set; then - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. else - enable_static=yes -fi - +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AS="${ac_tool_prefix}as" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS -# Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:$LINENO: result: $AS" >&5 +$as_echo "$AS" >&6; } else - enable_fast_install=yes + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } -if test "${lt_cv_path_SED+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_AS+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else - # Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AS="as" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 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 +done +IFS=$as_save_IFS fi - -SED=$lt_cv_path_SED - -{ echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&6; } - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } else - with_gnu_ld=no + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } 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; } + if test "x$ac_ct_AS" = x; then + AS="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi else - { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } + AS="$ac_cv_prog_AS" fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DLLTOOL+set}" = set; then + $as_echo_n "(cached) " >&6 else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 + break 2 + fi +done +done +IFS=$as_save_IFS + fi fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:$LINENO: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi -LD="$lt_cv_path_LD" -if test -n "$LD"; then - { echo "$as_me:$LINENO: result: $LD" >&5 -echo "${ECHO_T}$LD" >&6; } + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + 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 +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&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 + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi else - lt_cv_ld_reload_flag='-r' + DLLTOOL="$ac_cv_prog_DLLTOOL" fi -{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac -{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 -echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } -if test "${lt_cv_path_NM+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OBJDUMP+set}" = set; then + $as_echo_n "(cached) " >&6 else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +done +done +IFS=$as_save_IFS + 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" +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi -{ 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; } + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } else - { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 -echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi else - 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. + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi -case $host_os in -aix4* | aix5*) - lt_cv_deplibs_check_method=pass_all ;; +esac -beos*) - lt_cv_deplibs_check_method=pass_all - ;; +test -z "$AS" && AS=as -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; +test -z "$DLLTOOL" && DLLTOOL=dlltool -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; +test -z "$OBJDUMP" && OBJDUMP=objdump -netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; -nto-qnx*) - lt_cv_deplibs_check_method=unknown - ;; -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -fi -{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 -echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown +macro_version='2.2.6' +macro_revision='1.3012' -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -# Allow CC to be a program name with arguments. -compiler=$CC -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval=$enable_libtool_lock; -fi -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 5514 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - libsuff=64 - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int -main () -{ +ltmain="$ac_aux_dir/ltmain.sh" - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; +{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if test "${ac_cv_path_SED+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + $as_unset ac_script || ac_script= + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - lt_cv_cc_needs_belf=yes + + $ac_path_SED_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 +$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + fi else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_path_SED=$SED +fi - lt_cv_cc_needs_belf=no fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" -fi -{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -*-*-cygwin* | *-*-mingw* | *-*-pw32*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_DLLTOOL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if test "${ac_cv_path_FGREP+set}" = set; then + $as_echo_n "(cached) " >&6 else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done done IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { echo "$as_me:$LINENO: result: $DLLTOOL" >&5 -echo "${ECHO_T}$DLLTOOL" >&6; } + if test -z "$ac_cv_path_FGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + ac_cv_path_FGREP=$FGREP fi - + fi fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 -echo "${ECHO_T}$ac_ct_DLLTOOL" >&6; } +if test "${lt_cv_path_LD+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 -echo "${ECHO_T}no" >&6; } + lt_cv_path_LD="$LD" # Let the user override the test with a path. +fi fi - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi +LD="$lt_cv_path_LD" +if test -n "$LD"; then + { $as_echo "$as_me:$LINENO: result: $LD" >&5 +$as_echo "$LD" >&6; } else - DLLTOOL="$ac_cv_prog_DLLTOOL" + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if test "${lt_cv_path_NM+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. -set dummy ${ac_tool_prefix}as; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_AS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + for ac_prog in "dumpbin -symbols" "link -dump -symbols" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DUMPBIN+set}" = set; then + $as_echo_n "(cached) " >&6 else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -5807,8 +5849,8 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AS="${ac_tool_prefix}as" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5817,28 +5859,32 @@ IFS=$as_save_IFS fi fi -AS=$ac_cv_prog_AS -if test -n "$AS"; then - { echo "$as_me:$LINENO: result: $AS" >&5 -echo "${ECHO_T}$AS" >&6; } +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$DUMPBIN" && break + done fi -if test -z "$ac_cv_prog_AS"; then - ac_ct_AS=$AS - # Extract the first word of "as", so it can be a program name with args. -set dummy as; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_AS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in "dumpbin -symbols" "link -dump -symbols" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then + $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_AS"; then - ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -5847,8 +5893,8 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AS="as" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5857,81 +5903,351 @@ IFS=$as_save_IFS fi fi -ac_ct_AS=$ac_cv_prog_ac_ct_AS -if test -n "$ac_ct_AS"; then - { echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 -echo "${ECHO_T}$ac_ct_AS" >&6; } +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - if test "x$ac_ct_AS" = x; then - AS="false" + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - AS=$ac_ct_AS + DUMPBIN=$ac_ct_DUMPBIN fi -else - AS="$ac_cv_prog_AS" fi - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { echo "$as_me:$LINENO: result: $OBJDUMP" >&5 -echo "${ECHO_T}$OBJDUMP" >&6; } +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if test "${lt_cv_nm_interface+set}" = set; then + $as_echo_n "(cached) " >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:5951: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:5954: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:5957: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +# find the maximum length of command line arguments +{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:$LINENO: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OBJDUMP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + - fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. @@ -5944,7 +6260,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5955,11 +6271,11 @@ fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 -echo "${ECHO_T}$ac_ct_OBJDUMP" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then @@ -5967,12 +6283,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP @@ -5981,174 +6293,236 @@ else OBJDUMP="$ac_cv_prog_OBJDUMP" fi - ;; +test -z "$OBJDUMP" && OBJDUMP=objdump -esac -need_locks="$enable_libtool_lock" -for ac_header in dlfcn.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no -fi +{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if test "${lt_cv_deplibs_check_method+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +beos*) + lt_cv_deplibs_check_method=pass_all + ;; - ac_header_preproc=no -fi +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 + ;; -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +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' + ;; -# 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 +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +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 ;; - 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;} + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown -fi -done -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ 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 + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + $as_echo_n "(cached) " >&6 else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. + 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 @@ -6157,8 +6531,8 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6167,32 +6541,28 @@ IFS=$as_save_IFS fi fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6; } +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:$LINENO: result: $AR" >&5 +$as_echo "$AR" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - test -n "$CXX" && break - done fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ 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 +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. + 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 @@ -6201,8 +6571,8 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6211,645 +6581,152 @@ IFS=$as_save_IFS fi fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6; } +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" + if test "x$ac_ct_AR" = x; then + AR="false" else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - CXX=$ac_ct_CXX + AR=$ac_ct_AR fi +else + AR="$ac_cv_prog_AR" fi - fi -fi -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C++ compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } -GXX=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int -main () -{ +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" + if test "x$ac_ct_STRIP" = x; then + STRIP=":" else - CXXFLAGS="-g" + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP fi else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi + STRIP="$ac_cv_prog_STRIP" fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -depcc="$CXX" am_compiler_list= +test -z "$STRIP" && STRIP=: -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - - - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 -echo "${ECHO_T}$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -fi -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + $as_echo_n "(cached) " >&6 else - if test -n "$F77"; then - ac_cv_prog_F77="$F77" # Let the user override the test. + 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 @@ -6858,8 +6735,8 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6868,32 +6745,28 @@ IFS=$as_save_IFS fi fi -F77=$ac_cv_prog_F77 -if test -n "$F77"; then - { echo "$as_me:$LINENO: result: $F77" >&5 -echo "${ECHO_T}$F77" >&6; } +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - test -n "$F77" && break - done fi -if test -z "$F77"; then - ac_ct_F77=$F77 - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_F77"; then - ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. + 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 @@ -6902,8 +6775,8 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_F77="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6912,321 +6785,102 @@ IFS=$as_save_IFS fi fi -ac_ct_F77=$ac_cv_prog_ac_ct_F77 -if test -n "$ac_ct_F77"; then - { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 -echo "${ECHO_T}$ac_ct_F77" >&6; } +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - - test -n "$ac_ct_F77" && break -done - - if test "x$ac_ct_F77" = x; then - F77="" + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - F77=$ac_ct_F77 + RANLIB=$ac_ct_RANLIB fi -fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi +test -z "$RANLIB" && RANLIB=: -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -rm -f a.out -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } -if test "${ac_cv_f77_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif - end -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_f77_compiler_gnu=$ac_compiler_gnu +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi -{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} -ac_save_FFLAGS=$FFLAGS -FFLAGS= -{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 -echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_f77_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - FFLAGS=-g -cat >conftest.$ac_ext <<_ACEOF - program main - end -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_f77_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_prog_f77_g=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 -echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } -if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS -elif test $ac_cv_prog_f77_g = yes; then - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-g -O2" - else - FFLAGS="-g" - fi -else - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-O2" - else - FFLAGS= - fi -fi -G77=`test $ac_compiler_gnu = yes && echo yes` -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -# find the maximum length of command line arguments -{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 -echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - i=0 - teststring="ABCD" - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -fi -if test -n $lt_cv_sys_max_cmd_len ; then - { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 -echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } -else - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } -fi + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. -{ 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; } +{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. @@ -7238,33 +6892,18 @@ symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; -cygwin* | mingw* | pw32*) +cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; -hpux*) # Its linker distinguishes data from code symbols +hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux* | k*bsd*-gnu) - if test "$host_cpu" = ia64; then - symcode='[ABCDGIRSTW]' - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' @@ -7289,56 +6928,84 @@ sysv4) ;; esac +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) - opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + 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. +# Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* - cat > conftest.$ac_ext < conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; -void nm_test_func(){} +void nm_test_func(void); +void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} -EOF +_LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_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 + $as_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 @@ -7348,42 +7015,44 @@ EOF 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 + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif -EOF +_LT_EOF # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + 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 + cat <<_LT_EOF >> conftest.$ac_ext -/* The mapping between symbol names and symbols. */ +/* The mapping between symbol names and symbols. */ const struct { const char *name; - lt_ptr_t address; + void *address; } -lt_preloaded_symbols[] = +lt__PROGRAM__LTX_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} + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} }; +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + #ifdef __cplusplus } #endif -EOF +_LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" @@ -7393,7 +7062,7 @@ EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi @@ -7412,7 +7081,7 @@ EOF echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi - rm -f conftest* conftst* + rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then @@ -7428,87 +7097,269 @@ 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; } + { $as_echo "$as_me:$LINENO: result: failed" >&5 +$as_echo "failed" >&6; } else - { echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6; } + { $as_echo "$as_me:$LINENO: result: ok" >&5 +$as_echo "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 + + + + + + + + + + + + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_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 7159 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_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* ;; -esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e 1s/^X//' -sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; -# Same as above, but do not quote variable references. -double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if test "${lt_cv_cc_needs_belf+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' +int +main () +{ -# Constants: -rm="rm -f" + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + lt_cv_cc_needs_belf=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Global variables: -default_ofile=libtool -can_build_shared=yes + lt_cv_cc_needs_belf=no +fi -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -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 +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DSYMUTIL+set}" = set; then + $as_echo_n "(cached) " >&6 else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -7517,8 +7368,8 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7527,28 +7378,28 @@ IFS=$as_save_IFS fi fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ 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 +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then + $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -7557,8 +7408,8 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7567,44 +7418,40 @@ IFS=$as_save_IFS fi fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -echo "${ECHO_T}$ac_ct_AR" >&6; } +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - if test "x$ac_ct_AR" = x; then - AR="false" + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - AR=$ac_ct_AR + DSYMUTIL=$ac_ct_DSYMUTIL fi else - AR="$ac_cv_prog_AR" + DSYMUTIL="$ac_cv_prog_DSYMUTIL" 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 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_NMEDIT+set}" = set; then + $as_echo_n "(cached) " >&6 else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -7613,8 +7460,8 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7623,28 +7470,28 @@ IFS=$as_save_IFS fi fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ 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 +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then + $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -7653,8 +7500,8 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7663,44 +7510,40 @@ IFS=$as_save_IFS fi fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - RANLIB=$ac_ct_RANLIB + NMEDIT=$ac_ct_NMEDIT fi else - RANLIB="$ac_cv_prog_RANLIB" + NMEDIT="$ac_cv_prog_NMEDIT" 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 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_LIPO+set}" = set; then + $as_echo_n "(cached) " >&6 else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -7709,8 +7552,8 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7719,28 +7562,28 @@ IFS=$as_save_IFS fi fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ 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 +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then + $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -7749,8 +7592,8 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7759,5847 +7602,2867 @@ IFS=$as_save_IFS fi fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - if test "x$ac_ct_STRIP" = x; then - STRIP=":" + if test "x$ac_ct_LIPO" = x; then + LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - STRIP=$ac_ct_STRIP + LIPO=$ac_ct_LIPO fi else - STRIP="$ac_cv_prog_STRIP" + LIPO="$ac_cv_prog_LIPO" fi + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OTOOL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - +done +IFS=$as_save_IFS -# 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 +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&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 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" fi -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; } + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OTOOL64+set}" = set; then + $as_echo_n "(cached) " >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS -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 +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&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 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi -*** 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 +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS -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; } +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" else - MAGIC_CMD=: + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 fi +else + OTOOL64="$ac_cv_prog_OTOOL64" fi - fi - ;; -esac -enable_dlopen=no -enable_win32_dll=yes -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval=$enable_libtool_lock; -fi -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi -test -z "$pic_mode" && pic_mode=default -# Use C for the default configuration in the libtool script -tagname= -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -# Source file extension for C test sources. -ac_ext=c -# Object file extension for compiled C test sources. -objext=o -objext=$objext -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -# Allow CC to be a program name with arguments. -compiler=$CC -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* -lt_prog_compiler_no_builtin_flag= -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' -{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + + { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if test "${lt_cv_apple_cc_single_mod+set}" = set; then + $as_echo_n "(cached) " >&6 else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8068: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:8072: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $rm conftest* + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if test "${lt_cv_ld_exported_symbols_list+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + lt_cv_ld_exported_symbols_list=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + lt_cv_ld_exported_symbols_list=no 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" +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + + +for ac_header in dlfcn.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else - : + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF -lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= +fi -{ 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; } +done - 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' - ;; +# Set options - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; + enable_dlopen=no - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" ;; + esac +else + enable_shared=yes +fi - 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 - ;; + + + + + + + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; *) - lt_prog_compiler_pic='-fPIC' + 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 - # 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 - ;; +else + enable_static=yes +fi - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - esac - ;; - esac - ;; - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then + withval=$with_pic; pic_mode="$withval" +else + pic_mode=default +fi + + +test -z "$pic_mode" && pic_mode=default + + - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; *) - lt_prog_compiler_can_build_shared=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 - fi +else + enable_fast_install=yes +fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8358: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:8362: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works=yes - fi - fi - $rm conftest* -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } -if test x"$lt_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works=yes - fi - else - lt_prog_compiler_static_works=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } -if test x"$lt_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8462: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:8466: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - runpath_var= - allow_undefined_flag= - enable_shared_with_static_runtimes=no - archive_cmds= - archive_expsym_cmds= - old_archive_From_new_cmds= - old_archive_from_expsyms_cmds= - export_dynamic_flag_spec= - whole_archive_flag_spec= - thread_safe_flag_spec= - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_direct=no - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - link_all_deplibs=unknown - hardcode_automatic=no - module_cmds= - module_expsym_cmds= - always_export_symbols=no - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - ld_shlibs=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. -EOF - fi - ;; - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs=no - ;; - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test $supports_anon_versioning = yes; then - archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - ld_shlibs=no - fi - ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <&2 -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. +test -z "$LN_S" && LN_S="ln -s" -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - archive_cmds='' - hardcode_direct=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST fi + +{ $as_echo "$as_me:$LINENO: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if test "${lt_cv_objdir+set}" = set; then + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no - ;; - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs=no - ;; - esac - fi - ;; - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - freebsd1*) - ld_shlibs=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes +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 - # 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' - ;; +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' - hardcode_direct=yes - export_dynamic_flag_spec='${wl}-E' +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - export_dynamic_flag_spec='${wl}-E' +# Global variables: +ofile=libtool +can_build_shared=yes - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a - 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 - ;; +with_gnu_ld="$lt_cv_prog_gnu_ld" - 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 - ;; +old_CC="$CC" +old_CFLAGS="$CFLAGS" - 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 - ;; +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - 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=: - ;; +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' +*** 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 - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' +_LT_EOF + fi ;; + esac fi - hardcode_libdir_separator=: - ;; + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi - solaris*) - no_undefined_flag=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:$LINENO: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac fi - ;; + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; + else + MAGIC_CMD=: + fi +fi - *) - ld_shlibs=no - ;; - esac fi + ;; +esac -{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -echo "${ECHO_T}$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no +# Use C for the default configuration in the libtool script -# -# 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 +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 - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 -echo "${ECHO_T}$archive_cmds_need_lc" >&6; } - ;; - esac - fi - ;; -esac +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' -{ 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 no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`echo $lt_search_path_spec` + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + $as_echo_n "(cached) " >&6 else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8522: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:8526: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + fi -need_lib_prefix=unknown -hardcode_into_libs=no +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown +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 -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH +fi - # 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 + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes +{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' case $host_os in - 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"` + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' 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}' + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac ;; - esac - ;; - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; -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`' + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; -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 - ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; -freebsd1*) - dynamic_linker=no - ;; + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes + 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 ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; -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;; + lt_prog_compiler_pic='-fPIC' + ;; esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; + # 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 + ;; -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 - ;; + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no + 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 ;; *) - shlibpath_overrides_runpath=yes + lt_prog_compiler_pic='+Z' ;; esac - else - shlibpath_overrides_runpath=yes - fi - ;; + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; -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 - ;; + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; -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" - ;; + linux* | k*bsd*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + esac + ;; + esac + ;; -rdos*) - dynamic_linker=no - ;; + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; -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' - ;; + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; -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 - ;; + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH + rdos*) + lt_prog_compiler_static='-non_shared' ;; - siemens) - need_lib_prefix=no + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' ;; - 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 - ;; + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; esac fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; -*) - dynamic_linker=no - ;; +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: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no +{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +$as_echo "$lt_prog_compiler_pic" >&6; } -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var" || \ - test "X$hardcode_automatic" = "Xyes" ; then - # We can hardcode non-existant directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 -echo "${ECHO_T}$hardcode_action" >&6; } -if test "$hardcode_action" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -striplib= -old_striplib= -{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if test "${lt_cv_prog_compiler_pic_works+set}" = set; then + $as_echo_n "(cached) " >&6 else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - ;; - *) - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - ;; - esac + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8861: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:8865: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac else - lt_cv_dlopen=no - lt_cv_dlopen_libs= + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; +fi - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - darwin*) - # if libdl is installed we need to link against it - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test "${lt_cv_prog_compiler_static_works+set}" = set; then + $as_echo_n "(cached) " >&6 else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= fi - ;; - *) - { echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } -if test "${ac_cv_func_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif -#undef shl_load -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shl_load || defined __stub___shl_load -choke me -#endif -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_shl_load=yes + { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - ac_cv_func_shl_load=no -fi + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8966: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:8970: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } -if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" -else - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + $as_echo_n "(cached) " >&6 else - 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. */ + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dld_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no -fi + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:9021: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:9025: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" -else - { echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } -if test "${ac_cv_func_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif -#undef dlopen -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_dlopen || defined __stub___dlopen -choke me -#endif -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_dlopen=yes +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext + need_locks=no fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } -if test $ac_cv_func_dlopen = yes; then - lt_cv_dlopen="dlopen" -else - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_svld_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } -if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dld_dld_link=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= - ac_cv_lib_dld_dld_link=no -fi + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" -fi + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` 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 -fi + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 +*** Warning: the GNU linker, at least up to release 2.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. -fi +_LT_EOF + fi + ;; + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; -fi + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' -fi + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; -fi + gnu* | linux* | tpf* | k*bsd*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - ;; - esac + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' + archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + 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 + ;; - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" +*** 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. - { 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 <&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 + ;; -#if HAVE_DLFCN_H -#include -#endif + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 -#include +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. -#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; +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + *) + 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 - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; -fi -{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi -#include + # 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. -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' -/* 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 + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi -#ifdef __cplusplus -extern "C" void exit (int); -#endif + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -void fnord() { int i=42;} -int main () +int +main () { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - exit (status); + ; + return 0; } -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi -{ 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 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - 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 +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -# Report which library types will actually be built -{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } -test "$can_build_shared" = "no" && enable_shared=no + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -# 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 - ;; +int +main () +{ -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac -{ echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -{ echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6; } - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler \ - CC \ - LD \ - lt_prog_compiler_wl \ - lt_prog_compiler_pic \ - lt_prog_compiler_static \ - lt_prog_compiler_no_builtin_flag \ - export_dynamic_flag_spec \ - thread_safe_flag_spec \ - whole_archive_flag_spec \ - enable_shared_with_static_runtimes \ - old_archive_cmds \ - old_archive_from_new_cmds \ - predep_objects \ - postdep_objects \ - predeps \ - postdeps \ - compiler_lib_search_path \ - archive_cmds \ - archive_expsym_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - old_archive_from_expsyms_cmds \ - allow_undefined_flag \ - no_undefined_flag \ - export_symbols_cmds \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ - hardcode_automatic \ - module_cmds \ - module_expsym_cmds \ - lt_cv_prog_compiler_c_o \ - fix_srcfile_path \ - exclude_expsyms \ - include_expsyms; do - - case $var in - old_archive_cmds | \ - old_archive_from_new_cmds | \ - archive_cmds | \ - archive_expsym_cmds | \ - module_cmds | \ - module_expsym_cmds | \ - old_archive_from_expsyms_cmds | \ - export_symbols_cmds | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -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 +fi -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -# A sed program that does not truncate output. -SED=$lt_SED + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e 1s/^X//" + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; -# 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 + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; -# The names of the tagged configurations supported by this script. -available_tags= + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + 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 "X$deplibs" | $Xsed -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 + ;; -# ### BEGIN LIBTOOL CONFIG + darwin* | rhapsody*) -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared + else + ld_shlibs=no + fi -# 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 + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + freebsd1*) + ld_shlibs=no + ;; -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install + # 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 + ;; -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os + # 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 + ;; -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; -# An echo program that does not interpret backslashes. -echo=$lt_echo + 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 -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS + # 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' + ;; -# A C compiler. -LTCC=$lt_LTCC + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: -# A language-specific compiler. -CC=$lt_compiler + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' -# Is the compiler the GNU C compiler? -with_gcc=$GCC + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; -# An ERE matcher. -EGREP=$lt_EGREP + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat >conftest.$ac_ext <<_ACEOF +int foo(void) {} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -# The linker used to build libraries. -LD=$lt_LD +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Whether we need hard or soft links. -LN_S=$lt_LN_S -# A BSD-compatible nm program. -NM=$lt_NM +fi -# A symbol stripping program -STRIP=$lt_STRIP +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD + 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 + ;; -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" + 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 + ;; -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" + *nto* | *qnx*) + ;; -# Used on cygwin: assembler. -AS="$AS" + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; -# The name of the directory that contains temporary libtool files. -objdir=$objdir + 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' + ;; -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds + 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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl + 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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' -# Object file suffix (normally "o"). -objext="$ac_objext" + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; -# Old archive suffix (normally "a"). -libext="$libext" + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' + 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 + ;; -# Executable file suffix (normally ""). -exeext="$exeext" + 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 + ;; -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic -pic_mode=$pic_mode + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len + 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 + ;; -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' -# Must we lock files when doing compilation? -need_locks=$lt_need_locks + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' -# Do we need a version for libraries? -need_version=$need_version + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; -# Whether dlopen is supported. -dlopen_support=$enable_dlopen + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self + *) + ld_shlibs=no + ;; + esac -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi + fi -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static +{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag +with_gnu_ld=$with_gnu_ld -# 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 +# +# 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 -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_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* + { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +$as_echo "$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; +esac -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address -# This is the shared library runtime path variable. -runpath_var=$runpath_var -# This is the shared library path variable. -shlibpath_var=$shlibpath_var -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms -# ### END LIBTOOL CONFIG -__EOF__ - case $host_os in - aix3*) - cat <<\EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -EOF - ;; - esac - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -CC="$lt_save_CC" -# Check whether --with-tags was given. -if test "${with_tags+set}" = set; then - withval=$with_tags; tagnames="$withval" -fi -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 -echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} - fi - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 -echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} - else - { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 -echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in - "") ;; - *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 -echo "$as_me: error: invalid tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 -echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} - { (exit 1); exit 1; }; } - fi - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - CXX) - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_flag_spec_ld_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[]) { return(0); }' -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -# Allow CC to be a program name with arguments. -compiler=$CC -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_LD=$LD -lt_save_GCC=$GCC -GCC=$GXX -lt_save_with_gnu_ld=$with_gnu_ld -lt_save_path_LD=$lt_cv_path_LD -if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx -else - $as_unset lt_cv_prog_gnu_ld -fi -if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX -else - $as_unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -compiler=$CC -compiler_CXX=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' -else - lt_prog_compiler_no_builtin_flag_CXX= -fi -if test "$GXX" = yes; then - # Set up default GNU C++ configuration -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } -else - { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -echo "${ECHO_T}$LD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ - grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' -else - GXX=no - with_gnu_ld=no - wlarc= -fi -# PORTME: fill in a description of your system's C++ link characteristics -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } -ld_shlibs_CXX=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - - if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' - link_all_deplibs_CXX=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_CXX=no - ;; - esac - fi - ;; - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - freebsd[12]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - ld_shlibs_CXX=no - ;; - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - gnu*) - ;; - hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - case $host_cpu in - hppa*64*|ia64*) ;; - *) - export_dynamic_flag_spec_CXX='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc*) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC*) - # Portland Group C++ compiler - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - else - ld_shlibs_CXX=no - fi - ;; - osf3*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ - $rm $lib.exp' - - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - output_verbose_link_cmd='echo' - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - fi - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; -esac -{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no -GCC_CXX="$GXX" -LD_CXX="$LD" -cat > conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - # The `*' in the case matches for architectures that use `case' in - # $output_verbose_cmd can trigger glob expansion during the loop - # eval without this substitution. - output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` - - for p in `eval $output_verbose_link_cmd`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" \ - || test $p = "-R"; then - prev=$p - continue - else - prev= - fi - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" - else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" - fi - fi - ;; - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - *) ;; # Ignore the rest. - esac - done - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi -$rm -f confest.$objext -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - # - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac -lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix4* | aix5*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_CXX='-qnocommon' - lt_prog_compiler_wl_CXX='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC*) - # Portland Group C++ compiler. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13333: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:13337: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_CXX=yes - fi - fi - $rm conftest* -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } -if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; -esac -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_CXX=yes - fi - else - lt_prog_compiler_static_works_CXX=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } -if test x"$lt_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13437: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:13441: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' +if test "$GCC" = yes; then 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' + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else - 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' + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; - cygwin* | mingw*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no -{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_CXX=no - else - archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" - -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown +# 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*) @@ -13611,7 +10474,7 @@ aix3*) soname_spec='${libname}${release}${shared_ext}$major' ;; -aix4* | aix5*) +aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -13630,7 +10493,7 @@ aix4* | aix5*) 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 + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no @@ -13656,9 +10519,18 @@ aix4* | aix5*) ;; 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' + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$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' + ;; + esac ;; beos*) @@ -13681,25 +10553,28 @@ bsdi[45]*) # libtool to hard-code these into programs ;; -cygwin* | mingw* | pw32*) +cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 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'\''`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ - $rm \$dlpath' + $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in @@ -13708,20 +10583,20 @@ cygwin* | mingw* | pw32*) 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* | cegcc*) # 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 + 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'` + 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"` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) @@ -13745,12 +10620,13 @@ darwin* | rhapsody*) 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' + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -13843,18 +10719,18 @@ hpux9* | hpux10* | hpux11*) 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 - ;; - *) + 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 @@ -13931,16 +10807,75 @@ linux* | k*bsd*-gnu) finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then + shlibpath_overrides_runpath=yes +fi + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi @@ -13957,7 +10892,7 @@ netbsd*) version_type=sunos need_lib_prefix=no need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + 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' @@ -13978,14 +10913,16 @@ newsos6) shlibpath_overrides_runpath=yes ;; -nto-qnx*) - version_type=linux +*nto* | *qnx*) + version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' ;; openbsd*) @@ -13994,13 +10931,13 @@ openbsd*) need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + 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 @@ -14072,7 +11009,6 @@ sysv4 | sysv4.3*) sni) shlibpath_overrides_runpath=no need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) @@ -14103,13 +11039,12 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" @@ -14119,6 +11054,17 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) sys_lib_dlsearch_path_spec='/usr/lib' ;; +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/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}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -14130,8 +11076,8 @@ uts4*) dynamic_linker=no ;; esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } +{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -14139,6470 +11085,1344 @@ if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || \ - test -n "$runpath_var_CXX" || \ - test "X$hardcode_automatic_CXX" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_CXX" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi -{ 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 +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_CXX \ - CC_CXX \ - LD_CXX \ - lt_prog_compiler_wl_CXX \ - lt_prog_compiler_pic_CXX \ - lt_prog_compiler_static_CXX \ - lt_prog_compiler_no_builtin_flag_CXX \ - export_dynamic_flag_spec_CXX \ - thread_safe_flag_spec_CXX \ - whole_archive_flag_spec_CXX \ - enable_shared_with_static_runtimes_CXX \ - old_archive_cmds_CXX \ - old_archive_from_new_cmds_CXX \ - predep_objects_CXX \ - postdep_objects_CXX \ - predeps_CXX \ - postdeps_CXX \ - compiler_lib_search_path_CXX \ - archive_cmds_CXX \ - archive_expsym_cmds_CXX \ - postinstall_cmds_CXX \ - postuninstall_cmds_CXX \ - old_archive_from_expsyms_cmds_CXX \ - allow_undefined_flag_CXX \ - no_undefined_flag_CXX \ - export_symbols_cmds_CXX \ - hardcode_libdir_flag_spec_CXX \ - hardcode_libdir_flag_spec_ld_CXX \ - hardcode_libdir_separator_CXX \ - hardcode_automatic_CXX \ - module_cmds_CXX \ - module_expsym_cmds_CXX \ - lt_cv_prog_compiler_c_o_CXX \ - fix_srcfile_path_CXX \ - exclude_expsyms_CXX \ - include_expsyms_CXX; do - - case $var in - old_archive_cmds_CXX | \ - old_archive_from_new_cmds_CXX | \ - archive_cmds_CXX | \ - archive_expsym_cmds_CXX | \ - module_cmds_CXX | \ - module_expsym_cmds_CXX | \ - old_archive_from_expsyms_cmds_CXX | \ - export_symbols_cmds_CXX | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac -cfgfile="$ofile" - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared -# Whether or not to build static libraries. -build_old_libs=$enable_static -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os -# An echo program that does not interpret backslashes. -echo=$lt_echo -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS -# A C compiler. -LTCC=$lt_LTCC -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS -# A language-specific compiler. -CC=$lt_compiler_CXX -# Is the compiler the GNU C compiler? -with_gcc=$GCC_CXX -# An ERE matcher. -EGREP=$lt_EGREP -# The linker used to build libraries. -LD=$lt_LD_CXX -# Whether we need hard or soft links. -LN_S=$lt_LN_S -# A BSD-compatible nm program. -NM=$lt_NM -# A symbol stripping program -STRIP=$lt_STRIP -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" -# Used on cygwin: assembler. -AS="$AS" -# The name of the directory that contains temporary libtool files. -objdir=$objdir -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX -# Object file suffix (normally "o"). -objext="$ac_objext" -# Old archive suffix (normally "a"). -libext="$libext" -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' -# Executable file suffix (normally ""). -exeext="$exeext" -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX -pic_mode=$pic_mode -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX -# Must we lock files when doing compilation? -need_locks=$lt_need_locks -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix -# Do we need a version for libraries? -need_version=$need_version -# Whether dlopen is supported. -dlopen_support=$enable_dlopen -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX -# Library versioning type. -version_type=$version_type -# Format of library name prefix. -libname_spec=$lt_libname_spec -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_CXX -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_CXX -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_CXX -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_CXX -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_CXX -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_CXX -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_CXX -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX + { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi -# 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__ + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -with_gnu_ld=$lt_save_with_gnu_ld -lt_cv_path_LDCXX=$lt_cv_path_LD -lt_cv_path_LD=$lt_save_path_LD -lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld -lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld - - else - tagname="" - fi - ;; + lt_cv_dlopen=no + lt_cv_dlopen_libs= - 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 + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; -# Code to be used in simple compile tests -lt_simple_compile_test_code="\ - subroutine t - return - end -" + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; -# Code to be used in simple link tests -lt_simple_link_test_code="\ - program t - end -" + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; -# ltmain only uses $CC for tagged configurations so make sure $CC is set. + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dl_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + ac_cv_lib_dl_dlopen=no +fi -# Allow CC to be a program name with arguments. -compiler=$CC +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* +fi -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* + ;; + *) + { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 +$as_echo_n "checking for shl_load... " >&6; } +if test "${ac_cv_func_shl_load+set}" = set; then + $as_echo_n "(cached) " >&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 -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${F77-"f77"} -compiler=$CC -compiler_F77=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +/* 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 -{ 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; } +#undef shl_load -{ 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 +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_shl_load || defined __stub___shl_load +choke me +#endif -# 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 - ;; +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac -{ echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6; } +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_shl_load=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -{ 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; } + ac_cv_func_shl_load=no +fi -GCC_F77="$G77" -LD_F77="$LD" +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +$as_echo "$ac_cv_func_shl_load" >&6; } +if test "x$ac_cv_func_shl_load" = x""yes; then + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -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' - ;; +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dld_shl_load=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; + ac_cv_lib_dld_shl_load=no +fi - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - ;; +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 +$as_echo_n "checking for dlopen... " >&6; } +if test "${ac_cv_func_dlopen+set}" = set; then + $as_echo_n "(cached) " >&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 - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_F77='-fno-common' - ;; +/* 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. */ - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; +#ifdef __STDC__ +# include +#else +# include +#endif - 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 - ;; +#undef dlopen - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_F77=-Kconform_pic - fi - ;; +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_dlopen || defined __stub___dlopen +choke me +#endif - 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 - ;; +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - *) - 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 - ;; + ac_cv_func_dlopen=no +fi - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - ;; +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +$as_echo "$ac_cv_func_dlopen" >&6; } +if test "x$ac_cv_func_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - 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' - ;; +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dl_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_F77='-non_shared' - ;; + ac_cv_lib_dl_dlopen=no +fi - newsos6) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fpic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_F77='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_F77='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_svld_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - rdos*) - lt_prog_compiler_static_F77='-non_shared' - ;; + ac_cv_lib_svld_dlopen=no +fi - solaris*) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_F77='-Qoption ld ';; - *) - lt_prog_compiler_wl_F77='-Wl,';; - esac - ;; +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - sunos4*) - lt_prog_compiler_wl_F77='-Qoption ld ' - lt_prog_compiler_pic_F77='-PIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dld_dld_link=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; + ac_cv_lib_dld_dld_link=no +fi - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_F77='-Kconform_pic' - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = x""yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - unicos*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_can_build_shared_F77=no - ;; +fi - uts4*) - lt_prog_compiler_pic_F77='-pic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - *) - lt_prog_compiler_can_build_shared_F77=no - ;; - esac - fi +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 +fi -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_F77=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_F77" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15001: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:15005: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_F77=yes - fi - fi - $rm conftest* fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } -if test x"$lt_prog_compiler_pic_works_F77" = xyes; then - case $lt_prog_compiler_pic_F77 in - "" | " "*) ;; - *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; - esac -else - lt_prog_compiler_pic_F77= - lt_prog_compiler_can_build_shared_F77=no -fi fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_F77= - ;; - *) - lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; -esac + esac -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_F77=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_F77=yes - fi - else - lt_prog_compiler_static_works_F77=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" -if test x"$lt_prog_compiler_static_works_F77" = xyes; then - : -else - lt_prog_compiler_static_F77= -fi + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" -{ echo "$as_me:$LINENO: checking 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 + { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then + $as_echo_n "(cached) " >&6 else - lt_cv_prog_compiler_c_o_F77=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15105: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:15109: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_F77=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 11824 "configure" +#include "confdefs.h" -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; } +#if HAVE_DLFCN_H +#include +#endif +#include -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 +#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 + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no fi -else - need_locks=no fi +rm -fr conftest* -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - runpath_var= - allow_undefined_flag_F77= - enable_shared_with_static_runtimes_F77=no - archive_cmds_F77= - archive_expsym_cmds_F77= - old_archive_From_new_cmds_F77= - old_archive_from_expsyms_cmds_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - thread_safe_flag_spec_F77= - hardcode_libdir_flag_spec_F77= - hardcode_libdir_flag_spec_ld_F77= - hardcode_libdir_separator_F77= - hardcode_direct_F77=no - hardcode_minus_L_F77=no - hardcode_shlibpath_var_F77=unsupported - link_all_deplibs_F77=unknown - hardcode_automatic_F77=no - module_cmds_F77= - module_expsym_cmds_F77= - always_export_symbols_F77=no - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_F77= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } - 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 + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 11920 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" ;; 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}' + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_F77='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_F77= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac + 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 - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_F77=no - cat <&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. -EOF - fi - ;; - amigaos*) - archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_F77=no - ;; - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_F77=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_F77=no - fi - ;; - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_F77='-L$libdir' - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=no - enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_F77=no - fi - ;; - interix[3-9]*) - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - ld_shlibs_F77=no - fi - ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_F77=no - cat <&2 -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_F77=no - cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - ;; - sunos4*) - archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; +striplib= +old_striplib= +{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +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" = no; then - runpath_var= - hardcode_libdir_flag_spec_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=yes - archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_F77=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_F77=unsupported - fi - ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - archive_cmds_F77='' - hardcode_direct_F77=yes - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_F77=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_F77=yes - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_libdir_separator_F77= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_F77=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_F77='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + # Report which library types will actually be built + { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } -fi + { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + # 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 + ;; - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_F77="-z nodefs" - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 fi +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 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +CC="$lt_save_CC" - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_F77=' ${wl}-bernotok' - allow_undefined_flag_F77=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77='$convenience' - archive_cmds_need_lc_F77=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - amigaos*) - archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_F77=no - ;; - bsdi[45]*) - export_dynamic_flag_spec_F77=-rdynamic - ;; - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_F77=' ' - allow_undefined_flag_F77=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_F77='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_F77='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_F77=no - hardcode_direct_F77=no - hardcode_automatic_F77=yes - hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='' - link_all_deplibs_F77=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_F77=no - ;; - esac - fi - ;; - dgux*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; - freebsd1*) - ld_shlibs_F77=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - hpux9*) - if test "$GCC" = yes; then - archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=yes - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - ;; - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: + ac_config_commands="$ac_config_commands libtool" - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - fi - ;; - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_F77='+b $libdir' - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - ;; - *) - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' +# Only expand once: - # 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 - ;; +VERSION_SCRIPT_FLAGS= +$(/usr/bin/ld --help 2>&1 | grep -- --version-script >/dev/null) && \ + VERSION_SCRIPT_FLAGS=-Wl,--version-script= +test "`uname`" == "SunOS" && \ + VERSION_SCRIPT_FLAGS="-Wl,-M -Wl," - 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 - ;; + if test -n "$VERSION_SCRIPT_FLAGS"; then + USE_VERSION_SCRIPT_TRUE= + USE_VERSION_SCRIPT_FALSE='#' +else + USE_VERSION_SCRIPT_TRUE='#' + USE_VERSION_SCRIPT_FALSE= +fi - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - ;; - *) - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs_F77=no - fi - ;; - os2*) - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - allow_undefined_flag_F77=unsupported - archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - ;; +_cppflags="${CPPFLAGS}" +_ldflags="${LDFLAGS}" - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_F77='-rpath $libdir' - fi - hardcode_libdir_separator_F77=: - ;; +# Check whether --with-c14n was given. +if test "${with_c14n+set}" = set; then + withval=$with_c14n; +fi - solaris*) - no_undefined_flag_F77=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_shlibpath_var_F77=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs_F77=yes - ;; - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; +# Check whether --with-catalog was given. +if test "${with_catalog+set}" = set; then + withval=$with_catalog; +fi - 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' - ;; +# Check whether --with-debug was given. +if test "${with_debug+set}" = set; then + withval=$with_debug; +fi - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_F77=yes - fi - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_F77='${wl}-z,text' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - runpath_var='LD_RUN_PATH' +# Check whether --with-docbook was given. +if test "${with_docbook+set}" = set; then + withval=$with_docbook; +fi - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_F77='${wl}-z,text' - allow_undefined_flag_F77='${wl}-z,nodefs' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - export_dynamic_flag_spec_F77='${wl}-Bexport' - runpath_var='LD_RUN_PATH' +# Check whether --with-fexceptions was given. +if test "${with_fexceptions+set}" = set; then + withval=$with_fexceptions; +fi - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - uts4*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; +# Check whether --with-ftp was given. +if test "${with_ftp+set}" = set; then + withval=$with_ftp; +fi - *) - 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 +# Check whether --with-history was given. +if test "${with_history+set}" = set; then + withval=$with_history; +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* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +# Check whether --with-html was given. +if test "${with_html+set}" = set; then + withval=$with_html; +fi - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_F77 - pic_flag=$lt_prog_compiler_pic_F77 - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_F77 - allow_undefined_flag_F77= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_F77=no - else - archive_cmds_need_lc_F77=yes - fi - allow_undefined_flag_F77=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } - ;; - esac - fi - ;; -esac -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" +# Check whether --with-html-dir was given. +if test "${with_html_dir+set}" = set; then + withval=$with_html_dir; HTML_DIR=$withval +else + HTML_DIR='$(datadir)/doc' +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 +# Check whether --with-html-subdir was given. +if test "${with_html_subdir+set}" = set; then + withval=$with_html_subdir; test "x$withval" != "x" && HTML_DIR="$HTML_DIR/$withval" +else + HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html" +fi - # 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' - ;; +# Check whether --with-http was given. +if test "${with_http+set}" = set; then + withval=$with_http; +fi -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 - ;; +# Check whether --with-iconv was given. +if test "${with_iconv+set}" = set; then + withval=$with_iconv; +fi -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes +# Check whether --with-iso8859x was given. +if test "${with_iso8859x+set}" = set; then + withval=$with_iso8859x; +fi - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; +# Check whether --with-legacy was given. +if test "${with_legacy+set}" = set; then + withval=$with_legacy; +fi -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; +# Check whether --with-mem_debug was given. +if test "${with_mem_debug+set}" = set; then + withval=$with_mem_debug; +fi -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 - ;; +# Check whether --with-minimum was given. +if test "${with_minimum+set}" = set; then + withval=$with_minimum; +fi -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; +# Check whether --with-output was given. +if test "${with_output+set}" = set; then + withval=$with_output; +fi -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; +# Check whether --with-pattern was given. +if test "${with_pattern+set}" = set; then + withval=$with_pattern; +fi -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 - ;; +# Check whether --with-push was given. +if test "${with_push+set}" = set; then + withval=$with_push; +fi -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" - fi +# Check whether --with-python was given. +if test "${with_python+set}" = set; then + withval=$with_python; +fi - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' +# Check whether --with-reader was given. +if test "${with_reader+set}" = set; then + withval=$with_reader; +fi + + +# Check whether --with-readline was given. +if test "${with_readline+set}" = set; then + withval=$with_readline; + if test "$withval" != "no" -a "$withval" != "yes"; then + RDL_DIR=$withval + CPPFLAGS="${CPPFLAGS} -I$withval/include" + LDFLAGS="${LDFLAGS} -L$withval/lib" 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 - ;; +fi -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; +# Check whether --with-regexps was given. +if test "${with_regexps+set}" = set; then + withval=$with_regexps; +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" - ;; +# Check whether --with-run_debug was given. +if test "${with_run_debug+set}" = set; then + withval=$with_run_debug; +fi -rdos*) - dynamic_linker=no - ;; -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; +# Check whether --with-sax1 was given. +if test "${with_sax1+set}" = set; then + withval=$with_sax1; +fi -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +# Check whether --with-schemas was given. +if test "${with_schemas+set}" = set; then + withval=$with_schemas; fi -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_F77= -if test -n "$hardcode_libdir_flag_spec_F77" || \ - test -n "$runpath_var_F77" || \ - test "X$hardcode_automatic_F77" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_F77" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && - test "$hardcode_minus_L_F77" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_F77=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_F77=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_F77=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 -echo "${ECHO_T}$hardcode_action_F77" >&6; } -if test "$hardcode_action_F77" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless +# Check whether --with-schematron was given. +if test "${with_schematron+set}" = set; then + withval=$with_schematron; fi -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_F77 \ - CC_F77 \ - LD_F77 \ - lt_prog_compiler_wl_F77 \ - lt_prog_compiler_pic_F77 \ - lt_prog_compiler_static_F77 \ - lt_prog_compiler_no_builtin_flag_F77 \ - export_dynamic_flag_spec_F77 \ - thread_safe_flag_spec_F77 \ - whole_archive_flag_spec_F77 \ - enable_shared_with_static_runtimes_F77 \ - old_archive_cmds_F77 \ - old_archive_from_new_cmds_F77 \ - predep_objects_F77 \ - postdep_objects_F77 \ - predeps_F77 \ - postdeps_F77 \ - compiler_lib_search_path_F77 \ - archive_cmds_F77 \ - archive_expsym_cmds_F77 \ - postinstall_cmds_F77 \ - postuninstall_cmds_F77 \ - old_archive_from_expsyms_cmds_F77 \ - allow_undefined_flag_F77 \ - no_undefined_flag_F77 \ - export_symbols_cmds_F77 \ - hardcode_libdir_flag_spec_F77 \ - hardcode_libdir_flag_spec_ld_F77 \ - hardcode_libdir_separator_F77 \ - hardcode_automatic_F77 \ - module_cmds_F77 \ - module_expsym_cmds_F77 \ - lt_cv_prog_compiler_c_o_F77 \ - fix_srcfile_path_F77 \ - exclude_expsyms_F77 \ - include_expsyms_F77; do - - case $var in - old_archive_cmds_F77 | \ - old_archive_from_new_cmds_F77 | \ - archive_cmds_F77 | \ - archive_expsym_cmds_F77 | \ - module_cmds_F77 | \ - module_expsym_cmds_F77 | \ - old_archive_from_expsyms_cmds_F77 | \ - export_symbols_cmds_F77 | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_F77 - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_F77 - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_F77 - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_F77 - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_F77 - -# Object file suffix (normally "o"). -objext="$ac_objext" +# Check whether --with-threads was given. +if test "${with_threads+set}" = set; then + withval=$with_threads; +fi -# Old archive suffix (normally "a"). -libext="$libext" -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' +# Check whether --with-thread-alloc was given. +if test "${with_thread_alloc+set}" = set; then + withval=$with_thread_alloc; +fi -# 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 +# Check whether --with-tree was given. +if test "${with_tree+set}" = set; then + withval=$with_tree; +fi -# 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 +# Check whether --with-valid was given. +if test "${with_valid+set}" = set; then + withval=$with_valid; +fi -# 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 +# Check whether --with-writer was given. +if test "${with_writer+set}" = set; then + withval=$with_writer; +fi -# Do we need a version for libraries? -need_version=$need_version -# Whether dlopen is supported. -dlopen_support=$enable_dlopen +# Check whether --with-xinclude was given. +if test "${with_xinclude+set}" = set; then + withval=$with_xinclude; +fi -# 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 +# Check whether --with-xpath was given. +if test "${with_xpath+set}" = set; then + withval=$with_xpath; +fi -# 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 +# Check whether --with-xptr was given. +if test "${with_xptr+set}" = set; then + withval=$with_xptr; +fi -# 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 +# Check whether --with-modules was given. +if test "${with_modules+set}" = set; then + withval=$with_modules; +fi -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 -# Library versioning type. -version_type=$version_type +# Check whether --with-zlib was given. +if test "${with_zlib+set}" = set; then + withval=$with_zlib; + if test "$withval" != "no" -a "$withval" != "yes"; then + Z_DIR=$withval + CPPFLAGS="${CPPFLAGS} -I$withval/include" + LDFLAGS="${LDFLAGS} -L$withval/lib" + fi -# Format of library name prefix. -libname_spec=$lt_libname_spec +fi -# 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 +# Check whether --with-coverage was given. +if test "${with_coverage+set}" = set; then + withval=$with_coverage; +fi -# 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 +# Check whether --enable-rebuild-docs was given. +if test "${enable_rebuild_docs+set}" = set; then + enableval=$enable_rebuild_docs; +fi -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_F77 -archive_expsym_cmds=$lt_archive_expsym_cmds_F77 -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_F77 -module_expsym_cmds=$lt_module_expsym_cmds_F77 - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_F77 - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_F77 - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_F77 - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_F77 - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_F77 - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_F77 - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_F77 - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_F77 - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_F77 - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_F77 - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_F77 - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_F77 - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_F77 - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_F77 - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_F77 - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_F77 - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -objext_GCJ=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${GCJ-"gcj"} -compiler=$CC -compiler_GCJ=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -archive_cmds_need_lc_GCJ=no - -old_archive_cmds_GCJ=$old_archive_cmds - - -lt_prog_compiler_no_builtin_flag_GCJ= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' - - -{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17294: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:17298: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" -else - : -fi - -fi - -lt_prog_compiler_wl_GCJ= -lt_prog_compiler_pic_GCJ= -lt_prog_compiler_static_GCJ= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_static_GCJ='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_GCJ='-fno-common' - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_GCJ=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_GCJ=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_GCJ='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - else - lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_GCJ='-qnocommon' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_GCJ='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-fpic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - lt_prog_compiler_wl_GCJ='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_GCJ='-Qoption ld ';; - *) - lt_prog_compiler_wl_GCJ='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl_GCJ='-Qoption ld ' - lt_prog_compiler_pic_GCJ='-PIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_GCJ='-Kconform_pic' - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_can_build_shared_GCJ=no - ;; - - uts4*) - lt_prog_compiler_pic_GCJ='-pic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared_GCJ=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_GCJ"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_GCJ=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_GCJ" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17584: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:17588: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_GCJ=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } - -if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then - case $lt_prog_compiler_pic_GCJ in - "" | " "*) ;; - *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; - esac -else - lt_prog_compiler_pic_GCJ= - lt_prog_compiler_can_build_shared_GCJ=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_GCJ= - ;; - *) - lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_GCJ=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_GCJ=yes - fi - else - lt_prog_compiler_static_works_GCJ=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } - -if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then - : -else - lt_prog_compiler_static_GCJ= -fi - - -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_GCJ=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17688: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:17692: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_GCJ=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - runpath_var= - allow_undefined_flag_GCJ= - enable_shared_with_static_runtimes_GCJ=no - archive_cmds_GCJ= - archive_expsym_cmds_GCJ= - old_archive_From_new_cmds_GCJ= - old_archive_from_expsyms_cmds_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - thread_safe_flag_spec_GCJ= - hardcode_libdir_flag_spec_GCJ= - hardcode_libdir_flag_spec_ld_GCJ= - hardcode_libdir_separator_GCJ= - hardcode_direct_GCJ=no - hardcode_minus_L_GCJ=no - hardcode_shlibpath_var_GCJ=unsupported - link_all_deplibs_GCJ=unknown - hardcode_automatic_GCJ=no - module_cmds_GCJ= - module_expsym_cmds_GCJ= - always_export_symbols_GCJ=no - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_GCJ= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs_GCJ=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_GCJ= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_GCJ=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_GCJ=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_GCJ=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_GCJ='-L$libdir' - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=no - enable_shared_with_static_runtimes_GCJ=yes - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - interix[3-9]*) - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - ld_shlibs_GCJ=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_GCJ=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_GCJ=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - - if test "$ld_shlibs_GCJ" = no; then - runpath_var= - hardcode_libdir_flag_spec_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=yes - archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_GCJ=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_GCJ=unsupported - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_GCJ='' - hardcode_direct_GCJ=yes - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_GCJ=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_GCJ=yes - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_libdir_separator_GCJ= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_GCJ=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_GCJ='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_GCJ="-z nodefs" - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_GCJ=' ${wl}-bernotok' - allow_undefined_flag_GCJ=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_GCJ='$convenience' - archive_cmds_need_lc_GCJ=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_GCJ=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec_GCJ=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_GCJ=' ' - allow_undefined_flag_GCJ=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_GCJ='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_GCJ=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_GCJ=no - hardcode_direct_GCJ=no - hardcode_automatic_GCJ=yes - hardcode_shlibpath_var_GCJ=unsupported - whole_archive_flag_spec_GCJ='' - link_all_deplibs_GCJ=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_GCJ=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - - freebsd1*) - ld_shlibs_GCJ=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - ;; - *) - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - link_all_deplibs_GCJ=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - newsos6) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_shlibpath_var_GCJ=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - ;; - *) - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs_GCJ=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - allow_undefined_flag_GCJ=unsupported - archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_GCJ='-rpath $libdir' - fi - hardcode_libdir_separator_GCJ=: - ;; - - solaris*) - no_undefined_flag_GCJ=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_shlibpath_var_GCJ=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs_GCJ=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_GCJ='$CC -r -o $output$reload_objs' - hardcode_direct_GCJ=no - ;; - motorola) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_GCJ=no - ;; - - sysv4.3*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - export_dynamic_flag_spec_GCJ='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_GCJ=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_GCJ='${wl}-z,text' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_GCJ='${wl}-z,text' - allow_undefined_flag_GCJ='${wl}-z,nodefs' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - - *) - ld_shlibs_GCJ=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 -echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } -test "$ld_shlibs_GCJ" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_GCJ" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_GCJ=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_GCJ in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_GCJ - pic_flag=$lt_prog_compiler_pic_GCJ - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ - allow_undefined_flag_GCJ= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_GCJ=no - else - archive_cmds_need_lc_GCJ=yes - fi - allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" - -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_GCJ= -if test -n "$hardcode_libdir_flag_spec_GCJ" || \ - test -n "$runpath_var_GCJ" || \ - test "X$hardcode_automatic_GCJ" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_GCJ" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && - test "$hardcode_minus_L_GCJ" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_GCJ=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_GCJ=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_GCJ=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 -echo "${ECHO_T}$hardcode_action_GCJ" >&6; } - -if test "$hardcode_action_GCJ" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_GCJ \ - CC_GCJ \ - LD_GCJ \ - lt_prog_compiler_wl_GCJ \ - lt_prog_compiler_pic_GCJ \ - lt_prog_compiler_static_GCJ \ - lt_prog_compiler_no_builtin_flag_GCJ \ - export_dynamic_flag_spec_GCJ \ - thread_safe_flag_spec_GCJ \ - whole_archive_flag_spec_GCJ \ - enable_shared_with_static_runtimes_GCJ \ - old_archive_cmds_GCJ \ - old_archive_from_new_cmds_GCJ \ - predep_objects_GCJ \ - postdep_objects_GCJ \ - predeps_GCJ \ - postdeps_GCJ \ - compiler_lib_search_path_GCJ \ - archive_cmds_GCJ \ - archive_expsym_cmds_GCJ \ - postinstall_cmds_GCJ \ - postuninstall_cmds_GCJ \ - old_archive_from_expsyms_cmds_GCJ \ - allow_undefined_flag_GCJ \ - no_undefined_flag_GCJ \ - export_symbols_cmds_GCJ \ - hardcode_libdir_flag_spec_GCJ \ - hardcode_libdir_flag_spec_ld_GCJ \ - hardcode_libdir_separator_GCJ \ - hardcode_automatic_GCJ \ - module_cmds_GCJ \ - module_expsym_cmds_GCJ \ - lt_cv_prog_compiler_c_o_GCJ \ - fix_srcfile_path_GCJ \ - exclude_expsyms_GCJ \ - include_expsyms_GCJ; do - - case $var in - old_archive_cmds_GCJ | \ - old_archive_from_new_cmds_GCJ | \ - archive_cmds_GCJ | \ - archive_expsym_cmds_GCJ | \ - module_cmds_GCJ | \ - module_expsym_cmds_GCJ | \ - old_archive_from_expsyms_cmds_GCJ | \ - export_symbols_cmds_GCJ | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_GCJ - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_GCJ - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_GCJ - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_GCJ - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_GCJ - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_GCJ -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_GCJ - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_GCJ -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_GCJ -archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_GCJ -module_expsym_cmds=$lt_module_expsym_cmds_GCJ - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_GCJ - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_GCJ - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_GCJ - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_GCJ - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_GCJ - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_GCJ - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_GCJ - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_GCJ - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_GCJ - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_GCJ - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_GCJ - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_GCJ - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_GCJ - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_GCJ - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_GCJ - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - else - tagname="" - fi - ;; - - RC) - - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -objext_RC=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${RC-"windres"} -compiler=$CC -compiler_RC=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - -lt_cv_prog_compiler_c_o_RC=yes - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_RC \ - CC_RC \ - LD_RC \ - lt_prog_compiler_wl_RC \ - lt_prog_compiler_pic_RC \ - lt_prog_compiler_static_RC \ - lt_prog_compiler_no_builtin_flag_RC \ - export_dynamic_flag_spec_RC \ - thread_safe_flag_spec_RC \ - whole_archive_flag_spec_RC \ - enable_shared_with_static_runtimes_RC \ - old_archive_cmds_RC \ - old_archive_from_new_cmds_RC \ - predep_objects_RC \ - postdep_objects_RC \ - predeps_RC \ - postdeps_RC \ - compiler_lib_search_path_RC \ - archive_cmds_RC \ - archive_expsym_cmds_RC \ - postinstall_cmds_RC \ - postuninstall_cmds_RC \ - old_archive_from_expsyms_cmds_RC \ - allow_undefined_flag_RC \ - no_undefined_flag_RC \ - export_symbols_cmds_RC \ - hardcode_libdir_flag_spec_RC \ - hardcode_libdir_flag_spec_ld_RC \ - hardcode_libdir_separator_RC \ - hardcode_automatic_RC \ - module_cmds_RC \ - module_expsym_cmds_RC \ - lt_cv_prog_compiler_c_o_RC \ - fix_srcfile_path_RC \ - exclude_expsyms_RC \ - include_expsyms_RC; do - - case $var in - old_archive_cmds_RC | \ - old_archive_from_new_cmds_RC | \ - archive_cmds_RC | \ - archive_expsym_cmds_RC | \ - module_cmds_RC | \ - module_expsym_cmds_RC | \ - old_archive_from_expsyms_cmds_RC | \ - export_symbols_cmds_RC | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_RC - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_RC - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_RC - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_RC - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_RC - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_RC -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_RC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_RC -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_RC -archive_expsym_cmds=$lt_archive_expsym_cmds_RC -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_RC -module_expsym_cmds=$lt_module_expsym_cmds_RC - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_RC - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_RC - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_RC - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_RC - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_RC - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_RC - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_RC - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_RC - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_RC - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_RC - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_RC - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_RC - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_RC - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_RC - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_RC - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_RC - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_RC - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - ;; - - *) - { { 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 - - - - - - - - - - - - - - - - - - - - - - -_cppflags="${CPPFLAGS}" -_ldflags="${LDFLAGS}" - - -# Check whether --with-c14n was given. -if test "${with_c14n+set}" = set; then - withval=$with_c14n; -fi - - -# Check whether --with-catalog was given. -if test "${with_catalog+set}" = set; then - withval=$with_catalog; -fi - - -# Check whether --with-debug was given. -if test "${with_debug+set}" = set; then - withval=$with_debug; -fi - - -# Check whether --with-docbook was given. -if test "${with_docbook+set}" = set; then - withval=$with_docbook; -fi - - -# Check whether --with-fexceptions was given. -if test "${with_fexceptions+set}" = set; then - withval=$with_fexceptions; -fi - - -# Check whether --with-ftp was given. -if test "${with_ftp+set}" = set; then - withval=$with_ftp; -fi - - -# Check whether --with-history was given. -if test "${with_history+set}" = set; then - withval=$with_history; -fi - - -# Check whether --with-html was given. -if test "${with_html+set}" = set; then - withval=$with_html; -fi - - -# Check whether --with-html-dir was given. -if test "${with_html_dir+set}" = set; then - withval=$with_html_dir; HTML_DIR=$withval -else - HTML_DIR='$(datadir)/doc' -fi - - - -# Check whether --with-html-subdir was given. -if test "${with_html_subdir+set}" = set; then - withval=$with_html_subdir; test "x$withval" != "x" && HTML_DIR="$HTML_DIR/$withval" -else - HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html" -fi - - - -# Check whether --with-http was given. -if test "${with_http+set}" = set; then - withval=$with_http; -fi - - -# Check whether --with-iconv was given. -if test "${with_iconv+set}" = set; then - withval=$with_iconv; -fi - - -# Check whether --with-iso8859x was given. -if test "${with_iso8859x+set}" = set; then - withval=$with_iso8859x; -fi - - -# Check whether --with-legacy was given. -if test "${with_legacy+set}" = set; then - withval=$with_legacy; -fi - - -# Check whether --with-mem_debug was given. -if test "${with_mem_debug+set}" = set; then - withval=$with_mem_debug; -fi - - -# Check whether --with-minimum was given. -if test "${with_minimum+set}" = set; then - withval=$with_minimum; -fi - - -# Check whether --with-output was given. -if test "${with_output+set}" = set; then - withval=$with_output; -fi - - -# Check whether --with-pattern was given. -if test "${with_pattern+set}" = set; then - withval=$with_pattern; -fi - - -# Check whether --with-push was given. -if test "${with_push+set}" = set; then - withval=$with_push; -fi - - -# Check whether --with-python was given. -if test "${with_python+set}" = set; then - withval=$with_python; -fi - - -# Check whether --with-reader was given. -if test "${with_reader+set}" = set; then - withval=$with_reader; -fi - - -# Check whether --with-readline was given. -if test "${with_readline+set}" = set; then - withval=$with_readline; - if test "$withval" != "no" -a "$withval" != "yes"; then - RDL_DIR=$withval - CPPFLAGS="${CPPFLAGS} -I$withval/include" - LDFLAGS="${LDFLAGS} -L$withval/lib" - fi - -fi - - -# Check whether --with-regexps was given. -if test "${with_regexps+set}" = set; then - withval=$with_regexps; -fi - - -# Check whether --with-run_debug was given. -if test "${with_run_debug+set}" = set; then - withval=$with_run_debug; -fi - - -# Check whether --with-sax1 was given. -if test "${with_sax1+set}" = set; then - withval=$with_sax1; -fi - - -# Check whether --with-schemas was given. -if test "${with_schemas+set}" = set; then - withval=$with_schemas; -fi - - -# Check whether --with-schematron was given. -if test "${with_schematron+set}" = set; then - withval=$with_schematron; -fi - - -# Check whether --with-threads was given. -if test "${with_threads+set}" = set; then - withval=$with_threads; -fi - - -# Check whether --with-thread-alloc was given. -if test "${with_thread_alloc+set}" = set; then - withval=$with_thread_alloc; -fi - - -# Check whether --with-tree was given. -if test "${with_tree+set}" = set; then - withval=$with_tree; -fi - - -# Check whether --with-valid was given. -if test "${with_valid+set}" = set; then - withval=$with_valid; -fi - - -# Check whether --with-writer was given. -if test "${with_writer+set}" = set; then - withval=$with_writer; -fi - - -# Check whether --with-xinclude was given. -if test "${with_xinclude+set}" = set; then - withval=$with_xinclude; -fi - - -# Check whether --with-xpath was given. -if test "${with_xpath+set}" = set; then - withval=$with_xpath; -fi - - -# Check whether --with-xptr was given. -if test "${with_xptr+set}" = set; then - withval=$with_xptr; -fi - - -# Check whether --with-modules was given. -if test "${with_modules+set}" = set; then - withval=$with_modules; -fi - - -# Check whether --with-zlib was given. -if test "${with_zlib+set}" = set; then - withval=$with_zlib; - if test "$withval" != "no" -a "$withval" != "yes"; then - Z_DIR=$withval - CPPFLAGS="${CPPFLAGS} -I$withval/include" - LDFLAGS="${LDFLAGS} -L$withval/lib" - fi - -fi - - -# Check whether --with-coverage was given. -if test "${with_coverage+set}" = set; then - withval=$with_coverage; -fi - - -# Check whether --enable-rebuild-docs was given. -if test "${enable_rebuild_docs+set}" = set; then - enableval=$enable_rebuild_docs; -fi - - if test "$enable_rebuild_docs" = "no"; then - REBUILD_DOCS_TRUE= - REBUILD_DOCS_FALSE='#' -else - REBUILD_DOCS_TRUE='#' - REBUILD_DOCS_FALSE= -fi + if test "$enable_rebuild_docs" = "no"; then + REBUILD_DOCS_TRUE= + REBUILD_DOCS_FALSE='#' +else + REBUILD_DOCS_TRUE='#' + REBUILD_DOCS_FALSE= +fi if test "$with_schemas" = "yes" @@ -20775,20 +12595,21 @@ else for ac_header in zlib.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20804,32 +12625,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20843,74 +12665,78 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - { echo "$as_me:$LINENO: checking for gzread in -lz" >&5 -echo $ECHO_N "checking for gzread in -lz... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for gzread in -lz" >&5 +$as_echo_n "checking for gzread in -lz... " >&6; } if test "${ac_cv_lib_z_gzread+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" @@ -20942,33 +12768,37 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_z_gzread=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_z_gzread=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_gzread" >&5 -echo "${ECHO_T}$ac_cv_lib_z_gzread" >&6; } -if test $ac_cv_lib_z_gzread = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_gzread" >&5 +$as_echo "$ac_cv_lib_z_gzread" >&6; } +if test "x$ac_cv_lib_z_gzread" = x""yes; then cat >>confdefs.h <<\_ACEOF @@ -21011,11 +12841,11 @@ echo Checking headers ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 -echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; } + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21041,20 +12871,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" @@ -21062,12 +12893,15 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break @@ -21076,10 +12910,10 @@ fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then - { echo "$as_me:$LINENO: checking for library containing opendir" >&5 -echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } if test "${ac_cv_search_opendir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF @@ -21117,26 +12951,30 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_search_opendir=$ac_res else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then @@ -21151,8 +12989,8 @@ fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -echo "${ECHO_T}$ac_cv_search_opendir" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" @@ -21160,10 +12998,10 @@ if test "$ac_res" != no; then fi else - { echo "$as_me:$LINENO: checking for library containing opendir" >&5 -echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } if test "${ac_cv_search_opendir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF @@ -21201,26 +13039,30 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_search_opendir=$ac_res else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then @@ -21235,8 +13077,8 @@ fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -echo "${ECHO_T}$ac_cv_search_opendir" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" @@ -21245,10 +13087,10 @@ fi fi -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21275,20 +13117,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no @@ -21380,37 +13223,40 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_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 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -21422,20 +13268,21 @@ fi for ac_header in fcntl.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21451,32 +13298,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21490,69 +13338,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -21562,20 +13414,21 @@ done for ac_header in unistd.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21591,32 +13444,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21630,69 +13484,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -21702,20 +13560,21 @@ done for ac_header in ctype.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21731,32 +13590,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21770,69 +13630,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -21842,20 +13706,21 @@ done for ac_header in dirent.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21871,32 +13736,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21910,69 +13776,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -21982,20 +13852,21 @@ done for ac_header in errno.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22011,32 +13882,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22050,69 +13922,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -22122,20 +13998,21 @@ done for ac_header in malloc.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22151,32 +14028,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22190,69 +14068,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -22262,20 +14144,21 @@ done for ac_header in stdarg.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22291,32 +14174,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22330,69 +14214,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -22402,20 +14290,21 @@ done for ac_header in sys/stat.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22431,32 +14320,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22470,69 +14360,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -22542,20 +14436,21 @@ done for ac_header in sys/types.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22571,32 +14466,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22610,69 +14506,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -22682,20 +14582,21 @@ done for ac_header in stdint.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22711,32 +14612,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22750,69 +14652,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -22822,20 +14728,21 @@ done for ac_header in inttypes.h.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22851,32 +14758,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22890,69 +14798,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -22962,20 +14874,21 @@ done for ac_header in time.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22991,32 +14904,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23030,69 +14944,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -23102,20 +15020,21 @@ done for ac_header in ansidecl.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23131,32 +15050,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23170,69 +15090,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -23242,20 +15166,21 @@ done for ac_header in ieeefp.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23271,32 +15196,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23310,69 +15236,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -23382,20 +15312,21 @@ done for ac_header in nan.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23411,32 +15342,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23450,69 +15382,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -23522,20 +15458,21 @@ done for ac_header in math.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23551,32 +15488,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23590,69 +15528,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -23662,20 +15604,21 @@ done for ac_header in limits.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23691,32 +15634,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23730,69 +15674,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -23802,20 +15750,21 @@ done for ac_header in fp_class.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23831,32 +15780,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23870,69 +15820,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -23942,20 +15896,21 @@ done for ac_header in float.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23971,32 +15926,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24010,69 +15966,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -24082,20 +16042,21 @@ done for ac_header in stdlib.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24111,32 +16072,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24150,69 +16112,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -24222,11 +16188,11 @@ done for ac_header in sys/socket.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; } +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -24247,20 +16213,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" @@ -24268,12 +16235,15 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -24283,11 +16253,11 @@ done for ac_header in netinet/in.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; } +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -24308,20 +16278,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" @@ -24329,12 +16300,15 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -24344,11 +16318,11 @@ done for ac_header in arpa/inet.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; } +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -24372,33 +16346,183 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in netdb.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -24406,22 +16530,23 @@ fi done -for ac_header in netdb.h +for ac_header in sys/time.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24437,32 +16562,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24476,69 +16602,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -24546,22 +16676,23 @@ fi done -for ac_header in sys/time.h +for ac_header in sys/select.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24577,32 +16708,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24616,69 +16748,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -24686,22 +16822,23 @@ fi done -for ac_header in sys/select.h +for ac_header in poll.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24717,32 +16854,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24756,69 +16894,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -24828,20 +16970,21 @@ done for ac_header in sys/mman.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24857,32 +17000,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24896,69 +17040,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -24968,20 +17116,21 @@ done for ac_header in sys/timeb.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24997,32 +17146,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25036,69 +17186,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -25108,20 +17262,21 @@ done for ac_header in signal.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25137,32 +17292,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25176,69 +17332,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -25248,11 +17408,11 @@ done for ac_header in arpa/nameser.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; } +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -25273,20 +17433,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" @@ -25294,12 +17455,15 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -25309,11 +17473,11 @@ done for ac_header in resolv.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; } +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -25340,20 +17504,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" @@ -25361,12 +17526,15 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -25376,20 +17544,21 @@ done for ac_header in dl.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25405,32 +17574,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25444,69 +17614,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -25516,20 +17690,21 @@ done for ac_header in dlfcn.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25545,32 +17720,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25584,69 +17760,73 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { 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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -25660,11 +17840,11 @@ echo Checking libraries for ac_func in strftime do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -25717,43 +17897,50 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else # strftime is in -lintl on SCO UNIX. -{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5 -echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for strftime in -lintl" >&5 +$as_echo_n "checking for strftime in -lintl... " >&6; } if test "${ac_cv_lib_intl_strftime+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" @@ -25785,33 +17972,37 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_intl_strftime=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_strftime=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5 -echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; } -if test $ac_cv_lib_intl_strftime = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5 +$as_echo "$ac_cv_lib_intl_strftime" >&6; } +if test "x$ac_cv_lib_intl_strftime" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STRFTIME 1 _ACEOF @@ -25827,11 +18018,11 @@ done for ac_func in strdup strndup strerror do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -25884,35 +18075,42 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -25925,11 +18123,11 @@ done for ac_func in finite isnand fp_class class fpclass do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -25982,35 +18180,42 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -26022,11 +18227,11 @@ done for ac_func in strftime localtime gettimeofday ftime do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26079,35 +18284,42 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -26118,11 +18330,120 @@ done for ac_func in stat _stat signal do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + + + + + +for ac_func in printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26164,90 +18485,280 @@ choke me int main () { -return $ac_func (); +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + NEED_TRIO=1 +fi +done + + +{ $as_echo "$as_me:$LINENO: checking for va_copy" >&5 +$as_echo_n "checking for va_copy... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +va_list ap1,ap2; +int +main () +{ +va_copy(ap1,ap2); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + have_va_copy=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + have_va_copy=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $have_va_copy" >&5 +$as_echo "$have_va_copy" >&6; } +if test x"$have_va_copy" = x"yes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_VA_COPY 1 +_ACEOF + +else + { $as_echo "$as_me:$LINENO: checking for __va_copy" >&5 +$as_echo_n "checking for __va_copy... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + va_list ap1,ap2; +int +main () +{ +__va_copy(ap1,ap2); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + have___va_copy=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + have___va_copy=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: result: $have___va_copy" >&5 +$as_echo "$have___va_copy" >&6; } + if test x"$have___va_copy" = x"yes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE___VA_COPY 1 +_ACEOF + + fi +fi + +{ $as_echo "$as_me:$LINENO: checking for library containing gethostent" >&5 +$as_echo_n "checking for library containing gethostent... " >&6; } +if test "${ac_cv_search_gethostent+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostent (); +int +main () +{ +return gethostent (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +for ac_lib in '' nsl; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_search_gethostent=$ac_res else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_gethostent+set}" = set; then + break fi done +if test "${ac_cv_search_gethostent+set}" = set; then + : +else + ac_cv_search_gethostent=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_gethostent" >&5 +$as_echo "$ac_cv_search_gethostent" >&6; } +ac_res=$ac_cv_search_gethostent +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +fi - - - - - - - - -for ac_func in printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for library containing setsockopt" >&5 +$as_echo_n "checking for library containing setsockopt... " >&6; } +if test "${ac_cv_search_setsockopt+set}" = set; then + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -26255,355 +18766,476 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - +char setsockopt (); int main () { -return $ac_func (); +return setsockopt (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +for ac_lib in '' socket net network; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_search_setsockopt=$ac_res else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" + fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext + if test "${ac_cv_search_setsockopt+set}" = set; then + break fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - +done +if test "${ac_cv_search_setsockopt+set}" = set; then + : else - NEED_TRIO=1 + ac_cv_search_setsockopt=no fi -done +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_setsockopt" >&5 +$as_echo "$ac_cv_search_setsockopt" >&6; } +ac_res=$ac_cv_search_setsockopt +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +fi -{ echo "$as_me:$LINENO: checking for va_copy" >&5 -echo $ECHO_N "checking for va_copy... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for library containing connect" >&5 +$as_echo_n "checking for library containing connect... " >&6; } +if test "${ac_cv_search_connect+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -va_list ap1,ap2; + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char connect (); int main () { -va_copy(ap1,ap2); +return connect (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +for ac_lib in '' inet; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - have_va_copy=yes + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_search_connect=$ac_res else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - have_va_copy=no + fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $have_va_copy" >&5 -echo "${ECHO_T}$have_va_copy" >&6; } -if test x"$have_va_copy" = x"yes"; then + conftest$ac_exeext + if test "${ac_cv_search_connect+set}" = set; then + break +fi +done +if test "${ac_cv_search_connect+set}" = set; then + : +else + ac_cv_search_connect=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_connect" >&5 +$as_echo "$ac_cv_search_connect" >&6; } +ac_res=$ac_cv_search_connect +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -cat >>confdefs.h <<\_ACEOF -#define HAVE_VA_COPY 1 +fi + + +{ $as_echo "$as_me:$LINENO: checking for type of socket length (socklen_t)" >&5 +$as_echo_n "checking for type of socket length (socklen_t)... " >&6; } +cat > conftest.$ac_ext < +#include +#include +int main(void) { + +(void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL) +; return 0; } +EOF +if { (eval echo configure:18939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then + rm -rf conftest* + + { $as_echo "$as_me:$LINENO: result: socklen_t *" >&5 +$as_echo "socklen_t *" >&6; } + XML_SOCKLEN_T=socklen_t +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + cat > conftest.$ac_ext < +#include +#include +int main(void) { + +(void)getsockopt (1, 1, 1, NULL, (size_t *)NULL) +; return 0; } +EOF +if { (eval echo configure:18962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then + rm -rf conftest* + + { $as_echo "$as_me:$LINENO: result: size_t *" >&5 +$as_echo "size_t *" >&6; } + XML_SOCKLEN_T=size_t +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + cat > conftest.$ac_ext < +#include +#include +int main(void) { + +(void)getsockopt (1, 1, 1, NULL, (int *)NULL) +; return 0; } +EOF +if { (eval echo configure:18985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then + rm -rf conftest* + + { $as_echo "$as_me:$LINENO: result: int *" >&5 +$as_echo "int *" >&6; } + XML_SOCKLEN_T=int +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + { $as_echo "$as_me:$LINENO: WARNING: could not determine" >&5 +$as_echo "$as_me: WARNING: could not determine" >&2;} + XML_SOCKLEN_T="int" +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + +cat >>confdefs.h <<_ACEOF +#define XML_SOCKLEN_T $XML_SOCKLEN_T _ACEOF + + +{ $as_echo "$as_me:$LINENO: checking whether to enable IPv6" >&5 +$as_echo_n "checking whether to enable IPv6... " >&6; } +# Check whether --enable-ipv6 was given. +if test "${enable_ipv6+set}" = set; then + enableval=$enable_ipv6; else - { echo "$as_me:$LINENO: checking for __va_copy" >&5 -echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF + enable_ipv6=yes +fi + +if test "$with_minimum" = "yes" +then + enable_ipv6=no +fi +if test $enable_ipv6 = yes; then + have_ipv6=no + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - va_list ap1,ap2; + + #include + #include + int main () { -__va_copy(ap1,ap2); + + struct sockaddr_storage ss; + socket(AF_INET6, SOCK_STREAM, 0) + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - have___va_copy=yes + } && test -s conftest.$ac_objext; then + have_ipv6=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - have___va_copy=no + have_ipv6=no + fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { echo "$as_me:$LINENO: result: $have___va_copy" >&5 -echo "${ECHO_T}$have___va_copy" >&6; } - if test x"$have___va_copy" = x"yes"; then +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: result: $have_ipv6" >&5 +$as_echo "$have_ipv6" >&6; } + + if test $have_ipv6 = yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE___VA_COPY 1 +#define SUPPORT_IP6 /**/ _ACEOF - fi -fi + have_broken_ss_family=no -{ echo "$as_me:$LINENO: checking for library containing gethostent" >&5 -echo $ECHO_N "checking for library containing gethostent... $ECHO_C" >&6; } -if test "${ac_cv_search_gethostent+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking struct sockaddr::ss_family" >&5 +$as_echo_n "checking struct sockaddr::ss_family... " >&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 GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostent (); + #include + #include + int main () { -return gethostent (); + + struct sockaddr_storage ss ; + ss.ss_family = 0 ; + ; return 0; } _ACEOF -for ac_lib in '' nsl; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_search_gethostent=$ac_res + } && test -s conftest.$ac_objext; then + have_ss_family=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + have_ss_family=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_gethostent+set}" = set; then - break -fi -done -if test "${ac_cv_search_gethostent+set}" = set; then - : -else - ac_cv_search_gethostent=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_gethostent" >&5 -echo "${ECHO_T}$ac_cv_search_gethostent" >&6; } -ac_res=$ac_cv_search_gethostent -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -{ echo "$as_me:$LINENO: checking for library containing setsockopt" >&5 -echo $ECHO_N "checking for library containing setsockopt... $ECHO_C" >&6; } -if test "${ac_cv_search_setsockopt+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: result: $have_ss_family" >&5 +$as_echo "$have_ss_family" >&6; } + if test x$have_ss_family = xno ; then + { $as_echo "$as_me:$LINENO: checking broken struct sockaddr::ss_family" >&5 +$as_echo_n "checking broken struct sockaddr::ss_family... " >&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 GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char setsockopt (); + #include + #include + int main () { -return setsockopt (); + + struct sockaddr_storage ss ; + ss.__ss_family = 0 ; + ; return 0; } _ACEOF -for ac_lib in '' socket net; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_search_setsockopt=$ac_res + } && test -s conftest.$ac_objext; then + have_broken_ss_family=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + have_broken_ss_family=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_setsockopt+set}" = set; then - break -fi -done -if test "${ac_cv_search_setsockopt+set}" = set; then - : -else - ac_cv_search_setsockopt=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_search_setsockopt" >&6; } -ac_res=$ac_cv_search_setsockopt -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: result: $have_broken_ss_family" >&5 +$as_echo "$have_broken_ss_family" >&6; } + if test x$have_broken_ss_family = xyes ; then -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_BROKEN_SS_FAMILY /**/ +_ACEOF -{ echo "$as_me:$LINENO: checking for library containing connect" >&5 -echo $ECHO_N "checking for library containing connect... $ECHO_C" >&6; } -if test "${ac_cv_search_connect+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + +cat >>confdefs.h <<\_ACEOF +#define ss_family __ss_family +_ACEOF + + else + { $as_echo "$as_me:$LINENO: WARNING: ss_family and __ss_family not found" >&5 +$as_echo "$as_me: WARNING: ss_family and __ss_family not found" >&2;} + fi + fi + + have_getaddrinfo=no + { $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +$as_echo_n "checking for getaddrinfo... " >&6; } +if test "${ac_cv_func_getaddrinfo+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define getaddrinfo to an innocuous variant, in case declares getaddrinfo. + For example, HP-UX 11i declares gettimeofday. */ +#define getaddrinfo innocuous_getaddrinfo + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getaddrinfo (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getaddrinfo /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -26611,382 +19243,424 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char connect (); +char getaddrinfo (); +/* 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_getaddrinfo || defined __stub___getaddrinfo +choke me +#endif + int main () { -return connect (); +return getaddrinfo (); ; return 0; } _ACEOF -for ac_lib in '' inet; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_search_connect=$ac_res + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_getaddrinfo=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_getaddrinfo=no +fi -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_connect+set}" = set; then - break -fi -done -if test "${ac_cv_search_connect+set}" = set; then - : -else - ac_cv_search_connect=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_connect" >&5 -echo "${ECHO_T}$ac_cv_search_connect" >&6; } -ac_res=$ac_cv_search_connect -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - -{ echo "$as_me:$LINENO: checking for type of socket length (socklen_t)" >&5 -echo $ECHO_N "checking for type of socket length (socklen_t)... $ECHO_C" >&6; } -cat > conftest.$ac_ext < -#include -#include -int main(void) { - -(void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL) -; return 0; } -EOF -if { (eval echo configure:26693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then - rm -rf conftest* - - { echo "$as_me:$LINENO: result: socklen_t *" >&5 -echo "${ECHO_T}socklen_t *" >&6; } - XML_SOCKLEN_T=socklen_t -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - cat > conftest.$ac_ext < -#include -#include -int main(void) { - -(void)getsockopt (1, 1, 1, NULL, (size_t *)NULL) -; return 0; } -EOF -if { (eval echo configure:26716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then - rm -rf conftest* - - { echo "$as_me:$LINENO: result: size_t *" >&5 -echo "${ECHO_T}size_t *" >&6; } - XML_SOCKLEN_T=size_t -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - cat > conftest.$ac_ext < -#include -#include -int main(void) { +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +$as_echo "$ac_cv_func_getaddrinfo" >&6; } +if test "x$ac_cv_func_getaddrinfo" = x""yes; then + have_getaddrinfo=yes +fi -(void)getsockopt (1, 1, 1, NULL, (int *)NULL) -; return 0; } -EOF -if { (eval echo configure:26739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then - rm -rf conftest* + if test $have_getaddrinfo != yes; then + for lib in bsd socket inet; do + as_ac_Lib=`$as_echo "ac_cv_lib_$lib''_getaddrinfo" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for getaddrinfo in -l$lib" >&5 +$as_echo_n "checking for getaddrinfo in -l$lib... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-l$lib $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - { echo "$as_me:$LINENO: result: int *" >&5 -echo "${ECHO_T}int *" >&6; } - XML_SOCKLEN_T=int +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getaddrinfo (); +int +main () +{ +return getaddrinfo (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_Lib=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: WARNING: could not determine" >&5 -echo "$as_me: WARNING: could not determine" >&2;} - XML_SOCKLEN_T="int" + eval "$as_ac_Lib=no" fi -rm -f conftest* + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -rm -f conftest* +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + LIBS="$LIBS -l$lib";have_getaddrinfo=yes;break fi -rm -f conftest* -cat >>confdefs.h <<_ACEOF -#define XML_SOCKLEN_T $XML_SOCKLEN_T -_ACEOF + done + fi + if test $have_getaddrinfo = yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETADDRINFO /**/ +_ACEOF -{ echo "$as_me:$LINENO: checking whether to enable IPv6" >&5 -echo $ECHO_N "checking whether to enable IPv6... $ECHO_C" >&6; } -# Check whether --enable-ipv6 was given. -if test "${enable_ipv6+set}" = set; then - enableval=$enable_ipv6; -else - enable_ipv6=yes + fi + fi fi -if test "$with_minimum" = "yes" -then - enable_ipv6=no -fi -if test $enable_ipv6 = yes; then - have_ipv6=no + +{ $as_echo "$as_me:$LINENO: checking for isnan" >&5 +$as_echo_n "checking for isnan... " >&6; } +if test "${ac_cv_func_isnan+set}" = set; then + $as_echo_n "(cached) " >&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 isnan to an innocuous variant, in case declares isnan. + For example, HP-UX 11i declares gettimeofday. */ +#define isnan innocuous_isnan - #include - #include +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char isnan (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef isnan + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char isnan (); +/* 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_isnan || defined __stub___isnan +choke me +#endif int main () { - - struct sockaddr_storage ss; - socket(AF_INET6, SOCK_STREAM, 0) - +return isnan (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - have_ipv6=yes + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_isnan=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - have_ipv6=no - + ac_cv_func_isnan=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { echo "$as_me:$LINENO: result: $have_ipv6" >&5 -echo "${ECHO_T}$have_ipv6" >&6; } - - if test $have_ipv6 = yes; then +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_isnan" >&5 +$as_echo "$ac_cv_func_isnan" >&6; } +if test "x$ac_cv_func_isnan" = x""yes; then cat >>confdefs.h <<\_ACEOF -#define SUPPORT_IP6 +#define HAVE_ISNAN /**/ _ACEOF - have_broken_ss_family=no - - { echo "$as_me:$LINENO: checking struct sockaddr::ss_family" >&5 -echo $ECHO_N "checking struct sockaddr::ss_family... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF +else + { $as_echo "$as_me:$LINENO: checking for isnan in -lm" >&5 +$as_echo_n "checking for isnan in -lm... " >&6; } +if test "${ac_cv_lib_m_isnan+set}" = set; then + $as_echo_n "(cached) " >&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. */ - #include - #include - +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char isnan (); int main () { - - struct sockaddr_storage ss ; - ss.ss_family = 0 ; - +return isnan (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - have_ss_family=yes + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_m_isnan=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - have_ss_family=no + ac_cv_lib_m_isnan=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_isnan" >&5 +$as_echo "$ac_cv_lib_m_isnan" >&6; } +if test "x$ac_cv_lib_m_isnan" = x""yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ISNAN /**/ +_ACEOF fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { echo "$as_me:$LINENO: result: $have_ss_family" >&5 -echo "${ECHO_T}$have_ss_family" >&6; } - if test x$have_ss_family = xno ; then - { echo "$as_me:$LINENO: checking broken struct sockaddr::ss_family" >&5 -echo $ECHO_N "checking broken struct sockaddr::ss_family... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF +fi + + +{ $as_echo "$as_me:$LINENO: checking for isinf" >&5 +$as_echo_n "checking for isinf... " >&6; } +if test "${ac_cv_func_isinf+set}" = set; then + $as_echo_n "(cached) " >&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 isinf to an innocuous variant, in case declares isinf. + For example, HP-UX 11i declares gettimeofday. */ +#define isinf innocuous_isinf - #include - #include +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char isinf (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef isinf + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char isinf (); +/* 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_isinf || defined __stub___isinf +choke me +#endif int main () { - - struct sockaddr_storage ss ; - ss.__ss_family = 0 ; - +return isinf (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - have_broken_ss_family=yes + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_isinf=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - have_broken_ss_family=no - + ac_cv_func_isinf=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { echo "$as_me:$LINENO: result: $have_broken_ss_family" >&5 -echo "${ECHO_T}$have_broken_ss_family" >&6; } - if test x$have_broken_ss_family = xyes ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_BROKEN_SS_FAMILY -_ACEOF - +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5 +$as_echo "$ac_cv_func_isinf" >&6; } +if test "x$ac_cv_func_isinf" = x""yes; then cat >>confdefs.h <<\_ACEOF -#define ss_family __ss_family +#define HAVE_ISINF /**/ _ACEOF - else - { echo "$as_me:$LINENO: WARNING: ss_family and __ss_family not found" >&5 -echo "$as_me: WARNING: ss_family and __ss_family not found" >&2;} - fi - fi - - have_getaddrinfo=no - { echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } -if test "${ac_cv_func_getaddrinfo+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking for isinf in -lm" >&5 +$as_echo_n "checking for isinf in -lm... " >&6; } +if test "${ac_cv_lib_m_isinf+set}" = set; then + $as_echo_n "(cached) " >&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. */ -/* Define getaddrinfo to an innocuous variant, in case declares getaddrinfo. - For example, HP-UX 11i declares gettimeofday. */ -#define getaddrinfo innocuous_getaddrinfo - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char getaddrinfo (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef getaddrinfo /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -26994,18 +19668,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char getaddrinfo (); -/* 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_getaddrinfo || defined __stub___getaddrinfo -choke me -#endif - +char isinf (); int main () { -return getaddrinfo (); +return isinf (); ; return 0; } @@ -27016,45 +19683,243 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_getaddrinfo=yes + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_m_isinf=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getaddrinfo=no + ac_cv_lib_m_isinf=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } -if test $ac_cv_func_getaddrinfo = yes; then - have_getaddrinfo=yes +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_isinf" >&5 +$as_echo "$ac_cv_lib_m_isinf" >&6; } +if test "x$ac_cv_lib_m_isinf" = x""yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ISINF /**/ +_ACEOF + fi - if test $have_getaddrinfo != yes; then - for lib in bsd socket inet; do - as_ac_Lib=`echo "ac_cv_lib_$lib''_getaddrinfo" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for getaddrinfo in -l$lib" >&5 -echo $ECHO_N "checking for getaddrinfo in -l$lib... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +fi + + +XML_LIBDIR='-L${libdir}' +XML_INCLUDEDIR='-I${includedir}/libxml2' + +XML_CFLAGS="" +RDL_LIBS="" + +if test "${GCC}" != "yes" ; then + case "${host}" in + hppa*-*-hpux* ) + CFLAGS="${CFLAGS} -Wp,-H30000" + ;; + *-dec-osf* ) + CFLAGS="${CFLAGS} -ieee" + ;; + alpha*-*-linux* ) + CFLAGS="${CFLAGS} -ieee" + ;; + esac +else + if test "$with_fexceptions" = "yes" + then + # + # Not activated by default because this inflates the code size + # Used to allow propagation of C++ exceptions through the library + # + CFLAGS="${CFLAGS} -fexceptions" + fi + + CFLAGS="${CFLAGS} -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls" + case "${host}" in + alpha*-*-linux* ) + CFLAGS="${CFLAGS} -mieee" + ;; + alpha*-*-osf* ) + CFLAGS="${CFLAGS} -mieee" + ;; + esac +fi +case ${host} in + *-*-solaris*) + XML_LIBDIR="${XML_LIBDIR} -R${libdir}" + ;; + hppa*-hp-mpeix) + NEED_TRIO=1 + ;; + *-*-mingw* | *-*-cygwin* | *-*-msvc* ) + # If the host is Windows, and shared libraries are disabled, we + # need to add -DLIBXML_STATIC to CFLAGS in order for linking to + # work properly (without it, xmlexports.h would force the use of + # DLL imports, which obviously aren't present in a static + # library). + if test "x$enable_shared" = "xno"; then + XML_CFLAGS="$XML_CFLAGS -DLIBXML_STATIC" + CFLAGS="$CFLAGS -DLIBXML_STATIC" + fi + ;; +esac + + + +PYTHON_VERSION= +PYTHON_INCLUDES= +PYTHON_SITE_PACKAGES= +PYTHON_TESTS= +pythondir= +if test "$with_python" != "no" ; then + if test -x "$with_python/bin/python" + then + echo Found python in $with_python/bin/python + PYTHON="$with_python/bin/python" + else + if test -x "$with_python" + then + echo Found python in $with_python + PYTHON="$with_python" + else + if test -x "$PYTHON" + then + echo Found python in environment PYTHON=$PYTHON + with_python=`$PYTHON -c "import sys; print sys.exec_prefix"` + else + # Extract the first word of "python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5", so it can be a program name with args. +set dummy python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PYTHON+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi + fi + fi + if test "$PYTHON" != "" + then + PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[0:3]"` + echo Found Python version $PYTHON_VERSION + fi + if test "$PYTHON_VERSION" != "" + then + if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \ + -d $with_python/lib/python$PYTHON_VERSION/site-packages + then + PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION + PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages + else + if test -r $prefix/include/python$PYTHON_VERSION/Python.h + then + PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION + PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages + else + if test -r /usr/include/python$PYTHON_VERSION/Python.h + then + PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION + PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages + else + echo could not find python$PYTHON_VERSION/Python.h + fi + fi + if test ! -d "$PYTHON_SITE_PACKAGES" + then + PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"` + fi + fi + fi + if test "$with_python" != "" + then + pythondir='$(PYTHON_SITE_PACKAGES)' + else + pythondir='$(libdir)/python$(PYTHON_VERSION)/site-packages' + fi +else + PYTHON= +fi + if test "$PYTHON_INCLUDES" != ""; then + WITH_PYTHON_TRUE= + WITH_PYTHON_FALSE='#' +else + WITH_PYTHON_TRUE='#' + WITH_PYTHON_FALSE= +fi + +if test "$PYTHON_INCLUDES" != "" +then + PYTHON_SUBDIR=python +else + PYTHON_SUBDIR= +fi + + + +WITH_MODULES=0 +TEST_MODULES= + +if test "$with_modules" != "no" ; then + case "$host" in + *-*-cygwin*) + MODULE_EXTENSION=".dll" + { $as_echo "$as_me:$LINENO: checking for dlopen in -lcygwin" >&5 +$as_echo_n "checking for dlopen in -lcygwin... " >&6; } +if test "${ac_cv_lib_cygwin_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-l$lib $LIBS" +LIBS="-lcygwin $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -27068,11 +19933,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char getaddrinfo (); +char dlopen (); int main () { -return getaddrinfo (); +return dlopen (); ; return 0; } @@ -27083,55 +19948,54 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_cygwin_dlopen=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Lib=no" + ac_cv_lib_cygwin_dlopen=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - LIBS="$LIBS -l$lib";have_getaddrinfo=yes;break -fi - - done - fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cygwin_dlopen" >&5 +$as_echo "$ac_cv_lib_cygwin_dlopen" >&6; } +if test "x$ac_cv_lib_cygwin_dlopen" = x""yes; then - if test $have_getaddrinfo = yes; then + WITH_MODULES=1 + MODULE_PLATFORM_LIBS= cat >>confdefs.h <<\_ACEOF -#define HAVE_GETADDRINFO +#define HAVE_DLOPEN /**/ _ACEOF - fi - fi -fi +fi -{ echo "$as_me:$LINENO: checking for isnan" >&5 -echo $ECHO_N "checking for isnan... $ECHO_C" >&6; } -if test "${ac_cv_func_isnan+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + ;; + *) + { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 +$as_echo_n "checking for shl_load... " >&6; } +if test "${ac_cv_func_shl_load+set}" = set; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -27139,12 +20003,12 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define isnan to an innocuous variant, in case declares isnan. +/* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ -#define isnan innocuous_isnan +#define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char isnan (); below. + which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ @@ -27154,7 +20018,7 @@ cat >>conftest.$ac_ext <<_ACEOF # include #endif -#undef isnan +#undef shl_load /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -27162,18 +20026,18 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char isnan (); +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_isnan || defined __stub___isnan +#if defined __stub_shl_load || defined __stub___shl_load choke me #endif int main () { -return isnan (); +return shl_load (); ; return 0; } @@ -27184,45 +20048,46 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_isnan=yes + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_shl_load=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_isnan=no + ac_cv_func_shl_load=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_isnan" >&5 -echo "${ECHO_T}$ac_cv_func_isnan" >&6; } -if test $ac_cv_func_isnan = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ISNAN -_ACEOF - +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +$as_echo "$ac_cv_func_shl_load" >&6; } +if test "x$ac_cv_func_shl_load" = x""yes; then + libxml_have_shl_load=yes else - { echo "$as_me:$LINENO: checking for isnan in -lm" >&5 -echo $ECHO_N "checking for isnan in -lm... $ECHO_C" >&6; } -if test "${ac_cv_lib_m_isnan+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + + { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" +LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -27236,11 +20101,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char isnan (); +char shl_load (); int main () { -return isnan (); +return shl_load (); ; return 0; } @@ -27251,47 +20116,46 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_m_isnan=yes + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dld_shl_load=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_m_isnan=no + ac_cv_lib_dld_shl_load=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_isnan" >&5 -echo "${ECHO_T}$ac_cv_lib_m_isnan" >&6; } -if test $ac_cv_lib_m_isnan = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ISNAN -_ACEOF - -fi - -fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then + MODULE_PLATFORM_LIBS="-ldld" + libxml_have_shl_load=yes +else -{ echo "$as_me:$LINENO: checking for isinf" >&5 -echo $ECHO_N "checking for isinf... $ECHO_C" >&6; } -if test "${ac_cv_func_isinf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 +$as_echo_n "checking for dlopen... " >&6; } +if test "${ac_cv_func_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -27299,12 +20163,12 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define isinf to an innocuous variant, in case declares isinf. +/* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ -#define isinf innocuous_isinf +#define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char isinf (); below. + which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ @@ -27314,7 +20178,7 @@ cat >>conftest.$ac_ext <<_ACEOF # include #endif -#undef isinf +#undef dlopen /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -27322,18 +20186,18 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char isinf (); +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_isinf || defined __stub___isinf +#if defined __stub_dlopen || defined __stub___dlopen choke me #endif int main () { -return isinf (); +return dlopen (); ; return 0; } @@ -27344,45 +20208,46 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_isinf=yes + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_dlopen=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_isinf=no + ac_cv_func_dlopen=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5 -echo "${ECHO_T}$ac_cv_func_isinf" >&6; } -if test $ac_cv_func_isinf = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ISINF -_ACEOF - +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +$as_echo "$ac_cv_func_dlopen" >&6; } +if test "x$ac_cv_func_dlopen" = x""yes; then + libxml_have_dlopen=yes else - { echo "$as_me:$LINENO: checking for isinf in -lm" >&5 -echo $ECHO_N "checking for isinf in -lm... $ECHO_C" >&6; } -if test "${ac_cv_lib_m_isinf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + + { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" +LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -27396,11 +20261,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char isinf (); +char dlopen (); int main () { -return isinf (); +return dlopen (); ; return 0; } @@ -27411,239 +20276,280 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_m_isinf=yes + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dl_dlopen=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_m_isinf=no + ac_cv_lib_dl_dlopen=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_isinf" >&5 -echo "${ECHO_T}$ac_cv_lib_m_isinf" >&6; } -if test $ac_cv_lib_m_isinf = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_ISINF -_ACEOF + MODULE_PLATFORM_LIBS="-ldl" + libxml_have_dlopen=yes +fi fi fi +fi -XML_LIBDIR='-L${libdir}' -XML_INCLUDEDIR='-I${includedir}/libxml2' -XML_CFLAGS="" -RDL_LIBS="" + if test "${libxml_have_shl_load}" = "yes"; then + MODULE_EXTENSION=".sl" + WITH_MODULES=1 -if test "${GCC}" != "yes" ; then - case "${host}" in - hppa*-*-hpux* ) - CFLAGS="${CFLAGS} -Wp,-H30000" - ;; - *-dec-osf* ) - CFLAGS="${CFLAGS} -ieee" - ;; - alpha*-*-linux* ) - CFLAGS="${CFLAGS} -ieee" - ;; - esac -else - if test "$with_fexceptions" = "yes" - then - # - # Not activated by default because this inflates the code size - # Used to allow propagation of C++ exceptions through the library - # - CFLAGS="${CFLAGS} -fexceptions" - fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHLLOAD /**/ +_ACEOF - CFLAGS="${CFLAGS} -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls" + fi + + if test "${libxml_have_dlopen}" = "yes"; then case "${host}" in - alpha*-*-linux* ) - CFLAGS="${CFLAGS} -mieee" - ;; - alpha*-*-osf* ) - CFLAGS="${CFLAGS} -mieee" - ;; + *-*-hpux* ) + MODULE_EXTENSION=".sl" + ;; + * ) + MODULE_EXTENSION=".so" + ;; esac + + WITH_MODULES=1 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DLOPEN /**/ +_ACEOF + + fi + ;; + esac fi -case ${host} in - *-*-solaris*) - XML_LIBDIR="${XML_LIBDIR} -R${libdir}" - ;; - hppa*-hp-mpeix) - NEED_TRIO=1 - ;; - *-*-mingw* | *-*-cygwin* | *-*-msvc* ) - # If the host is Windows, and shared libraries are disabled, we - # need to add -DLIBXML_STATIC to CFLAGS in order for linking to - # work properly (without it, xmlexports.h would force the use of - # DLL imports, which obviously aren't present in a static - # library). - if test "x$enable_shared" = "xno"; then - XML_CFLAGS="$XML_CFLAGS -DLIBXML_STATIC" - CFLAGS="$CFLAGS -DLIBXML_STATIC" - fi - ;; -esac +if test "${WITH_MODULES}" = "1"; then + TEST_MODULES="ModuleTests" +fi -PYTHON_VERSION= -PYTHON_INCLUDES= -PYTHON_SITE_PACKAGES= -PYTHON_TESTS= -pythondir= -if test "$with_python" != "no" ; then - if test -x "$with_python/bin/python" + + + + + +if [ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ] || \ + [ "${LOGNAME}" = "veillard" -a "`pwd`" = "/home/veillard/libxml2" ] || \ + [ "${LOGNAME}" = "bill" -a "`pwd`" = "/home/bill/gnomesvn/libxml2" ] + then + if test "$with_minimum" != "yes" then - echo Found python in $with_python/bin/python - PYTHON="$with_python/bin/python" - else - if test -x "$with_python" - then - echo Found python in $with_python - PYTHON="$with_python" - else - if test -x "$PYTHON" - then - echo Found python in environment PYTHON=$PYTHON - with_python=`$PYTHON -c "import sys; print sys.exec_prefix"` - else - # Extract the first word of "python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5", so it can be a program name with args. -set dummy python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_PYTHON+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PYTHON in - [\\/]* | ?:[\\/]*) - ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS + if test "${with_mem_debug}" = "" ; then + echo Activating memory debugging + with_mem_debug="yes" + with_run_debug="yes" + fi + if test "${with_docbook}" = "" ; then + with_docbook="yes" + fi + fi + if test "${GCC}" = "yes" ; then + CFLAGS="-g -O -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall" + fi + STATIC_BINARIES="-static" +else + STATIC_BINARIES= +fi - ;; -esac + + +if test "${NEED_TRIO}" = "1" ; then + echo Adding trio library for string functions + WITH_TRIO=1 +else + WITH_TRIO=0 fi -PYTHON=$ac_cv_path_PYTHON -if test -n "$PYTHON"; then - { echo "$as_me:$LINENO: result: $PYTHON" >&5 -echo "${ECHO_T}$PYTHON" >&6; } + if test "${NEED_TRIO}" = "1"; then + WITH_TRIO_SOURCES_TRUE= + WITH_TRIO_SOURCES_FALSE='#' else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + WITH_TRIO_SOURCES_TRUE='#' + WITH_TRIO_SOURCES_FALSE= fi - fi - fi - fi - if test "$PYTHON" != "" - then - PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[0:3]"` - echo Found Python version $PYTHON_VERSION - fi - if test "$PYTHON_VERSION" != "" - then - if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \ - -d $with_python/lib/python$PYTHON_VERSION/site-packages - then - PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION - PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages - else - if test -r $prefix/include/python$PYTHON_VERSION/Python.h - then - PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION - PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages - else - if test -r /usr/include/python$PYTHON_VERSION/Python.h - then - PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION - PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages - else - echo could not find python$PYTHON_VERSION/Python.h - fi - fi - if test ! -d "$PYTHON_SITE_PACKAGES" - then - PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"` - fi - fi - fi - if test "$with_python" != "" - then - pythondir='$(PYTHON_SITE_PACKAGES)' - else - pythondir='$(libdir)/python$(PYTHON_VERSION)/site-packages' - fi + +echo Checking configuration requirements + +THREAD_LIBS="" +BASE_THREAD_LIBS="" +WITH_THREADS=0 +THREAD_CFLAGS="" +TEST_THREADS="" +THREADS_W32="" + +if test "$with_threads" = "no" ; then + echo Disabling multithreaded support else - PYTHON= + echo Enabling multithreaded support + if test "$with_threads" = "pthread" | test "$with_threads" = "" ; then + if test "${ac_cv_header_pthread_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for pthread.h" >&5 +$as_echo_n "checking for pthread.h... " >&6; } +if test "${ac_cv_header_pthread_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi - if test "$PYTHON_INCLUDES" != ""; then - WITH_PYTHON_TRUE= - WITH_PYTHON_FALSE='#' +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 +$as_echo "$ac_cv_header_pthread_h" >&6; } else - WITH_PYTHON_TRUE='#' - WITH_PYTHON_FALSE= + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking pthread.h usability" >&5 +$as_echo_n "checking pthread.h usability... " >&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 +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no fi -if test "$PYTHON_INCLUDES" != "" -then - PYTHON_SUBDIR=python +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking pthread.h presence" >&5 +$as_echo_n "checking pthread.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else - PYTHON_SUBDIR= + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;} -WITH_MODULES=0 -TEST_MODULES= + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for pthread.h" >&5 +$as_echo_n "checking for pthread.h... " >&6; } +if test "${ac_cv_header_pthread_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_pthread_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 +$as_echo "$ac_cv_header_pthread_h" >&6; } -if test "$with_modules" != "no" ; then - case "$host" in - *-*-cygwin*) - MODULE_EXTENSION=".dll" - { echo "$as_me:$LINENO: checking for dlopen in -lcygwin" >&5 -echo $ECHO_N "checking for dlopen in -lcygwin... $ECHO_C" >&6; } -if test "${ac_cv_lib_cygwin_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +if test "x$ac_cv_header_pthread_h" = x""yes; then + { $as_echo "$as_me:$LINENO: checking for pthread_join in -lpthread" >&5 +$as_echo_n "checking for pthread_join in -lpthread... " >&6; } +if test "${ac_cv_lib_pthread_pthread_join+set}" = set; then + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lcygwin $LIBS" +LIBS="-lpthread $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -27657,11 +20563,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char dlopen (); +char pthread_join (); int main () { -return dlopen (); +return pthread_join (); ; return 0; } @@ -27672,73 +20578,125 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_cygwin_dlopen=yes + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_pthread_pthread_join=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_cygwin_dlopen=no + ac_cv_lib_pthread_pthread_join=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_cygwin_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_cygwin_dlopen" >&6; } -if test $ac_cv_lib_cygwin_dlopen = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_join" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_join" >&6; } +if test "x$ac_cv_lib_pthread_pthread_join" = x""yes; then - WITH_MODULES=1 - MODULE_PLATFORM_LIBS= + THREAD_LIBS="-lpthread" cat >>confdefs.h <<\_ACEOF -#define HAVE_DLOPEN +#define HAVE_LIBPTHREAD /**/ _ACEOF +cat >>confdefs.h <<\_ACEOF +#define HAVE_PTHREAD_H /**/ +_ACEOF + + WITH_THREADS="1" 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 +fi -/* 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 + fi + case $host_os in + *mingw32*) if test "$THREAD_LIBS" != "-lpthread"; then + WITH_THREADS="1" + THREADS_W32="Win32" + THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS" + fi + ;; + *cygwin*) THREAD_LIBS="" + ;; + *beos*) WITH_THREADS="1" + THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_BEOS_THREADS" + ;; + *linux*) + if test "${GCC}" = "yes" ; then + GCC_VERSION=`${CC} --version | head -1 | awk '{print $3}'` + GCC_MAJOR=`echo ${GCC_VERSION} | sed 's+\..*++'` + GCC_MEDIUM=`echo ${GCC_VERSION} | sed 's+[0-9]*\.++' | sed 's+\..*++'` + if test "${THREAD_LIBS}" = "-lpthread" ; then + if expr ${GCC_MEDIUM} \> 2 \& ${GCC_MAJOR} = 3 > /dev/null + then + THREAD_LIBS="" + BASE_THREAD_LIBS="-lpthread" + else + if expr ${GCC_MAJOR} \> 3 > /dev/null + then + THREAD_LIBS="" + BASE_THREAD_LIBS="-lpthread" + else + echo old GCC disabling weak symbols for pthread + fi + fi + fi + fi + ;; + esac + if test "$WITH_THREADS" = "1" ; then + THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT" + TEST_THREADS="Threadtests" + fi +fi +if test "$with_thread_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then + THREAD_CFLAGS="$THREAD_CFLAGS -DLIBXML_THREAD_ALLOC_ENABLED" +fi -#undef shl_load + + + + + + + +if test "$with_history" = "yes" ; then + echo Enabling xmllint shell history + unset tcap + for termlib in ncurses curses termcap terminfo termlib; do + as_ac_Lib=`$as_echo "ac_cv_lib_${termlib}''_tputs" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for tputs in -l${termlib}" >&5 +$as_echo_n "checking for tputs in -l${termlib}... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-l${termlib} $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -27746,18 +20704,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shl_load || defined __stub___shl_load -choke me -#endif - +char tputs (); int main () { -return shl_load (); +return tputs (); ; return 0; } @@ -27768,194 +20719,182 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_shl_load=yes + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_Lib=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_shl_load=no + eval "$as_ac_Lib=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + tcap="-l$termlib" 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 - libxml_have_shl_load=yes -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 + test -n "$tcap" && break + done + + if test "${ac_cv_header_readline_history_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for readline/history.h" >&5 +$as_echo_n "checking for readline/history.h... " >&6; } +if test "${ac_cv_header_readline_history_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_readline_history_h" >&5 +$as_echo "$ac_cv_header_readline_history_h" >&6; } else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking readline/history.h usability" >&5 +$as_echo_n "checking readline/history.h usability... " >&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 GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} +$ac_includes_default +#include _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dld_shl_load=yes + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dld_shl_load=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + ac_header_compiler=no 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 - MODULE_PLATFORM_LIBS="-ldld" - libxml_have_shl_load=yes -else +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } - { 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 +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking readline/history.h presence" >&5 +$as_echo_n "checking readline/history.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_dlopen || defined __stub___dlopen -choke me -#endif - -int -main () -{ -return dlopen (); - ; - return 0; -} +#include _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_dlopen=yes + }; then + ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_dlopen=no + ac_header_preproc=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } -if test $ac_cv_func_dlopen = yes; then - libxml_have_dlopen=yes +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: readline/history.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: readline/history.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: readline/history.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: readline/history.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: readline/history.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: readline/history.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: readline/history.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: readline/history.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: readline/history.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: readline/history.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: readline/history.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: readline/history.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: readline/history.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: readline/history.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: readline/history.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: readline/history.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for readline/history.h" >&5 +$as_echo_n "checking for readline/history.h... " >&6; } +if test "${ac_cv_header_readline_history_h+set}" = set; then + $as_echo_n "(cached) " >&6 else + ac_cv_header_readline_history_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_readline_history_h" >&5 +$as_echo "$ac_cv_header_readline_history_h" >&6; } - { 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 +fi +if test "x$ac_cv_header_readline_history_h" = x""yes; then + { $as_echo "$as_me:$LINENO: checking for append_history in -lhistory" >&5 +$as_echo_n "checking for append_history in -lhistory... " >&6; } +if test "${ac_cv_lib_history_append_history+set}" = set; then + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" +LIBS="-lhistory $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -27969,11 +20908,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char dlopen (); +char append_history (); int main () { -return dlopen (); +return append_history (); ; return 0; } @@ -27984,153 +20923,61 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dl_dlopen=yes + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_history_append_history=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dl_dlopen=no + ac_cv_lib_history_append_history=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then - - MODULE_PLATFORM_LIBS="-ldl" - libxml_have_dlopen=yes -fi - -fi - -fi - -fi - - - if test "${libxml_have_shl_load}" = "yes"; then - MODULE_EXTENSION=".sl" - WITH_MODULES=1 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SHLLOAD -_ACEOF - - fi - - if test "${libxml_have_dlopen}" = "yes"; then - case "${host}" in - *-*-hpux* ) - MODULE_EXTENSION=".sl" - ;; - * ) - MODULE_EXTENSION=".so" - ;; - esac +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_history_append_history" >&5 +$as_echo "$ac_cv_lib_history_append_history" >&6; } +if test "x$ac_cv_lib_history_append_history" = x""yes; then - WITH_MODULES=1 + RDL_LIBS="-lhistory" cat >>confdefs.h <<\_ACEOF -#define HAVE_DLOPEN -_ACEOF - - fi - ;; - esac -fi - -if test "${WITH_MODULES}" = "1"; then - TEST_MODULES="ModuleTests" -fi - - - - - - - -if [ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ] || \ - [ "${LOGNAME}" = "veillard" -a "`pwd`" = "/home/veillard/libxml2" ] || \ - [ "${LOGNAME}" = "bill" -a "`pwd`" = "/home/bill/gnomesvn/libxml2" ] - then - if test "$with_minimum" != "yes" - then - if test "${with_mem_debug}" = "" ; then - echo Activating memory debugging - with_mem_debug="yes" - with_run_debug="yes" - fi - if test "${with_docbook}" = "" ; then - with_docbook="yes" - fi - fi - if test "${GCC}" = "yes" ; then - CFLAGS="-g -O -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall" - fi - STATIC_BINARIES="-static" -else - STATIC_BINARIES= -fi - - - -if test "${NEED_TRIO}" = "1" ; then - echo Adding trio library for string functions - WITH_TRIO=1 -else - WITH_TRIO=0 -fi - if test "${NEED_TRIO}" = "1"; then - WITH_TRIO_SOURCES_TRUE= - WITH_TRIO_SOURCES_FALSE='#' -else - WITH_TRIO_SOURCES_TRUE='#' - WITH_TRIO_SOURCES_FALSE= -fi - - +#define HAVE_LIBHISTORY /**/ +_ACEOF -echo Checking configuration requirements +fi -THREAD_LIBS="" -BASE_THREAD_LIBS="" -WITH_THREADS=0 -THREAD_CFLAGS="" -TEST_THREADS="" -THREADS_W32="" +fi -if test "$with_threads" = "no" ; then - echo Disabling multithreaded support -else - echo Enabling multithreaded support - if test "${ac_cv_header_pthread_h+set}" = set; then - { echo "$as_me:$LINENO: checking for pthread.h" >&5 -echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; } -if test "${ac_cv_header_pthread_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test "${ac_cv_header_readline_readline_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for readline/readline.h" >&5 +$as_echo_n "checking for readline/readline.h... " >&6; } +if test "${ac_cv_header_readline_readline_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 -echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_readline_readline_h" >&5 +$as_echo "$ac_cv_header_readline_readline_h" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking pthread.h usability" >&5 -echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking readline/readline.h usability" >&5 +$as_echo_n "checking readline/readline.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -28138,7 +20985,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -28146,112 +20993,114 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking pthread.h presence" >&5 -echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking readline/readline.h presence" >&5 +$as_echo_n "checking readline/readline.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: readline/readline.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: readline/readline.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: readline/readline.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: readline/readline.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: readline/readline.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: readline/readline.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: readline/readline.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: readline/readline.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: readline/readline.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: readline/readline.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: readline/readline.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: readline/readline.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: readline/readline.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: readline/readline.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: readline/readline.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: readline/readline.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for pthread.h" >&5 -echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; } -if test "${ac_cv_header_pthread_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for readline/readline.h" >&5 +$as_echo_n "checking for readline/readline.h... " >&6; } +if test "${ac_cv_header_readline_readline_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_header_pthread_h=$ac_header_preproc + ac_cv_header_readline_readline_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 -echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_readline_readline_h" >&5 +$as_echo "$ac_cv_header_readline_readline_h" >&6; } fi -if test $ac_cv_header_pthread_h = yes; then - { echo "$as_me:$LINENO: checking for pthread_join in -lpthread" >&5 -echo $ECHO_N "checking for pthread_join in -lpthread... $ECHO_C" >&6; } -if test "${ac_cv_lib_pthread_pthread_join+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "x$ac_cv_header_readline_readline_h" = x""yes; then + { $as_echo "$as_me:$LINENO: checking for readline in -lreadline" >&5 +$as_echo_n "checking for readline in -lreadline... " >&6; } +if test "${ac_cv_lib_readline_readline+set}" = set; then + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" +LIBS="-lreadline $tcap $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -28265,11 +21114,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char pthread_join (); +char readline (); int main () { -return pthread_join (); +return readline (); ; return 0; } @@ -28280,186 +21129,320 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_pthread_pthread_join=yes + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_readline_readline=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthread_pthread_join=no + ac_cv_lib_readline_readline=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_join" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_join" >&6; } -if test $ac_cv_lib_pthread_pthread_join = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5 +$as_echo "$ac_cv_lib_readline_readline" >&6; } +if test "x$ac_cv_lib_readline_readline" = x""yes; then - THREAD_LIBS="-lpthread" + RDL_LIBS="-lreadline $RDL_LIBS $tcap" cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBPTHREAD +#define HAVE_LIBREADLINE /**/ _ACEOF +fi + +fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_PTHREAD_H -_ACEOF - WITH_THREADS="1" + if test -n "$RDL_DIR" -a -n "$RDL_LIBS"; then + CPPFLAGS="$CPPFLAGS -I${RDL_DIR}/include" + RDL_LIBS="-L${RDL_DIR}/lib $RDL_LIBS" + fi fi +if test "$with_tree" = "no" ; then + echo Disabling DOM like tree manipulation APIs + WITH_TREE=0 +else + WITH_TREE=1 fi - case $host_os in - *mingw32*) WITH_THREADS="1" - THREADS_W32="Win32" - THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS" - ;; - *cygwin*) THREAD_LIBS="" - ;; - *beos*) WITH_THREADS="1" - THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_BEOS_THREADS" - ;; - *linux*) - if test "${GCC}" = "yes" ; then - GCC_VERSION=`${CC} --version | head -1 | awk '{print $3}'` - GCC_MAJOR=`echo ${GCC_VERSION} | sed 's+\..*++'` - GCC_MEDIUM=`echo ${GCC_VERSION} | sed 's+[0-9]*\.++' | sed 's+\..*++'` - if test "${THREAD_LIBS}" = "-lpthread" ; then - if expr ${GCC_MEDIUM} \> 2 \& ${GCC_MAJOR} = 3 > /dev/null - then - THREAD_LIBS="" - BASE_THREAD_LIBS="-lpthread" - else - if expr ${GCC_MAJOR} \> 3 > /dev/null - then - THREAD_LIBS="" - BASE_THREAD_LIBS="-lpthread" - else - echo old GCC disabling weak symbols for pthread - fi - fi - fi - fi - ;; - esac - if test "$WITH_THREADS" = "1" ; then - THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT" - TEST_THREADS="Threadtests" +if test "$with_ftp" = "no" ; then + echo Disabling FTP support + WITH_FTP=0 + FTP_OBJ= +else + WITH_FTP=1 + FTP_OBJ=nanoftp.o +fi + + + +if test "$with_http" = "no" ; then + echo Disabling HTTP support + WITH_HTTP=0 + HTTP_OBJ= +else + WITH_HTTP=1 + HTTP_OBJ=nanohttp.o +fi + + + +if test "$with_legacy" = "no" ; then + echo Disabling deprecated APIs + WITH_LEGACY=0 +else + WITH_LEGACY=1 +fi + + +if test "$with_reader" = "no" ; then + echo Disabling the xmlReader parsing interface + WITH_READER=0 + READER_TEST= +else + WITH_READER=1 + READER_TEST=Readertests + if test "$with_push" = "no" ; then + echo xmlReader requires Push interface - enabling it + with_push=yes fi fi -if test "$with_thread_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then - THREAD_CFLAGS="$THREAD_CFLAGS -DLIBXML_THREAD_ALLOC_ENABLED" + + + +if test "$with_writer" = "no" ; then + echo Disabling the xmlWriter saving interface + WITH_WRITER=0 +# WRITER_TEST= +else + WITH_WRITER=1 +# WRITER_TEST=Writertests + if test "$with_push" = "no" ; then + echo xmlWriter requires Push interface - enabling it + with_push=yes + fi + if test "$with_output" = "no" ; then + echo xmlWriter requires Output interface - enabling it + with_output=yes + fi +fi + +#AC_SUBST(WRITER_TEST) + +if test "$with_pattern" = "no" ; then + echo Disabling the xmlPattern parsing interface + WITH_PATTERN=0 + TEST_PATTERN= +else + WITH_PATTERN=1 + TEST_PATTERN=Patterntests +fi + + + +if test "$with_sax1" = "no" ; then + echo Disabling the older SAX1 interface + WITH_SAX1=0 + TEST_SAX= +else + WITH_SAX1=1 + TEST_SAX=SAXtests +fi + + + +if test "$with_push" = "no" ; then + echo Disabling the PUSH parser interfaces + WITH_PUSH=0 + TEST_PUSH= +else + WITH_PUSH=1 + TEST_PUSH="XMLPushtests" +fi + + + +if test "$with_html" = "no" ; then + echo Disabling HTML support + WITH_HTML=0 + HTML_OBJ= + TEST_HTML= +else + WITH_HTML=1 + HTML_OBJ="HTMLparser.o HTMLtree.o" + TEST_HTML=HTMLtests + if test "$with_push" != "no" ; then + TEST_PHTML=HTMLPushtests + else + TEST_PHTML= + fi +fi + + + + + +if test "$with_valid" = "no" ; then + echo Disabling DTD validation support + WITH_VALID=0 + TEST_VALID= + TEST_VTIME= +else + WITH_VALID=1 + TEST_VALID=Validtests + TEST_VTIME=VTimingtests +fi + + + + +if test "$with_catalog" = "no" ; then + echo Disabling Catalog support + WITH_CATALOG=0 + CATALOG_OBJ= + TEST_CATALOG= +else + WITH_CATALOG=1 + CATALOG_OBJ="catalog.o" + TEST_CATALOG=Catatests +fi + + + + +if test "$with_docbook" = "no" ; then + echo Disabling Docbook support + WITH_DOCB=0 + DOCB_OBJ= +else + WITH_DOCB=1 + DOCB_OBJ="DOCBparser.o" +fi + + + + +if test "$with_xptr" = "no" ; then + echo Disabling XPointer support + WITH_XPTR=0 + XPTR_OBJ= + TEST_XPTR= +else + WITH_XPTR=1 + XPTR_OBJ=xpointer.o + TEST_XPTR=XPtrtests + if test "$with_xpath" = "no" ; then + echo XPointer requires XPath support - enabling it + with_xpath=yes + fi fi +if test "$with_c14n" = "no" ; then + echo Disabling C14N support + WITH_C14N=0 + C14N_OBJ= + TEST_C14N= +else + WITH_C14N=1 + C14N_OBJ="c14n.c" + TEST_C14N=C14Ntests + if test "$with_xpath" = "no" ; then + echo C14N requires XPath support - enabling it + with_xpath=yes + fi +fi -if test "$with_history" = "yes" ; then - echo Enabling xmllint shell history - unset tcap - for termlib in ncurses curses termcap terminfo termlib; do - as_ac_Lib=`echo "ac_cv_lib_${termlib}''_tputs" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for tputs in -l${termlib}" >&5 -echo $ECHO_N "checking for tputs in -l${termlib}... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "$with_xinclude" = "no" ; then + echo Disabling XInclude support + WITH_XINCLUDE=0 + XINCLUDE_OBJ= + with_xinclude="no" + TEST_XINCLUDE= else - ac_check_lib_save_LIBS=$LIBS -LIBS="-l${termlib} $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + WITH_XINCLUDE=1 + XINCLUDE_OBJ=xinclude.o + TEST_XINCLUDE=XIncludetests + if test "$with_xpath" = "no" ; then + echo XInclude requires XPath support - enabling it + with_xpath=yes + fi +fi -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tputs (); -int -main () -{ -return tputs (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Lib=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + +if test "$with_xpath" = "no" ; then + echo Disabling XPATH support + WITH_XPATH=0 + XPATH_OBJ= + TEST_XPATH= +else + WITH_XPATH=1 + XPATH_OBJ=xpath.o + TEST_XPATH=XPathtests fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - tcap="-l$termlib" + + + + +if test "$with_output" = "no" ; then + echo Disabling serialization/saving support + WITH_OUTPUT=0 +else + WITH_OUTPUT=1 fi - test -n "$tcap" && break - done - if test "${ac_cv_header_readline_history_h+set}" = set; then - { echo "$as_me:$LINENO: checking for readline/history.h" >&5 -echo $ECHO_N "checking for readline/history.h... $ECHO_C" >&6; } -if test "${ac_cv_header_readline_history_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +WITH_ICONV=0 +if test "$with_iconv" = "no" ; then + echo Disabling ICONV support +else + if test "$with_iconv" != "yes" -a "$with_iconv" != "" ; then + CPPFLAGS="${CPPFLAGS} -I$with_iconv/include" + # Export this since our headers include iconv.h + XML_INCLUDEDIR="${XML_INCLUDEDIR} -I$with_iconv/include" + ICONV_LIBS="-L$with_iconv/lib" + fi + + if test "${ac_cv_header_iconv_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for iconv.h" >&5 +$as_echo_n "checking for iconv.h... " >&6; } +if test "${ac_cv_header_iconv_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_readline_history_h" >&5 -echo "${ECHO_T}$ac_cv_header_readline_history_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5 +$as_echo "$ac_cv_header_iconv_h" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking readline/history.h usability" >&5 -echo $ECHO_N "checking readline/history.h usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking iconv.h usability" >&5 +$as_echo_n "checking iconv.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -28467,7 +21450,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -28475,130 +21458,123 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking readline/history.h presence" >&5 -echo $ECHO_N "checking readline/history.h presence... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking iconv.h presence" >&5 +$as_echo_n "checking iconv.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: readline/history.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: readline/history.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: readline/history.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: readline/history.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: iconv.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: readline/history.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: readline/history.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: readline/history.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: readline/history.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: readline/history.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: readline/history.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: readline/history.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: readline/history.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: readline/history.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: readline/history.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: readline/history.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: readline/history.h: in the future, the compiler will take precedence" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: iconv.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: iconv.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: iconv.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: iconv.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: iconv.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: iconv.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: iconv.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: iconv.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for readline/history.h" >&5 -echo $ECHO_N "checking for readline/history.h... $ECHO_C" >&6; } -if test "${ac_cv_header_readline_history_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for iconv.h" >&5 +$as_echo_n "checking for iconv.h... " >&6; } +if test "${ac_cv_header_iconv_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_header_readline_history_h=$ac_header_preproc + ac_cv_header_iconv_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_readline_history_h" >&5 -echo "${ECHO_T}$ac_cv_header_readline_history_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5 +$as_echo "$ac_cv_header_iconv_h" >&6; } fi -if test $ac_cv_header_readline_history_h = yes; then - { echo "$as_me:$LINENO: checking for append_history in -lhistory" >&5 -echo $ECHO_N "checking for append_history in -lhistory... $ECHO_C" >&6; } -if test "${ac_cv_lib_history_append_history+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lhistory $LIBS" -cat >conftest.$ac_ext <<_ACEOF +if test "x$ac_cv_header_iconv_h" = x""yes; then + { $as_echo "$as_me:$LINENO: checking for iconv" >&5 +$as_echo_n "checking for iconv... " >&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 GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char append_history (); +#include +#include int main () { -return append_history (); + +iconv_t cd = iconv_open ("",""); +iconv (cd, NULL, NULL, NULL, NULL); ; return 0; } @@ -28609,2555 +21585,2720 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_history_append_history=yes + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + WITH_ICONV=1 else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_history_append_history=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_history_append_history" >&5 -echo "${ECHO_T}$ac_cv_lib_history_append_history" >&6; } -if test $ac_cv_lib_history_append_history = yes; then - - RDL_LIBS="-lhistory" - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBHISTORY -_ACEOF - -fi -fi + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:$LINENO: checking for iconv in -liconv" >&5 +$as_echo_n "checking for iconv in -liconv... " >&6; } + _ldflags="${LDFLAGS}" + _libs="${LIBS}" + LDFLAGS="${LDFLAGS} ${ICONV_LIBS}" + LIBS="${LIBS} -liconv" - if test "${ac_cv_header_readline_readline_h+set}" = set; then - { echo "$as_me:$LINENO: checking for readline/readline.h" >&5 -echo $ECHO_N "checking for readline/readline.h... $ECHO_C" >&6; } -if test "${ac_cv_header_readline_readline_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_readline_readline_h" >&5 -echo "${ECHO_T}$ac_cv_header_readline_readline_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking readline/readline.h usability" >&5 -echo $ECHO_N "checking readline/readline.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF + 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 +#include +#include +int +main () +{ + +iconv_t cd = iconv_open ("",""); +iconv (cd, NULL, NULL, NULL, NULL); + ; + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + WITH_ICONV=1 + ICONV_LIBS="${ICONV_LIBS} -liconv" + LIBS="${_libs}" + LDFLAGS="${_ldflags}" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } -# Is the header present? -{ echo "$as_me:$LINENO: checking readline/readline.h presence" >&5 -echo $ECHO_N "checking readline/readline.h 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 -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + LIBS="${_libs}" + LDFLAGS="${_ldflags}" +fi - ac_header_preproc=no +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi -# 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: readline/readline.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: readline/readline.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: readline/readline.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: readline/readline.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: readline/readline.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: readline/readline.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: readline/readline.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: readline/readline.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: readline/readline.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: readline/readline.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: readline/readline.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: readline/readline.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: readline/readline.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: readline/readline.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: readline/readline.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: readline/readline.h: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ echo "$as_me:$LINENO: checking for readline/readline.h" >&5 -echo $ECHO_N "checking for readline/readline.h... $ECHO_C" >&6; } -if test "${ac_cv_header_readline_readline_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_readline_readline_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_readline_readline_h" >&5 -echo "${ECHO_T}$ac_cv_header_readline_readline_h" >&6; } -fi -if test $ac_cv_header_readline_readline_h = yes; then - { echo "$as_me:$LINENO: checking for readline in -lreadline" >&5 -echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; } -if test "${ac_cv_lib_readline_readline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test "$WITH_ICONV" = "1" ; then + { $as_echo "$as_me:$LINENO: checking for iconv declaration" >&5 +$as_echo_n "checking for iconv declaration... " >&6; } + if test "${xml_cv_iconv_arg2+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lreadline $tcap $LIBS" -cat >conftest.$ac_ext <<_ACEOF + + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +#include +#include +extern #ifdef __cplusplus -extern "C" +"C" #endif -char readline (); +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif + int main () { -return readline (); + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_readline_readline=yes + } && test -s conftest.$ac_objext; then + xml_cv_iconv_arg2="" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_readline_readline=no + xml_cv_iconv_arg2="const" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + + xml_cv_iconv_decl="extern size_t iconv (iconv_t cd, $xml_cv_iconv_arg2 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" + { $as_echo "$as_me:$LINENO: result: ${xml_xxx:- + }$xml_cv_iconv_decl" >&5 +$as_echo "${xml_xxx:- + }$xml_cv_iconv_decl" >&6; } + +cat >>confdefs.h <<_ACEOF +#define ICONV_CONST $xml_cv_iconv_arg2 +_ACEOF + + fi +fi +case "$host" in + *mingw*) M_LIBS="" + ;; + *beos*) M_LIBS="" + ;; + *haiku*) M_LIBS="" + ;; + *) M_LIBS="-lm" + ;; +esac +XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS" +XML_LIBTOOLLIBS="libxml2.la" + + +WITH_ISO8859X=1 +if test "$WITH_ICONV" != "1" ; then +if test "$with_iso8859x" = "no" ; then + echo Disabling ISO8859X support + WITH_ISO8859X=0 +fi +fi + + +if test "$with_schematron" = "no" ; then + echo "Disabling Schematron support" + WITH_SCHEMATRON=0 + TEST_SCHEMATRON= +else + echo "Enabled Schematron support" + WITH_SCHEMATRON=1 + TEST_SCHEMATRON="Schematrontests" + with_xpath=yes + with_pattern=yes +fi + + + +if test "$with_schemas" = "no" ; then + echo "Disabling Schemas/Relax-NG support" + WITH_SCHEMAS=0 + TEST_SCHEMAS= +else + echo "Enabled Schemas/Relax-NG support" + WITH_SCHEMAS=1 + TEST_SCHEMAS="Schemastests Relaxtests" + if test "$PYTHON_INCLUDES" != "" ; then + PYTHON_TESTS="$PYTHON_TESTS RelaxNGPythonTests SchemasPythonTests" + fi + with_regexps=yes +fi + + + +if test "$with_regexps" = "no" ; then + echo Disabling Regexps support + WITH_REGEXPS=0 + TEST_REGEXPS= +else + WITH_REGEXPS=1 + TEST_REGEXPS="Regexptests Automatatests" +fi + + + +if test "$with_debug" = "no" ; then + echo Disabling DEBUG support + WITH_DEBUG=0 + DEBUG_OBJ= + TEST_DEBUG= +else + WITH_DEBUG=1 + DEBUG_OBJ=debugXML.o + TEST_DEBUG=Scripttests +fi + + + + +if test "$with_mem_debug" = "yes" ; then + if test "$with_thread_alloc" = "yes" ; then + echo Disabling memory debug - cannot use mem-debug with thread-alloc! + WITH_MEM_DEBUG=0 + else + echo Enabling memory debug support + WITH_MEM_DEBUG=1 + fi +else + WITH_MEM_DEBUG=0 +fi + + +if test "$with_run_debug" = "yes" ; then + echo Enabling runtime debug support + WITH_RUN_DEBUG=1 +else + WITH_RUN_DEBUG=0 +fi + + +WIN32_EXTRA_LIBADD= +WIN32_EXTRA_LDFLAGS= +CYGWIN_EXTRA_LDFLAGS= +CYGWIN_EXTRA_PYTHON_LIBADD= +case "$host" in + *-*-mingw*) + CPPFLAGS="$CPPFLAGS -DWIN32" + WIN32_EXTRA_LIBADD="-lws2_32" + WIN32_EXTRA_LDFLAGS="-no-undefined" + +cat >>confdefs.h <<\_ACEOF +#define _WINSOCKAPI_ 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define snprintf _snprintf +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define vsnprintf _vsnprintf +_ACEOF + + ;; + *-*-cygwin*) + CYGWIN_EXTRA_LDFLAGS="-no-undefined" + if test "${PYTHON}" != "" + then + CYGWIN_EXTRA_PYTHON_LIBADD="-L/usr/lib/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}" + fi + ;; +esac + + + + + +if test "$with_coverage" = "yes" -a "${GCC}" = "yes" +then + echo Enabling code coverage for GCC + CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage" + LDFLAGS="$LDFLAGS -fprofile-arcs -ftest-coverage" +else + echo Disabling code coverage for GCC fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + + + + + + + + + + + + + + + + + + + + + +RELDATE=`date +'%a %b %e %Y'` + + + +rm -f COPYING.LIB COPYING +ln -s Copyright COPYING + +# keep on one line for cygwin c.f. #130896 +ac_config_files="$ac_config_files libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h xml2-config libxml-2.0.pc libxml-2.0-uninstalled.pc python/setup.py" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5 -echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; } -if test $ac_cv_lib_readline_readline = yes; then - - RDL_LIBS="-lreadline $RDL_LIBS $tcap" +rm -f confcache -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBREADLINE -_ACEOF +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -fi +DEFS=-DHAVE_CONFIG_H -fi +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs +LTLIBOBJS=$ac_ltlibobjs - if test -n "$RDL_DIR" -a -n "$RDL_LIBS"; then - CPPFLAGS="$CPPFLAGS -I${RDL_DIR}/include" - RDL_LIBS="-L${RDL_DIR}/lib $RDL_LIBS" - fi -fi -if test "$with_tree" = "no" ; then - echo Disabling DOM like tree manipulation APIs - WITH_TREE=0 + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' else - WITH_TREE=1 + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= fi - -if test "$with_ftp" = "no" ; then - echo Disabling FTP support - WITH_FTP=0 - FTP_OBJ= -else - WITH_FTP=1 - FTP_OBJ=nanoftp.o +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_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 "$with_http" = "no" ; then - echo Disabling HTTP support - WITH_HTTP=0 - HTTP_OBJ= -else - WITH_HTTP=1 - HTTP_OBJ=nanohttp.o +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_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 "$with_legacy" = "no" ; then - echo Disabling deprecated APIs - WITH_LEGACY=0 -else - WITH_LEGACY=1 +if test -z "${USE_VERSION_SCRIPT_TRUE}" && test -z "${USE_VERSION_SCRIPT_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"USE_VERSION_SCRIPT\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"USE_VERSION_SCRIPT\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi - - -if test "$with_reader" = "no" ; then - echo Disabling the xmlReader parsing interface - WITH_READER=0 - READER_TEST= -else - WITH_READER=1 - READER_TEST=Readertests - if test "$with_push" = "no" ; then - echo xmlReader requires Push interface - enabling it - with_push=yes - fi +if test -z "${REBUILD_DOCS_TRUE}" && test -z "${REBUILD_DOCS_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"REBUILD_DOCS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"REBUILD_DOCS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${WITH_PYTHON_TRUE}" && test -z "${WITH_PYTHON_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"WITH_PYTHON\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"WITH_PYTHON\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${WITH_TRIO_SOURCES_TRUE}" && test -z "${WITH_TRIO_SOURCES_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"WITH_TRIO_SOURCES\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"WITH_TRIO_SOURCES\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi +: ${CONFIG_STATUS=./config.status} +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## -if test "$with_writer" = "no" ; then - echo Disabling the xmlWriter saving interface - WITH_WRITER=0 -# WRITER_TEST= +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST else - WITH_WRITER=1 -# WRITER_TEST=Writertests - if test "$with_push" = "no" ; then - echo xmlWriter requires Push interface - enabling it - with_push=yes - fi - if test "$with_output" = "no" ; then - echo xmlWriter requires Output interface - enabling it - with_output=yes - fi + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -#AC_SUBST(WRITER_TEST) -if test "$with_pattern" = "no" ; then - echo Disabling the xmlPattern parsing interface - WITH_PATTERN=0 - TEST_PATTERN= -else - WITH_PATTERN=1 - TEST_PATTERN=Patterntests -fi +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if test "$with_sax1" = "no" ; then - echo Disabling the older SAX1 interface - WITH_SAX1=0 - TEST_SAX= -else - WITH_SAX1=1 - TEST_SAX=SAXtests +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi - -if test "$with_push" = "no" ; then - echo Disabling the PUSH parser interfaces - WITH_PUSH=0 - TEST_PUSH= +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset else - WITH_PUSH=1 - TEST_PUSH="XMLPushtests" + as_unset=false fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" -if test "$with_html" = "no" ; then - echo Disabling HTML support - WITH_HTML=0 - HTML_OBJ= - TEST_HTML= -else - WITH_HTML=1 - HTML_OBJ="HTMLparser.o HTMLtree.o" - TEST_HTML=HTMLtests - if test "$with_push" != "no" ; then - TEST_PHTML=HTMLPushtests - else - TEST_PHTML= - fi +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } fi +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi - -if test "$with_valid" = "no" ; then - echo Disabling DTD validation support - WITH_VALID=0 - TEST_VALID= - TEST_VTIME= +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename else - WITH_VALID=1 - TEST_VALID=Validtests - TEST_VTIME=VTimingtests + 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 || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + -if test "$with_catalog" = "no" ; then - echo Disabling Catalog support - WITH_CATALOG=0 - CATALOG_OBJ= - TEST_CATALOG= -else - WITH_CATALOG=1 - CATALOG_OBJ="catalog.o" - TEST_CATALOG=Catatests -fi + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} -if test "$with_docbook" = "no" ; then - echo Disabling Docbook support - WITH_DOCB=0 - DOCB_OBJ= +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname else - WITH_DOCB=1 - DOCB_OBJ="DOCBparser.o" + as_dirname=false fi +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi -if test "$with_xptr" = "no" ; then - echo Disabling XPointer support - WITH_XPTR=0 - XPTR_OBJ= - TEST_XPTR= +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' else - WITH_XPTR=1 - XPTR_OBJ=xpointer.o - TEST_XPTR=XPtrtests - if test "$with_xpath" = "no" ; then - echo XPointer requires XPath support - enabling it - with_xpath=yes - fi + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' fi +as_executable_p=$as_test_x +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -if test "$with_c14n" = "no" ; then - echo Disabling C14N support - WITH_C14N=0 - C14N_OBJ= - TEST_C14N= -else - WITH_C14N=1 - C14N_OBJ="c14n.c" - TEST_C14N=C14Ntests - if test "$with_xpath" = "no" ; then - echo C14N requires XPath support - enabling it - with_xpath=yes - fi -fi +exec 6>&1 +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by $as_me, which was +generated by GNU Autoconf 2.63. Invocation command line was + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" -if test "$with_xinclude" = "no" ; then - echo Disabling XInclude support - WITH_XINCLUDE=0 - XINCLUDE_OBJ= - with_xinclude="no" - TEST_XINCLUDE= -else - WITH_XINCLUDE=1 - XINCLUDE_OBJ=xinclude.o - TEST_XINCLUDE=XIncludetests - if test "$with_xpath" = "no" ; then - echo XInclude requires XPath support - enabling it - with_xpath=yes - fi -fi +_ACEOF +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac -if test "$with_xpath" = "no" ; then - echo Disabling XPATH support - WITH_XPATH=0 - XPATH_OBJ= - TEST_XPATH= -else - WITH_XPATH=1 - XPATH_OBJ=xpath.o - TEST_XPATH=XPathtests -fi +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. +Usage: $0 [OPTION]... [FILE]... + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE +Configuration files: +$config_files -if test "$with_output" = "no" ; then - echo Disabling serialization/saving support - WITH_OUTPUT=0 -else - WITH_OUTPUT=1 -fi +Configuration headers: +$config_headers +Configuration commands: +$config_commands -WITH_ICONV=0 -if test "$with_iconv" = "no" ; then - echo Disabling ICONV support -else - if test "$with_iconv" != "yes" -a "$with_iconv" != "" ; then - CPPFLAGS="${CPPFLAGS} -I$with_iconv/include" - # Export this since our headers include iconv.h - XML_INCLUDEDIR="${XML_INCLUDEDIR} -I$with_iconv/include" - ICONV_LIBS="-L$with_iconv/lib" - fi +Report bugs to ." - if test "${ac_cv_header_iconv_h+set}" = set; then - { echo "$as_me:$LINENO: checking for iconv.h" >&5 -echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6; } -if test "${ac_cv_header_iconv_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5 -echo "${ECHO_T}$ac_cv_header_iconv_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking iconv.h usability" >&5 -echo $ECHO_N "checking iconv.h 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 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.63, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no -fi +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { $as_echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; -# Is the header present? -{ echo "$as_me:$LINENO: checking iconv.h presence" >&5 -echo $ECHO_N "checking iconv.h 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 -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + # This is an error. + -*) { $as_echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; - ac_header_preproc=no -fi + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } + esac + shift +done -# 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: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: iconv.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: iconv.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: iconv.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: iconv.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: iconv.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: iconv.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: iconv.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: iconv.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: iconv.h: in the future, the compiler will take precedence" >&2;} +ac_configure_extra_args= - ;; -esac -{ echo "$as_me:$LINENO: checking for iconv.h" >&5 -echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6; } -if test "${ac_cv_header_iconv_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_iconv_h=$ac_header_preproc +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5 -echo "${ECHO_T}$ac_cv_header_iconv_h" >&6; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" fi -if test $ac_cv_header_iconv_h = yes; then - { echo "$as_me:$LINENO: checking for iconv" >&5 -echo $ECHO_N "checking for iconv... $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 -#include -int -main () +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log { + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 -iconv_t cd = iconv_open ("",""); -iconv (cd, NULL, NULL, NULL, NULL); - ; - return 0; -} _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - WITH_ICONV=1 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - { echo "$as_me:$LINENO: checking for iconv in -liconv" >&5 -echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6; } +# 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 - _ldflags="${LDFLAGS}" - _libs="${LIBS}" - LDFLAGS="${LDFLAGS} ${ICONV_LIBS}" - LIBS="${LIBS} -liconv" +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' +macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' +macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' +enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' +pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' +host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' +host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' +host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' +build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' +build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' +build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' +SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' +Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' +GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' +EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' +FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' +LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' +NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' +LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' +ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' +exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' +lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' +reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' +AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' +STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' +RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' +compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' +GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' +SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' +ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' +need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' +LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' +libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' +fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' +version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' +runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' +libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' +soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' +old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' +striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +deplibs_check_method \ +file_magic_cmd \ +AR \ +AR_FLAGS \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +SHELL \ +ECHO \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_wl \ +lt_prog_compiler_pic \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_flag_spec_ld \ +hardcode_libdir_separator \ +fix_srcfile_path \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +finish_eval \ +old_striplib \ +striplib; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done - 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 () -{ +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done -iconv_t cd = iconv_open ("",""); -iconv (cd, NULL, NULL, NULL, NULL); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` + ;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - WITH_ICONV=1 - ICONV_LIBS="${ICONV_LIBS} -liconv" - LIBS="${_libs}" - LDFLAGS="${_ldflags}" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - LIBS="${_libs}" - LDFLAGS="${_ldflags}" +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' - if test "$WITH_ICONV" = "1" ; then - { echo "$as_me:$LINENO: checking for iconv declaration" >&5 -echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6; } - if test "${xml_cv_iconv_arg2+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 -extern -#ifdef __cplusplus -"C" -#endif -#if defined(__STDC__) || defined(__cplusplus) -size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); -#else -size_t iconv(); -#endif -int -main () -{ +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xml_cv_iconv_arg2="" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "libxml2.spec") CONFIG_FILES="$CONFIG_FILES libxml2.spec:libxml.spec.in" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; + "include/libxml/Makefile") CONFIG_FILES="$CONFIG_FILES include/libxml/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "doc/examples/Makefile") CONFIG_FILES="$CONFIG_FILES doc/examples/Makefile" ;; + "doc/devhelp/Makefile") CONFIG_FILES="$CONFIG_FILES doc/devhelp/Makefile" ;; + "example/Makefile") CONFIG_FILES="$CONFIG_FILES example/Makefile" ;; + "python/Makefile") CONFIG_FILES="$CONFIG_FILES python/Makefile" ;; + "python/tests/Makefile") CONFIG_FILES="$CONFIG_FILES python/tests/Makefile" ;; + "xstc/Makefile") CONFIG_FILES="$CONFIG_FILES xstc/Makefile" ;; + "include/libxml/xmlversion.h") CONFIG_FILES="$CONFIG_FILES include/libxml/xmlversion.h" ;; + "xml2-config") CONFIG_FILES="$CONFIG_FILES xml2-config" ;; + "libxml-2.0.pc") CONFIG_FILES="$CONFIG_FILES libxml-2.0.pc" ;; + "libxml-2.0-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES libxml-2.0-uninstalled.pc" ;; + "python/setup.py") CONFIG_FILES="$CONFIG_FILES python/setup.py" ;; - xml_cv_iconv_arg2="const" -fi + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + $as_echo "$as_me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} - xml_cv_iconv_decl="extern size_t iconv (iconv_t cd, $xml_cv_iconv_arg2 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" - { echo "$as_me:$LINENO: result: ${xml_xxx:- - }$xml_cv_iconv_decl" >&5 -echo "${ECHO_T}${xml_xxx:- - }$xml_cv_iconv_decl" >&6; } +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then -cat >>confdefs.h <<_ACEOF -#define ICONV_CONST $xml_cv_iconv_arg2 -_ACEOF - fi +ac_cr=' ' +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr fi -case "$host" in - *mingw*) M_LIBS="" - ;; - *beos*) M_LIBS="" - ;; - *) M_LIBS="-lm" - ;; -esac -XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS" -XML_LIBTOOLLIBS="libxml2.la" +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF -WITH_ISO8859X=1 -if test "$WITH_ICONV" != "1" ; then -if test "$with_iso8859x" = "no" ; then - echo Disabling ISO8859X support - WITH_ISO8859X=0 -fi -fi +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } -if test "$with_schematron" = "no" ; then - echo "Disabling Schematron support" - WITH_SCHEMATRON=0 - TEST_SCHEMATRON= -else - echo "Enabled Schematron support" - WITH_SCHEMATRON=1 - TEST_SCHEMATRON="Schematrontests" - with_xpath=yes - with_pattern=yes -fi + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + print line +} -if test "$with_schemas" = "no" ; then - echo "Disabling Schemas/Relax-NG support" - WITH_SCHEMAS=0 - TEST_SCHEMAS= +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else - echo "Enabled Schemas/Relax-NG support" - WITH_SCHEMAS=1 - TEST_SCHEMAS="Schemastests Relaxtests" - if test "$PYTHON_INCLUDES" != "" ; then - PYTHON_TESTS="$PYTHON_TESTS RelaxNGPythonTests SchemasPythonTests" - fi - with_regexps=yes + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&2;} + { (exit 1); exit 1; }; } +_ACEOF + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' fi +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF -if test "$with_regexps" = "no" ; then - echo Disabling Regexps support - WITH_REGEXPS=0 - TEST_REGEXPS= -else - WITH_REGEXPS=1 - TEST_REGEXPS="Regexptests Automatatests" -fi +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. -if test "$with_debug" = "no" ; then - echo Disabling DEBUG support - WITH_DEBUG=0 - DEBUG_OBJ= - TEST_DEBUG= -else - WITH_DEBUG=1 - DEBUG_OBJ=debugXML.o - TEST_DEBUG=Scripttests -fi +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 +$as_echo "$as_me: error: could not setup config headers machinery" >&2;} + { (exit 1); exit 1; }; } +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" + done + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; + esac + ;; + esac -if test "$with_mem_debug" = "yes" ; then - if test "$with_thread_alloc" = "yes" ; then - echo Disabling memory debug - cannot use mem-debug with thread-alloc! - WITH_MEM_DEBUG=0 - else - echo Enabling memory debug support - WITH_MEM_DEBUG=1 - fi -else - WITH_MEM_DEBUG=0 -fi + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix -if test "$with_run_debug" = "yes" ; then - echo Enabling runtime debug support - WITH_RUN_DEBUG=1 -else - WITH_RUN_DEBUG=0 -fi +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -WIN32_EXTRA_LIBADD= -WIN32_EXTRA_LDFLAGS= -CYGWIN_EXTRA_LDFLAGS= -CYGWIN_EXTRA_PYTHON_LIBADD= -case "$host" in - *-*-mingw*) - CPPFLAGS="$CPPFLAGS -DWIN32" - WIN32_EXTRA_LIBADD="-lws2_32" - WIN32_EXTRA_LDFLAGS="-no-undefined" + case $ac_mode in + :F) + # + # CONFIG_FILE + # -cat >>confdefs.h <<\_ACEOF -#define _WINSOCKAPI_ 1 + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= -cat >>confdefs.h <<\_ACEOF -#define snprintf _snprintf +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac _ACEOF - -cat >>confdefs.h <<\_ACEOF -#define vsnprintf _vsnprintf +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; - *-*-cygwin*) - CYGWIN_EXTRA_LDFLAGS="-no-undefined" - if test "${PYTHON}" != "" - then - CYGWIN_EXTRA_PYTHON_LIBADD="-L/usr/lib/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}" - fi + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 +$as_echo "$as_me: error: could not create -" >&2;} + { (exit 1); exit 1; }; } + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count ;; -esac - - - - - -if test "$with_coverage" = "yes" -a "${GCC}" = "yes" -then - echo Enabling code coverage for GCC - CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage" - LDFLAGS="$LDFLAGS -fprofile-arcs -ftest-coverage" -else - echo Disabling code coverage for GCC -fi - - - - - - - - - - - - - - + :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac - - - - - -RELDATE=`date +'%a %b %e %Y'` - - - -rm -f COPYING.LIB COPYING -ln -s Copyright COPYING - -# keep on one line for cygwin c.f. #130896 -ac_config_files="$ac_config_files libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h xml2-config libxml-2.0.pc libxml-2.0-uninstalled.pc python/setup.py" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done done +} + ;; + "libtool":C) - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + # 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 -DEFS=-DHAVE_CONFIG_H + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL -LTLIBOBJS=$ac_ltlibobjs +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${REBUILD_DOCS_TRUE}" && test -z "${REBUILD_DOCS_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"REBUILD_DOCS\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"REBUILD_DOCS\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${WITH_PYTHON_TRUE}" && test -z "${WITH_PYTHON_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"WITH_PYTHON\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"WITH_PYTHON\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${WITH_TRIO_SOURCES_TRUE}" && test -z "${WITH_TRIO_SOURCES_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"WITH_TRIO_SOURCES\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"WITH_TRIO_SOURCES\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi +# The names of the tagged configurations supported by this script. +available_tags="" -: ${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. +# ### BEGIN LIBTOOL CONFIG -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF +# Assembler program. +AS=$AS -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +# DLL creation program. +DLLTOOL=$DLLTOOL -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac +# Object dumper program. +OBJDUMP=$OBJDUMP -fi +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared +# Whether or not to build static libraries. +build_old_libs=$enable_static +# What type of objects to build. +pic_mode=$pic_mode -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install -# 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 +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os +# A sed program that does not truncate output. +SED=$lt_SED -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS +# A grep program that handles long lines. +GREP=$lt_GREP - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi +# An ERE matcher. +EGREP=$lt_EGREP -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' +# A literal string matcher. +FGREP=$lt_FGREP -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done +# A BSD- or MS-compatible name lister. +NM=$lt_NM -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi +# Whether we need soft or hard links. +LN_S=$lt_LN_S -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len +# Object file suffix (normally "o"). +objext=$ac_objext -# 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'` +# Executable file suffix (normally ""). +exeext=$exeext -# CDPATH. -$as_unset CDPATH +# whether the shell understands "unset". +lt_unset=$lt_unset +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} +# Command to use when deplibs_check_method == "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS +# A symbol stripping program. +STRIP=$lt_STRIP -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac +# A C compiler. +LTCC=$lt_CC -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +# 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 -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that does not interpret backslashes. +ECHO=$lt_ECHO + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL -# 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'" +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL -exec 6>&1 +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 -# Save the log message, to keep $[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by $as_me, which was -generated by GNU Autoconf 2.61. Invocation command line was +# Old archive suffix (normally "a"). +libext=$libext - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds -_ACEOF +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink -cat >>$CONFIG_STATUS <<_ACEOF -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix -_ACEOF +# Do we need a version for libraries? +need_version=$need_version -cat >>$CONFIG_STATUS <<\_ACEOF -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +# Library versioning type. +version_type=$version_type -Usage: $0 [OPTIONS] [FILE]... +# Shared library runtime path variable. +runpath_var=$runpath_var - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE +# Shared library path variable. +shlibpath_var=$shlibpath_var -Configuration files: -$config_files +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath -Configuration headers: -$config_headers +# Format of library name prefix. +libname_spec=$lt_libname_spec -Configuration commands: -$config_commands +# 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 -Report bugs to ." +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds -Copyright (C) 2006 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -_ACEOF +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - { echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs - # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - esac - shift -done +# Whether dlopen is supported. +dlopen_support=$enable_dlopen -ac_configure_extra_args= +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +# The linker used to build libraries. +LD=$lt_LD -_ACEOF +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds -cat >>$CONFIG_STATUS <<\_ACEOF +# A language specific compiler. +CC=$lt_compiler -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libxml2.spec") CONFIG_FILES="$CONFIG_FILES libxml2.spec:libxml.spec.in" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; - "include/libxml/Makefile") CONFIG_FILES="$CONFIG_FILES include/libxml/Makefile" ;; - "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "doc/examples/Makefile") CONFIG_FILES="$CONFIG_FILES doc/examples/Makefile" ;; - "doc/devhelp/Makefile") CONFIG_FILES="$CONFIG_FILES doc/devhelp/Makefile" ;; - "example/Makefile") CONFIG_FILES="$CONFIG_FILES example/Makefile" ;; - "python/Makefile") CONFIG_FILES="$CONFIG_FILES python/Makefile" ;; - "python/tests/Makefile") CONFIG_FILES="$CONFIG_FILES python/tests/Makefile" ;; - "xstc/Makefile") CONFIG_FILES="$CONFIG_FILES xstc/Makefile" ;; - "include/libxml/xmlversion.h") CONFIG_FILES="$CONFIG_FILES include/libxml/xmlversion.h" ;; - "xml2-config") CONFIG_FILES="$CONFIG_FILES xml2-config" ;; - "libxml-2.0.pc") CONFIG_FILES="$CONFIG_FILES libxml-2.0.pc" ;; - "libxml-2.0-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES libxml-2.0-uninstalled.pc" ;; - "python/setup.py") CONFIG_FILES="$CONFIG_FILES python/setup.py" ;; +# Is the compiler the GNU compiler? +with_gcc=$GCC - *) { { 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 +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl -# 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 +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec -# -# Set up the sed scripts for CONFIG_FILES section. -# +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec -# 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 +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object -_ACEOF +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -build!$build$ac_delim -build_cpu!$build_cpu$ac_delim -build_vendor!$build_vendor$ac_delim -build_os!$build_os$ac_delim -host!$host$ac_delim -host_cpu!$host_cpu$ac_delim -host_vendor!$host_vendor$ac_delim -host_os!$host_os$ac_delim -LIBXML_MAJOR_VERSION!$LIBXML_MAJOR_VERSION$ac_delim -LIBXML_MINOR_VERSION!$LIBXML_MINOR_VERSION$ac_delim -LIBXML_MICRO_VERSION!$LIBXML_MICRO_VERSION$ac_delim -LIBXML_VERSION!$LIBXML_VERSION$ac_delim -LIBXML_VERSION_INFO!$LIBXML_VERSION_INFO$ac_delim -LIBXML_VERSION_NUMBER!$LIBXML_VERSION_NUMBER$ac_delim -LIBXML_VERSION_EXTRA!$LIBXML_VERSION_EXTRA$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -INSTALL_DATA!$INSTALL_DATA$ac_delim -am__isrc!$am__isrc$ac_delim -CYGPATH_W!$CYGPATH_W$ac_delim -PACKAGE!$PACKAGE$ac_delim -VERSION!$VERSION$ac_delim -ACLOCAL!$ACLOCAL$ac_delim -AUTOCONF!$AUTOCONF$ac_delim -AUTOMAKE!$AUTOMAKE$ac_delim -AUTOHEADER!$AUTOHEADER$ac_delim -MAKEINFO!$MAKEINFO$ac_delim -install_sh!$install_sh$ac_delim -STRIP!$STRIP$ac_delim -INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim -mkdir_p!$mkdir_p$ac_delim -AWK!$AWK$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -am__leading_dot!$am__leading_dot$ac_delim -AMTAR!$AMTAR$ac_delim -am__tar!$am__tar$ac_delim -am__untar!$am__untar$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -DEPDIR!$DEPDIR$ac_delim -am__include!$am__include$ac_delim -am__quote!$am__quote$ac_delim -AMDEP_TRUE!$AMDEP_TRUE$ac_delim -AMDEP_FALSE!$AMDEP_FALSE$ac_delim -AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim -CCDEPMODE!$CCDEPMODE$ac_delim -am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim -am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim -CPP!$CPP$ac_delim -RM!$RM$ac_delim -MV!$MV$ac_delim -TAR!$TAR$ac_delim -PERL!$PERL$ac_delim -WGET!$WGET$ac_delim -XMLLINT!$XMLLINT$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -XSLTPROC!$XSLTPROC$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -U!$U$ac_delim -ANSI2KNR!$ANSI2KNR$ac_delim -SED!$SED$ac_delim -LN_S!$LN_S$ac_delim -ECHO!$ECHO$ac_delim -AR!$AR$ac_delim -RANLIB!$RANLIB$ac_delim -DLLTOOL!$DLLTOOL$ac_delim -AS!$AS$ac_delim -OBJDUMP!$OBJDUMP$ac_delim -CXX!$CXX$ac_delim -CXXFLAGS!$CXXFLAGS$ac_delim -ac_ct_CXX!$ac_ct_CXX$ac_delim -CXXDEPMODE!$CXXDEPMODE$ac_delim -am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim -am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim -CXXCPP!$CXXCPP$ac_delim -F77!$F77$ac_delim -FFLAGS!$FFLAGS$ac_delim -ac_ct_F77!$ac_ct_F77$ac_delim -LIBTOOL!$LIBTOOL$ac_delim -HTML_DIR!$HTML_DIR$ac_delim -REBUILD_DOCS_TRUE!$REBUILD_DOCS_TRUE$ac_delim -REBUILD_DOCS_FALSE!$REBUILD_DOCS_FALSE$ac_delim -Z_CFLAGS!$Z_CFLAGS$ac_delim -Z_LIBS!$Z_LIBS$ac_delim -WITH_ZLIB!$WITH_ZLIB$ac_delim -PYTHON!$PYTHON$ac_delim -WITH_PYTHON_TRUE!$WITH_PYTHON_TRUE$ac_delim -WITH_PYTHON_FALSE!$WITH_PYTHON_FALSE$ac_delim -pythondir!$pythondir$ac_delim -PYTHON_SUBDIR!$PYTHON_SUBDIR$ac_delim -WITH_MODULES!$WITH_MODULES$ac_delim -MODULE_PLATFORM_LIBS!$MODULE_PLATFORM_LIBS$ac_delim -MODULE_EXTENSION!$MODULE_EXTENSION$ac_delim -TEST_MODULES!$TEST_MODULES$ac_delim -STATIC_BINARIES!$STATIC_BINARIES$ac_delim -WITH_TRIO_SOURCES_TRUE!$WITH_TRIO_SOURCES_TRUE$ac_delim -WITH_TRIO_SOURCES_FALSE!$WITH_TRIO_SOURCES_FALSE$ac_delim -WITH_TRIO!$WITH_TRIO$ac_delim -THREAD_LIBS!$THREAD_LIBS$ac_delim -BASE_THREAD_LIBS!$BASE_THREAD_LIBS$ac_delim -WITH_THREADS!$WITH_THREADS$ac_delim -THREAD_CFLAGS!$THREAD_CFLAGS$ac_delim -TEST_THREADS!$TEST_THREADS$ac_delim -THREADS_W32!$THREADS_W32$ac_delim -WITH_TREE!$WITH_TREE$ac_delim -WITH_FTP!$WITH_FTP$ac_delim -FTP_OBJ!$FTP_OBJ$ac_delim -WITH_HTTP!$WITH_HTTP$ac_delim -HTTP_OBJ!$HTTP_OBJ$ac_delim -WITH_LEGACY!$WITH_LEGACY$ac_delim -WITH_READER!$WITH_READER$ac_delim -READER_TEST!$READER_TEST$ac_delim -WITH_WRITER!$WITH_WRITER$ac_delim -WITH_PATTERN!$WITH_PATTERN$ac_delim -TEST_PATTERN!$TEST_PATTERN$ac_delim -WITH_SAX1!$WITH_SAX1$ac_delim -TEST_SAX!$TEST_SAX$ac_delim -WITH_PUSH!$WITH_PUSH$ac_delim -TEST_PUSH!$TEST_PUSH$ac_delim -WITH_HTML!$WITH_HTML$ac_delim -HTML_OBJ!$HTML_OBJ$ac_delim -TEST_HTML!$TEST_HTML$ac_delim -TEST_PHTML!$TEST_PHTML$ac_delim -WITH_VALID!$WITH_VALID$ac_delim -TEST_VALID!$TEST_VALID$ac_delim -TEST_VTIME!$TEST_VTIME$ac_delim -WITH_CATALOG!$WITH_CATALOG$ac_delim -CATALOG_OBJ!$CATALOG_OBJ$ac_delim -TEST_CATALOG!$TEST_CATALOG$ac_delim -WITH_DOCB!$WITH_DOCB$ac_delim -DOCB_OBJ!$DOCB_OBJ$ac_delim -WITH_XPTR!$WITH_XPTR$ac_delim -XPTR_OBJ!$XPTR_OBJ$ac_delim -TEST_XPTR!$TEST_XPTR$ac_delim -WITH_C14N!$WITH_C14N$ac_delim -C14N_OBJ!$C14N_OBJ$ac_delim -TEST_C14N!$TEST_C14N$ac_delim -WITH_XINCLUDE!$WITH_XINCLUDE$ac_delim -XINCLUDE_OBJ!$XINCLUDE_OBJ$ac_delim -TEST_XINCLUDE!$TEST_XINCLUDE$ac_delim -WITH_XPATH!$WITH_XPATH$ac_delim -XPATH_OBJ!$XPATH_OBJ$ac_delim -TEST_XPATH!$TEST_XPATH$ac_delim -WITH_OUTPUT!$WITH_OUTPUT$ac_delim -WITH_ICONV!$WITH_ICONV$ac_delim -WITH_ISO8859X!$WITH_ISO8859X$ac_delim -WITH_SCHEMATRON!$WITH_SCHEMATRON$ac_delim -TEST_SCHEMATRON!$TEST_SCHEMATRON$ac_delim -WITH_SCHEMAS!$WITH_SCHEMAS$ac_delim -TEST_SCHEMAS!$TEST_SCHEMAS$ac_delim -WITH_REGEXPS!$WITH_REGEXPS$ac_delim -TEST_REGEXPS!$TEST_REGEXPS$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done +# 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 -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +# 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 -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF +# 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 -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -WITH_DEBUG!$WITH_DEBUG$ac_delim -DEBUG_OBJ!$DEBUG_OBJ$ac_delim -TEST_DEBUG!$TEST_DEBUG$ac_delim -WITH_MEM_DEBUG!$WITH_MEM_DEBUG$ac_delim -WITH_RUN_DEBUG!$WITH_RUN_DEBUG$ac_delim -WIN32_EXTRA_LIBADD!$WIN32_EXTRA_LIBADD$ac_delim -WIN32_EXTRA_LDFLAGS!$WIN32_EXTRA_LDFLAGS$ac_delim -CYGWIN_EXTRA_LDFLAGS!$CYGWIN_EXTRA_LDFLAGS$ac_delim -CYGWIN_EXTRA_PYTHON_LIBADD!$CYGWIN_EXTRA_PYTHON_LIBADD$ac_delim -XML_CFLAGS!$XML_CFLAGS$ac_delim -XML_LIBDIR!$XML_LIBDIR$ac_delim -XML_LIBS!$XML_LIBS$ac_delim -XML_LIBTOOLLIBS!$XML_LIBTOOLLIBS$ac_delim -ICONV_LIBS!$ICONV_LIBS$ac_delim -XML_INCLUDEDIR!$XML_INCLUDEDIR$ac_delim -HAVE_ISNAN!$HAVE_ISNAN$ac_delim -HAVE_ISINF!$HAVE_ISINF$ac_delim -PYTHON_VERSION!$PYTHON_VERSION$ac_delim -PYTHON_INCLUDES!$PYTHON_INCLUDES$ac_delim -PYTHON_SITE_PACKAGES!$PYTHON_SITE_PACKAGES$ac_delim -M_LIBS!$M_LIBS$ac_delim -RDL_LIBS!$RDL_LIBS$ac_delim -RELDATE!$RELDATE$ac_delim -PYTHON_TESTS!$PYTHON_TESTS$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 26; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof -_ACEOF +# 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 -# 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 +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath -cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path -for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; - esac +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - ac_builddir=. +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action +# ### END LIBTOOL CONFIG - case $ac_mode in - :F) - # - # CONFIG_FILE - # +_LT_EOF - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; esac -_ACEOF +} -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} -case `sed -n '/datarootdir/ { - p - q +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" } -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; esac - ;; - :H) - # - # CONFIG_HEADER - # -_ACEOF +} -# Transform confdefs.h into a sed script `conftest.defines', that -# substitutes the proper values into config.h.in to produce config.h. -rm -f conftest.defines conftest.tail -# First, append a space to every undef/define line, to ease matching. -echo 's/$/ /' >conftest.defines -# Then, protect against being on the right side of a sed subst, or in -# an unquoted here document, in config.status. If some macros were -# called several times there might be several #defines for the same -# symbol, which is useless. But do not sort them, since the last -# AC_DEFINE must be honored. -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where -# NAME is the cpp macro being defined, VALUE is the value it is being given. -# PARAMS is the parameter list in the macro definition--in most cases, it's -# just an empty string. -ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' -ac_dB='\\)[ (].*,\\1define\\2' -ac_dC=' ' -ac_dD=' ,' - -uniq confdefs.h | - sed -n ' - t rset - :rset - s/^[ ]*#[ ]*define[ ][ ]*// - t ok - d - :ok - s/[\\&,]/\\&/g - s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p - s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p - ' >>conftest.defines - -# Remove the space that was appended to ease matching. -# Then replace #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -# (The regexp can be short, since the line contains either #define or #undef.) -echo 's/ $// -s,^[ #]*u.*,/* & */,' >>conftest.defines - -# Break up conftest.defines: -ac_max_sed_lines=50 - -# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" -# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" -# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" -# et cetera. -ac_in='$ac_file_inputs' -ac_out='"$tmp/out1"' -ac_nxt='"$tmp/out2"' - -while : -do - # Write a here document: - cat >>$CONFIG_STATUS <<_ACEOF - # First, check the format of the line: - cat >"\$tmp/defines.sed" <<\\CEOF -/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def -/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def -b -:def -_ACEOF - sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS - ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in - sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail - grep . conftest.tail >/dev/null || break - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines conftest.tail +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} -echo "ac_result=$ac_in" >>$CONFIG_STATUS -cat >>$CONFIG_STATUS <<\_ACEOF - if test x"$ac_file" != x-; then - echo "/* $configure_input */" >"$tmp/config.h" - cat "$ac_result" >>"$tmp/config.h" - if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f $ac_file - mv "$tmp/config.h" $ac_file - fi +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $* )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" else - echo "/* $configure_input */" - cat "$ac_result" + func_dirname_result="$func_dirname_result${2}" fi - rm -f "$tmp/out12" -# Compute $ac_file's index in $config_headers. -_am_arg=$ac_file -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; +} - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} - ;; +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac +} +# sed scripts: +my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[^=]*=//' - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$@"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1+=\$2" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1=\$$1\$2" +} + +_LT_EOF + ;; esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done + + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + ;; esac @@ -31169,6 +24310,11 @@ _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -31190,6 +24336,10 @@ if test "$no_create" != yes; then # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi chmod +x xml2-config python/setup.py diff --git a/configure.in b/configure.in index 1ac2316..7b8fd44 100644 --- a/configure.in +++ b/configure.in @@ -5,7 +5,7 @@ AC_CANONICAL_HOST LIBXML_MAJOR_VERSION=2 LIBXML_MINOR_VERSION=7 -LIBXML_MICRO_VERSION=3 +LIBXML_MICRO_VERSION=4 LIBXML_MICRO_VERSION_SUFFIX= LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION @@ -26,6 +26,14 @@ else if test -d .svn ; then then LIBXML_VERSION_EXTRA="-SVN$extra" fi +else if test -d .git ; then + extra=`git describe | sed 's+LIBXML[[0-9.]]*-++'` + echo extra=$extra + if test "$extra" != "" + then + LIBXML_VERSION_EXTRA="-GIT$extra" + fi +fi fi fi AC_SUBST(LIBXML_MAJOR_VERSION) @@ -59,6 +67,18 @@ test "x$U" != "x" && AC_MSG_ERROR(Compiler not ANSI compliant) AC_LIBTOOL_WIN32_DLL AM_PROG_LIBTOOL +dnl +dnl if the system support linker version scripts for symbol versioning +dnl then add it +dnl +VERSION_SCRIPT_FLAGS= +$(/usr/bin/ld --help 2>&1 | grep -- --version-script >/dev/null) && \ + VERSION_SCRIPT_FLAGS=-Wl,--version-script= +test "`uname`" == "SunOS" && \ + VERSION_SCRIPT_FLAGS="-Wl,-M -Wl," +AC_SUBST(VERSION_SCRIPT_FLAGS) +AM_CONDITIONAL([USE_VERSION_SCRIPT], [test -n "$VERSION_SCRIPT_FLAGS"]) + dnl dnl We process the AC_ARG_WITH first so that later we can modify dnl some of them to try to prevent impossible combinations. This @@ -414,6 +434,7 @@ AC_CHECK_HEADERS([arpa/inet.h], [], [], AC_CHECK_HEADERS([netdb.h]) AC_CHECK_HEADERS([sys/time.h]) AC_CHECK_HEADERS([sys/select.h]) +AC_CHECK_HEADERS([poll.h]) AC_CHECK_HEADERS([sys/mman.h]) AC_CHECK_HEADERS([sys/timeb.h]) AC_CHECK_HEADERS([signal.h]) @@ -473,7 +494,7 @@ fi dnl Checks for inet libraries: AC_SEARCH_LIBS(gethostent, [nsl]) -AC_SEARCH_LIBS(setsockopt, [socket net]) +AC_SEARCH_LIBS(setsockopt, [socket net network]) AC_SEARCH_LIBS(connect, [inet]) dnl Determine what socket length (socklen_t) data type is @@ -862,17 +883,21 @@ if test "$with_threads" = "no" ; then echo Disabling multithreaded support else echo Enabling multithreaded support - - AC_CHECK_HEADER(pthread.h, - AC_CHECK_LIB(pthread, pthread_join,[ - THREAD_LIBS="-lpthread" - AC_DEFINE([HAVE_LIBPTHREAD], [], [Define if pthread library is there (-lpthread)]) - AC_DEFINE([HAVE_PTHREAD_H], [], [Define if is there]) - WITH_THREADS="1"])) + dnl Use pthread by default + if test "$with_threads" = "pthread" | test "$with_threads" = "" ; then + AC_CHECK_HEADER(pthread.h, + AC_CHECK_LIB(pthread, pthread_join,[ + THREAD_LIBS="-lpthread" + AC_DEFINE([HAVE_LIBPTHREAD], [], [Define if pthread library is there (-lpthread)]) + AC_DEFINE([HAVE_PTHREAD_H], [], [Define if is there]) + WITH_THREADS="1"])) + fi case $host_os in - *mingw32*) WITH_THREADS="1" - THREADS_W32="Win32" - THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS" + *mingw32*) if test "$THREAD_LIBS" != "-lpthread"; then + WITH_THREADS="1" + THREADS_W32="Win32" + THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS" + fi ;; *cygwin*) THREAD_LIBS="" ;; @@ -890,7 +915,7 @@ else THREAD_LIBS="" BASE_THREAD_LIBS="-lpthread" else - if expr ${GCC_MAJOR} \> 3 > /dev/null + if expr ${GCC_MAJOR} \> 3 > /dev/null then THREAD_LIBS="" BASE_THREAD_LIBS="-lpthread" @@ -1261,6 +1286,8 @@ case "$host" in ;; *beos*) M_LIBS="" ;; + *haiku*) M_LIBS="" + ;; *) M_LIBS="-lm" ;; esac diff --git a/debugXML.c b/debugXML.c index de6fd6c..415889a 100644 --- a/debugXML.c +++ b/debugXML.c @@ -141,9 +141,9 @@ xmlCtxtDumpSpaces(xmlDebugCtxtPtr ctxt) return; if ((ctxt->output != NULL) && (ctxt->depth > 0)) { if (ctxt->depth < 50) - fprintf(ctxt->output, &ctxt->shift[100 - 2 * ctxt->depth]); + fprintf(ctxt->output, "%s", &ctxt->shift[100 - 2 * ctxt->depth]); else - fprintf(ctxt->output, ctxt->shift); + fprintf(ctxt->output, "%s", ctxt->shift); } } @@ -162,7 +162,7 @@ xmlDebugErr(xmlDebugCtxtPtr ctxt, int error, const char *msg) NULL, ctxt->node, XML_FROM_CHECK, error, XML_ERR_ERROR, NULL, 0, NULL, NULL, NULL, 0, 0, - msg); + "%s", msg); } static void xmlDebugErr2(xmlDebugCtxtPtr ctxt, int error, const char *msg, int extra) @@ -259,7 +259,9 @@ xmlCtxtCheckName(xmlDebugCtxtPtr ctxt, const xmlChar * name) "Name is not an NCName '%s'", (const char *) name); } if ((ctxt->dict != NULL) && - (!xmlDictOwns(ctxt->dict, name))) { + (!xmlDictOwns(ctxt->dict, name)) && + ((ctxt->doc == NULL) || + ((ctxt->doc->parseFlags & (XML_PARSE_SAX1 | XML_PARSE_NODICT)) == 0))) { xmlDebugErr3(ctxt, XML_CHECK_OUTSIDE_DICT, "Name is not from the document dictionnary '%s'", (const char *) name); @@ -2801,7 +2803,6 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input, { char prompt[500] = "/ > "; char *cmdline = NULL, *cur; - int nbargs; char command[100]; char arg[400]; int i; @@ -2853,7 +2854,6 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input, * Parse the command itself */ cur = cmdline; - nbargs = 0; while ((*cur == ' ') || (*cur == '\t')) cur++; i = 0; @@ -2866,7 +2866,6 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input, command[i] = 0; if (i == 0) continue; - nbargs++; /* * Parse the argument @@ -2880,8 +2879,6 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input, arg[i++] = *cur++; } arg[i] = 0; - if (i != 0) - nbargs++; /* * start interpreting the command diff --git a/depcomp b/depcomp index e5f9736..df8eea7 100755 --- a/depcomp +++ b/depcomp @@ -1,10 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2007-03-29.01 +scriptversion=2009-04-28.21; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software -# Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 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 @@ -17,9 +17,7 @@ scriptversion=2007-03-29.01 # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -87,6 +85,15 @@ if test "$depmode" = dashXmstdout; then depmode=dashmstdout fi +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u="sed s,\\\\\\\\,/,g" + depmode=msvisualcpp +fi + case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what @@ -192,14 +199,14 @@ sgi) ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' -' ' ' >> $depfile - echo >> $depfile +' ' ' >> "$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 + >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -328,7 +335,12 @@ hp2) if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. - sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi @@ -404,7 +416,7 @@ dashmstdout) # Remove the call to Libtool. if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift @@ -455,32 +467,39 @@ makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift - cleared=no - for arg in "$@"; do + cleared=no eat=no + for arg + do case $cleared in no) set ""; shift cleared=yes ;; esac + if test $eat = yes; then + eat=no + continue + fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done - obj_suffix="`echo $object | sed 's/^.*\././'`" + obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" @@ -500,7 +519,7 @@ cpp) # Remove the call to Libtool. if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift @@ -538,13 +557,27 @@ cpp) msvisualcpp) # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. + # always write the preprocessed file to stdout. "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + IFS=" " for arg do case "$arg" in + -o) + shift + ;; + $object) + shift + ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift @@ -557,16 +590,23 @@ msvisualcpp) ;; esac done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + none) exec "$@" ;; @@ -585,5 +625,6 @@ exit 0 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: diff --git a/dict.c b/dict.c index 0e07e8d..3eff231 100644 --- a/dict.c +++ b/dict.c @@ -698,7 +698,6 @@ xmlDictFree(xmlDictPtr dict) { inside_dict = 0; iter = next; } - inside_dict = 0; } xmlFree(dict->dict); } diff --git a/doc/APIchunk0.html b/doc/APIchunk0.html index 67841cf..e116c35 100644 --- a/doc/APIchunk0.html +++ b/doc/APIchunk0.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index A-B for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index A-B for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index A-B for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index A-B for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -270,8 +270,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk1.html b/doc/APIchunk1.html index eacab4b..6a1af3e 100644 --- a/doc/APIchunk1.html +++ b/doc/APIchunk1.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index C-C for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index C-C for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index C-C for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index C-C for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -358,8 +358,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk10.html b/doc/APIchunk10.html index 5264d46..43c11a3 100644 --- a/doc/APIchunk10.html +++ b/doc/APIchunk10.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index a-a for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index a-a for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index Z-a for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index Z-a for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -37,7 +37,28 @@ A:link, A:visited, A:active { text-decoration: underline } w-w x-x y-z -

                          Letter a:

                          a-z
                          xmlCheckLanguageID
                          +

                          Letter Z:

                          ZLIB
                          docbCreateFileParserCtxt
                          +docbParseFile
                          +docbSAXParseFile
                          +htmlCreateFileParserCtxt
                          +htmlParseFile
                          +htmlSAXParseFile
                          +xmlCreateEntityParserCtxt
                          +xmlCreateFileParserCtxt
                          +xmlCreateURLParserCtxt
                          +xmlGetCompressMode
                          +xmlGetDocCompressMode
                          +xmlOutputBufferCreateFilename
                          +xmlParseFile
                          +xmlParserInputBufferCreateFilename
                          +xmlRecoverFile
                          +xmlSAXParseFile
                          +xmlSAXParseFileWithData
                          +xmlSAXUserParseFile
                          +xmlSetCompressMode
                          +xmlSetDocCompressMode
                          +
                          Zlib
                          LIBXML_ZLIB_ENABLED
                          +

                          Letter a:

                          a-z
                          xmlCheckLanguageID
                          xmlURIEscapeStr
                          a-zA-Z
                          IS_ASCII_LETTER
                          a-zA-Z0-9
                          IS_PUBIDCHAR
                          @@ -61,6 +82,8 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMAS_ELEM_FINAL_ABSENT
                          XML_SCHEMAS_TYPE_VARIETY_ABSENT
                          absoluteURI
                          xmlParseURI
                          +
                          abstain
                          xmlCleanupParser
                          +xmlCleanupThreads
                          abstract
                          XML_SCHEMAS_ELEM_ABSTRACT
                          XML_SCHEMAS_TYPE_ABSTRACT
                          accept
                          xmlExpMaxToken
                          @@ -230,6 +253,7 @@ A:link, A:visited, A:active { text-decoration: underline }
                          afraid
                          xmlEncodeEntities
                          after
                          UTF8ToHtml
                          UTF8Toisolat1
                          +_xmlParserCtxt
                          docbEncodeEntities
                          htmlEncodeEntities
                          isolat1ToUTF8
                          @@ -298,8 +322,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlGcMemSetup
                          xmlMemSetup
                          xmlParserInputDeallocate
                          -
                          allocator
                          ATTRIBUTE_ALLOC_SIZE
                          -DEBUG_MEMORY
                          +
                          allocator
                          DEBUG_MEMORY
                          +LIBXML_ATTR_ALLOC_SIZE
                          allocators
                          xmlGcMemGet
                          xmlGcMemSetup
                          allow
                          XML_SCHEMAS_ATTR_GLOBAL
                          @@ -429,6 +453,8 @@ A:link, A:visited, A:active { text-decoration: underline }
                          angle
                          xmlParseCharData
                          annotation
                          _xmlSchemaAnnot
                          another
                          xmlCharEncodingOutputFunc
                          +xmlCleanupParser
                          +xmlCleanupThreads
                          xmlInputMatchCallback
                          xmlOutputMatchCallback
                          xmlSetGenericErrorFunc
                          @@ -485,6 +511,8 @@ A:link, A:visited, A:active { text-decoration: underline } resolveEntity
                          resolveEntitySAXFunc
                          xmlCheckVersion
                          +xmlCleanupParser
                          +xmlCleanupThreads
                          xmlCurrentChar
                          xmlGetExternalEntityLoader
                          xmlLineNumbersDefault
                          @@ -492,6 +520,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSAX2ResolveEntity
                          xmlSetExternalEntityLoader
                          xmlXIncludeProcessFlagsData
                          +xmlXIncludeProcessTreeFlagsData
                          applications
                          xmlSetGenericErrorFunc
                          xmlSetStructuredErrorFunc
                          applied
                          xmlHashCopy
                          @@ -586,6 +615,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStrncatNew
                          automaton
                          _xmlSchemaType
                          autoreference
                          _xmlDoc
                          +
                          avoid
                          xmlCleanupParser
                          +xmlCleanupThreads
                          avoiding
                          xmlTextReaderNext
                          xmlTextReaderNextSibling
                          aware
                          xmlGetProp
                          @@ -598,8 +629,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk11.html b/doc/APIchunk11.html index b692956..b77863c 100644 --- a/doc/APIchunk11.html +++ b/doc/APIchunk11.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index b-b for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index b-b for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index b-b for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index b-b for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -95,6 +95,8 @@ A:link, A:visited, A:active { text-decoration: underline }
                          before
                          htmlInitAutoClose
                          xmlBuildRelativeURI
                          xmlCatalogAdd
                          +xmlCleanupParser
                          +xmlCleanupThreads
                          xmlCurrentChar
                          xmlGcMemSetup
                          xmlGetLineNo
                          @@ -185,6 +187,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlMemBlocks
                          xmlMemDisplay
                          xmlMemoryDump
                          +
                          body
                          _xmlParserCtxt
                          book1
                          xmlBuildRelativeURI
                          bool
                          xmlBoolToText
                          both
                          xmlBufferFree
                          @@ -214,7 +217,8 @@ A:link, A:visited, A:active { text-decoration: underline }
                          breaking
                          xmlEncodeEntities
                          breaks
                          xmlCurrentChar
                          broke
                          XML_CAST_FPTR
                          -
                          broken
                          xmlParseBalancedChunkMemoryRecover
                          +
                          broken
                          xmlGetThreadId
                          +xmlParseBalancedChunkMemoryRecover
                          xmlTextReaderNormalization
                          buf
                          xmlSaveFileTo
                          xmlSaveFormatFileTo
                          @@ -295,8 +299,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk12.html b/doc/APIchunk12.html index 41acac9..d95f37d 100644 --- a/doc/APIchunk12.html +++ b/doc/APIchunk12.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index c-c for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index c-c for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index c-c for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index c-c for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -37,7 +37,11 @@ A:link, A:visited, A:active { text-decoration: underline } w-w x-x y-z -

                          Letter c:

                          cache
                          xmlXPathContextSetCache
                          +

                          Letter c:

                          c14n
                          xmlC14NDocDumpMemory
                          +xmlC14NDocSave
                          +xmlC14NDocSaveTo
                          +xmlC14NExecute
                          +
                          cache
                          xmlXPathContextSetCache
                          cached
                          xmlXPathContextSetCache
                          caching:
                          xmlXPathContextSetCache
                          calculated
                          xmlStrncatNew
                          @@ -46,6 +50,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlBuildRelativeURI
                          xmlC14NDocDumpMemory
                          xmlCheckFilename
                          +xmlCleanupParser
                          +xmlCleanupThreads
                          xmlGetLineNo
                          xmlTextReaderCurrentDoc
                          xmlXPathAddValues
                          @@ -59,6 +65,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathAxisFunc
                          came
                          xmlPopInput
                          cannot
                          xmlParseAttribute
                          +xmlXPathRegisterNs
                          canonic
                          xmlCanonicPath
                          canonical
                          xmlC14NDocDumpMemory
                          xmlC14NDocSave
                          @@ -810,6 +817,8 @@ A:link, A:visited, A:active { text-decoration: underline }
                          counterparts
                          xmlEncodeEntitiesReentrant
                          course
                          xmlTextReaderNormalization
                          cover
                          xmlSearchNs
                          +
                          crash
                          xmlCleanupParser
                          +xmlCleanupThreads
                          create
                          xmlBufferCreate
                          xmlBufferCreateSize
                          xmlBufferCreateStatic
                          @@ -878,8 +887,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk13.html b/doc/APIchunk13.html index a66dbb2..d1390eb 100644 --- a/doc/APIchunk13.html +++ b/doc/APIchunk13.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index d-d for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index d-d for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index d-d for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index d-d for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -522,6 +522,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlCleanupParser
                          xmlCreateEntitiesTable
                          xmlFreeNode
                          +xmlGetThreadId
                          xmlInitCharEncodingHandlers
                          xmlKeepBlanksDefault
                          xmlNodeListGetRawString
                          @@ -573,6 +574,8 @@ A:link, A:visited, A:active { text-decoration: underline }
                          double-hyphen
                          xmlParseComment
                          double-quotes
                          xmlBufferWriteQuotedString
                          doublequotes
                          xmlParseQuotedString
                          +
                          doubt
                          xmlCleanupParser
                          +xmlCleanupThreads
                          down
                          xmlGetBufferAllocationScheme
                          xmlSetBufferAllocationScheme
                          draft
                          XINCLUDE_OLD_NS
                          @@ -633,8 +636,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk14.html b/doc/APIchunk14.html index 0973657..42194a3 100644 --- a/doc/APIchunk14.html +++ b/doc/APIchunk14.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index e-e for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index e-e for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index e-e for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index e-e for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -373,6 +373,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderConstXmlLang
                          xmlTextReaderXmlLang
                          xmlValidateNotationDecl
                          +
                          exit
                          xmlCleanupParser
                          +xmlCleanupThreads
                          expand
                          xmlLoadSGMLSuperCatalog
                          expanded
                          xmlRelaxNGValidateFullElement
                          xmlSchemaNewStringValue
                          @@ -437,8 +439,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk15.html b/doc/APIchunk15.html index 3a17059..8bb4437 100644 --- a/doc/APIchunk15.html +++ b/doc/APIchunk15.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index f-f for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index f-f for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index f-f for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index f-f for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -78,6 +78,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXIncludeProcessNode
                          xmlXIncludeProcessTree
                          xmlXIncludeProcessTreeFlags
                          +xmlXIncludeProcessTreeFlagsData
                          xmlXPathCompareValues
                          fails
                          UTF8ToHtml
                          UTF8Toisolat1
                          @@ -140,6 +141,7 @@ A:link, A:visited, A:active { text-decoration: underline } _xmlError
                          xmlParseMisc
                          xmlXIncludeProcessFlagsData
                          +xmlXIncludeProcessTreeFlagsData
                          xmlXPathOrderDocElems
                          fields
                          XML_SAX2_MAGIC
                          _htmlElemDesc
                          @@ -203,10 +205,6 @@ A:link, A:visited, A:active { text-decoration: underline }
                          flag
                          XML_SCHEMAS_ELEM_CIRCULAR
                          htmlSetMetaEncoding
                          initxmlDefaultSAXHandler
                          -xmlC14NDocDumpMemory
                          -xmlC14NDocSave
                          -xmlC14NDocSaveTo
                          -xmlC14NExecute
                          xmlSAX2InitDefaultSAXHandler
                          xmlTextReaderIsValid
                          flagged
                          _htmlElemDesc
                          @@ -424,8 +422,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk16.html b/doc/APIchunk16.html index b8e3fed..ea2d948 100644 --- a/doc/APIchunk16.html +++ b/doc/APIchunk16.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index g-h for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index g-h for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index g-h for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index g-h for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -177,6 +177,8 @@ A:link, A:visited, A:active { text-decoration: underline }
                          grows
                          xmlBufferWriteCHAR
                          xmlBufferWriteChar
                          xmlBufferWriteQuotedString
                          +
                          guess
                          xmlCleanupParser
                          +xmlCleanupThreads

                          Letter h:

                          had
                          xmlNewGlobalNs
                          hand
                          xmlLoadACatalog
                          handled
                          xmlLoadACatalog
                          @@ -225,11 +227,14 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathPopNodeSet
                          xmlXPathPopNumber
                          xmlXPathPopString
                          +
                          hard
                          xmlCleanupParser
                          +xmlCleanupThreads
                          has-same-nodes
                          xmlXPathHasSameNodes
                          haystack
                          xmlStrcasestr
                          xmlStrstr
                          xmlStrsub
                          head
                          XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD
                          +_xmlParserCtxt
                          header
                          xmlNanoHTTPAuthHeader
                          xmlNanoHTTPContentLength
                          xmlNanoHTTPRedir
                          @@ -335,8 +340,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk17.html b/doc/APIchunk17.html index 29b9ec3..5424f37 100644 --- a/doc/APIchunk17.html +++ b/doc/APIchunk17.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index i-i for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index i-i for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index i-i for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index i-i for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -156,6 +156,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXIncludeProcessFlags
                          xmlXIncludeProcessFlagsData
                          xmlXIncludeProcessTreeFlags
                          +xmlXIncludeProcessTreeFlagsData
                          xmlXIncludeSetFlags
                          including
                          XML_SCHEMAS_INCLUDING_CONVERT_NS
                          attribute
                          @@ -210,8 +211,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathNodeSetRemove
                          xmlXPtrLocationSetRemove
                          xmlXPtrNewRange
                          -
                          indicate
                          ATTRIBUTE_ALLOC_SIZE
                          -ATTRIBUTE_PRINTF
                          +
                          indicate
                          LIBXML_ATTR_ALLOC_SIZE
                          +LIBXML_ATTR_FORMAT
                          xmlParseExternalID
                          xmlParserInputGrow
                          xmlParserInputRead
                          @@ -438,7 +439,8 @@ A:link, A:visited, A:active { text-decoration: underline }
                          insufficient
                          xmlCanonicPath
                          xmlPathToURI
                          intact
                          xmlParseURIRaw
                          -
                          integer
                          xmlStrcasecmp
                          +
                          integer
                          xmlGetThreadId
                          +xmlStrcasecmp
                          xmlStrcmp
                          xmlStrncasecmp
                          xmlStrncmp
                          @@ -538,8 +540,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk18.html b/doc/APIchunk18.html index d0651f1..d9444ad 100644 --- a/doc/APIchunk18.html +++ b/doc/APIchunk18.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index j-l for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index j-l for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index j-l for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index j-l for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -43,6 +43,8 @@ A:link, A:visited, A:active { text-decoration: underline } namePop
                          nodePop
                          valuePop
                          +xmlCleanupParser
                          +xmlCleanupThreads
                          xmlCopyEnumeration
                          xmlCreateEntitiesTable
                          xmlCreateEnumeration
                          @@ -151,6 +153,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathNodeLeadingSorted
                          xmlXPathNormalizeFunction
                          xmlXPathStringFunction
                          +
                          leak
                          xmlCleanupParser
                          +xmlCleanupThreads
                          least
                          xmlDetectCharEncoding
                          xmlXPathStringFunction
                          left
                          xmlExpNewOr
                          @@ -220,6 +224,8 @@ A:link, A:visited, A:active { text-decoration: underline }
                          lib
                          xmlCheckVersion
                          libc
                          DEBUG_MEMORY
                          libraries
                          LIBXML_MODULE_EXTENSION
                          +xmlCleanupParser
                          +xmlCleanupThreads
                          xmlRelaxNGInitTypes
                          library
                          _xmlError
                          _xmlSchema
                          @@ -255,7 +261,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathNodeSetFreeNs
                          libxml1
                          xmlChildrenNode
                          xmlRootNode
                          -
                          libxml2
                          xmlCleanupThreads
                          +
                          libxml2
                          xmlCleanupParser
                          +xmlCleanupThreads
                          xmlFreeMutex
                          xmlInitThreads
                          xmlLockLibrary
                          @@ -267,11 +274,11 @@ A:link, A:visited, A:active { text-decoration: underline } xmlUnlockLibrary
                          lifetime
                          xmlBufferCreateStatic
                          xmlExpCtxtNbCons
                          -
                          like
                          ATTRIBUTE_PRINTF
                          -IS_CHAR_CH
                          +
                          like
                          IS_CHAR_CH
                          IS_DIGIT_CH
                          IS_EXTENDER_CH
                          IS_LETTER_CH
                          +LIBXML_ATTR_FORMAT
                          LIBXML_DOTTED_VERSION
                          LIBXML_TREE_ENABLED
                          xmlCharEncOutFunc
                          @@ -283,6 +290,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderNormalization
                          xmlValidityErrorFunc
                          xmlValidityWarningFunc
                          +
                          likely
                          xmlGetThreadId
                          limit
                          xmlCharEncFirstLine
                          xmlDecodeEntities
                          xmlPatternMaxDepth
                          @@ -412,8 +420,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk19.html b/doc/APIchunk19.html index eccf3d3..51645b1 100644 --- a/doc/APIchunk19.html +++ b/doc/APIchunk19.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index m-m for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index m-m for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index m-m for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index m-m for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -73,6 +73,7 @@ A:link, A:visited, A:active { text-decoration: underline }
                          manage
                          xmlBufferWriteChar
                          xmlBufferWriteQuotedString
                          manages
                          xmlBufferWriteCHAR
                          +
                          mandate
                          xmlGetThreadId
                          manipulated
                          xmlNewRMutex
                          manipulating
                          xmlExpNewCtxt
                          xmlLoadSGMLSuperCatalog
                          @@ -244,6 +245,10 @@ A:link, A:visited, A:active { text-decoration: underline } _xmlParserCtxt
                          docbCreatePushParserCtxt
                          htmlCreatePushParserCtxt
                          +xmlC14NDocDumpMemory
                          +xmlC14NDocSave
                          +xmlC14NDocSaveTo
                          +xmlC14NExecute
                          xmlCreatePushParserCtxt
                          xmlGetCompressMode
                          xmlKeepBlanksDefault
                          @@ -310,6 +315,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStringCurrentChar
                          multiply
                          xmlXPathMultValues
                          multithreaded
                          htmlInitAutoClose
                          +xmlCleanupParser
                          +xmlCleanupThreads
                          xmlInitParser
                          mutex
                          xmlDictCleanup
                          xmlFreeMutex
                          @@ -336,8 +343,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk2.html b/doc/APIchunk2.html index e8f243f..966456e 100644 --- a/doc/APIchunk2.html +++ b/doc/APIchunk2.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index D-E for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index D-E for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index D-E for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index D-E for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -388,8 +388,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk20.html b/doc/APIchunk20.html index 3bd1894..9c4ed36 100644 --- a/doc/APIchunk20.html +++ b/doc/APIchunk20.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index n-n for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index n-n for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index n-n for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index n-n for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -87,30 +87,6 @@ A:link, A:visited, A:active { text-decoration: underline } _htmlElemDesc
                          xmlCheckUTF8
                          xmlDebugDumpString
                          -
                          need
                          WITH_TRIO
                          -XML_SCHEMAS_TYPE_FACETSNEEDVALUE
                          -XML_SCHEMAS_TYPE_NORMVALUENEEDED
                          -XML_SUBSTITUTE_BOTH
                          -XML_SUBSTITUTE_NONE
                          -XML_SUBSTITUTE_PEREF
                          -XML_SUBSTITUTE_REF
                          -_xmlDOMWrapCtxt
                          -xmlCreatePushParserCtxt
                          -xmlGetNsList
                          -xmlInitCharEncodingHandlers
                          -xmlNewDocNode
                          -xmlNewDocNodeEatName
                          -xmlNewTextChild
                          -xmlNodeSetContent
                          -xmlNodeSetContentLen
                          -xmlParseEntityRef
                          -xmlParserHandleReference
                          -xmlRegExecErrInfo
                          -xmlRegExecNextValues
                          -xmlSchemaNewStringValue
                          -xmlStreamWantsAnyNode
                          -xmlValidGetValidElements
                          -xmlXPathNewContext
                          needed
                          _xmlParserCtxt
                          _xmlXPathContext
                          htmlEntityLookup
                          @@ -199,6 +175,13 @@ A:link, A:visited, A:active { text-decoration: underline } xmlEncodeEntitiesReentrant
                          xmlNewChild
                          xmlNewTextChild
                          +xmlTextReaderBaseUri
                          +xmlTextReaderLocalName
                          +xmlTextReaderLocatorBaseURI
                          +xmlTextReaderName
                          +xmlTextReaderNamespaceUri
                          +xmlTextReaderPrefix
                          +xmlTextReaderXmlLang
                          xmlXPathParseNCName
                          non-CDATA
                          _xmlParserCtxt
                          non-NULL
                          htmlParseEntityRef
                          @@ -208,10 +191,6 @@ A:link, A:visited, A:active { text-decoration: underline }
                          non-blank
                          xmlParseElementChildrenContentDecl
                          non-determinist
                          _xmlValidCtxt
                          non-empty
                          xmlXPathBooleanFunction
                          -
                          non-exclusive
                          xmlC14NDocDumpMemory
                          -xmlC14NDocSave
                          -xmlC14NDocSaveTo
                          -xmlC14NExecute
                          non-final
                          xmlRegExecPushString
                          xmlRegExecPushString2
                          non-negative
                          xmlC14NDocSaveTo
                          @@ -274,6 +253,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlValidateDtdFinal
                          note
                          xmlCheckUTF8
                          xmlLoadExternalEntity
                          +
                          notice
                          xmlCleanupParser
                          +xmlCleanupThreads
                          now
                          XML_CAST_FPTR
                          _xmlSchema
                          _xmlSchemaElement
                          @@ -324,8 +305,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk21.html b/doc/APIchunk21.html index 4f02c03..f114c8e 100644 --- a/doc/APIchunk21.html +++ b/doc/APIchunk21.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index o-o for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index o-o for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index o-o for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index o-o for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -366,8 +366,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk22.html b/doc/APIchunk22.html index 6ac6027..7a647dd 100644 --- a/doc/APIchunk22.html +++ b/doc/APIchunk22.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index p-p for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index p-p for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index p-p for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index p-p for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -102,6 +102,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSetGenericErrorFunc
                          xmlSetStructuredErrorFunc
                          xmlXIncludeProcessFlagsData
                          +xmlXIncludeProcessTreeFlagsData
                          xmlXPathEvalFunc
                          xmlXPathIntersection
                          passive
                          xmlNanoFTPGetConnection
                          @@ -173,8 +174,13 @@ A:link, A:visited, A:active { text-decoration: underline }
                          places
                          xmlMemDisplayLast
                          xmlStrPrintf
                          xmlStrVPrintf
                          +
                          platforms
                          xmlGetThreadId
                          plug
                          xmlXPathFuncLookupFunc
                          xmlXPathVariableLookupFunc
                          +
                          plugin
                          xmlCleanupParser
                          +xmlCleanupThreads
                          +
                          plugins
                          xmlCleanupParser
                          +xmlCleanupThreads
                          plus
                          UTF8ToHtml
                          docbEncodeEntities
                          htmlEncodeEntities
                          @@ -519,6 +525,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNanoHTTPInit
                          xmlNanoHTTPScanProxy
                          prune
                          xmlReplaceNode
                          +
                          pthread_t
                          xmlGetThreadId
                          +
                          pthreads
                          xmlGetThreadId
                          publicID
                          xmlParseExternalID
                          pull
                          xmlParserInputBufferGrow
                          pure
                          xmlParseCDSect
                          @@ -549,8 +557,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk23.html b/doc/APIchunk23.html index b7b26c2..d63d98c 100644 --- a/doc/APIchunk23.html +++ b/doc/APIchunk23.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index q-r for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index q-r for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index q-r for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index q-r for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -404,6 +404,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStructuredErrorFunc
                          reports
                          docbCreatePushParserCtxt
                          htmlCreatePushParserCtxt
                          +xmlCleanupParser
                          +xmlCleanupThreads
                          xmlCreatePushParserCtxt
                          repr
                          xmlSchemaValidateFacet
                          xmlSchemaValidateFacetWhtsp
                          @@ -628,8 +630,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk24.html b/doc/APIchunk24.html index 4377acb..0d1045b 100644 --- a/doc/APIchunk24.html +++ b/doc/APIchunk24.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index s-s for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index s-s for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index s-s for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index s-s for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -420,7 +420,10 @@ A:link, A:visited, A:active { text-decoration: underline } ignorableWhitespace
                          ignorableWhitespaceSAXFunc
                          xmlBuildRelativeURI
                          +xmlCleanupParser
                          +xmlCleanupThreads
                          xmlGcMemSetup
                          +xmlGetThreadId
                          xmlHandleEntity
                          xmlMemSetup
                          xmlParseAttributeType
                          @@ -437,7 +440,10 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXIncludeProcessNode
                          xmlXIncludeProcessTree
                          xmlXIncludeProcessTreeFlags
                          -
                          sometimes
                          xmlExpExpDerive
                          +xmlXIncludeProcessTreeFlagsData
                          +
                          sometimes
                          xmlCleanupParser
                          +xmlCleanupThreads
                          +xmlExpExpDerive
                          somewhat
                          xmlCheckLanguageID
                          xmlCleanupParser
                          sorted
                          xmlParserAddNodeInfo
                          @@ -532,6 +538,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParseNamespace
                          xmlSchemaIsBuiltInTypeFacet
                          specification
                          XML_XML_NAMESPACE
                          +xmlGetThreadId
                          xmlTextReaderNormalization
                          specifications
                          xmlParseSDDecl
                          specify
                          XML_SCHEMAS_TYPE_BLOCK_DEFAULT
                          @@ -642,7 +649,9 @@ A:link, A:visited, A:active { text-decoration: underline } xmlValidateDtdFinal
                          steps
                          xmlNormalizeURIPath
                          xmlValidateDocumentFinal
                          -
                          still
                          xmlModuleFree
                          +
                          still
                          xmlCleanupParser
                          +xmlCleanupThreads
                          +xmlModuleFree
                          xmlNoNetExternalEntityLoader
                          xmlParseNamespace
                          xmlReconciliateNs
                          @@ -796,6 +805,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXIncludeProcessNode
                          xmlXIncludeProcessTree
                          xmlXIncludeProcessTreeFlags
                          +xmlXIncludeProcessTreeFlagsData
                          substitutions:
                          XML_SCHEMAS_ELEM_BLOCK_RESTRICTION
                          XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION
                          substring
                          xmlNodeAddContent
                          @@ -935,8 +945,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk25.html b/doc/APIchunk25.html index 6b0749d..c06b50e 100644 --- a/doc/APIchunk25.html +++ b/doc/APIchunk25.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index t-t for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index t-t for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index t-t for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index t-t for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -162,6 +162,7 @@ A:link, A:visited, A:active { text-decoration: underline }
                          though
                          xmlDocDumpMemory
                          xmlNoNetExternalEntityLoader
                          thread
                          LIBXML_THREAD_ENABLED
                          +xmlCleanupParser
                          xmlCleanupThreads
                          xmlGetGlobalState
                          xmlGetLastError
                          @@ -418,8 +419,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk26.html b/doc/APIchunk26.html index 4fca766..a99c708 100644 --- a/doc/APIchunk26.html +++ b/doc/APIchunk26.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index u-v for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index u-v for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index u-v for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index u-v for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -217,6 +217,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlCharEncInFunc
                          xmlCharEncOutFunc

                          Letter v:

                          val1
                          xmlXPtrLocationSetMerge
                          +
                          valgrind
                          xmlCleanupParser
                          +xmlCleanupThreads
                          validated
                          xmlCharInRange
                          xmlSchemaValidateLengthFacet
                          xmlSchemaValidateLengthFacetWhtsp
                          @@ -271,6 +273,8 @@ A:link, A:visited, A:active { text-decoration: underline }
                          very
                          _htmlElemDesc
                          _xmlParserInput
                          xmlCharEncFirstLine
                          +xmlCleanupParser
                          +xmlCleanupThreads
                          via
                          xmlNanoHTTPFetch
                          xmlNanoHTTPMethod
                          xmlNanoHTTPMethodRedir
                          @@ -292,8 +296,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk27.html b/doc/APIchunk27.html index d9fe323..e04260d 100644 --- a/doc/APIchunk27.html +++ b/doc/APIchunk27.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index w-w for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index w-w for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index w-w for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index w-w for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -127,6 +127,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXIncludeProcessNode
                          xmlXIncludeProcessTree
                          xmlXIncludeProcessTreeFlags
                          +xmlXIncludeProcessTreeFlagsData
                          wether
                          _xmlNodeSet
                          what
                          xmlCatalogGetDefaults
                          xmlCatalogSetDefaults
                          @@ -231,6 +232,8 @@ A:link, A:visited, A:active { text-decoration: underline } entityDecl
                          entityDeclSAXFunc
                          htmlNewDocNoDtD
                          +xmlCleanupParser
                          +xmlCleanupThreads
                          xmlNewGlobalNs
                          xmlParseEntityRef
                          xmlParsePEReference
                          @@ -311,8 +314,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk28.html b/doc/APIchunk28.html index 5fbd28f..b2a9f11 100644 --- a/doc/APIchunk28.html +++ b/doc/APIchunk28.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index x-x for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index x-x for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index x-x for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index x-x for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -533,8 +533,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk29.html b/doc/APIchunk29.html index e5befeb..cbc5e98 100644 --- a/doc/APIchunk29.html +++ b/doc/APIchunk29.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index y-z for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index y-z for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index y-z for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index y-z for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -65,6 +65,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNewTextChild
                          xmlSchemaGetBuiltInType
                          xmlSearchNs
                          +
                          your
                          xmlCleanupParser
                          +xmlCleanupThreads

                          Letter z:

                          zero
                          docbEncodeEntities
                          docbParseChunk
                          htmlCtxtReadDoc
                          @@ -104,8 +106,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk3.html b/doc/APIchunk3.html index 3b0b349..4e8cb30 100644 --- a/doc/APIchunk3.html +++ b/doc/APIchunk3.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index F-I for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index F-I for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index F-I for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index F-I for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -126,9 +126,9 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSetStructuredErrorFunc
                          xmlXPathFunctionLookup
                          xmlXPathFunctionLookupNS
                          -

                          Letter G:

                          GCC
                          ATTRIBUTE_ALLOC_SIZE
                          -ATTRIBUTE_PRINTF
                          -ATTRIBUTE_UNUSED
                          +

                          Letter G:

                          GCC
                          ATTRIBUTE_UNUSED
                          +LIBXML_ATTR_ALLOC_SIZE
                          +LIBXML_ATTR_FORMAT
                          GEDecl
                          xmlParseEntityDecl
                          GET
                          xmlNanoHTTPFetch
                          xmlNanoHTTPOpen
                          @@ -323,8 +323,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk4.html b/doc/APIchunk4.html index 2a4fb80..395dbfc 100644 --- a/doc/APIchunk4.html +++ b/doc/APIchunk4.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index J-N for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index J-N for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index J-N for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index J-N for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -318,8 +318,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk5.html b/doc/APIchunk5.html index 0c4f510..d03ac9a 100644 --- a/doc/APIchunk5.html +++ b/doc/APIchunk5.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index O-P for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index O-P for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index O-P for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index O-P for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -267,8 +267,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk6.html b/doc/APIchunk6.html index f598093..e9cf959 100644 --- a/doc/APIchunk6.html +++ b/doc/APIchunk6.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index Q-R for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index Q-R for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index Q-R for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index Q-R for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -263,8 +263,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk7.html b/doc/APIchunk7.html index f9550fc..3c5f1d1 100644 --- a/doc/APIchunk7.html +++ b/doc/APIchunk7.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index S-S for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index S-S for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index S-S for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index S-S for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -302,8 +302,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk8.html b/doc/APIchunk8.html index 2d73300..7c4b089 100644 --- a/doc/APIchunk8.html +++ b/doc/APIchunk8.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index T-U for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index T-U for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index T-U for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index T-U for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -279,8 +279,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIchunk9.html b/doc/APIchunk9.html index 497a2bf..5623084 100644 --- a/doc/APIchunk9.html +++ b/doc/APIchunk9.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index V-Z for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index V-Z for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B +API Alphabetic Index V-Y for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          API Alphabetic Index V-Y for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          A-B C-C D-E F-I @@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d @@ -80,7 +80,9 @@ A:link, A:visited, A:active { text-decoration: underline } xmlPreviousElementSibling
                          xmlTextReaderSchemaValidate
                          xmlTextReaderSchemaValidateCtxt
                          -
                          WARNING:
                          xmlSchemaGetCanonValue
                          +
                          WARNING:
                          xmlCleanupParser
                          +xmlCleanupThreads
                          +xmlSchemaGetCanonValue
                          xmlSchemaNewStringValue
                          WFC:
                          xmlParseAttribute
                          xmlParseCharRef
                          @@ -151,6 +153,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXIncludeProcessNode
                          xmlXIncludeProcessTree
                          xmlXIncludeProcessTreeFlags
                          +xmlXIncludeProcessTreeFlagsData
                          xmlXIncludeSetFlags
                          XInclude?
                          xmlDOMWrapCloneNode
                          XLINK_TYPE_NONE
                          xlinkIsLink
                          @@ -236,27 +239,6 @@ A:link, A:visited, A:active { text-decoration: underline }
                          YiRadicals
                          xmlUCSIsYiRadicals
                          YiSyllables
                          xmlUCSIsYiSyllables
                          YijingHexagramSymbols
                          xmlUCSIsYijingHexagramSymbols
                          -

                          Letter Z:

                          ZLIB
                          docbCreateFileParserCtxt
                          -docbParseFile
                          -docbSAXParseFile
                          -htmlCreateFileParserCtxt
                          -htmlParseFile
                          -htmlSAXParseFile
                          -xmlCreateEntityParserCtxt
                          -xmlCreateFileParserCtxt
                          -xmlCreateURLParserCtxt
                          -xmlGetCompressMode
                          -xmlGetDocCompressMode
                          -xmlOutputBufferCreateFilename
                          -xmlParseFile
                          -xmlParserInputBufferCreateFilename
                          -xmlRecoverFile
                          -xmlSAXParseFile
                          -xmlSAXParseFileWithData
                          -xmlSAXUserParseFile
                          -xmlSetCompressMode
                          -xmlSetDocCompressMode
                          -
                          Zlib
                          LIBXML_ZLIB_ENABLED

                          A-B C-C D-E @@ -266,8 +248,8 @@ A:link, A:visited, A:active { text-decoration: underline } Q-R S-S T-U -V-Z -a-a +V-Y +Z-a b-b c-c d-d diff --git a/doc/APIconstructors.html b/doc/APIconstructors.html index bebc3e1..2f7ad1e 100644 --- a/doc/APIconstructors.html +++ b/doc/APIconstructors.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -List of constructors for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          List of constructors for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          Type const htmlElemDesc *:

                          htmlTagLookup
                          +List of constructors for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          List of constructors for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          Type const htmlElemDesc *:

                          htmlTagLookup

                          Type const htmlEntityDesc *:

                          htmlEntityLookup
                          htmlEntityValueLookup
                          htmlParseEntityRef
                          diff --git a/doc/APIfiles.html b/doc/APIfiles.html index 7ed0d9b..22b7bea 100644 --- a/doc/APIfiles.html +++ b/doc/APIfiles.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -List of Symbols per Module for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          List of Symbols per Module for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          Module DOCBparser:

                          docbCreateFileParserCtxt
                          +List of Symbols per Module for libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          List of Symbols per Module for libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          Module DOCBparser:

                          docbCreateFileParserCtxt
                          docbCreatePushParserCtxt
                          docbDocPtr
                          docbEncodeEntities
                          @@ -192,11 +192,15 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSAX2UnparsedEntityDecl
                          xmlSAXDefaultVersion
                          xmlSAXVersion
                          -

                          Module c14n:

                          xmlC14NDocDumpMemory
                          +

                          Module c14n:

                          XML_C14N_1_0
                          +XML_C14N_1_1
                          +XML_C14N_EXCLUSIVE_1_0
                          +xmlC14NDocDumpMemory
                          xmlC14NDocSave
                          xmlC14NDocSaveTo
                          xmlC14NExecute
                          xmlC14NIsVisibleCallback
                          +xmlC14NMode

                          Module catalog:

                          XML_CATALOGS_NAMESPACE
                          XML_CATALOG_PI
                          XML_CATA_ALLOW_ALL
                          @@ -450,6 +454,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlRegisterNodeFunc
                          xmlSaveNoEmptyTags
                          xmlStructuredError
                          +xmlStructuredErrorContext
                          xmlSubstituteEntitiesDefaultValue
                          xmlThrDefBufferAllocScheme
                          xmlThrDefDefaultBufferSize
                          @@ -1687,6 +1692,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXIncludeProcessNode
                          xmlXIncludeProcessTree
                          xmlXIncludeProcessTreeFlags
                          +xmlXIncludeProcessTreeFlagsData
                          xmlXIncludeSetFlags

                          Module xlink:

                          XLINK_ACTUATE_AUTO
                          XLINK_ACTUATE_NONE
                          @@ -3125,10 +3131,10 @@ A:link, A:visited, A:active { text-decoration: underline } xmlUCSIsYiRadicals
                          xmlUCSIsYiSyllables
                          xmlUCSIsYijingHexagramSymbols
                          -

                          Module xmlversion:

                          ATTRIBUTE_ALLOC_SIZE
                          -ATTRIBUTE_PRINTF
                          -ATTRIBUTE_UNUSED
                          +

                          Module xmlversion:

                          ATTRIBUTE_UNUSED
                          DEBUG_MEMORY_LOCATION
                          +LIBXML_ATTR_ALLOC_SIZE
                          +LIBXML_ATTR_FORMAT
                          LIBXML_AUTOMATA_ENABLED
                          LIBXML_C14N_ENABLED
                          LIBXML_CATALOG_ENABLED
                          diff --git a/doc/APIfunctions.html b/doc/APIfunctions.html index 6cf73df..b105fb0 100644 --- a/doc/APIfunctions.html +++ b/doc/APIfunctions.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -List of function manipulating types in libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          List of function manipulating types in libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          Type ...:

                          errorSAXFunc
                          +List of function manipulating types in libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          List of function manipulating types in libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          Type ...:

                          errorSAXFunc
                          fatalErrorSAXFunc
                          warningSAXFunc
                          xmlGenericErrorFunc
                          @@ -312,6 +312,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlReadDoc
                          xmlReaderForDoc
                          xmlReaderNewDoc
                          +xmlRecoverDoc
                          xmlRegExecCallbacks
                          xmlRegExecPushString
                          xmlRegExecPushString2
                          @@ -870,6 +871,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlValidityErrorFunc
                          xmlValidityWarningFunc
                          xmlXIncludeProcessFlagsData
                          +xmlXIncludeProcessTreeFlagsData
                          xmlXPathFuncLookupFunc
                          xmlXPathRegisterFuncLookup
                          xmlXPathRegisterVariableLookup
                          @@ -1009,11 +1011,9 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNewNodeEatName
                          xmlNewNsPropEatName
                          xmlParserInputDeallocate
                          -xmlRecoverDoc
                          xmlSAX2EntityDecl
                          xmlStrPrintf
                          xmlStrVPrintf
                          -xmlStrcasestr
                          xmlStrcat
                          xmlStrncat
                          xmlXPathWrapString
                          @@ -1544,6 +1544,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXIncludeProcessNode
                          xmlXIncludeProcessTree
                          xmlXIncludeProcessTreeFlags
                          +xmlXIncludeProcessTreeFlagsData
                          xmlXPathCastNodeToNumber
                          xmlXPathCastNodeToString
                          xmlXPathCmpNodes
                          diff --git a/doc/APIsymbols.html b/doc/APIsymbols.html index 126e387..e2d4d0d 100644 --- a/doc/APIsymbols.html +++ b/doc/APIsymbols.html @@ -7,9 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Alphabetic List of Symbols in libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          Alphabetic List of Symbols in libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          Letter A:

                          ATTRIBUTE_ALLOC_SIZE
                          -ATTRIBUTE_PRINTF
                          -ATTRIBUTE_UNUSED
                          +Alphabetic List of Symbols in libxml2
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          Alphabetic List of Symbols in libxml2

                          Developer Menu
                          API Indexes
                          Related links

                          Letter A:

                          ATTRIBUTE_UNUSED

                          Letter B:

                          BAD_CAST
                          BASE_BUFFER_SIZE

                          Letter C:

                          CAST_TO_BOOLEAN
                          @@ -59,7 +57,9 @@ A:link, A:visited, A:active { text-decoration: underline } IS_LETTER_CH
                          IS_PUBIDCHAR
                          IS_PUBIDCHAR_CH
                          -

                          Letter L:

                          LIBXML_AUTOMATA_ENABLED
                          +

                          Letter L:

                          LIBXML_ATTR_ALLOC_SIZE
                          +LIBXML_ATTR_FORMAT
                          +LIBXML_AUTOMATA_ENABLED
                          LIBXML_C14N_ENABLED
                          LIBXML_CATALOG_ENABLED
                          LIBXML_DEBUG_ENABLED
                          @@ -149,8 +149,11 @@ A:link, A:visited, A:active { text-decoration: underline } XML_BUFFER_ALLOC_EXACT
                          XML_BUFFER_ALLOC_IMMUTABLE
                          XML_BUFFER_ALLOC_IO
                          +XML_C14N_1_0
                          +XML_C14N_1_1
                          XML_C14N_CREATE_CTXT
                          XML_C14N_CREATE_STACK
                          +XML_C14N_EXCLUSIVE_1_0
                          XML_C14N_INVALID_NODE
                          XML_C14N_RELATIVE_NAMESPACE
                          XML_C14N_REQUIRES_UTF8
                          @@ -1775,6 +1778,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlC14NDocSaveTo
                          xmlC14NExecute
                          xmlC14NIsVisibleCallback
                          +xmlC14NMode
                          xmlCanonicPath
                          xmlCatalog
                          xmlCatalogAdd
                          @@ -2899,6 +2903,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStrstr
                          xmlStrsub
                          xmlStructuredError
                          +xmlStructuredErrorContext
                          xmlStructuredErrorFunc
                          xmlSubstituteEntitiesDefault
                          xmlSubstituteEntitiesDefaultValue
                          @@ -3307,6 +3312,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXIncludeProcessNode
                          xmlXIncludeProcessTree
                          xmlXIncludeProcessTreeFlags
                          +xmlXIncludeProcessTreeFlagsData
                          xmlXIncludeSetFlags
                          xmlXPathAddValues
                          xmlXPathAxis
                          diff --git a/doc/DOM.html b/doc/DOM.html index 8bfc916..bacdde4 100644 --- a/doc/DOM.html +++ b/doc/DOM.html @@ -7,11 +7,11 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -DOM Principles
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          DOM Principles

                          Developer Menu
                          API Indexes
                          Related links

                          DOM stands for the Document +DOM Principles
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          DOM Principles

                          Developer Menu
                          API Indexes
                          Related links

                          DOM stands for the Document Object Model; this is an API for accessing XML or HTML structured documents. Native support for DOM in Gnome is on the way (module gnome-dom), and will be based on gnome-xml. This will be a far cleaner interface to manipulate XML files within Gnome since it won't expose the internal -structure.

                          The current DOM implementation on top of libxml2 is the gdome2 Gnome module, this +structure.

                          The current DOM implementation on top of libxml2 is the gdome2 Gnome module, this is a full DOM interface, thanks to Paolo Casarini, check the Gdome2 homepage for more information.

                          Daniel Veillard

                          diff --git a/doc/FAQ.html b/doc/FAQ.html index 6454942..842b2f2 100644 --- a/doc/FAQ.html +++ b/doc/FAQ.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -FAQ
                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                          Made with Libxml2 Logo

                          The XML C parser and toolkit of Gnome

                          FAQ

                          Main Menu
                          Related links

                          Table of Contents:

                          • License(s)
                          • +FAQ
                            Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                            Made with Libxml2 Logo

                            The XML C parser and toolkit of Gnome

                            FAQ

                            Main Menu
                            Related links

                            Table of Contents:

                            • License(s)
                            • Installation
                            • Compilation
                            • Developer corner
                            • @@ -239,10 +239,10 @@ pnode=pxmlDoc->children->children; examples.
                            • look for examples of use for libxml2 function using the Gnome code or by asking on Google.
                            • -
                            • Browse +
                            • Browse the libxml2 source , I try to write code as clean and documented as possible, so looking at it may be helpful. In particular the code - of xmllint.c and of the various testXXX.c test programs should + of xmllint.c and of the various testXXX.c test programs should provide good examples of how to do things with the library.

                            diff --git a/doc/Makefile.am b/doc/Makefile.am index 72441a5..f131f2b 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -32,7 +32,7 @@ else all: endif -api: libxml2-api.xml libxml2-refs.xml $(APIPAGES) $(srcdir)/html/index.html $(WIN32_DIR)/libxml2.def.src ../elfgcchack.h +api: libxml2-api.xml libxml2-refs.xml $(APIPAGES) $(srcdir)/html/index.html $(WIN32_DIR)/libxml2.def.src ../elfgcchack.h $(srcdir)/site.xsl web: $(PAGES) @@ -89,8 +89,10 @@ $(WIN32_DIR)/libxml2.def.src: libxml2-api.xml $(XSLTPROC) -o $(WIN32_DIR)/libxml2.def.src \ --nonet $(WIN32_DIR)/defgen.xsl libxml2-api.xml ; fi ) -libxml2-api.xml libxml2-refs.xml: apibuild.py ../include/libxml/*.h ../*.c +libxml2-api.xml libxml2-refs.xml ../libxml2.syms: apibuild.py symbols.xml syms.xsl checkapisym.xsl ../include/libxml/*.h ../*.c -(./apibuild.py) + ($(XSLTPROC) checkapisym.xsl libxml2-api.xml) + ($(XSLTPROC) -o ../libxml2.syms syms.xsl symbols.xml) -@(cd .. ; $(MAKE) rebuild_testapi) diff --git a/doc/Makefile.in b/doc/Makefile.in index d5867a0..c91b0f6 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @@ -15,8 +16,9 @@ @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -41,6 +43,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -50,16 +53,65 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man_MANS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ @@ -76,10 +128,6 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@ @@ -88,14 +136,14 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOCB_OBJ = @DOCB_OBJ@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FTP_OBJ = @FTP_OBJ@ GREP = @GREP@ HAVE_ISINF = @HAVE_ISINF@ @@ -109,6 +157,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -120,6 +169,7 @@ LIBXML_VERSION = @LIBXML_VERSION@ LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@ LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@ LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ @@ -128,8 +178,12 @@ MODULE_EXTENSION = @MODULE_EXTENSION@ MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@ MV = @MV@ M_LIBS = @M_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -178,6 +232,7 @@ THREAD_CFLAGS = @THREAD_CFLAGS@ THREAD_LIBS = @THREAD_LIBS@ U = @U@ VERSION = @VERSION@ +VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@ WGET = @WGET@ WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@ WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@ @@ -228,8 +283,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -260,6 +314,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -273,6 +328,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = devhelp examples @@ -308,14 +364,14 @@ $(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; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu doc/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -333,57 +389,51 @@ $(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 +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -install-man1: $(man1_MANS) $(man_MANS) +install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ + @list=''; test -n "$(man1dir)" || exit 0; \ + { for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ - done + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + uninstall-man1: @$(NORMAL_UNINSTALL) - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ - done + @list=''; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + test -z "$$files" || { \ + echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -409,7 +459,7 @@ $(RECURSIVE_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ @@ -443,16 +493,16 @@ $(RECURSIVE_CLEAN_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -460,14 +510,14 @@ ID: $(HEADERS) $(SOURCES) $(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; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -479,7 +529,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -488,34 +538,52 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) + @list='$(MANS)'; if test -n "$$list"; then \ + list=`for p in $$list; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ + if test -n "$$list" && \ + grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ + echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ + grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ + echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ + echo " typically \`make maintainer-clean' will remove them" >&2; \ + exit 1; \ + else :; fi; \ + else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -531,29 +599,44 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ @@ -586,6 +669,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -604,6 +688,8 @@ dvi-am: html: html-recursive +html-am: + info: info-recursive info-am: @@ -612,18 +698,28 @@ install-data-am: install-data-local install-man install-dvi: install-dvi-recursive +install-dvi-am: + install-exec-am: install-html: install-html-recursive +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: install-man1 install-pdf: install-pdf-recursive +install-pdf-am: + install-ps: install-ps-recursive +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -647,8 +743,8 @@ uninstall-am: uninstall-man uninstall-man: uninstall-man1 -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ @@ -669,7 +765,7 @@ uninstall-man: uninstall-man1 @REBUILD_DOCS_TRUE@all: web $(top_builddir)/NEWS libxml2.xsa $(man_MANS) @REBUILD_DOCS_FALSE@all: -api: libxml2-api.xml libxml2-refs.xml $(APIPAGES) $(srcdir)/html/index.html $(WIN32_DIR)/libxml2.def.src ../elfgcchack.h +api: libxml2-api.xml libxml2-refs.xml $(APIPAGES) $(srcdir)/html/index.html $(WIN32_DIR)/libxml2.def.src ../elfgcchack.h $(srcdir)/site.xsl web: $(PAGES) @@ -726,8 +822,10 @@ $(WIN32_DIR)/libxml2.def.src: libxml2-api.xml $(XSLTPROC) -o $(WIN32_DIR)/libxml2.def.src \ --nonet $(WIN32_DIR)/defgen.xsl libxml2-api.xml ; fi ) -libxml2-api.xml libxml2-refs.xml: apibuild.py ../include/libxml/*.h ../*.c +libxml2-api.xml libxml2-refs.xml ../libxml2.syms: apibuild.py symbols.xml syms.xsl checkapisym.xsl ../include/libxml/*.h ../*.c -(./apibuild.py) + ($(XSLTPROC) checkapisym.xsl libxml2-api.xml) + ($(XSLTPROC) -o ../libxml2.syms syms.xsl symbols.xml) -@(cd .. ; $(MAKE) rebuild_testapi) xmllint.1: xmllint.xml @@ -761,6 +859,7 @@ install-data-local: $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts .PHONY : html xml templates scan + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/doc/README.docs b/doc/README.docs index d0b993c..279b375 100644 --- a/doc/README.docs +++ b/doc/README.docs @@ -21,4 +21,4 @@ required and justified. Daniel Veillard -$Id: README.docs,v 1.1 2003/09/01 04:58:15 wbrack Exp $ +$Id$ diff --git a/doc/XMLinfo.html b/doc/XMLinfo.html index 996b1b4..fda85ac 100644 --- a/doc/XMLinfo.html +++ b/doc/XMLinfo.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -XML
                            Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                            Made with Libxml2 Logo

                            The XML C parser and toolkit of Gnome

                            XML

                            Main Menu
                            Related links

                            XML is a standard for +XML
                            Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                            Made with Libxml2 Logo

                            The XML C parser and toolkit of Gnome

                            XML

                            Main Menu
                            Related links

                            XML is a standard for markup-based structured documents. Here is an example XML document:

                            <?xml version="1.0"?>
                             <EXAMPLE prop1="gnome is great" prop2="&amp; linux too">
                            diff --git a/doc/XSLT.html b/doc/XSLT.html
                            index 5edd1b1..83ba529 100644
                            --- a/doc/XSLT.html
                            +++ b/doc/XSLT.html
                            @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica}
                             H2 {font-family: Verdana,Arial,Helvetica}
                             H3 {font-family: Verdana,Arial,Helvetica}
                             A:link, A:visited, A:active { text-decoration: underline }
                            -XSLT
                            Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                            Made with Libxml2 Logo

                            The XML C parser and toolkit of Gnome

                            XSLT

                            Main Menu
                            Related links

                            Check the separate libxslt page

                            XSL Transformations, is a +XSLT
                            Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                            Made with Libxml2 Logo

                            The XML C parser and toolkit of Gnome

                            XSLT

                            Main Menu
                            Related links

                            Check the separate libxslt page

                            XSL Transformations, is a language for transforming XML documents into other XML documents (or HTML/textual output).

                            A separate library called libxslt is available implementing XSLT-1.0 for libxml2. This module "libxslt" too can be found in the Gnome SVN base.

                            You can check the progresses on the libxslt Changelog.

                            Daniel Veillard

                            diff --git a/doc/apibuild.py b/doc/apibuild.py index b7fa22e..5bfe68f 100755 --- a/doc/apibuild.py +++ b/doc/apibuild.py @@ -74,6 +74,8 @@ ignored_words = { "X_IN_Y": (5, "macro function builder"), "ATTRIBUTE_ALLOC_SIZE": (3, "macro for gcc checking extension"), "ATTRIBUTE_PRINTF": (5, "macro for gcc printf args checking extension"), + "LIBXML_ATTR_FORMAT": (5, "macro for gcc printf args checking extension"), + "LIBXML_ATTR_ALLOC_SIZE": (3, "macro for gcc checking extension"), } def escape(raw): diff --git a/doc/architecture.html b/doc/architecture.html index 7316fbd..df9b5ef 100644 --- a/doc/architecture.html +++ b/doc/architecture.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -libxml2 architecture
                            Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                            Made with Libxml2 Logo

                            The XML C parser and toolkit of Gnome

                            libxml2 architecture

                            Developer Menu
                            API Indexes
                            Related links

                            Libxml2 is made of multiple components; some of them are optional, and +libxml2 architecture
                            Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                            Made with Libxml2 Logo

                            The XML C parser and toolkit of Gnome

                            libxml2 architecture

                            Developer Menu
                            API Indexes
                            Related links

                            Libxml2 is made of multiple components; some of them are optional, and most of the block interfaces are public. The main components are:

                            • an Input/Output layer
                            • FTP and HTTP client layers (optional)
                            • an Internationalization layer managing the encodings support
                            • diff --git a/doc/bugs.html b/doc/bugs.html index 6b8f309..2d44df0 100644 --- a/doc/bugs.html +++ b/doc/bugs.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Reporting bugs and getting help
                              Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                              Made with Libxml2 Logo

                              The XML C parser and toolkit of Gnome

                              Reporting bugs and getting help

                              Main Menu
                              Related links

                              Well, bugs or missing features are always possible, and I will make a +Reporting bugs and getting help
                              Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                              Made with Libxml2 Logo

                              The XML C parser and toolkit of Gnome

                              Reporting bugs and getting help

                              Main Menu
                              Related links

                              Well, bugs or missing features are always possible, and I will make a point of fixing them in a timely fashion. The best way to report a bug is to use the Gnome bug tracking database (make sure to use the "libxml2" module name). I diff --git a/doc/catalog.html b/doc/catalog.html index 0b5aaea..502bbb6 100644 --- a/doc/catalog.html +++ b/doc/catalog.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Catalog support
                              Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                              Made with Libxml2 Logo

                              The XML C parser and toolkit of Gnome

                              Catalog support

                              Main Menu
                              Related links

                              Table of Content:

                              1. General overview
                              2. +Catalog support
                                Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                Made with Libxml2 Logo

                                The XML C parser and toolkit of Gnome

                                Catalog support

                                Main Menu
                                Related links

                                Table of Content:

                                1. General overview
                                2. The definition
                                3. Using catalogs
                                4. Some examples
                                5. diff --git a/doc/checkapisym.xsl b/doc/checkapisym.xsl new file mode 100644 index 0000000..8591393 --- /dev/null +++ b/doc/checkapisym.xsl @@ -0,0 +1,48 @@ + + + + + + + + + + + + Looking for functions in symbols.xml + + + + Found + + functions + + + Looking for variables in symbols.xml + + + + Found + + variables + + + + + + + + + Failed to find export in symbols.xml: + + + + + + + diff --git a/doc/contribs.html b/doc/contribs.html index 97bf430..c8ab757 100644 --- a/doc/contribs.html +++ b/doc/contribs.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Contributions
                                  Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                  Made with Libxml2 Logo

                                  The XML C parser and toolkit of Gnome

                                  Contributions

                                  Main Menu
                                  Related links
                                  • Bjorn Reese, William Brack and Thomas Broyer have provided a number of +Contributions
                                    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                    Made with Libxml2 Logo

                                    The XML C parser and toolkit of Gnome

                                    Contributions

                                    Main Menu
                                    Related links
                                    • Bjorn Reese, William Brack and Thomas Broyer have provided a number of patches, Gary Pennington worked on the validation API, threading support and Solaris port.
                                    • John Fleck helps maintaining the documentation and man pages.
                                    • diff --git a/doc/devhelp/Makefile.in b/doc/devhelp/Makefile.in index 1257ad4..bb372f8 100644 --- a/doc/devhelp/Makefile.in +++ b/doc/devhelp/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @@ -15,8 +16,9 @@ @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -41,6 +43,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -60,10 +63,6 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@ @@ -72,14 +71,14 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOCB_OBJ = @DOCB_OBJ@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FTP_OBJ = @FTP_OBJ@ GREP = @GREP@ HAVE_ISINF = @HAVE_ISINF@ @@ -93,6 +92,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -104,6 +104,7 @@ LIBXML_VERSION = @LIBXML_VERSION@ LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@ LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@ LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ @@ -112,8 +113,12 @@ MODULE_EXTENSION = @MODULE_EXTENSION@ MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@ MV = @MV@ M_LIBS = @M_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -162,6 +167,7 @@ THREAD_CFLAGS = @THREAD_CFLAGS@ THREAD_LIBS = @THREAD_LIBS@ U = @U@ VERSION = @VERSION@ +VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@ WGET = @WGET@ WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@ WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@ @@ -212,8 +218,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -244,6 +249,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -257,6 +263,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DEVHELP_DIR = $(datadir)/gtk-doc/html/libxml2 @@ -325,14 +332,14 @@ $(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; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/devhelp/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu doc/devhelp/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/devhelp/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu doc/devhelp/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -350,6 +357,7 @@ $(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 +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -379,13 +387,17 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -413,6 +425,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -431,6 +444,8 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: @@ -439,18 +454,28 @@ install-data-am: install-data-local install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -498,6 +523,7 @@ install-data-local: -@INSTALL@ -m 0644 libxml2.devhelp $(DESTDIR)$(DEVHELP_DIR) -@INSTALL@ -m 0644 $(EXTRA_FORMAT) $(DESTDIR)$(DEVHELP_DIR) -@INSTALL@ -m 0644 $(HTML_FILES) $(DESTDIR)$(DEVHELP_DIR) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/doc/devhelp/libxml2-c14n.html b/doc/devhelp/libxml2-c14n.html index e60f229..914500e 100644 --- a/doc/devhelp/libxml2-c14n.html +++ b/doc/devhelp/libxml2-c14n.html @@ -43,11 +43,12 @@

                                      Author(s): Aleksey Sanin <aleksey@aleksey.com>

                                      Synopsis

                                      -
                                      int	xmlC14NExecute			(xmlDocPtr doc, 
                                      xmlC14NIsVisibleCallback is_visible_callback,
                                      void * user_data,
                                      int exclusive,
                                      xmlChar ** inclusive_ns_prefixes,
                                      int with_comments,
                                      xmlOutputBufferPtr buf); -int xmlC14NDocSaveTo (xmlDocPtr doc,
                                      xmlNodeSetPtr nodes,
                                      int exclusive,
                                      xmlChar ** inclusive_ns_prefixes,
                                      int with_comments,
                                      xmlOutputBufferPtr buf); +
                                      typedef enum xmlC14NMode;
                                      +int	xmlC14NExecute			(xmlDocPtr doc, 
                                      xmlC14NIsVisibleCallback is_visible_callback,
                                      void * user_data,
                                      int mode,
                                      xmlChar ** inclusive_ns_prefixes,
                                      int with_comments,
                                      xmlOutputBufferPtr buf); +int xmlC14NDocSaveTo (xmlDocPtr doc,
                                      xmlNodeSetPtr nodes,
                                      int mode,
                                      xmlChar ** inclusive_ns_prefixes,
                                      int with_comments,
                                      xmlOutputBufferPtr buf); typedef int xmlC14NIsVisibleCallback (void * user_data,
                                      xmlNodePtr node,
                                      xmlNodePtr parent); -int xmlC14NDocSave (xmlDocPtr doc,
                                      xmlNodeSetPtr nodes,
                                      int exclusive,
                                      xmlChar ** inclusive_ns_prefixes,
                                      int with_comments,
                                      const char * filename,
                                      int compression); -int xmlC14NDocDumpMemory (xmlDocPtr doc,
                                      xmlNodeSetPtr nodes,
                                      int exclusive,
                                      xmlChar ** inclusive_ns_prefixes,
                                      int with_comments,
                                      xmlChar ** doc_txt_ptr); +int xmlC14NDocSave (xmlDocPtr doc,
                                      xmlNodeSetPtr nodes,
                                      int mode,
                                      xmlChar ** inclusive_ns_prefixes,
                                      int with_comments,
                                      const char * filename,
                                      int compression); +int xmlC14NDocDumpMemory (xmlDocPtr doc,
                                      xmlNodeSetPtr nodes,
                                      int mode,
                                      xmlChar ** inclusive_ns_prefixes,
                                      int with_comments,
                                      xmlChar ** doc_txt_ptr);
                                      @@ -56,25 +57,33 @@ int xmlC14NDocDumpMemory (

                                      Details

                                      +

                                      Enum xmlC14NMode

                                      enum xmlC14NMode {
                                      +    XML_C14N_1_0 = 0 /* Origianal C14N 1.0 spec */
                                      +    XML_C14N_EXCLUSIVE_1_0 = 1 /* Exclusive C14N 1.0 spec */
                                      +    XML_C14N_1_1 = 2 /*  C14N 1.1 spec */
                                      +};
                                      +

                                      +

                                      +

                                      Function type xmlC14NIsVisibleCallback

                                      int	xmlC14NIsVisibleCallback	(void * user_data, 
                                      xmlNodePtr node,
                                      xmlNodePtr parent)

                                      Signature for a C14N callback on visible nodes

                                      user_data:user data
                                      node:the curent node
                                      parent:the parent node
                                      Returns:1 if the node should be included

                                      -

                                      xmlC14NDocDumpMemory ()

                                      int	xmlC14NDocDumpMemory		(xmlDocPtr doc, 
                                      xmlNodeSetPtr nodes,
                                      int exclusive,
                                      xmlChar ** inclusive_ns_prefixes,
                                      int with_comments,
                                      xmlChar ** doc_txt_ptr)
                                      +

                                      xmlC14NDocDumpMemory ()

                                      int	xmlC14NDocDumpMemory		(xmlDocPtr doc, 
                                      xmlNodeSetPtr nodes,
                                      int mode,
                                      xmlChar ** inclusive_ns_prefixes,
                                      int with_comments,
                                      xmlChar ** doc_txt_ptr)

                                      Dumps the canonized image of given XML document into memory. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)

                                      -
                                      doc:the XML document for canonization
                                      nodes:the nodes set to be included in the canonized image or NULL if all document nodes should be included
                                      exclusive:the exclusive flag (0 - non-exclusive canonicalization; otherwise - exclusive canonicalization)
                                      inclusive_ns_prefixes:the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
                                      with_comments:include comments in the result (!=0) or not (==0)
                                      doc_txt_ptr:the memory pointer for allocated canonical XML text; the caller of this functions is responsible for calling xmlFree() to free allocated memory
                                      Returns:the number of bytes written on success or a negative value on fail
                                      +
                                      doc:the XML document for canonization
                                      nodes:the nodes set to be included in the canonized image or NULL if all document nodes should be included
                                      mode:the c14n mode (see @xmlC14NMode)
                                      inclusive_ns_prefixes:the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
                                      with_comments:include comments in the result (!=0) or not (==0)
                                      doc_txt_ptr:the memory pointer for allocated canonical XML text; the caller of this functions is responsible for calling xmlFree() to free allocated memory
                                      Returns:the number of bytes written on success or a negative value on fail

                                      -

                                      xmlC14NDocSave ()

                                      int	xmlC14NDocSave			(xmlDocPtr doc, 
                                      xmlNodeSetPtr nodes,
                                      int exclusive,
                                      xmlChar ** inclusive_ns_prefixes,
                                      int with_comments,
                                      const char * filename,
                                      int compression)
                                      +

                                      xmlC14NDocSave ()

                                      int	xmlC14NDocSave			(xmlDocPtr doc, 
                                      xmlNodeSetPtr nodes,
                                      int mode,
                                      xmlChar ** inclusive_ns_prefixes,
                                      int with_comments,
                                      const char * filename,
                                      int compression)

                                      Dumps the canonized image of given XML document into the file. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)

                                      -
                                      doc:the XML document for canonization
                                      nodes:the nodes set to be included in the canonized image or NULL if all document nodes should be included
                                      exclusive:the exclusive flag (0 - non-exclusive canonicalization; otherwise - exclusive canonicalization)
                                      inclusive_ns_prefixes:the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
                                      with_comments:include comments in the result (!=0) or not (==0)
                                      filename:the filename to store canonical XML image
                                      compression:the compression level (zlib requred): -1 - libxml default, 0 - uncompressed, >0 - compression level
                                      Returns:the number of bytes written success or a negative value on fail
                                      +
                                      doc:the XML document for canonization
                                      nodes:the nodes set to be included in the canonized image or NULL if all document nodes should be included
                                      mode:the c14n mode (see @xmlC14NMode)
                                      inclusive_ns_prefixes:the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
                                      with_comments:include comments in the result (!=0) or not (==0)
                                      filename:the filename to store canonical XML image
                                      compression:the compression level (zlib requred): -1 - libxml default, 0 - uncompressed, >0 - compression level
                                      Returns:the number of bytes written success or a negative value on fail

                                      -

                                      xmlC14NDocSaveTo ()

                                      int	xmlC14NDocSaveTo		(xmlDocPtr doc, 
                                      xmlNodeSetPtr nodes,
                                      int exclusive,
                                      xmlChar ** inclusive_ns_prefixes,
                                      int with_comments,
                                      xmlOutputBufferPtr buf)
                                      +

                                      xmlC14NDocSaveTo ()

                                      int	xmlC14NDocSaveTo		(xmlDocPtr doc, 
                                      xmlNodeSetPtr nodes,
                                      int mode,
                                      xmlChar ** inclusive_ns_prefixes,
                                      int with_comments,
                                      xmlOutputBufferPtr buf)

                                      Dumps the canonized image of given XML document into the provided buffer. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)

                                      -
                                      doc:the XML document for canonization
                                      nodes:the nodes set to be included in the canonized image or NULL if all document nodes should be included
                                      exclusive:the exclusive flag (0 - non-exclusive canonicalization; otherwise - exclusive canonicalization)
                                      inclusive_ns_prefixes:the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
                                      with_comments:include comments in the result (!=0) or not (==0)
                                      buf:the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output
                                      Returns:non-negative value on success or a negative value on fail
                                      +
                                      doc:the XML document for canonization
                                      nodes:the nodes set to be included in the canonized image or NULL if all document nodes should be included
                                      mode:the c14n mode (see @xmlC14NMode)
                                      inclusive_ns_prefixes:the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
                                      with_comments:include comments in the result (!=0) or not (==0)
                                      buf:the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output
                                      Returns:non-negative value on success or a negative value on fail

                                      -

                                      xmlC14NExecute ()

                                      int	xmlC14NExecute			(xmlDocPtr doc, 
                                      xmlC14NIsVisibleCallback is_visible_callback,
                                      void * user_data,
                                      int exclusive,
                                      xmlChar ** inclusive_ns_prefixes,
                                      int with_comments,
                                      xmlOutputBufferPtr buf)
                                      +

                                      xmlC14NExecute ()

                                      int	xmlC14NExecute			(xmlDocPtr doc, 
                                      xmlC14NIsVisibleCallback is_visible_callback,
                                      void * user_data,
                                      int mode,
                                      xmlChar ** inclusive_ns_prefixes,
                                      int with_comments,
                                      xmlOutputBufferPtr buf)

                                      Dumps the canonized image of given XML document into the provided buffer. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)

                                      -
                                      doc:the XML document for canonization
                                      is_visible_callback:the function to use to determine is node visible or not
                                      user_data:the first parameter for @is_visible_callback function (in most cases, it is nodes set)
                                      exclusive:the exclusive flag (0 - non-exclusive canonicalization; otherwise - exclusive canonicalization)
                                      inclusive_ns_prefixes:the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
                                      with_comments:include comments in the result (!=0) or not (==0)
                                      buf:the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output
                                      Returns:non-negative value on success or a negative value on fail
                                      +
                                      doc:the XML document for canonization
                                      is_visible_callback:the function to use to determine is node visible or not
                                      user_data:the first parameter for @is_visible_callback function (in most cases, it is nodes set)
                                      mode:the c14n mode (see @xmlC14NMode)
                                      inclusive_ns_prefixes:the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
                                      with_comments:include comments in the result (!=0) or not (==0)
                                      buf:the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output
                                      Returns:non-negative value on success or a negative value on fail

                                      diff --git a/doc/devhelp/libxml2-globals.html b/doc/devhelp/libxml2-globals.html index 449049e..415492b 100644 --- a/doc/devhelp/libxml2-globals.html +++ b/doc/devhelp/libxml2-globals.html @@ -116,6 +116,7 @@ const char * xmlThrDefTreeIndentString xmlError xmlLastError xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue + void * xmlStructuredErrorContext } xmlGlobalState;

                                      @@ -258,6 +259,10 @@ const char * xmlThrDefTreeIndentString


                                      Variable xmlStructuredError

                                      xmlStructuredErrorFunc xmlStructuredError;
                                       

                                      +

                                      +
                                      +

                                      Variable xmlStructuredErrorContext

                                      void * xmlStructuredErrorContext;
                                      +


                                      Variable xmlSubstituteEntitiesDefaultValue

                                      int xmlSubstituteEntitiesDefaultValue;
                                      diff --git a/doc/devhelp/libxml2-parser.html b/doc/devhelp/libxml2-parser.html
                                      index 06e863a..e4e2d76 100644
                                      --- a/doc/devhelp/libxml2-parser.html
                                      +++ b/doc/devhelp/libxml2-parser.html
                                      @@ -97,7 +97,7 @@ int	xmlGetFeature			(xmlDtdPtr	xmlIOParseDTD		(xmlSAXHandlerPtr sax, 
                                      xmlParserInputBufferPtr input,
                                      xmlCharEncoding enc); void xmlFreeParserCtxt (xmlParserCtxtPtr ctxt); xmlDtdPtr xmlParseDTD (const xmlChar * ExternalID,
                                      const xmlChar * SystemID); -xmlDocPtr xmlRecoverDoc (xmlChar * cur); +xmlDocPtr xmlRecoverDoc (const xmlChar * cur); typedef void commentSAXFunc (void * ctx,
                                      const xmlChar * value); int xmlInitParserCtxt (xmlParserCtxtPtr ctxt); typedef void attributeSAXFunc (void * ctx,
                                      const xmlChar * name,
                                      const xmlChar * value); @@ -481,7 +481,7 @@ void xmlSetExternalEntityLoader (
                                      ctxt:an XML parser context
                                      Returns:the index in bytes from the beginning of the entity or -1 in case the index could not be computed.

                                      xmlCleanupParser ()

                                      void	xmlCleanupParser		(void)
                                      -

                                      This function name is somewhat misleading. It does not clean up parser state, it cleans up memory allocated by the library itself. It is a cleanup function for the XML library. It tries to reclaim all related global memory allocated for the library processing. It doesn't deallocate any document related memory. One should call xmlCleanupParser() only when the process has finished using the library and all XML/HTML documents built with it. See also xmlInitParser() which has the opposite function of preparing the library for operations.

                                      +

                                      This function name is somewhat misleading. It does not clean up parser state, it cleans up memory allocated by the library itself. It is a cleanup function for the XML library. It tries to reclaim all related global memory allocated for the library processing. It doesn't deallocate any document related memory. One should call xmlCleanupParser() only when the process has finished using the library and all XML/HTML documents built with it. See also xmlInitParser() which has the opposite function of preparing the library for operations. WARNING: if your application is multithreaded or has plugin support calling this may crash the application if another thread or a plugin is still using libxml2. It's sometimes very hard to guess if libxml2 is in use in the application, some libraries or plugins may use it without notice. In case of doubt abstain from calling this function or do it just before calling exit() to avoid leak reports from valgrind !



                                      -

                                      xmlRecoverDoc ()

                                      xmlDocPtr	xmlRecoverDoc		(xmlChar * cur)
                                      +

                                      xmlRecoverDoc ()

                                      xmlDocPtr	xmlRecoverDoc		(const xmlChar * cur)

                                      parse an XML in-memory document and build a tree. In the case the document is not Well Formed, a attempt to build a tree is tried anyway

                                      cur:a pointer to an array of xmlChar
                                      Returns:the resulting document tree or NULL in case of failure

                                      diff --git a/doc/devhelp/libxml2-threads.html b/doc/devhelp/libxml2-threads.html index 3ce5f93..0ddd0bc 100644 --- a/doc/devhelp/libxml2-threads.html +++ b/doc/devhelp/libxml2-threads.html @@ -92,7 +92,7 @@ The content of this structure is not made public by the API.




                                      xmlInitThreads ()

                                      void	xmlInitThreads			(void)
                                      diff --git a/doc/devhelp/libxml2-tree.html b/doc/devhelp/libxml2-tree.html index 6e70990..c370203 100644 --- a/doc/devhelp/libxml2-tree.html +++ b/doc/devhelp/libxml2-tree.html @@ -707,7 +707,7 @@ void
                                      xmlFreeNsList (xmlChar * version : the XML version string const xmlChar * encoding : the declared encoding, if any int standalone : standalone document - int html : an HTML(1)/Docbook(2) document Input stream stack + int html : an HTML(1)/Docbook(2) document * 3 is HTML after <head> * 10 is HTML xmlParserInputPtr input : Current input stream int inputNr : Number of current input streams int inputMax : Max number of input streams diff --git a/doc/devhelp/libxml2-xinclude.html b/doc/devhelp/libxml2-xinclude.html index 31df927..12a61d5 100644 --- a/doc/devhelp/libxml2-xinclude.html +++ b/doc/devhelp/libxml2-xinclude.html @@ -55,6 +55,7 @@ #define XINCLUDE_OLD_NS; typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt; typedef xmlXIncludeCtxt * xmlXIncludeCtxtPtr; +int xmlXIncludeProcessTreeFlagsData (xmlNodePtr tree,
                                      int flags,
                                      void * data); int xmlXIncludeProcessFlagsData (xmlDocPtr doc,
                                      int flags,
                                      void * data); int xmlXIncludeProcessFlags (xmlDocPtr doc,
                                      int flags); int xmlXIncludeProcessTree (xmlNodePtr tree); @@ -153,6 +154,10 @@ The content of this structure is not made public by the API.

                                      xmlXIncludeProcessTreeFlags ()

                                      int	xmlXIncludeProcessTreeFlags	(xmlNodePtr tree, 
                                      int flags)

                                      Implement the XInclude substitution for the given subtree

                                      tree:a node in an XML document
                                      flags:a set of xmlParserOption used for parsing XML includes
                                      Returns:0 if no substitution were done, -1 if some processing failed or the number of substitutions done.
                                      +
                                      +

                                      xmlXIncludeProcessTreeFlagsData ()

                                      int	xmlXIncludeProcessTreeFlagsData	(xmlNodePtr tree, 
                                      int flags,
                                      void * data)
                                      +

                                      Implement the XInclude substitution on the XML node @tree

                                      +
                                      tree:an XML node
                                      flags:a set of xmlParserOption used for parsing XML includes
                                      data:application data that will be passed to the parser context in the _private field of the parser context(s)
                                      Returns:0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

                                      xmlXIncludeSetFlags ()

                                      int	xmlXIncludeSetFlags		(xmlXIncludeCtxtPtr ctxt, 
                                      int flags)

                                      Set the flags used for further processing of XML resources.

                                      diff --git a/doc/devhelp/libxml2-xmlreader.html b/doc/devhelp/libxml2-xmlreader.html index 2466e75..0ecf704 100644 --- a/doc/devhelp/libxml2-xmlreader.html +++ b/doc/devhelp/libxml2-xmlreader.html @@ -280,7 +280,7 @@ The content of this structure is not made public by the API.

                                      xmlTextReaderBaseUri ()

                                      xmlChar *	xmlTextReaderBaseUri	(xmlTextReaderPtr reader)

                                      The base URI of the node.

                                      -
                                      reader:the xmlTextReaderPtr used
                                      Returns:the base URI or NULL if not available
                                      +
                                      reader:the xmlTextReaderPtr used
                                      Returns:the base URI or NULL if not available, if non NULL it need to be freed by the caller.

                                      xmlTextReaderByteConsumed ()

                                      long	xmlTextReaderByteConsumed	(xmlTextReaderPtr reader)

                                      This function provides the current index of the parser used by the reader, relative to the start of the current entity. This function actually just wraps a call to xmlBytesConsumed() for the parser context associated with the reader. See xmlBytesConsumed() for more information.

                                      @@ -404,11 +404,11 @@ The content of this structure is not made public by the API.

                                      xmlTextReaderLocalName ()

                                      xmlChar *	xmlTextReaderLocalName	(xmlTextReaderPtr reader)

                                      The local name of the node.

                                      -
                                      reader:the xmlTextReaderPtr used
                                      Returns:the local name or NULL if not available
                                      +
                                      reader:the xmlTextReaderPtr used
                                      Returns:the local name or NULL if not available, if non NULL it need to be freed by the caller.

                                      xmlTextReaderLocatorBaseURI ()

                                      xmlChar *	xmlTextReaderLocatorBaseURI	(xmlTextReaderLocatorPtr locator)

                                      Obtain the base URI for the given locator.

                                      -
                                      locator:the xmlTextReaderLocatorPtr used
                                      Returns:the base URI or NULL in case of error.
                                      +
                                      locator:the xmlTextReaderLocatorPtr used
                                      Returns:the base URI or NULL in case of error, if non NULL it need to be freed by the caller.

                                      xmlTextReaderLocatorLineNumber ()

                                      int	xmlTextReaderLocatorLineNumber	(xmlTextReaderLocatorPtr locator)

                                      Obtain the line number for the given locator.

                                      @@ -444,11 +444,11 @@ The content of this structure is not made public by the API.

                                      xmlTextReaderName ()

                                      xmlChar *	xmlTextReaderName	(xmlTextReaderPtr reader)

                                      The qualified name of the node, equal to Prefix :LocalName.

                                      -
                                      reader:the xmlTextReaderPtr used
                                      Returns:the local name or NULL if not available
                                      +
                                      reader:the xmlTextReaderPtr used
                                      Returns:the local name or NULL if not available, if non NULL it need to be freed by the caller.

                                      xmlTextReaderNamespaceUri ()

                                      xmlChar *	xmlTextReaderNamespaceUri	(xmlTextReaderPtr reader)

                                      The URI defining the namespace associated with the node.

                                      -
                                      reader:the xmlTextReaderPtr used
                                      Returns:the namespace URI or NULL if not available
                                      +
                                      reader:the xmlTextReaderPtr used
                                      Returns:the namespace URI or NULL if not available, if non NULL it need to be freed by the caller.

                                      xmlTextReaderNext ()

                                      int	xmlTextReaderNext		(xmlTextReaderPtr reader)

                                      Skip to the node following the current one in document order while avoiding the subtree if any.

                                      @@ -468,7 +468,7 @@ The content of this structure is not made public by the API.

                                      xmlTextReaderPrefix ()

                                      xmlChar *	xmlTextReaderPrefix	(xmlTextReaderPtr reader)

                                      A shorthand reference to the namespace associated with the node.

                                      -
                                      reader:the xmlTextReaderPtr used
                                      Returns:the prefix or NULL if not available
                                      +
                                      reader:the xmlTextReaderPtr used
                                      Returns:the prefix or NULL if not available, if non NULL it need to be freed by the caller.

                                      xmlTextReaderPreserve ()

                                      xmlNodePtr	xmlTextReaderPreserve	(xmlTextReaderPtr reader)

                                      This tells the XML Reader to preserve the current node. The caller must also use xmlTextReaderCurrentDoc() to keep an handle on the resulting document once parsing has finished

                                      @@ -552,7 +552,7 @@ The content of this structure is not made public by the API.

                                      xmlTextReaderXmlLang ()

                                      xmlChar *	xmlTextReaderXmlLang	(xmlTextReaderPtr reader)

                                      The xml:lang scope within which the node resides.

                                      -
                                      reader:the xmlTextReaderPtr used
                                      Returns:the xml:lang value or NULL if none exists.
                                      +
                                      reader:the xmlTextReaderPtr used
                                      Returns:the xml:lang value or NULL if none exists., if non NULL it need to be freed by the caller.

                                      diff --git a/doc/devhelp/libxml2-xmlstring.html b/doc/devhelp/libxml2-xmlstring.html index 43da9a4..6dfc70b 100644 --- a/doc/devhelp/libxml2-xmlstring.html +++ b/doc/devhelp/libxml2-xmlstring.html @@ -47,7 +47,7 @@ typedef unsigned char xmlChar; int xmlStrcmp (const xmlChar * str1,
                                      const xmlChar * str2); xmlChar * xmlCharStrndup (const char * cur,
                                      int len); -const xmlChar * xmlStrcasestr (const xmlChar * str,
                                      xmlChar * val); +const xmlChar * xmlStrcasestr (const xmlChar * str,
                                      const xmlChar * val); xmlChar * xmlStrcat (xmlChar * cur,
                                      const xmlChar * add); int xmlStrPrintf (xmlChar * buf,
                                      int len,
                                      const xmlChar * msg,
                                      ... ...); const xmlChar * xmlStrstr (const xmlChar * str,
                                      const xmlChar * val); @@ -127,7 +127,7 @@ int xmlUTF8Strloc (const
                                      str1:the first xmlChar *
                                      str2:the second xmlChar *
                                      Returns:the integer result of the comparison

                                      -

                                      xmlStrcasestr ()

                                      const xmlChar *	xmlStrcasestr		(const xmlChar * str, 
                                      xmlChar * val)
                                      +

                                      xmlStrcasestr ()

                                      const xmlChar *	xmlStrcasestr		(const xmlChar * str, 
                                      const xmlChar * val)

                                      a case-ignoring strstr for xmlChar's

                                      str:the xmlChar * array (haystack)
                                      val:the xmlChar to search (needle)
                                      Returns:the xmlChar * for the first occurrence or NULL.

                                      diff --git a/doc/devhelp/libxml2-xmlversion.html b/doc/devhelp/libxml2-xmlversion.html index 28cc5a8..8e9dc3d 100644 --- a/doc/devhelp/libxml2-xmlversion.html +++ b/doc/devhelp/libxml2-xmlversion.html @@ -44,7 +44,7 @@

                                      Synopsis

                                      #define LIBXML_VERSION_EXTRA;
                                      -#define LIBXML_DOCB_ENABLED;
                                      +#define LIBXML_MODULES_ENABLED;
                                       #define LIBXML_LEGACY_ENABLED;
                                       #define LIBXML_READER_ENABLED;
                                       #define LIBXML_THREAD_ENABLED;
                                      @@ -53,8 +53,8 @@
                                       #define LIBXML_DEBUG_ENABLED;
                                       #define LIBXML_XINCLUDE_ENABLED;
                                       #define ATTRIBUTE_UNUSED;
                                      -#define LIBXML_MODULES_ENABLED;
                                      -#define ATTRIBUTE_PRINTF;
                                      +#define LIBXML_DOCB_ENABLED;
                                      +#define LIBXML_PUSH_ENABLED;
                                       #define LIBXML_SAX1_ENABLED;
                                       #define WITHOUT_TRIO;
                                       #define LIBXML_SCHEMATRON_ENABLED;
                                      @@ -66,20 +66,20 @@
                                       #define LIBXML_XPTR_ENABLED;
                                       #define LIBXML_VERSION_STRING;
                                       #define LIBXML_CATALOG_ENABLED;
                                      +#define LIBXML_ATTR_ALLOC_SIZE;
                                       #define LIBXML_REGEXP_ENABLED;
                                       #define LIBXML_MODULE_EXTENSION;
                                       #define LIBXML_ICONV_ENABLED;
                                       #define LIBXML_HTML_ENABLED;
                                      -#define LIBXML_WRITER_ENABLED;
                                       #define LIBXML_UNICODE_ENABLED;
                                       #define LIBXML_FTP_ENABLED;
                                       #define LIBXML_AUTOMATA_ENABLED;
                                       #define LIBXML_ZLIB_ENABLED;
                                      -#define ATTRIBUTE_ALLOC_SIZE;
                                      -#define LIBXML_PUSH_ENABLED;
                                      +#define LIBXML_WRITER_ENABLED;
                                       #define LIBXML_C14N_ENABLED;
                                       #define LIBXML_SCHEMAS_ENABLED;
                                       #define DEBUG_MEMORY_LOCATION;
                                      +#define LIBXML_ATTR_FORMAT;
                                       #define LIBXML_TEST_VERSION;
                                       #define LIBXML_XPATH_ENABLED;
                                       #define LIBXML_EXPR_ENABLED;
                                      @@ -95,20 +95,20 @@ void	xmlCheckVersion			(int version);
                                           

                                      Details

                                      -

                                      Macro ATTRIBUTE_ALLOC_SIZE

                                      #define ATTRIBUTE_ALLOC_SIZE;
                                      -

                                      Macro used to indicate to GCC this is an allocator function

                                      -
                                      -
                                      -

                                      Macro ATTRIBUTE_PRINTF

                                      #define ATTRIBUTE_PRINTF;
                                      -

                                      Macro used to indicate to GCC the parameter are printf like

                                      -
                                      -

                                      Macro ATTRIBUTE_UNUSED

                                      #define ATTRIBUTE_UNUSED;
                                       

                                      Macro used to signal to GCC unused function parameters


                                      Macro DEBUG_MEMORY_LOCATION

                                      #define DEBUG_MEMORY_LOCATION;
                                       

                                      Whether the memory debugging is configured in

                                      +
                                      +
                                      +

                                      Macro LIBXML_ATTR_ALLOC_SIZE

                                      #define LIBXML_ATTR_ALLOC_SIZE;
                                      +

                                      Macro used to indicate to GCC this is an allocator function

                                      +
                                      +
                                      +

                                      Macro LIBXML_ATTR_FORMAT

                                      #define LIBXML_ATTR_FORMAT;
                                      +

                                      Macro used to indicate to GCC the parameter are printf like


                                      Macro LIBXML_AUTOMATA_ENABLED

                                      #define LIBXML_AUTOMATA_ENABLED;
                                      diff --git a/doc/devhelp/libxml2-xpathInternals.html b/doc/devhelp/libxml2-xpathInternals.html
                                      index 863d868..6200688 100644
                                      --- a/doc/devhelp/libxml2-xpathInternals.html
                                      +++ b/doc/devhelp/libxml2-xpathInternals.html
                                      @@ -663,7 +663,7 @@ void	xmlXPathDebugDumpObject		(FILE * out
                                               

                                      xmlXPathRegisterNs ()

                                      int	xmlXPathRegisterNs		(xmlXPathContextPtr ctxt, 
                                      const xmlChar * prefix,
                                      const xmlChar * ns_uri)

                                      Register a new namespace. If @ns_uri is NULL it unregisters the namespace

                                      -
                                      ctxt:the XPath context
                                      prefix:the namespace prefix
                                      ns_uri:the namespace name
                                      Returns:0 in case of success, -1 in case of error
                                      +
                                      ctxt:the XPath context
                                      prefix:the namespace prefix cannot be NULL or empty string
                                      ns_uri:the namespace name
                                      Returns:0 in case of success, -1 in case of error

                                      xmlXPathRegisterVariable ()

                                      int	xmlXPathRegisterVariable	(xmlXPathContextPtr ctxt, 
                                      const xmlChar * name,
                                      xmlXPathObjectPtr value)

                                      Register a new variable value. If @value is NULL it unregisters the variable

                                      diff --git a/doc/devhelp/libxml2.devhelp b/doc/devhelp/libxml2.devhelp index ce525af..8152979 100644 --- a/doc/devhelp/libxml2.devhelp +++ b/doc/devhelp/libxml2.devhelp @@ -52,8 +52,6 @@ - - @@ -92,6 +90,8 @@ + + @@ -343,8 +343,11 @@ + + + @@ -1559,6 +1562,7 @@ + @@ -1909,6 +1913,7 @@ + @@ -3343,6 +3348,7 @@ + diff --git a/doc/docs.html b/doc/docs.html index f548f4c..e0e2a2a 100644 --- a/doc/docs.html +++ b/doc/docs.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Developer Menu
                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                      Made with Libxml2 Logo

                                      The XML C parser and toolkit of Gnome

                                      Developer Menu

                                      Developer Menu
                                      API Indexes
                                      Related links

                                      There are several on-line resources related to using libxml:

                                      1. Use the search engine to look up +Developer Menu
                                        Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                        Made with Libxml2 Logo

                                        The XML C parser and toolkit of Gnome

                                        Developer Menu

                                        Developer Menu
                                        API Indexes
                                        Related links

                                        There are several on-line resources related to using libxml:

                                        1. Use the search engine to look up information.
                                        2. Check the FAQ.
                                        3. Check the extensive @@ -24,7 +24,7 @@ A:link, A:visited, A:active { text-decoration: underline } documentation explaining how to use the libxml SAX interface.
                                        4. George Lebl wrote an article for IBM developerWorks about using libxml.
                                        5. -
                                        6. Check the TODO +
                                        7. Check the TODO file.
                                        8. Read the 1.x to 2.x upgrade path description. If you are starting a new project using libxml you should diff --git a/doc/downloads.html b/doc/downloads.html index 4b4adfa..9fb242a 100644 --- a/doc/downloads.html +++ b/doc/downloads.html @@ -7,30 +7,30 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Downloads
                                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                          Made with Libxml2 Logo

                                          The XML C parser and toolkit of Gnome

                                          Downloads

                                          Main Menu
                                          Related links

                                          The latest versions of libxml2 can be found on the xmlsoft.org server ( FTP and rsync are available), there are also -mirrors (Australia( Web), France) or on the Gnome FTP server as source archive -, Antonin Sprinzl also provide a -mirror in Austria. (NOTE that you need both the libxml(2) and libxml(2)-devel -packages installed to compile applications using libxml.)

                                          You can find all the history of libxml(2) and libxslt releases in the old directory. The precompiled -Windows binaries made by Igor Zlatovic are available in the win32 directory.

                                          Binary ports:

                                          • Red Hat RPMs for i386 are available directly on xmlsoft.org, the source RPM will compile on - any architecture supported by Red Hat.
                                          • +Downloads
                                            Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                            Made with Libxml2 Logo

                                            The XML C parser and toolkit of Gnome

                                            Downloads

                                            Main Menu
                                            Related links

                                            The latest versions of libxml2 can be found on the xmlsoft.org server ( FTP and rsync are available), there are also +mirrors (France and +Antonin Sprinzl also provide a +mirror in Austria). (NOTE that you need both the libxml(2) and libxml(2)-devel +packages installed to compile applications using libxml if using RPMs.)

                                            You can find all the history of libxml(2) and libxslt releases in the old directory. The precompiled +Windows binaries made by Igor Zlatovic are available in the win32 directory.

                                            Binary ports:

                                            If you know other supported binary ports, please contact me.

                                            Snapshot:

                                            If you know other supported binary ports, please contact me.

                                            Snapshot:

                                            Contributions:

                                            I do accept external contributions, especially if compiling on another platform, get in touch with the list to upload the package, wrappers for -various languages have been provided, and can be found in the bindings section

                                            Libxml2 is also available from SVN:

                                            diff --git a/doc/encoding.html b/doc/encoding.html index b74ddbc..387f6f3 100644 --- a/doc/encoding.html +++ b/doc/encoding.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Encodings support
                                            Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                            Made with Libxml2 Logo

                                            The XML C parser and toolkit of Gnome

                                            Encodings support

                                            Main Menu
                                            Related links

                                            If you are not really familiar with Internationalization (usual shortcut +Encodings support
                                            Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                            Made with Libxml2 Logo

                                            The XML C parser and toolkit of Gnome

                                            Encodings support

                                            Main Menu
                                            Related links

                                            If you are not really familiar with Internationalization (usual shortcut is I18N) , Unicode, characters and glyphs, I suggest you read a presentation by Tim Bray on Unicode and why you should care about it.

                                            If you don't understand why it does not make sense to have a string without knowing what encoding it uses, then as Joel Spolsky said please do not @@ -33,7 +33,7 @@ allows the document to be encoded in other encodings at the condition that they are clearly labeled as such. For example the following is a wellformed XML document encoded in ISO-8859-1 and using accentuated letters that we French like for both markup and content:

                                            <?xml version="1.0" encoding="ISO-8859-1"?>
                                            -<très>là</très>

                                            Having internationalization support in libxml2 means the following:

                                            • the document is properly parsed
                                            • +<très>là</très>

                                              Having internationalization support in libxml2 means the following:

                                              • the document is properly parsed
                                              • information about it's encoding is saved
                                              • it can be modified
                                              • it can be saved in its original encoding
                                              • @@ -51,7 +51,7 @@ an internationalized fashion by libxml2 too:

                                                <!DOCTYPE HTML PUBLIC "-
                                                   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
                                                 </head>
                                                 <body>
                                                -<p>W3C crée des standards pour le Web.</body>
                                                +<p>W3C crée des standards pour le Web.</body>
                                                 </html>

                                                The internal encoding, how and why

                                                One of the core decisions was to force all documents to be converted to a default internal encoding, and that encoding to be UTF-8, here are the rationales for those choices:

                                                • keeping the native encoding in the internal form would force the libxml @@ -107,10 +107,10 @@ sequence:

                                                  1. when a document is processed, we usually don't know the enc You may end-up with a garbled document, or no document at all ! Example:
                                                    ~/XML -> ./xmllint err.xml 
                                                     err.xml:1: error: Input is not proper UTF-8, indicate encoding !
                                                    -<très>là</très>
                                                    +<très>là</très>
                                                        ^
                                                     err.xml:1: error: Bytes: 0xE8 0x73 0x3E 0x6C
                                                    -<très>là</très>
                                                    +<très>là</très>
                                                        ^
                                                  2. xmlSwitchEncoding() does an encoding name lookup, canonicalize it, and @@ -163,10 +163,10 @@ encoding:

                                                    1. if no encoding is given, libxml2 will look for an encoding portability is really crucial

                                                    Here are a few examples based on the same test document:

                                                    ~/XML -> ./xmllint isolat1 
                                                     <?xml version="1.0" encoding="ISO-8859-1"?>
                                                    -<très>là</très>
                                                    +<très>là</très>
                                                     ~/XML -> ./xmllint --encode UTF-8 isolat1 
                                                     <?xml version="1.0" encoding="UTF-8"?>
                                                    -<très>là  </très>
                                                    +<très>là  </très>
                                                     ~/XML -> 

                                                    The same processing is applied (and reuse most of the code) for HTML I18N processing. Looking up and modifying the content encoding is a bit more difficult since it is located in a <meta> tag under the <head>, diff --git a/doc/entities.html b/doc/entities.html index 37bb4de..dc4cfaf 100644 --- a/doc/entities.html +++ b/doc/entities.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Entities or no entities
                                                    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                    Made with Libxml2 Logo

                                                    The XML C parser and toolkit of Gnome

                                                    Entities or no entities

                                                    Developer Menu
                                                    API Indexes
                                                    Related links

                                                    Entities in principle are similar to simple C macros. An entity defines an +Entities or no entities
                                                    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                    Made with Libxml2 Logo

                                                    The XML C parser and toolkit of Gnome

                                                    Entities or no entities

                                                    Developer Menu
                                                    API Indexes
                                                    Related links

                                                    Entities in principle are similar to simple C macros. An entity defines an abbreviation for a given string that you can reuse many times throughout the content of your document. Entities are especially useful when a given string may occur frequently within a document, or to confine the change needed to a diff --git a/doc/example.html b/doc/example.html index 533b6a8..20b690a 100644 --- a/doc/example.html +++ b/doc/example.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -A real example
                                                    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                    Made with Libxml2 Logo

                                                    The XML C parser and toolkit of Gnome

                                                    A real example

                                                    Developer Menu
                                                    API Indexes
                                                    Related links

                                                    Here is a real size example, where the actual content of the application +A real example
                                                    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                    Made with Libxml2 Logo

                                                    The XML C parser and toolkit of Gnome

                                                    A real example

                                                    Developer Menu
                                                    API Indexes
                                                    Related links

                                                    Here is a real size example, where the actual content of the application data is not kept in the DOM tree but uses internal structures. It is based on a proposal to keep a database of jobs related to Gnome, with an XML based storage structure. Here is an XML encoded jobs diff --git a/doc/examples/Makefile.in b/doc/examples/Makefile.in index b0b8f95..4476e08 100644 --- a/doc/examples/Makefile.in +++ b/doc/examples/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @@ -16,8 +17,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -47,6 +49,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_io1_OBJECTS = io1.$(OBJEXT) io1_OBJECTS = $(am_io1_OBJECTS) @@ -128,6 +131,7 @@ xpath2_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ @@ -166,10 +170,6 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@ @@ -178,14 +178,14 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOCB_OBJ = @DOCB_OBJ@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FTP_OBJ = @FTP_OBJ@ GREP = @GREP@ HAVE_ISINF = @HAVE_ISINF@ @@ -199,6 +199,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -210,6 +211,7 @@ LIBXML_VERSION = @LIBXML_VERSION@ LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@ LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@ LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ @@ -218,8 +220,12 @@ MODULE_EXTENSION = @MODULE_EXTENSION@ MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@ MV = @MV@ M_LIBS = @M_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -268,6 +274,7 @@ THREAD_CFLAGS = @THREAD_CFLAGS@ THREAD_LIBS = @THREAD_LIBS@ U = @U@ VERSION = @VERSION@ +VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@ WGET = @WGET@ WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@ WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@ @@ -318,8 +325,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -350,6 +356,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -363,6 +370,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @@ -439,14 +447,14 @@ $(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; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/examples/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu doc/examples/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/examples/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu doc/examples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -464,13 +472,16 @@ $(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 +$(am__aclocal_m4_deps): 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 + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list io1$(EXEEXT): $(io1_OBJECTS) $(io1_DEPENDENCIES) @rm -f io1$(EXEEXT) $(io1_LINK) $(io1_OBJECTS) $(io1_LDADD) $(LIBS) @@ -541,21 +552,21 @@ distclean-compile: .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -571,14 +582,14 @@ ID: $(HEADERS) $(SOURCES) $(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; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -586,29 +597,34 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -629,13 +645,17 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -663,6 +683,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -684,6 +705,8 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: @@ -692,18 +715,28 @@ install-data-am: install-data-local install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -791,6 +824,7 @@ tests: $(noinst_PROGRAMS) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/doc/examples/io2.c b/doc/examples/io2.c index 2659ef1..814a27e 100644 --- a/doc/examples/io2.c +++ b/doc/examples/io2.c @@ -34,7 +34,7 @@ main(void) * for demonstration purposes. */ xmlDocDumpFormatMemory(doc, &xmlbuff, &buffersize, 1); - printf((char *) xmlbuff); + printf("%s", (char *) xmlbuff); /* * Free associated memory. diff --git a/doc/guidelines.html b/doc/guidelines.html index 06f9692..af4a7b3 100644 --- a/doc/guidelines.html +++ b/doc/guidelines.html @@ -367,7 +367,7 @@ ensure a smooth evolution of the resource and instances.

                                                    Daniel Veillard

                                                    -

                                                    $Id: guidelines.html 2912 2004-12-26 21:01:48Z veillard $

                                                    +

                                                    $Id$

                                                    diff --git a/doc/help.html b/doc/help.html index ff0c36c..edd65fe 100644 --- a/doc/help.html +++ b/doc/help.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -How to help
                                                    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                    Made with Libxml2 Logo

                                                    The XML C parser and toolkit of Gnome

                                                    How to help

                                                    Main Menu
                                                    Related links

                                                    You can help the project in various ways, the best thing to do first is to +How to help
                                                    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                    Made with Libxml2 Logo

                                                    The XML C parser and toolkit of Gnome

                                                    How to help

                                                    Main Menu
                                                    Related links

                                                    You can help the project in various ways, the best thing to do first is to subscribe to the mailing-list as explained before, check the archives and the Gnome bug database:

                                                    1. Provide patches when you find problems.
                                                    2. Provide the diffs when you port libxml2 to a new platform. They may not diff --git a/doc/html/book1.html b/doc/html/book1.html index 70263a1..62d98d1 100644 --- a/doc/html/book1.html +++ b/doc/html/book1.html @@ -10,4 +10,4 @@ A:link, A:visited, A:active { text-decoration: underline } Reference Manual for libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Reference Manual for libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      Table of Contents

                                                      • DOCBparser: old DocBook SGML parser
                                                      • HTMLparser: interface for an HTML 4.0 non-verifying parser
                                                      • HTMLtree: specific APIs to process HTML tree, especially serialization
                                                      • SAX: Old SAX version 1 handler, deprecated
                                                      • SAX2: SAX2 parser interface used to build the DOM tree
                                                      • c14n: Provide Canonical XML and Exclusive XML Canonicalization
                                                      • catalog: interfaces to the Catalog handling system
                                                      • chvalid: Unicode character range checking
                                                      • debugXML: Tree debugging APIs
                                                      • dict: string dictionnary
                                                      • encoding: interface for the encoding conversion functions
                                                      • entities: interface for the XML entities handling
                                                      • globals: interface for all global variables of the library
                                                      • hash: Chained hash tables
                                                      • list: lists interfaces
                                                      • nanoftp: minimal FTP implementation
                                                      • nanohttp: minimal HTTP implementation
                                                      • parser: the core parser module
                                                      • parserInternals: internals routines exported by the parser.
                                                      • pattern: pattern expression handling
                                                      • relaxng: implementation of the Relax-NG validation
                                                      • schemasInternals: internal interfaces for XML Schemas
                                                      • schematron: XML Schemastron implementation
                                                      • threads: interfaces for thread handling
                                                      • tree: interfaces for tree manipulation
                                                      • uri: library of generic URI related routines
                                                      • valid: The DTD validation
                                                      • xinclude: implementation of XInclude
                                                      • xlink: unfinished XLink detection module
                                                      • xmlIO: interface for the I/O interfaces used by the parser
                                                      • xmlautomata: API to build regexp automata
                                                      • xmlerror: error handling
                                                      • xmlexports: macros for marking symbols as exportable/importable.
                                                      • xmlmemory: interface for the memory allocator
                                                      • xmlmodule: dynamic module loading
                                                      • xmlreader: the XMLReader implementation
                                                      • xmlregexp: regular expressions handling
                                                      • xmlsave: the XML document serializer
                                                      • xmlschemas: incomplete XML Schemas structure implementation
                                                      • xmlschemastypes: implementation of XML Schema Datatypes
                                                      • xmlstring: set of routines to process strings
                                                      • xmlunicode: Unicode character APIs
                                                      • xmlversion: compile-time version informations
                                                      • xmlwriter: text writing API for XML
                                                      • xpath: XML Path Language implementation
                                                      • xpathInternals: internal interfaces for XML Path Language implementation
                                                      • xpointer: API to handle XML Pointers

                                                      Daniel Veillard

                                                      + Reference Manual for libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Reference Manual for libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      Table of Contents

                                                      • DOCBparser: old DocBook SGML parser
                                                      • HTMLparser: interface for an HTML 4.0 non-verifying parser
                                                      • HTMLtree: specific APIs to process HTML tree, especially serialization
                                                      • SAX: Old SAX version 1 handler, deprecated
                                                      • SAX2: SAX2 parser interface used to build the DOM tree
                                                      • c14n: Provide Canonical XML and Exclusive XML Canonicalization
                                                      • catalog: interfaces to the Catalog handling system
                                                      • chvalid: Unicode character range checking
                                                      • debugXML: Tree debugging APIs
                                                      • dict: string dictionnary
                                                      • encoding: interface for the encoding conversion functions
                                                      • entities: interface for the XML entities handling
                                                      • globals: interface for all global variables of the library
                                                      • hash: Chained hash tables
                                                      • list: lists interfaces
                                                      • nanoftp: minimal FTP implementation
                                                      • nanohttp: minimal HTTP implementation
                                                      • parser: the core parser module
                                                      • parserInternals: internals routines exported by the parser.
                                                      • pattern: pattern expression handling
                                                      • relaxng: implementation of the Relax-NG validation
                                                      • schemasInternals: internal interfaces for XML Schemas
                                                      • schematron: XML Schemastron implementation
                                                      • threads: interfaces for thread handling
                                                      • tree: interfaces for tree manipulation
                                                      • uri: library of generic URI related routines
                                                      • valid: The DTD validation
                                                      • xinclude: implementation of XInclude
                                                      • xlink: unfinished XLink detection module
                                                      • xmlIO: interface for the I/O interfaces used by the parser
                                                      • xmlautomata: API to build regexp automata
                                                      • xmlerror: error handling
                                                      • xmlexports: macros for marking symbols as exportable/importable.
                                                      • xmlmemory: interface for the memory allocator
                                                      • xmlmodule: dynamic module loading
                                                      • xmlreader: the XMLReader implementation
                                                      • xmlregexp: regular expressions handling
                                                      • xmlsave: the XML document serializer
                                                      • xmlschemas: incomplete XML Schemas structure implementation
                                                      • xmlschemastypes: implementation of XML Schema Datatypes
                                                      • xmlstring: set of routines to process strings
                                                      • xmlunicode: Unicode character APIs
                                                      • xmlversion: compile-time version informations
                                                      • xmlwriter: text writing API for XML
                                                      • xpath: XML Path Language implementation
                                                      • xpathInternals: internal interfaces for XML Path Language implementation
                                                      • xpointer: API to handle XML Pointers

                                                      Daniel Veillard

                                                      diff --git a/doc/html/index.html b/doc/html/index.html index 70263a1..62d98d1 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -10,4 +10,4 @@ A:link, A:visited, A:active { text-decoration: underline } Reference Manual for libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Reference Manual for libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      Table of Contents

                                                      • DOCBparser: old DocBook SGML parser
                                                      • HTMLparser: interface for an HTML 4.0 non-verifying parser
                                                      • HTMLtree: specific APIs to process HTML tree, especially serialization
                                                      • SAX: Old SAX version 1 handler, deprecated
                                                      • SAX2: SAX2 parser interface used to build the DOM tree
                                                      • c14n: Provide Canonical XML and Exclusive XML Canonicalization
                                                      • catalog: interfaces to the Catalog handling system
                                                      • chvalid: Unicode character range checking
                                                      • debugXML: Tree debugging APIs
                                                      • dict: string dictionnary
                                                      • encoding: interface for the encoding conversion functions
                                                      • entities: interface for the XML entities handling
                                                      • globals: interface for all global variables of the library
                                                      • hash: Chained hash tables
                                                      • list: lists interfaces
                                                      • nanoftp: minimal FTP implementation
                                                      • nanohttp: minimal HTTP implementation
                                                      • parser: the core parser module
                                                      • parserInternals: internals routines exported by the parser.
                                                      • pattern: pattern expression handling
                                                      • relaxng: implementation of the Relax-NG validation
                                                      • schemasInternals: internal interfaces for XML Schemas
                                                      • schematron: XML Schemastron implementation
                                                      • threads: interfaces for thread handling
                                                      • tree: interfaces for tree manipulation
                                                      • uri: library of generic URI related routines
                                                      • valid: The DTD validation
                                                      • xinclude: implementation of XInclude
                                                      • xlink: unfinished XLink detection module
                                                      • xmlIO: interface for the I/O interfaces used by the parser
                                                      • xmlautomata: API to build regexp automata
                                                      • xmlerror: error handling
                                                      • xmlexports: macros for marking symbols as exportable/importable.
                                                      • xmlmemory: interface for the memory allocator
                                                      • xmlmodule: dynamic module loading
                                                      • xmlreader: the XMLReader implementation
                                                      • xmlregexp: regular expressions handling
                                                      • xmlsave: the XML document serializer
                                                      • xmlschemas: incomplete XML Schemas structure implementation
                                                      • xmlschemastypes: implementation of XML Schema Datatypes
                                                      • xmlstring: set of routines to process strings
                                                      • xmlunicode: Unicode character APIs
                                                      • xmlversion: compile-time version informations
                                                      • xmlwriter: text writing API for XML
                                                      • xpath: XML Path Language implementation
                                                      • xpathInternals: internal interfaces for XML Path Language implementation
                                                      • xpointer: API to handle XML Pointers

                                                      Daniel Veillard

                                                      + Reference Manual for libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Reference Manual for libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      Table of Contents

                                                      • DOCBparser: old DocBook SGML parser
                                                      • HTMLparser: interface for an HTML 4.0 non-verifying parser
                                                      • HTMLtree: specific APIs to process HTML tree, especially serialization
                                                      • SAX: Old SAX version 1 handler, deprecated
                                                      • SAX2: SAX2 parser interface used to build the DOM tree
                                                      • c14n: Provide Canonical XML and Exclusive XML Canonicalization
                                                      • catalog: interfaces to the Catalog handling system
                                                      • chvalid: Unicode character range checking
                                                      • debugXML: Tree debugging APIs
                                                      • dict: string dictionnary
                                                      • encoding: interface for the encoding conversion functions
                                                      • entities: interface for the XML entities handling
                                                      • globals: interface for all global variables of the library
                                                      • hash: Chained hash tables
                                                      • list: lists interfaces
                                                      • nanoftp: minimal FTP implementation
                                                      • nanohttp: minimal HTTP implementation
                                                      • parser: the core parser module
                                                      • parserInternals: internals routines exported by the parser.
                                                      • pattern: pattern expression handling
                                                      • relaxng: implementation of the Relax-NG validation
                                                      • schemasInternals: internal interfaces for XML Schemas
                                                      • schematron: XML Schemastron implementation
                                                      • threads: interfaces for thread handling
                                                      • tree: interfaces for tree manipulation
                                                      • uri: library of generic URI related routines
                                                      • valid: The DTD validation
                                                      • xinclude: implementation of XInclude
                                                      • xlink: unfinished XLink detection module
                                                      • xmlIO: interface for the I/O interfaces used by the parser
                                                      • xmlautomata: API to build regexp automata
                                                      • xmlerror: error handling
                                                      • xmlexports: macros for marking symbols as exportable/importable.
                                                      • xmlmemory: interface for the memory allocator
                                                      • xmlmodule: dynamic module loading
                                                      • xmlreader: the XMLReader implementation
                                                      • xmlregexp: regular expressions handling
                                                      • xmlsave: the XML document serializer
                                                      • xmlschemas: incomplete XML Schemas structure implementation
                                                      • xmlschemastypes: implementation of XML Schema Datatypes
                                                      • xmlstring: set of routines to process strings
                                                      • xmlunicode: Unicode character APIs
                                                      • xmlversion: compile-time version informations
                                                      • xmlwriter: text writing API for XML
                                                      • xpath: XML Path Language implementation
                                                      • xpathInternals: internal interfaces for XML Path Language implementation
                                                      • xpointer: API to handle XML Pointers

                                                      Daniel Veillard

                                                      diff --git a/doc/html/libxml-DOCBparser.html b/doc/html/libxml-DOCBparser.html index bb3ef1c..899d02d 100644 --- a/doc/html/libxml-DOCBparser.html +++ b/doc/html/libxml-DOCBparser.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module DOCBparser from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module DOCBparser from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      This module is deprecated

                                                      interface for a DocBook SGML non-verifying parser This code is DEPRECATED, and should not be used anymore.

                                                      Table of Contents

                                                      Typedef xmlParserInputPtr docbParserInputPtr
                                                      +    Module DOCBparser from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module DOCBparser from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      This module is deprecated

                                                      interface for a DocBook SGML non-verifying parser This code is DEPRECATED, and should not be used anymore.

                                                      Table of Contents

                                                      Typedef xmlParserInputPtr docbParserInputPtr
                                                       
                                                      Typedef xmlParserCtxt docbParserCtxt
                                                       
                                                      Typedef xmlParserCtxtPtr docbParserCtxtPtr
                                                       
                                                      Typedef xmlParserInput docbParserInput
                                                      diff --git a/doc/html/libxml-HTMLparser.html b/doc/html/libxml-HTMLparser.html
                                                      index 7034fe0..0bc7dbd 100644
                                                      --- a/doc/html/libxml-HTMLparser.html
                                                      +++ b/doc/html/libxml-HTMLparser.html
                                                      @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline }
                                                       Module HTMLparser from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module HTMLparser from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      this module implements an HTML 4.0 non-verifying parser with API compatible with the XML parser ones. It should be able to parse "real world" HTML, even if severely broken from a specification point of view.

                                                      Table of Contents

                                                      #define htmlDefaultSubelement
                                                      #define htmlElementAllowedHereDesc
                                                      #define htmlRequiredAttrs
                                                      Typedef xmlDocPtr htmlDocPtr
                                                      +    Module HTMLparser from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module HTMLparser from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      this module implements an HTML 4.0 non-verifying parser with API compatible with the XML parser ones. It should be able to parse "real world" HTML, even if severely broken from a specification point of view.

                                                      Table of Contents

                                                      #define htmlDefaultSubelement
                                                      #define htmlElementAllowedHereDesc
                                                      #define htmlRequiredAttrs
                                                      Typedef xmlDocPtr htmlDocPtr
                                                       
                                                      Structure htmlElemDesc
                                                      struct _htmlElemDesc
                                                      Typedef htmlElemDesc * htmlElemDescPtr
                                                       
                                                      Structure htmlEntityDesc
                                                      struct _htmlEntityDesc diff --git a/doc/html/libxml-HTMLtree.html b/doc/html/libxml-HTMLtree.html index a2270e0..a26d588 100644 --- a/doc/html/libxml-HTMLtree.html +++ b/doc/html/libxml-HTMLtree.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module HTMLtree from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module HTMLtree from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      this module implements a few function needed to process tree in an HTML specific way.

                                                      Table of Contents

                                                      #define HTML_COMMENT_NODE
                                                      #define HTML_ENTITY_REF_NODE
                                                      #define HTML_PI_NODE
                                                      #define HTML_PRESERVE_NODE
                                                      #define HTML_TEXT_NODE
                                                      void	htmlDocContentDumpFormatOutput	(xmlOutputBufferPtr buf, 
                                                      xmlDocPtr cur,
                                                      const char * encoding,
                                                      int format)
                                                      + Module HTMLtree from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module HTMLtree from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      this module implements a few function needed to process tree in an HTML specific way.

                                                      Table of Contents

                                                      #define HTML_COMMENT_NODE
                                                      #define HTML_ENTITY_REF_NODE
                                                      #define HTML_PI_NODE
                                                      #define HTML_PRESERVE_NODE
                                                      #define HTML_TEXT_NODE
                                                      void	htmlDocContentDumpFormatOutput	(xmlOutputBufferPtr buf, 
                                                      xmlDocPtr cur,
                                                      const char * encoding,
                                                      int format)
                                                      void	htmlDocContentDumpOutput	(xmlOutputBufferPtr buf, 
                                                      xmlDocPtr cur,
                                                      const char * encoding)
                                                      int	htmlDocDump			(FILE * f, 
                                                      xmlDocPtr cur)
                                                      void	htmlDocDumpMemory		(xmlDocPtr cur, 
                                                      xmlChar ** mem,
                                                      int * size)
                                                      diff --git a/doc/html/libxml-SAX.html b/doc/html/libxml-SAX.html index 746c55b..461b882 100644 --- a/doc/html/libxml-SAX.html +++ b/doc/html/libxml-SAX.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module SAX from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module SAX from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      This module is deprecated

                                                      DEPRECATED set of SAX version 1 interfaces used to build the DOM tree.

                                                      Table of Contents

                                                      void	comment			(void * ctx, 
                                                      const xmlChar * value)
                                                      + Module SAX from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module SAX from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      This module is deprecated

                                                      DEPRECATED set of SAX version 1 interfaces used to build the DOM tree.

                                                      Table of Contents

                                                      void	comment			(void * ctx, 
                                                      const xmlChar * value)
                                                      int	checkNamespace			(void * ctx, 
                                                      xmlChar * namespace)
                                                      int	getColumnNumber			(void * ctx)
                                                      void	entityDecl			(void * ctx, 
                                                      const xmlChar * name,
                                                      int type,
                                                      const xmlChar * publicId,
                                                      const xmlChar * systemId,
                                                      xmlChar * content)
                                                      diff --git a/doc/html/libxml-SAX2.html b/doc/html/libxml-SAX2.html index 02fdad1..478d0bf 100644 --- a/doc/html/libxml-SAX2.html +++ b/doc/html/libxml-SAX2.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module SAX2 from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module SAX2 from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      those are the default SAX2 interfaces used by the library when building DOM tree.

                                                      Table of Contents

                                                      void	docbDefaultSAXHandlerInit	(void)
                                                      + Module SAX2 from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module SAX2 from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      those are the default SAX2 interfaces used by the library when building DOM tree.

                                                      Table of Contents

                                                      void	docbDefaultSAXHandlerInit	(void)
                                                      void	htmlDefaultSAXHandlerInit	(void)
                                                      void	xmlDefaultSAXHandlerInit	(void)
                                                      void	xmlSAX2AttributeDecl		(void * ctx, 
                                                      const xmlChar * elem,
                                                      const xmlChar * fullname,
                                                      int type,
                                                      int def,
                                                      const xmlChar * defaultValue,
                                                      xmlEnumerationPtr tree)
                                                      diff --git a/doc/html/libxml-c14n.html b/doc/html/libxml-c14n.html index dfcb9c5..1eff22d 100644 --- a/doc/html/libxml-c14n.html +++ b/doc/html/libxml-c14n.html @@ -10,23 +10,29 @@ A:link, A:visited, A:active { text-decoration: underline } Module c14n from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module c14n from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      the c14n modules provides a "Canonical XML" implementation

                                                      Table of Contents

                                                      int	xmlC14NDocDumpMemory		(xmlDocPtr doc, 
                                                      xmlNodeSetPtr nodes,
                                                      int exclusive,
                                                      xmlChar ** inclusive_ns_prefixes,
                                                      int with_comments,
                                                      xmlChar ** doc_txt_ptr)
                                                      -
                                                      int	xmlC14NDocSave			(xmlDocPtr doc, 
                                                      xmlNodeSetPtr nodes,
                                                      int exclusive,
                                                      xmlChar ** inclusive_ns_prefixes,
                                                      int with_comments,
                                                      const char * filename,
                                                      int compression)
                                                      -
                                                      int	xmlC14NDocSaveTo		(xmlDocPtr doc, 
                                                      xmlNodeSetPtr nodes,
                                                      int exclusive,
                                                      xmlChar ** inclusive_ns_prefixes,
                                                      int with_comments,
                                                      xmlOutputBufferPtr buf)
                                                      -
                                                      int	xmlC14NExecute			(xmlDocPtr doc, 
                                                      xmlC14NIsVisibleCallback is_visible_callback,
                                                      void * user_data,
                                                      int exclusive,
                                                      xmlChar ** inclusive_ns_prefixes,
                                                      int with_comments,
                                                      xmlOutputBufferPtr buf)
                                                      + Module c14n from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module c14n from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      the c14n modules provides a "Canonical XML" implementation

                                                      Table of Contents

                                                      Enum xmlC14NMode
                                                      +
                                                      int	xmlC14NDocDumpMemory		(xmlDocPtr doc, 
                                                      xmlNodeSetPtr nodes,
                                                      int mode,
                                                      xmlChar ** inclusive_ns_prefixes,
                                                      int with_comments,
                                                      xmlChar ** doc_txt_ptr)
                                                      +
                                                      int	xmlC14NDocSave			(xmlDocPtr doc, 
                                                      xmlNodeSetPtr nodes,
                                                      int mode,
                                                      xmlChar ** inclusive_ns_prefixes,
                                                      int with_comments,
                                                      const char * filename,
                                                      int compression)
                                                      +
                                                      int	xmlC14NDocSaveTo		(xmlDocPtr doc, 
                                                      xmlNodeSetPtr nodes,
                                                      int mode,
                                                      xmlChar ** inclusive_ns_prefixes,
                                                      int with_comments,
                                                      xmlOutputBufferPtr buf)
                                                      +
                                                      int	xmlC14NExecute			(xmlDocPtr doc, 
                                                      xmlC14NIsVisibleCallback is_visible_callback,
                                                      void * user_data,
                                                      int mode,
                                                      xmlChar ** inclusive_ns_prefixes,
                                                      int with_comments,
                                                      xmlOutputBufferPtr buf)
                                                      Function type: xmlC14NIsVisibleCallback
                                                       int	xmlC14NIsVisibleCallback	(void * user_data, 
                                                      xmlNodePtr node,
                                                      xmlNodePtr parent)

                                                      Description

                                                      -

                                                      Function: xmlC14NDocDumpMemory

                                                      int	xmlC14NDocDumpMemory		(xmlDocPtr doc, 
                                                      xmlNodeSetPtr nodes,
                                                      int exclusive,
                                                      xmlChar ** inclusive_ns_prefixes,
                                                      int with_comments,
                                                      xmlChar ** doc_txt_ptr)
                                                      +

                                                      Enum xmlC14NMode

                                                      Enum xmlC14NMode {
                                                      +    XML_C14N_1_0 = 0 : Origianal C14N 1.0 spec
                                                      +    XML_C14N_EXCLUSIVE_1_0 = 1 : Exclusive C14N 1.0 spec
                                                      +    XML_C14N_1_1 = 2 : C14N 1.1 spec
                                                      +}
                                                      +

                                                      Function: xmlC14NDocDumpMemory

                                                      int	xmlC14NDocDumpMemory		(xmlDocPtr doc, 
                                                      xmlNodeSetPtr nodes,
                                                      int mode,
                                                      xmlChar ** inclusive_ns_prefixes,
                                                      int with_comments,
                                                      xmlChar ** doc_txt_ptr)

                                                      Dumps the canonized image of given XML document into memory. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)

                                                      -
                                                      doc:the XML document for canonization
                                                      nodes:the nodes set to be included in the canonized image or NULL if all document nodes should be included
                                                      exclusive:the exclusive flag (0 - non-exclusive canonicalization; otherwise - exclusive canonicalization)
                                                      inclusive_ns_prefixes:the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
                                                      with_comments:include comments in the result (!=0) or not (==0)
                                                      doc_txt_ptr:the memory pointer for allocated canonical XML text; the caller of this functions is responsible for calling xmlFree() to free allocated memory
                                                      Returns:the number of bytes written on success or a negative value on fail

                                                      Function: xmlC14NDocSave

                                                      int	xmlC14NDocSave			(xmlDocPtr doc, 
                                                      xmlNodeSetPtr nodes,
                                                      int exclusive,
                                                      xmlChar ** inclusive_ns_prefixes,
                                                      int with_comments,
                                                      const char * filename,
                                                      int compression)
                                                      +
                                                      doc:the XML document for canonization
                                                      nodes:the nodes set to be included in the canonized image or NULL if all document nodes should be included
                                                      mode:the c14n mode (see @xmlC14NMode)
                                                      inclusive_ns_prefixes:the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
                                                      with_comments:include comments in the result (!=0) or not (==0)
                                                      doc_txt_ptr:the memory pointer for allocated canonical XML text; the caller of this functions is responsible for calling xmlFree() to free allocated memory
                                                      Returns:the number of bytes written on success or a negative value on fail

                                                      Function: xmlC14NDocSave

                                                      int	xmlC14NDocSave			(xmlDocPtr doc, 
                                                      xmlNodeSetPtr nodes,
                                                      int mode,
                                                      xmlChar ** inclusive_ns_prefixes,
                                                      int with_comments,
                                                      const char * filename,
                                                      int compression)

                                                      Dumps the canonized image of given XML document into the file. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)

                                                      -
                                                      doc:the XML document for canonization
                                                      nodes:the nodes set to be included in the canonized image or NULL if all document nodes should be included
                                                      exclusive:the exclusive flag (0 - non-exclusive canonicalization; otherwise - exclusive canonicalization)
                                                      inclusive_ns_prefixes:the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
                                                      with_comments:include comments in the result (!=0) or not (==0)
                                                      filename:the filename to store canonical XML image
                                                      compression:the compression level (zlib requred): -1 - libxml default, 0 - uncompressed, >0 - compression level
                                                      Returns:the number of bytes written success or a negative value on fail

                                                      Function: xmlC14NDocSaveTo

                                                      int	xmlC14NDocSaveTo		(xmlDocPtr doc, 
                                                      xmlNodeSetPtr nodes,
                                                      int exclusive,
                                                      xmlChar ** inclusive_ns_prefixes,
                                                      int with_comments,
                                                      xmlOutputBufferPtr buf)
                                                      +
                                                      doc:the XML document for canonization
                                                      nodes:the nodes set to be included in the canonized image or NULL if all document nodes should be included
                                                      mode:the c14n mode (see @xmlC14NMode)
                                                      inclusive_ns_prefixes:the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
                                                      with_comments:include comments in the result (!=0) or not (==0)
                                                      filename:the filename to store canonical XML image
                                                      compression:the compression level (zlib requred): -1 - libxml default, 0 - uncompressed, >0 - compression level
                                                      Returns:the number of bytes written success or a negative value on fail

                                                      Function: xmlC14NDocSaveTo

                                                      int	xmlC14NDocSaveTo		(xmlDocPtr doc, 
                                                      xmlNodeSetPtr nodes,
                                                      int mode,
                                                      xmlChar ** inclusive_ns_prefixes,
                                                      int with_comments,
                                                      xmlOutputBufferPtr buf)

                                                      Dumps the canonized image of given XML document into the provided buffer. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)

                                                      -
                                                      doc:the XML document for canonization
                                                      nodes:the nodes set to be included in the canonized image or NULL if all document nodes should be included
                                                      exclusive:the exclusive flag (0 - non-exclusive canonicalization; otherwise - exclusive canonicalization)
                                                      inclusive_ns_prefixes:the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
                                                      with_comments:include comments in the result (!=0) or not (==0)
                                                      buf:the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output
                                                      Returns:non-negative value on success or a negative value on fail

                                                      Function: xmlC14NExecute

                                                      int	xmlC14NExecute			(xmlDocPtr doc, 
                                                      xmlC14NIsVisibleCallback is_visible_callback,
                                                      void * user_data,
                                                      int exclusive,
                                                      xmlChar ** inclusive_ns_prefixes,
                                                      int with_comments,
                                                      xmlOutputBufferPtr buf)
                                                      +
                                                      doc:the XML document for canonization
                                                      nodes:the nodes set to be included in the canonized image or NULL if all document nodes should be included
                                                      mode:the c14n mode (see @xmlC14NMode)
                                                      inclusive_ns_prefixes:the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
                                                      with_comments:include comments in the result (!=0) or not (==0)
                                                      buf:the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output
                                                      Returns:non-negative value on success or a negative value on fail

                                                      Function: xmlC14NExecute

                                                      int	xmlC14NExecute			(xmlDocPtr doc, 
                                                      xmlC14NIsVisibleCallback is_visible_callback,
                                                      void * user_data,
                                                      int mode,
                                                      xmlChar ** inclusive_ns_prefixes,
                                                      int with_comments,
                                                      xmlOutputBufferPtr buf)

                                                      Dumps the canonized image of given XML document into the provided buffer. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)

                                                      -
                                                      doc:the XML document for canonization
                                                      is_visible_callback:the function to use to determine is node visible or not
                                                      user_data:the first parameter for @is_visible_callback function (in most cases, it is nodes set)
                                                      exclusive:the exclusive flag (0 - non-exclusive canonicalization; otherwise - exclusive canonicalization)
                                                      inclusive_ns_prefixes:the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
                                                      with_comments:include comments in the result (!=0) or not (==0)
                                                      buf:the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output
                                                      Returns:non-negative value on success or a negative value on fail

                                                      Function type: xmlC14NIsVisibleCallback

                                                      Function type: xmlC14NIsVisibleCallback
                                                      +
                                                      doc:the XML document for canonization
                                                      is_visible_callback:the function to use to determine is node visible or not
                                                      user_data:the first parameter for @is_visible_callback function (in most cases, it is nodes set)
                                                      mode:the c14n mode (see @xmlC14NMode)
                                                      inclusive_ns_prefixes:the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
                                                      with_comments:include comments in the result (!=0) or not (==0)
                                                      buf:the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output
                                                      Returns:non-negative value on success or a negative value on fail

                                                      Function type: xmlC14NIsVisibleCallback

                                                      Function type: xmlC14NIsVisibleCallback
                                                       int	xmlC14NIsVisibleCallback	(void * user_data, 
                                                      xmlNodePtr node,
                                                      xmlNodePtr parent)

                                                      Signature for a C14N callback on visible nodes

                                                      user_data:user data
                                                      node:the curent node
                                                      parent:the parent node
                                                      Returns:1 if the node should be included

                                                      Daniel Veillard

                                                      diff --git a/doc/html/libxml-catalog.html b/doc/html/libxml-catalog.html index 9a58bbf..da5b85c 100644 --- a/doc/html/libxml-catalog.html +++ b/doc/html/libxml-catalog.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module catalog from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module catalog from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      the catalog module implements the support for XML Catalogs and SGML catalogs

                                                      Table of Contents

                                                      #define XML_CATALOGS_NAMESPACE
                                                      #define XML_CATALOG_PI
                                                      Structure xmlCatalog
                                                      struct _xmlCatalog + Module catalog from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module catalog from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      the catalog module implements the support for XML Catalogs and SGML catalogs

                                                      Table of Contents

                                                      #define XML_CATALOGS_NAMESPACE
                                                      #define XML_CATALOG_PI
                                                      Structure xmlCatalog
                                                      struct _xmlCatalog The content of this structure is not made public by the API.
                                                      Enum xmlCatalogAllow
                                                       
                                                      Enum xmlCatalogPrefer
                                                      diff --git a/doc/html/libxml-chvalid.html b/doc/html/libxml-chvalid.html
                                                      index 4b1ebf1..5fd107e 100644
                                                      --- a/doc/html/libxml-chvalid.html
                                                      +++ b/doc/html/libxml-chvalid.html
                                                      @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline }
                                                       Module chvalid from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module chvalid from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      this module exports interfaces for the character range validation APIs This file is automatically generated from the cvs source definition files using the genChRanges.py Python script

                                                      Table of Contents

                                                      #define xmlIsBaseCharQ
                                                      #define xmlIsBaseChar_ch
                                                      #define xmlIsBlankQ
                                                      #define xmlIsBlank_ch
                                                      #define xmlIsCharQ
                                                      #define xmlIsChar_ch
                                                      #define xmlIsCombiningQ
                                                      #define xmlIsDigitQ
                                                      #define xmlIsDigit_ch
                                                      #define xmlIsExtenderQ
                                                      #define xmlIsExtender_ch
                                                      #define xmlIsIdeographicQ
                                                      #define xmlIsPubidCharQ
                                                      #define xmlIsPubidChar_ch
                                                      Structure xmlChLRange
                                                      struct _xmlChLRange + Module chvalid from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module chvalid from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      this module exports interfaces for the character range validation APIs This file is automatically generated from the cvs source definition files using the genChRanges.py Python script

                                                      Table of Contents

                                                      #define xmlIsBaseCharQ
                                                      #define xmlIsBaseChar_ch
                                                      #define xmlIsBlankQ
                                                      #define xmlIsBlank_ch
                                                      #define xmlIsCharQ
                                                      #define xmlIsChar_ch
                                                      #define xmlIsCombiningQ
                                                      #define xmlIsDigitQ
                                                      #define xmlIsDigit_ch
                                                      #define xmlIsExtenderQ
                                                      #define xmlIsExtender_ch
                                                      #define xmlIsIdeographicQ
                                                      #define xmlIsPubidCharQ
                                                      #define xmlIsPubidChar_ch
                                                      Structure xmlChLRange
                                                      struct _xmlChLRange
                                                      Typedef xmlChLRange * xmlChLRangePtr
                                                       
                                                      Structure xmlChRangeGroup
                                                      struct _xmlChRangeGroup
                                                      Typedef xmlChRangeGroup * xmlChRangeGroupPtr
                                                      diff --git a/doc/html/libxml-debugXML.html b/doc/html/libxml-debugXML.html
                                                      index 6cae0a6..8fede1b 100644
                                                      --- a/doc/html/libxml-debugXML.html
                                                      +++ b/doc/html/libxml-debugXML.html
                                                      @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline }
                                                       Module debugXML from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module debugXML from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      Interfaces to a set of routines used for debugging the tree produced by the XML parser.

                                                      Table of Contents

                                                      Structure xmlShellCtxt
                                                      struct _xmlShellCtxt + Module debugXML from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module debugXML from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      Interfaces to a set of routines used for debugging the tree produced by the XML parser.

                                                      Table of Contents

                                                      Structure xmlShellCtxt
                                                      struct _xmlShellCtxt
                                                      Typedef xmlShellCtxt * xmlShellCtxtPtr
                                                       
                                                      const char *	xmlBoolToText		(int boolval)
                                                      int	xmlDebugCheckDocument		(FILE * output, 
                                                      xmlDocPtr doc)
                                                      diff --git a/doc/html/libxml-dict.html b/doc/html/libxml-dict.html index 412a881..4e39936 100644 --- a/doc/html/libxml-dict.html +++ b/doc/html/libxml-dict.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module dict from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module dict from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      dictionary of reusable strings, just used to avoid allocation and freeing operations.

                                                      Table of Contents

                                                      Structure xmlDict
                                                      struct _xmlDict + Module dict from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module dict from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      dictionary of reusable strings, just used to avoid allocation and freeing operations.

                                                      Table of Contents

                                                      Structure xmlDict
                                                      struct _xmlDict The content of this structure is not made public by the API.
                                                      Typedef xmlDict * xmlDictPtr
                                                       
                                                      void	xmlDictCleanup			(void)
                                                      diff --git a/doc/html/libxml-encoding.html b/doc/html/libxml-encoding.html index 16ced2a..6def0f2 100644 --- a/doc/html/libxml-encoding.html +++ b/doc/html/libxml-encoding.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module encoding from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module encoding from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      interface for the encoding conversion functions needed for XML basic encoding and iconv() support. Related specs are rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies [ISO-10646] UTF-8 and UTF-16 in Annexes [ISO-8859-1] ISO Latin-1 characters codes. [UNICODE] The Unicode Consortium, "The Unicode Standard -- Worldwide Character Encoding -- Version 1.0", Addison- Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is described in Unicode Technical Report #4. [US-ASCII] Coded Character Set--7-bit American Standard Code for Information Interchange, ANSI X3.4-1986.

                                                      Table of Contents

                                                      Enum xmlCharEncoding
                                                      +    Module encoding from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module encoding from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      interface for the encoding conversion functions needed for XML basic encoding and iconv() support. Related specs are rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies [ISO-10646] UTF-8 and UTF-16 in Annexes [ISO-8859-1] ISO Latin-1 characters codes. [UNICODE] The Unicode Consortium, "The Unicode Standard -- Worldwide Character Encoding -- Version 1.0", Addison- Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is described in Unicode Technical Report #4. [US-ASCII] Coded Character Set--7-bit American Standard Code for Information Interchange, ANSI X3.4-1986.

                                                      Table of Contents

                                                      Enum xmlCharEncoding
                                                       
                                                      Structure xmlCharEncodingHandler
                                                      struct _xmlCharEncodingHandler
                                                      Typedef xmlCharEncodingHandler * xmlCharEncodingHandlerPtr
                                                       
                                                      int	UTF8Toisolat1			(unsigned char * out, 
                                                      int * outlen,
                                                      const unsigned char * in,
                                                      int * inlen)
                                                      diff --git a/doc/html/libxml-entities.html b/doc/html/libxml-entities.html index 406e64e..2f975e8 100644 --- a/doc/html/libxml-entities.html +++ b/doc/html/libxml-entities.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module entities from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module entities from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      this module provides some of the entity API needed for the parser and applications.

                                                      Table of Contents

                                                      Structure xmlEntitiesTable
                                                      struct _xmlHashTable + Module entities from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module entities from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      this module provides some of the entity API needed for the parser and applications.

                                                      Table of Contents

                                                      Structure xmlEntitiesTable
                                                      struct _xmlHashTable The content of this structure is not made public by the API.
                                                      Typedef xmlEntitiesTable * xmlEntitiesTablePtr
                                                       
                                                      Enum xmlEntityType
                                                      diff --git a/doc/html/libxml-globals.html b/doc/html/libxml-globals.html
                                                      index 148d6a1..7dfa786 100644
                                                      --- a/doc/html/libxml-globals.html
                                                      +++ b/doc/html/libxml-globals.html
                                                      @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline }
                                                       Module globals from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module globals from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      all the global variables and thread handling for those variables is handled by this module. The bottom of this file is automatically generated by build_glob.py based on the description file global.data

                                                      Table of Contents

                                                      Structure xmlGlobalState
                                                      struct _xmlGlobalState + Module globals from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module globals from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      all the global variables and thread handling for those variables is handled by this module. The bottom of this file is automatically generated by build_glob.py based on the description file global.data

                                                      Table of Contents

                                                      Structure xmlGlobalState
                                                      struct _xmlGlobalState
                                                      Typedef xmlGlobalState * xmlGlobalStatePtr
                                                       
                                                      void	xmlCleanupGlobals		(void)
                                                      xmlDeregisterNodeFunc	xmlDeregisterNodeDefault	(xmlDeregisterNodeFunc func)
                                                      @@ -84,6 +84,7 @@ void xmlRegisterNodeFunc (xmlError xmlLastError xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue + void * xmlStructuredErrorContext }

                                                      Function: xmlCleanupGlobals

                                                      void	xmlCleanupGlobals		(void)

                                                      Additional cleanup for multi-threading

                                                      Function: xmlDeregisterNodeDefault

                                                      xmlDeregisterNodeFunc	xmlDeregisterNodeDefault	(xmlDeregisterNodeFunc func)
                                                      diff --git a/doc/html/libxml-hash.html b/doc/html/libxml-hash.html index ef5b903..8b99c51 100644 --- a/doc/html/libxml-hash.html +++ b/doc/html/libxml-hash.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module hash from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module hash from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      This module implements the hash table support used in various places in the library.

                                                      Table of Contents

                                                      #define XML_CAST_FPTR
                                                      Structure xmlHashTable
                                                      struct _xmlHashTable + Module hash from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module hash from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      This module implements the hash table support used in various places in the library.

                                                      Table of Contents

                                                      #define XML_CAST_FPTR
                                                      Structure xmlHashTable
                                                      struct _xmlHashTable The content of this structure is not made public by the API.
                                                      Typedef xmlHashTable * xmlHashTablePtr
                                                       
                                                      int	xmlHashAddEntry			(xmlHashTablePtr table, 
                                                      const xmlChar * name,
                                                      void * userdata)
                                                      diff --git a/doc/html/libxml-lib.html b/doc/html/libxml-lib.html index 70263a1..62d98d1 100644 --- a/doc/html/libxml-lib.html +++ b/doc/html/libxml-lib.html @@ -10,4 +10,4 @@ A:link, A:visited, A:active { text-decoration: underline } Reference Manual for libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Reference Manual for libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      Table of Contents

                                                      • DOCBparser: old DocBook SGML parser
                                                      • HTMLparser: interface for an HTML 4.0 non-verifying parser
                                                      • HTMLtree: specific APIs to process HTML tree, especially serialization
                                                      • SAX: Old SAX version 1 handler, deprecated
                                                      • SAX2: SAX2 parser interface used to build the DOM tree
                                                      • c14n: Provide Canonical XML and Exclusive XML Canonicalization
                                                      • catalog: interfaces to the Catalog handling system
                                                      • chvalid: Unicode character range checking
                                                      • debugXML: Tree debugging APIs
                                                      • dict: string dictionnary
                                                      • encoding: interface for the encoding conversion functions
                                                      • entities: interface for the XML entities handling
                                                      • globals: interface for all global variables of the library
                                                      • hash: Chained hash tables
                                                      • list: lists interfaces
                                                      • nanoftp: minimal FTP implementation
                                                      • nanohttp: minimal HTTP implementation
                                                      • parser: the core parser module
                                                      • parserInternals: internals routines exported by the parser.
                                                      • pattern: pattern expression handling
                                                      • relaxng: implementation of the Relax-NG validation
                                                      • schemasInternals: internal interfaces for XML Schemas
                                                      • schematron: XML Schemastron implementation
                                                      • threads: interfaces for thread handling
                                                      • tree: interfaces for tree manipulation
                                                      • uri: library of generic URI related routines
                                                      • valid: The DTD validation
                                                      • xinclude: implementation of XInclude
                                                      • xlink: unfinished XLink detection module
                                                      • xmlIO: interface for the I/O interfaces used by the parser
                                                      • xmlautomata: API to build regexp automata
                                                      • xmlerror: error handling
                                                      • xmlexports: macros for marking symbols as exportable/importable.
                                                      • xmlmemory: interface for the memory allocator
                                                      • xmlmodule: dynamic module loading
                                                      • xmlreader: the XMLReader implementation
                                                      • xmlregexp: regular expressions handling
                                                      • xmlsave: the XML document serializer
                                                      • xmlschemas: incomplete XML Schemas structure implementation
                                                      • xmlschemastypes: implementation of XML Schema Datatypes
                                                      • xmlstring: set of routines to process strings
                                                      • xmlunicode: Unicode character APIs
                                                      • xmlversion: compile-time version informations
                                                      • xmlwriter: text writing API for XML
                                                      • xpath: XML Path Language implementation
                                                      • xpathInternals: internal interfaces for XML Path Language implementation
                                                      • xpointer: API to handle XML Pointers

                                                      Daniel Veillard

                                                      + Reference Manual for libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Reference Manual for libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      Table of Contents

                                                      • DOCBparser: old DocBook SGML parser
                                                      • HTMLparser: interface for an HTML 4.0 non-verifying parser
                                                      • HTMLtree: specific APIs to process HTML tree, especially serialization
                                                      • SAX: Old SAX version 1 handler, deprecated
                                                      • SAX2: SAX2 parser interface used to build the DOM tree
                                                      • c14n: Provide Canonical XML and Exclusive XML Canonicalization
                                                      • catalog: interfaces to the Catalog handling system
                                                      • chvalid: Unicode character range checking
                                                      • debugXML: Tree debugging APIs
                                                      • dict: string dictionnary
                                                      • encoding: interface for the encoding conversion functions
                                                      • entities: interface for the XML entities handling
                                                      • globals: interface for all global variables of the library
                                                      • hash: Chained hash tables
                                                      • list: lists interfaces
                                                      • nanoftp: minimal FTP implementation
                                                      • nanohttp: minimal HTTP implementation
                                                      • parser: the core parser module
                                                      • parserInternals: internals routines exported by the parser.
                                                      • pattern: pattern expression handling
                                                      • relaxng: implementation of the Relax-NG validation
                                                      • schemasInternals: internal interfaces for XML Schemas
                                                      • schematron: XML Schemastron implementation
                                                      • threads: interfaces for thread handling
                                                      • tree: interfaces for tree manipulation
                                                      • uri: library of generic URI related routines
                                                      • valid: The DTD validation
                                                      • xinclude: implementation of XInclude
                                                      • xlink: unfinished XLink detection module
                                                      • xmlIO: interface for the I/O interfaces used by the parser
                                                      • xmlautomata: API to build regexp automata
                                                      • xmlerror: error handling
                                                      • xmlexports: macros for marking symbols as exportable/importable.
                                                      • xmlmemory: interface for the memory allocator
                                                      • xmlmodule: dynamic module loading
                                                      • xmlreader: the XMLReader implementation
                                                      • xmlregexp: regular expressions handling
                                                      • xmlsave: the XML document serializer
                                                      • xmlschemas: incomplete XML Schemas structure implementation
                                                      • xmlschemastypes: implementation of XML Schema Datatypes
                                                      • xmlstring: set of routines to process strings
                                                      • xmlunicode: Unicode character APIs
                                                      • xmlversion: compile-time version informations
                                                      • xmlwriter: text writing API for XML
                                                      • xpath: XML Path Language implementation
                                                      • xpathInternals: internal interfaces for XML Path Language implementation
                                                      • xpointer: API to handle XML Pointers

                                                      Daniel Veillard

                                                      diff --git a/doc/html/libxml-list.html b/doc/html/libxml-list.html index 41d94af..ded1e82 100644 --- a/doc/html/libxml-list.html +++ b/doc/html/libxml-list.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module list from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module list from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      this module implement the list support used in various place in the library.

                                                      Table of Contents

                                                      Structure xmlLink
                                                      struct _xmlLink + Module list from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module list from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      this module implement the list support used in various place in the library.

                                                      Table of Contents

                                                      Structure xmlLink
                                                      struct _xmlLink The content of this structure is not made public by the API.
                                                      Typedef xmlLink * xmlLinkPtr
                                                       
                                                      Structure xmlList
                                                      struct _xmlList diff --git a/doc/html/libxml-nanoftp.html b/doc/html/libxml-nanoftp.html index bf10179..8790665 100644 --- a/doc/html/libxml-nanoftp.html +++ b/doc/html/libxml-nanoftp.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module nanoftp from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module nanoftp from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      minimal FTP implementation allowing to fetch resources like external subset.

                                                      Table of Contents

                                                      Function type: ftpDataCallback
                                                      +    Module nanoftp from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module nanoftp from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      minimal FTP implementation allowing to fetch resources like external subset.

                                                      Table of Contents

                                                      Function type: ftpDataCallback
                                                       void	ftpDataCallback			(void * userData, 
                                                      const char * data,
                                                      int len)
                                                      Function type: ftpListCallback
                                                      diff --git a/doc/html/libxml-nanohttp.html b/doc/html/libxml-nanohttp.html
                                                      index 39510d3..b1cd9df 100644
                                                      --- a/doc/html/libxml-nanohttp.html
                                                      +++ b/doc/html/libxml-nanohttp.html
                                                      @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline }
                                                       Module nanohttp from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module nanohttp from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      minimal HTTP implementation allowing to fetch resources like external subset.

                                                      Table of Contents

                                                      const char *	xmlNanoHTTPAuthHeader	(void * ctx)
                                                      + Module nanohttp from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module nanohttp from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      minimal HTTP implementation allowing to fetch resources like external subset.

                                                      Table of Contents

                                                      const char *	xmlNanoHTTPAuthHeader	(void * ctx)
                                                      void	xmlNanoHTTPCleanup		(void)
                                                      void	xmlNanoHTTPClose		(void * ctx)
                                                      int	xmlNanoHTTPContentLength	(void * ctx)
                                                      diff --git a/doc/html/libxml-parser.html b/doc/html/libxml-parser.html index 83db4d9..b35cac0 100644 --- a/doc/html/libxml-parser.html +++ b/doc/html/libxml-parser.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module parser from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module parser from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      Interfaces, constants and types related to the XML parser

                                                      Table of Contents

                                                      #define XML_COMPLETE_ATTRS
                                                      #define XML_DEFAULT_VERSION
                                                      #define XML_DETECT_IDS
                                                      #define XML_SAX2_MAGIC
                                                      #define XML_SKIP_IDS
                                                      Enum xmlFeature
                                                      +    Module parser from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module parser from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      Interfaces, constants and types related to the XML parser

                                                      Table of Contents

                                                      #define XML_COMPLETE_ATTRS
                                                      #define XML_DEFAULT_VERSION
                                                      #define XML_DETECT_IDS
                                                      #define XML_SAX2_MAGIC
                                                      #define XML_SKIP_IDS
                                                      Enum xmlFeature
                                                       
                                                      Enum xmlParserInputState
                                                       
                                                      Enum xmlParserMode
                                                       
                                                      Structure xmlParserNodeInfo
                                                      struct _xmlParserNodeInfo @@ -169,7 +169,7 @@ void xmlParserInputDeallocate (xmlDocPtr xmlReadFile (const char * filename,
                                                      const char * encoding,
                                                      int options)
                                                      xmlDocPtr	xmlReadIO		(xmlInputReadCallback ioread, 
                                                      xmlInputCloseCallback ioclose,
                                                      void * ioctx,
                                                      const char * URL,
                                                      const char * encoding,
                                                      int options)
                                                      xmlDocPtr	xmlReadMemory		(const char * buffer, 
                                                      int size,
                                                      const char * URL,
                                                      const char * encoding,
                                                      int options)
                                                      -
                                                      xmlDocPtr	xmlRecoverDoc		(xmlChar * cur)
                                                      +
                                                      xmlDocPtr	xmlRecoverDoc		(const xmlChar * cur)
                                                      xmlDocPtr	xmlRecoverFile		(const char * filename)
                                                      xmlDocPtr	xmlRecoverMemory	(const char * buffer, 
                                                      int size)
                                                      xmlDtdPtr	xmlSAXParseDTD		(xmlSAXHandlerPtr sax, 
                                                      const xmlChar * ExternalID,
                                                      const xmlChar * SystemID)
                                                      @@ -409,7 +409,7 @@ void warningSAXFunc (void * ctx,
                                                      const char * msg,
                                                      ...

                                                      Function: xmlByteConsumed

                                                      long	xmlByteConsumed			(xmlParserCtxtPtr ctxt)

                                                      This function provides the current index of the parser relative to the start of the current entity. This function is computed in bytes from the beginning starting at zero and finishing at the size in byte of the file if parsing a file. The function is of constant cost if the input is UTF-8 but can be costly if run on non-UTF-8 input.

                                                      ctxt:an XML parser context
                                                      Returns:the index in bytes from the beginning of the entity or -1 in case the index could not be computed.

                                                      Function: xmlCleanupParser

                                                      void	xmlCleanupParser		(void)
                                                      -

                                                      This function name is somewhat misleading. It does not clean up parser state, it cleans up memory allocated by the library itself. It is a cleanup function for the XML library. It tries to reclaim all related global memory allocated for the library processing. It doesn't deallocate any document related memory. One should call xmlCleanupParser() only when the process has finished using the library and all XML/HTML documents built with it. See also xmlInitParser() which has the opposite function of preparing the library for operations.

                                                      +

                                                      This function name is somewhat misleading. It does not clean up parser state, it cleans up memory allocated by the library itself. It is a cleanup function for the XML library. It tries to reclaim all related global memory allocated for the library processing. It doesn't deallocate any document related memory. One should call xmlCleanupParser() only when the process has finished using the library and all XML/HTML documents built with it. See also xmlInitParser() which has the opposite function of preparing the library for operations. WARNING: if your application is multithreaded or has plugin support calling this may crash the application if another thread or a plugin is still using libxml2. It's sometimes very hard to guess if libxml2 is in use in the application, some libraries or plugins may use it without notice. In case of doubt abstain from calling this function or do it just before calling exit() to avoid leak reports from valgrind !

                                                      Function: xmlClearNodeInfoSeq

                                                      void	xmlClearNodeInfoSeq		(xmlParserNodeInfoSeqPtr seq)

                                                      -- Clear (release memory and reinitialize) node info sequence

                                                      seq:a node info sequence pointer

                                                      Function: xmlClearParserCtxt

                                                      void	xmlClearParserCtxt		(xmlParserCtxtPtr ctxt)
                                                      @@ -518,7 +518,7 @@ void xmlParserInputDeallocate (xmlChar

                                                      parse an XML document from I/O functions and source and build a tree.

                                                      ioread:an I/O read function
                                                      ioclose:an I/O close function
                                                      ioctx:an I/O handler
                                                      URL:the base URL to use for the document
                                                      encoding:the document encoding, or NULL
                                                      options:a combination of xmlParserOption
                                                      Returns:the resulting document tree

                                                      Function: xmlReadMemory

                                                      xmlDocPtr	xmlReadMemory		(const char * buffer, 
                                                      int size,
                                                      const char * URL,
                                                      const char * encoding,
                                                      int options)

                                                      parse an XML in-memory document and build a tree.

                                                      -
                                                      buffer:a pointer to a char array
                                                      size:the size of the array
                                                      URL:the base URL to use for the document
                                                      encoding:the document encoding, or NULL
                                                      options:a combination of xmlParserOption
                                                      Returns:the resulting document tree

                                                      Function: xmlRecoverDoc

                                                      xmlDocPtr	xmlRecoverDoc		(xmlChar * cur)
                                                      +
                                                      buffer:a pointer to a char array
                                                      size:the size of the array
                                                      URL:the base URL to use for the document
                                                      encoding:the document encoding, or NULL
                                                      options:a combination of xmlParserOption
                                                      Returns:the resulting document tree

                                                      Function: xmlRecoverDoc

                                                      xmlDocPtr	xmlRecoverDoc		(const xmlChar * cur)

                                                      parse an XML in-memory document and build a tree. In the case the document is not Well Formed, a attempt to build a tree is tried anyway

                                                      cur:a pointer to an array of xmlChar
                                                      Returns:the resulting document tree or NULL in case of failure

                                                      Function: xmlRecoverFile

                                                      xmlDocPtr	xmlRecoverFile		(const char * filename)

                                                      parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. In the case the document is not Well Formed, it attempts to build a tree anyway

                                                      diff --git a/doc/html/libxml-parserInternals.html b/doc/html/libxml-parserInternals.html index 5c155db..60c1a43 100644 --- a/doc/html/libxml-parserInternals.html +++ b/doc/html/libxml-parserInternals.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module parserInternals from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module parserInternals from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      this module exports a number of internal parsing routines they are not really all intended for applications but can prove useful doing low level processing.

                                                      Table of Contents

                                                      #define INPUT_CHUNK
                                                      #define IS_ASCII_DIGIT
                                                      #define IS_ASCII_LETTER
                                                      #define IS_BASECHAR
                                                      #define IS_BLANK
                                                      #define IS_BLANK_CH
                                                      #define IS_BYTE_CHAR
                                                      #define IS_CHAR
                                                      #define IS_CHAR_CH
                                                      #define IS_COMBINING
                                                      #define IS_COMBINING_CH
                                                      #define IS_DIGIT
                                                      #define IS_DIGIT_CH
                                                      #define IS_EXTENDER
                                                      #define IS_EXTENDER_CH
                                                      #define IS_IDEOGRAPHIC
                                                      #define IS_LETTER
                                                      #define IS_LETTER_CH
                                                      #define IS_PUBIDCHAR
                                                      #define IS_PUBIDCHAR_CH
                                                      #define MOVETO_ENDTAG
                                                      #define MOVETO_STARTTAG
                                                      #define SKIP_EOL
                                                      #define XML_MAX_NAMELEN
                                                      #define XML_MAX_TEXT_LENGTH
                                                      #define XML_SUBSTITUTE_BOTH
                                                      #define XML_SUBSTITUTE_NONE
                                                      #define XML_SUBSTITUTE_PEREF
                                                      #define XML_SUBSTITUTE_REF
                                                      htmlParserCtxtPtr	htmlCreateFileParserCtxt	(const char * filename, 
                                                      const char * encoding)
                                                      + Module parserInternals from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module parserInternals from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      this module exports a number of internal parsing routines they are not really all intended for applications but can prove useful doing low level processing.

                                                      Table of Contents

                                                      #define INPUT_CHUNK
                                                      #define IS_ASCII_DIGIT
                                                      #define IS_ASCII_LETTER
                                                      #define IS_BASECHAR
                                                      #define IS_BLANK
                                                      #define IS_BLANK_CH
                                                      #define IS_BYTE_CHAR
                                                      #define IS_CHAR
                                                      #define IS_CHAR_CH
                                                      #define IS_COMBINING
                                                      #define IS_COMBINING_CH
                                                      #define IS_DIGIT
                                                      #define IS_DIGIT_CH
                                                      #define IS_EXTENDER
                                                      #define IS_EXTENDER_CH
                                                      #define IS_IDEOGRAPHIC
                                                      #define IS_LETTER
                                                      #define IS_LETTER_CH
                                                      #define IS_PUBIDCHAR
                                                      #define IS_PUBIDCHAR_CH
                                                      #define MOVETO_ENDTAG
                                                      #define MOVETO_STARTTAG
                                                      #define SKIP_EOL
                                                      #define XML_MAX_NAMELEN
                                                      #define XML_MAX_TEXT_LENGTH
                                                      #define XML_SUBSTITUTE_BOTH
                                                      #define XML_SUBSTITUTE_NONE
                                                      #define XML_SUBSTITUTE_PEREF
                                                      #define XML_SUBSTITUTE_REF
                                                      htmlParserCtxtPtr	htmlCreateFileParserCtxt	(const char * filename, 
                                                      const char * encoding)
                                                      void	htmlInitAutoClose		(void)
                                                      xmlParserInputPtr	inputPop	(xmlParserCtxtPtr ctxt)
                                                      int	inputPush			(xmlParserCtxtPtr ctxt, 
                                                      xmlParserInputPtr value)
                                                      diff --git a/doc/html/libxml-pattern.html b/doc/html/libxml-pattern.html index 2edeafd..c9aa972 100644 --- a/doc/html/libxml-pattern.html +++ b/doc/html/libxml-pattern.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module pattern from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module pattern from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      allows to compile and test pattern expressions for nodes either in a tree or based on a parser state.

                                                      Table of Contents

                                                      Structure xmlPattern
                                                      struct _xmlPattern + Module pattern from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module pattern from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      allows to compile and test pattern expressions for nodes either in a tree or based on a parser state.

                                                      Table of Contents

                                                      Structure xmlPattern
                                                      struct _xmlPattern The content of this structure is not made public by the API.
                                                      Enum xmlPatternFlags
                                                       
                                                      Typedef xmlPattern * xmlPatternPtr
                                                      diff --git a/doc/html/libxml-relaxng.html b/doc/html/libxml-relaxng.html
                                                      index b631a1a..874851c 100644
                                                      --- a/doc/html/libxml-relaxng.html
                                                      +++ b/doc/html/libxml-relaxng.html
                                                      @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline }
                                                       Module relaxng from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module relaxng from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      implementation of the Relax-NG validation

                                                      Table of Contents

                                                      Structure xmlRelaxNG
                                                      struct _xmlRelaxNG + Module relaxng from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module relaxng from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      implementation of the Relax-NG validation

                                                      Table of Contents

                                                      Structure xmlRelaxNG
                                                      struct _xmlRelaxNG The content of this structure is not made public by the API.
                                                      Structure xmlRelaxNGParserCtxt
                                                      struct _xmlRelaxNGParserCtxt The content of this structure is not made public by the API. diff --git a/doc/html/libxml-schemasInternals.html b/doc/html/libxml-schemasInternals.html index 2ebd4a3..5712310 100644 --- a/doc/html/libxml-schemasInternals.html +++ b/doc/html/libxml-schemasInternals.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module schemasInternals from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module schemasInternals from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      internal interfaces for the XML Schemas handling and schema validity checking The Schemas development is a Work In Progress. Some of those interfaces are not garanteed to be API or ABI stable !

                                                      Table of Contents

                                                      #define XML_SCHEMAS_ANYATTR_LAX
                                                      #define XML_SCHEMAS_ANYATTR_SKIP
                                                      #define XML_SCHEMAS_ANYATTR_STRICT
                                                      #define XML_SCHEMAS_ANY_LAX
                                                      #define XML_SCHEMAS_ANY_SKIP
                                                      #define XML_SCHEMAS_ANY_STRICT
                                                      #define XML_SCHEMAS_ATTRGROUP_GLOBAL
                                                      #define XML_SCHEMAS_ATTRGROUP_HAS_REFS
                                                      #define XML_SCHEMAS_ATTRGROUP_MARKED
                                                      #define XML_SCHEMAS_ATTRGROUP_REDEFINED
                                                      #define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED
                                                      #define XML_SCHEMAS_ATTR_FIXED
                                                      #define XML_SCHEMAS_ATTR_GLOBAL
                                                      #define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED
                                                      #define XML_SCHEMAS_ATTR_NSDEFAULT
                                                      #define XML_SCHEMAS_ATTR_USE_OPTIONAL
                                                      #define XML_SCHEMAS_ATTR_USE_PROHIBITED
                                                      #define XML_SCHEMAS_ATTR_USE_REQUIRED
                                                      #define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION
                                                      #define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION
                                                      #define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION
                                                      #define XML_SCHEMAS_ELEM_ABSTRACT
                                                      #define XML_SCHEMAS_ELEM_BLOCK_ABSENT
                                                      #define XML_SCHEMAS_ELEM_BLOCK_EXTENSION
                                                      #define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION
                                                      #define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION
                                                      #define XML_SCHEMAS_ELEM_CIRCULAR
                                                      #define XML_SCHEMAS_ELEM_DEFAULT
                                                      #define XML_SCHEMAS_ELEM_FINAL_ABSENT
                                                      #define XML_SCHEMAS_ELEM_FINAL_EXTENSION
                                                      #define XML_SCHEMAS_ELEM_FINAL_RESTRICTION
                                                      #define XML_SCHEMAS_ELEM_FIXED
                                                      #define XML_SCHEMAS_ELEM_GLOBAL
                                                      #define XML_SCHEMAS_ELEM_INTERNAL_CHECKED
                                                      #define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED
                                                      #define XML_SCHEMAS_ELEM_NILLABLE
                                                      #define XML_SCHEMAS_ELEM_NSDEFAULT
                                                      #define XML_SCHEMAS_ELEM_REF
                                                      #define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD
                                                      #define XML_SCHEMAS_ELEM_TOPLEVEL
                                                      #define XML_SCHEMAS_FACET_COLLAPSE
                                                      #define XML_SCHEMAS_FACET_PRESERVE
                                                      #define XML_SCHEMAS_FACET_REPLACE
                                                      #define XML_SCHEMAS_FACET_UNKNOWN
                                                      #define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION
                                                      #define XML_SCHEMAS_FINAL_DEFAULT_LIST
                                                      #define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION
                                                      #define XML_SCHEMAS_FINAL_DEFAULT_UNION
                                                      #define XML_SCHEMAS_INCLUDING_CONVERT_NS
                                                      #define XML_SCHEMAS_QUALIF_ATTR
                                                      #define XML_SCHEMAS_QUALIF_ELEM
                                                      #define XML_SCHEMAS_TYPE_ABSTRACT
                                                      #define XML_SCHEMAS_TYPE_BLOCK_DEFAULT
                                                      #define XML_SCHEMAS_TYPE_BLOCK_EXTENSION
                                                      #define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION
                                                      #define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE
                                                      #define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION
                                                      #define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION
                                                      #define XML_SCHEMAS_TYPE_FACETSNEEDVALUE
                                                      #define XML_SCHEMAS_TYPE_FINAL_DEFAULT
                                                      #define XML_SCHEMAS_TYPE_FINAL_EXTENSION
                                                      #define XML_SCHEMAS_TYPE_FINAL_LIST
                                                      #define XML_SCHEMAS_TYPE_FINAL_RESTRICTION
                                                      #define XML_SCHEMAS_TYPE_FINAL_UNION
                                                      #define XML_SCHEMAS_TYPE_FIXUP_1
                                                      #define XML_SCHEMAS_TYPE_GLOBAL
                                                      #define XML_SCHEMAS_TYPE_HAS_FACETS
                                                      #define XML_SCHEMAS_TYPE_INTERNAL_INVALID
                                                      #define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED
                                                      #define XML_SCHEMAS_TYPE_MARKED
                                                      #define XML_SCHEMAS_TYPE_MIXED
                                                      #define XML_SCHEMAS_TYPE_NORMVALUENEEDED
                                                      #define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD
                                                      #define XML_SCHEMAS_TYPE_REDEFINED
                                                      #define XML_SCHEMAS_TYPE_VARIETY_ABSENT
                                                      #define XML_SCHEMAS_TYPE_VARIETY_ATOMIC
                                                      #define XML_SCHEMAS_TYPE_VARIETY_LIST
                                                      #define XML_SCHEMAS_TYPE_VARIETY_UNION
                                                      #define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE
                                                      #define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE
                                                      #define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE
                                                      #define XML_SCHEMAS_WILDCARD_COMPLETE
                                                      Structure xmlSchemaAnnot
                                                      struct _xmlSchemaAnnot + Module schemasInternals from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module schemasInternals from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      internal interfaces for the XML Schemas handling and schema validity checking The Schemas development is a Work In Progress. Some of those interfaces are not garanteed to be API or ABI stable !

                                                      Table of Contents

                                                      #define XML_SCHEMAS_ANYATTR_LAX
                                                      #define XML_SCHEMAS_ANYATTR_SKIP
                                                      #define XML_SCHEMAS_ANYATTR_STRICT
                                                      #define XML_SCHEMAS_ANY_LAX
                                                      #define XML_SCHEMAS_ANY_SKIP
                                                      #define XML_SCHEMAS_ANY_STRICT
                                                      #define XML_SCHEMAS_ATTRGROUP_GLOBAL
                                                      #define XML_SCHEMAS_ATTRGROUP_HAS_REFS
                                                      #define XML_SCHEMAS_ATTRGROUP_MARKED
                                                      #define XML_SCHEMAS_ATTRGROUP_REDEFINED
                                                      #define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED
                                                      #define XML_SCHEMAS_ATTR_FIXED
                                                      #define XML_SCHEMAS_ATTR_GLOBAL
                                                      #define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED
                                                      #define XML_SCHEMAS_ATTR_NSDEFAULT
                                                      #define XML_SCHEMAS_ATTR_USE_OPTIONAL
                                                      #define XML_SCHEMAS_ATTR_USE_PROHIBITED
                                                      #define XML_SCHEMAS_ATTR_USE_REQUIRED
                                                      #define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION
                                                      #define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION
                                                      #define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION
                                                      #define XML_SCHEMAS_ELEM_ABSTRACT
                                                      #define XML_SCHEMAS_ELEM_BLOCK_ABSENT
                                                      #define XML_SCHEMAS_ELEM_BLOCK_EXTENSION
                                                      #define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION
                                                      #define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION
                                                      #define XML_SCHEMAS_ELEM_CIRCULAR
                                                      #define XML_SCHEMAS_ELEM_DEFAULT
                                                      #define XML_SCHEMAS_ELEM_FINAL_ABSENT
                                                      #define XML_SCHEMAS_ELEM_FINAL_EXTENSION
                                                      #define XML_SCHEMAS_ELEM_FINAL_RESTRICTION
                                                      #define XML_SCHEMAS_ELEM_FIXED
                                                      #define XML_SCHEMAS_ELEM_GLOBAL
                                                      #define XML_SCHEMAS_ELEM_INTERNAL_CHECKED
                                                      #define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED
                                                      #define XML_SCHEMAS_ELEM_NILLABLE
                                                      #define XML_SCHEMAS_ELEM_NSDEFAULT
                                                      #define XML_SCHEMAS_ELEM_REF
                                                      #define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD
                                                      #define XML_SCHEMAS_ELEM_TOPLEVEL
                                                      #define XML_SCHEMAS_FACET_COLLAPSE
                                                      #define XML_SCHEMAS_FACET_PRESERVE
                                                      #define XML_SCHEMAS_FACET_REPLACE
                                                      #define XML_SCHEMAS_FACET_UNKNOWN
                                                      #define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION
                                                      #define XML_SCHEMAS_FINAL_DEFAULT_LIST
                                                      #define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION
                                                      #define XML_SCHEMAS_FINAL_DEFAULT_UNION
                                                      #define XML_SCHEMAS_INCLUDING_CONVERT_NS
                                                      #define XML_SCHEMAS_QUALIF_ATTR
                                                      #define XML_SCHEMAS_QUALIF_ELEM
                                                      #define XML_SCHEMAS_TYPE_ABSTRACT
                                                      #define XML_SCHEMAS_TYPE_BLOCK_DEFAULT
                                                      #define XML_SCHEMAS_TYPE_BLOCK_EXTENSION
                                                      #define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION
                                                      #define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE
                                                      #define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION
                                                      #define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION
                                                      #define XML_SCHEMAS_TYPE_FACETSNEEDVALUE
                                                      #define XML_SCHEMAS_TYPE_FINAL_DEFAULT
                                                      #define XML_SCHEMAS_TYPE_FINAL_EXTENSION
                                                      #define XML_SCHEMAS_TYPE_FINAL_LIST
                                                      #define XML_SCHEMAS_TYPE_FINAL_RESTRICTION
                                                      #define XML_SCHEMAS_TYPE_FINAL_UNION
                                                      #define XML_SCHEMAS_TYPE_FIXUP_1
                                                      #define XML_SCHEMAS_TYPE_GLOBAL
                                                      #define XML_SCHEMAS_TYPE_HAS_FACETS
                                                      #define XML_SCHEMAS_TYPE_INTERNAL_INVALID
                                                      #define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED
                                                      #define XML_SCHEMAS_TYPE_MARKED
                                                      #define XML_SCHEMAS_TYPE_MIXED
                                                      #define XML_SCHEMAS_TYPE_NORMVALUENEEDED
                                                      #define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD
                                                      #define XML_SCHEMAS_TYPE_REDEFINED
                                                      #define XML_SCHEMAS_TYPE_VARIETY_ABSENT
                                                      #define XML_SCHEMAS_TYPE_VARIETY_ATOMIC
                                                      #define XML_SCHEMAS_TYPE_VARIETY_LIST
                                                      #define XML_SCHEMAS_TYPE_VARIETY_UNION
                                                      #define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE
                                                      #define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE
                                                      #define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE
                                                      #define XML_SCHEMAS_WILDCARD_COMPLETE
                                                      Structure xmlSchemaAnnot
                                                      struct _xmlSchemaAnnot
                                                      Typedef xmlSchemaAnnot * xmlSchemaAnnotPtr
                                                       
                                                      Structure xmlSchemaAttribute
                                                      struct _xmlSchemaAttribute
                                                      Structure xmlSchemaAttributeGroup
                                                      struct _xmlSchemaAttributeGroup diff --git a/doc/html/libxml-schematron.html b/doc/html/libxml-schematron.html index 1dcd73a..467498e 100644 --- a/doc/html/libxml-schematron.html +++ b/doc/html/libxml-schematron.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module schematron from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module schematron from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      interface to the XML Schematron validity checking.

                                                      Table of Contents

                                                      Structure xmlSchematron
                                                      struct _xmlSchematron + Module schematron from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module schematron from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      interface to the XML Schematron validity checking.

                                                      Table of Contents

                                                      Structure xmlSchematron
                                                      struct _xmlSchematron The content of this structure is not made public by the API.
                                                      Structure xmlSchematronParserCtxt
                                                      struct _xmlSchematronParserCtxt The content of this structure is not made public by the API. diff --git a/doc/html/libxml-threads.html b/doc/html/libxml-threads.html index b31cfd4..812336e 100644 --- a/doc/html/libxml-threads.html +++ b/doc/html/libxml-threads.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module threads from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module threads from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      set of generic threading related routines should work with pthreads, Windows native or TLS threads

                                                      Table of Contents

                                                      Structure xmlMutex
                                                      struct _xmlMutex + Module threads from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module threads from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      set of generic threading related routines should work with pthreads, Windows native or TLS threads

                                                      Table of Contents

                                                      Structure xmlMutex
                                                      struct _xmlMutex The content of this structure is not made public by the API.
                                                      Typedef xmlMutex * xmlMutexPtr
                                                       
                                                      Structure xmlRMutex
                                                      struct _xmlRMutex @@ -38,7 +38,7 @@ The content of this structure is not made public by the API. }

                                                      Structure xmlRMutex

                                                      Structure xmlRMutex
                                                      struct _xmlRMutex { The content of this structure is not made public by the API. }

                                                      Function: xmlCleanupThreads

                                                      void	xmlCleanupThreads		(void)
                                                      -

                                                      xmlCleanupThreads() is used to to cleanup all the thread related data of the libxml2 library once processing has ended.

                                                      +

                                                      xmlCleanupThreads() is used to to cleanup all the thread related data of the libxml2 library once processing has ended. WARNING: if your application is multithreaded or has plugin support calling this may crash the application if another thread or a plugin is still using libxml2. It's sometimes very hard to guess if libxml2 is in use in the application, some libraries or plugins may use it without notice. In case of doubt abstain from calling this function or do it just before calling exit() to avoid leak reports from valgrind !

                                                      Function: xmlDllMain

                                                      int	xmlDllMain			(void * hinstDLL, 
                                                      unsigned long fdwReason,
                                                      void * lpvReserved)

                                                      hinstDLL:
                                                      fdwReason:
                                                      lpvReserved:
                                                      Returns:

                                                      Function: xmlFreeMutex

                                                      void	xmlFreeMutex			(xmlMutexPtr tok)
                                                      @@ -48,7 +48,7 @@ The content of this structure is not made public by the API.
                                                      tok:the reentrant mutex

                                                      Function: xmlGetGlobalState

                                                      xmlGlobalStatePtr	xmlGetGlobalState	(void)

                                                      xmlGetGlobalState() is called to retrieve the global state for a thread.

                                                      Returns:the thread global state or NULL in case of error

                                                      Function: xmlGetThreadId

                                                      int	xmlGetThreadId			(void)
                                                      -

                                                      xmlGetThreadId() find the current thread ID number

                                                      +

                                                      xmlGetThreadId() find the current thread ID number Note that this is likely to be broken on some platforms using pthreads as the specification doesn't mandate pthread_t to be an integer type

                                                      Returns:the current thread ID number

                                                      Function: xmlInitThreads

                                                      void	xmlInitThreads			(void)

                                                      xmlInitThreads() is used to to initialize all the thread related data of the libxml2 library.

                                                      Function: xmlIsMainThread

                                                      int	xmlIsMainThread			(void)
                                                      diff --git a/doc/html/libxml-tree.html b/doc/html/libxml-tree.html index 87c415c..6f91605 100644 --- a/doc/html/libxml-tree.html +++ b/doc/html/libxml-tree.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module tree from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module tree from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      this module describes the structures found in an tree resulting from an XML or HTML parsing, as well as the API provided for various processing on that tree

                                                      Table of Contents

                                                      #define BASE_BUFFER_SIZE
                                                      #define XML_GET_CONTENT
                                                      #define XML_GET_LINE
                                                      #define XML_LOCAL_NAMESPACE
                                                      #define XML_XML_ID
                                                      #define XML_XML_NAMESPACE
                                                      #define xmlChildrenNode
                                                      #define xmlRootNode
                                                      Structure xmlAttr
                                                      struct _xmlAttr + Module tree from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module tree from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      this module describes the structures found in an tree resulting from an XML or HTML parsing, as well as the API provided for various processing on that tree

                                                      Table of Contents

                                                      #define BASE_BUFFER_SIZE
                                                      #define XML_GET_CONTENT
                                                      #define XML_GET_LINE
                                                      #define XML_LOCAL_NAMESPACE
                                                      #define XML_XML_ID
                                                      #define XML_XML_NAMESPACE
                                                      #define xmlChildrenNode
                                                      #define xmlRootNode
                                                      Structure xmlAttr
                                                      struct _xmlAttr
                                                      Typedef xmlAttr * xmlAttrPtr
                                                       
                                                      Structure xmlAttribute
                                                      struct _xmlAttribute
                                                      Enum xmlAttributeDefault
                                                      @@ -489,7 +489,7 @@ A:link, A:visited, A:active { text-decoration: underline }
                                                           const xmlChar *	version	: the XML version string
                                                           const xmlChar *	encoding	: the declared encoding, if any
                                                           int	standalone	: standalone document
                                                      -    int	html	: an HTML(1)/Docbook(2) document Input st
                                                      +    int	html	: an HTML(1)/Docbook(2) document * 3 is H
                                                           xmlParserInputPtr	input	: Current input stream
                                                           int	inputNr	: Number of current input streams
                                                           int	inputMax	: Max number of input streams
                                                      diff --git a/doc/html/libxml-uri.html b/doc/html/libxml-uri.html
                                                      index 61d4dba..7b1ddf2 100644
                                                      --- a/doc/html/libxml-uri.html
                                                      +++ b/doc/html/libxml-uri.html
                                                      @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline }
                                                       Module uri from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module uri from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      library of generic URI related routines Implements RFC 2396

                                                      Table of Contents

                                                      Structure xmlURI
                                                      struct _xmlURI + Module uri from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module uri from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      library of generic URI related routines Implements RFC 2396

                                                      Table of Contents

                                                      Structure xmlURI
                                                      struct _xmlURI
                                                      Typedef xmlURI * xmlURIPtr
                                                       
                                                      xmlChar *	xmlBuildRelativeURI	(const xmlChar * URI, 
                                                      const xmlChar * base)
                                                      xmlChar *	xmlBuildURI		(const xmlChar * URI, 
                                                      const xmlChar * base)
                                                      diff --git a/doc/html/libxml-valid.html b/doc/html/libxml-valid.html index 30ef3cd..2b2269b 100644 --- a/doc/html/libxml-valid.html +++ b/doc/html/libxml-valid.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module valid from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module valid from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      API for the DTD handling and the validity checking

                                                      Table of Contents

                                                      #define XML_CTXT_FINISH_DTD_0
                                                      #define XML_CTXT_FINISH_DTD_1
                                                      Structure xmlAttributeTable
                                                      struct _xmlHashTable + Module valid from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module valid from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      API for the DTD handling and the validity checking

                                                      Table of Contents

                                                      #define XML_CTXT_FINISH_DTD_0
                                                      #define XML_CTXT_FINISH_DTD_1
                                                      Structure xmlAttributeTable
                                                      struct _xmlHashTable The content of this structure is not made public by the API.
                                                      Typedef xmlAttributeTable * xmlAttributeTablePtr
                                                       
                                                      Structure xmlElementTable
                                                      struct _xmlHashTable diff --git a/doc/html/libxml-xinclude.html b/doc/html/libxml-xinclude.html index 6ccb123..152506a 100644 --- a/doc/html/libxml-xinclude.html +++ b/doc/html/libxml-xinclude.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module xinclude from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xinclude from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      API to handle XInclude processing, implements the World Wide Web Consortium Last Call Working Draft 10 November 2003

                                                      Table of Contents

                                                      #define XINCLUDE_FALLBACK
                                                      #define XINCLUDE_HREF
                                                      #define XINCLUDE_NODE
                                                      #define XINCLUDE_NS
                                                      #define XINCLUDE_OLD_NS
                                                      #define XINCLUDE_PARSE
                                                      #define XINCLUDE_PARSE_ENCODING
                                                      #define XINCLUDE_PARSE_TEXT
                                                      #define XINCLUDE_PARSE_XML
                                                      #define XINCLUDE_PARSE_XPOINTER
                                                      Structure xmlXIncludeCtxt
                                                      struct _xmlXIncludeCtxt + Module xinclude from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xinclude from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      API to handle XInclude processing, implements the World Wide Web Consortium Last Call Working Draft 10 November 2003

                                                      Table of Contents

                                                      #define XINCLUDE_FALLBACK
                                                      #define XINCLUDE_HREF
                                                      #define XINCLUDE_NODE
                                                      #define XINCLUDE_NS
                                                      #define XINCLUDE_OLD_NS
                                                      #define XINCLUDE_PARSE
                                                      #define XINCLUDE_PARSE_ENCODING
                                                      #define XINCLUDE_PARSE_TEXT
                                                      #define XINCLUDE_PARSE_XML
                                                      #define XINCLUDE_PARSE_XPOINTER
                                                      Structure xmlXIncludeCtxt
                                                      struct _xmlXIncludeCtxt The content of this structure is not made public by the API.
                                                      Typedef xmlXIncludeCtxt * xmlXIncludeCtxtPtr
                                                       
                                                      void	xmlXIncludeFreeContext		(xmlXIncludeCtxtPtr ctxt)
                                                      @@ -21,6 +21,7 @@ The content of this structure is not made public by the API.
                                                      int	xmlXIncludeProcessNode		(xmlXIncludeCtxtPtr ctxt, 
                                                      xmlNodePtr node)
                                                      int	xmlXIncludeProcessTree		(xmlNodePtr tree)
                                                      int	xmlXIncludeProcessTreeFlags	(xmlNodePtr tree, 
                                                      int flags)
                                                      +
                                                      int	xmlXIncludeProcessTreeFlagsData	(xmlNodePtr tree, 
                                                      int flags,
                                                      void * data)
                                                      int	xmlXIncludeSetFlags		(xmlXIncludeCtxtPtr ctxt, 
                                                      int flags)

                                                      Description

                                                      Macro: XINCLUDE_FALLBACK

                                                      #define XINCLUDE_FALLBACK

                                                      Macro defining "fallback"

                                                      @@ -51,6 +52,8 @@ The content of this structure is not made public by the API.

                                                      Implement the XInclude substitution for the given subtree

                                                      tree:a node in an XML document
                                                      Returns:0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

                                                      Function: xmlXIncludeProcessTreeFlags

                                                      int	xmlXIncludeProcessTreeFlags	(xmlNodePtr tree, 
                                                      int flags)

                                                      Implement the XInclude substitution for the given subtree

                                                      -
                                                      tree:a node in an XML document
                                                      flags:a set of xmlParserOption used for parsing XML includes
                                                      Returns:0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

                                                      Function: xmlXIncludeSetFlags

                                                      int	xmlXIncludeSetFlags		(xmlXIncludeCtxtPtr ctxt, 
                                                      int flags)
                                                      +
                                                      tree:a node in an XML document
                                                      flags:a set of xmlParserOption used for parsing XML includes
                                                      Returns:0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

                                                      Function: xmlXIncludeProcessTreeFlagsData

                                                      int	xmlXIncludeProcessTreeFlagsData	(xmlNodePtr tree, 
                                                      int flags,
                                                      void * data)
                                                      +

                                                      Implement the XInclude substitution on the XML node @tree

                                                      +
                                                      tree:an XML node
                                                      flags:a set of xmlParserOption used for parsing XML includes
                                                      data:application data that will be passed to the parser context in the _private field of the parser context(s)
                                                      Returns:0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

                                                      Function: xmlXIncludeSetFlags

                                                      int	xmlXIncludeSetFlags		(xmlXIncludeCtxtPtr ctxt, 
                                                      int flags)

                                                      Set the flags used for further processing of XML resources.

                                                      ctxt:an XInclude processing context
                                                      flags:a set of xmlParserOption used for parsing XML includes
                                                      Returns:0 in case of success and -1 in case of error.

                                                      Daniel Veillard

                                                      diff --git a/doc/html/libxml-xlink.html b/doc/html/libxml-xlink.html index 4c1c7ba..1786d3d 100644 --- a/doc/html/libxml-xlink.html +++ b/doc/html/libxml-xlink.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module xlink from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xlink from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      unfinished XLink detection module

                                                      Table of Contents

                                                      Enum xlinkActuate
                                                      +    Module xlink from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xlink from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      unfinished XLink detection module

                                                      Table of Contents

                                                      Enum xlinkActuate
                                                       
                                                      Typedef xmlChar * xlinkHRef
                                                       
                                                      Structure xlinkHandler
                                                      struct _xlinkHandler
                                                      Typedef xlinkHandler * xlinkHandlerPtr
                                                      diff --git a/doc/html/libxml-xmlIO.html b/doc/html/libxml-xmlIO.html
                                                      index 0ca4bc9..0c8d846 100644
                                                      --- a/doc/html/libxml-xmlIO.html
                                                      +++ b/doc/html/libxml-xmlIO.html
                                                      @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline }
                                                       Module xmlIO from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlIO from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      interface for the I/O interfaces used by the parser

                                                      Table of Contents

                                                      xmlOutputBufferPtr	xmlAllocOutputBuffer	(xmlCharEncodingHandlerPtr encoder)
                                                      + Module xmlIO from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlIO from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      interface for the I/O interfaces used by the parser

                                                      Table of Contents

                                                      xmlOutputBufferPtr	xmlAllocOutputBuffer	(xmlCharEncodingHandlerPtr encoder)
                                                      xmlParserInputBufferPtr	xmlAllocParserInputBuffer	(xmlCharEncoding enc)
                                                      int	xmlCheckFilename		(const char * path)
                                                      xmlParserInputPtr	xmlCheckHTTPInput	(xmlParserCtxtPtr ctxt, 
                                                      xmlParserInputPtr ret)
                                                      diff --git a/doc/html/libxml-xmlautomata.html b/doc/html/libxml-xmlautomata.html index 1361214..cf707b5 100644 --- a/doc/html/libxml-xmlautomata.html +++ b/doc/html/libxml-xmlautomata.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module xmlautomata from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlautomata from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      the API to build regexp automata

                                                      Table of Contents

                                                      Structure xmlAutomata
                                                      struct _xmlAutomata + Module xmlautomata from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlautomata from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      the API to build regexp automata

                                                      Table of Contents

                                                      Structure xmlAutomata
                                                      struct _xmlAutomata The content of this structure is not made public by the API.
                                                      Typedef xmlAutomata * xmlAutomataPtr
                                                       
                                                      Structure xmlAutomataState
                                                      struct _xmlAutomataState diff --git a/doc/html/libxml-xmlerror.html b/doc/html/libxml-xmlerror.html index 74af5ed..6e9f36f 100644 --- a/doc/html/libxml-xmlerror.html +++ b/doc/html/libxml-xmlerror.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module xmlerror from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlerror from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      the API used to report errors

                                                      Table of Contents

                                                      Structure xmlError
                                                      struct _xmlError + Module xmlerror from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlerror from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      the API used to report errors

                                                      Table of Contents

                                                      Structure xmlError
                                                      struct _xmlError
                                                      Enum xmlErrorDomain
                                                       
                                                      Enum xmlErrorLevel
                                                       
                                                      Typedef xmlError * xmlErrorPtr
                                                      diff --git a/doc/html/libxml-xmlexports.html b/doc/html/libxml-xmlexports.html
                                                      index 38a05a3..7adf4c1 100644
                                                      --- a/doc/html/libxml-xmlexports.html
                                                      +++ b/doc/html/libxml-xmlexports.html
                                                      @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline }
                                                       Module xmlexports from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlexports from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      macros for marking symbols as exportable/importable.

                                                      Table of Contents

                                                      #define LIBXML_DLL_IMPORT
                                                      #define XMLCALL
                                                      #define XMLCDECL
                                                      #define XMLPUBFUN
                                                      #define XMLPUBVAR
                                                      #define _REENTRANT

                                                      Description

                                                      + Module xmlexports from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlexports from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      macros for marking symbols as exportable/importable.

                                                      Table of Contents

                                                      #define LIBXML_DLL_IMPORT
                                                      #define XMLCALL
                                                      #define XMLCDECL
                                                      #define XMLPUBFUN
                                                      #define XMLPUBVAR
                                                      #define _REENTRANT

                                                      Description

                                                      Macro: LIBXML_DLL_IMPORT

                                                      #define LIBXML_DLL_IMPORT

                                                      Macro: XMLCALL

                                                      #define XMLCALL

                                                      Macro: XMLCDECL

                                                      #define XMLCDECL

                                                      diff --git a/doc/html/libxml-xmlmemory.html b/doc/html/libxml-xmlmemory.html index 8dd16ec..34399ca 100644 --- a/doc/html/libxml-xmlmemory.html +++ b/doc/html/libxml-xmlmemory.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module xmlmemory from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlmemory from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      provides interfaces for the memory allocator, including debugging capabilities.

                                                      Table of Contents

                                                      #define DEBUG_MEMORY
                                                      Variable xmlMallocFunc xmlMalloc
                                                      +    Module xmlmemory from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlmemory from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      provides interfaces for the memory allocator, including debugging capabilities.

                                                      Table of Contents

                                                      #define DEBUG_MEMORY
                                                      Variable xmlMallocFunc xmlMalloc
                                                       
                                                       
                                                      Variable xmlMallocFunc xmlMallocAtomic
                                                       
                                                      diff --git a/doc/html/libxml-xmlmodule.html b/doc/html/libxml-xmlmodule.html
                                                      index 0a6c4a8..97e6bae 100644
                                                      --- a/doc/html/libxml-xmlmodule.html
                                                      +++ b/doc/html/libxml-xmlmodule.html
                                                      @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline }
                                                       Module xmlmodule from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlmodule from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      basic API for dynamic module loading, used by libexslt added in 2.6.17

                                                      Table of Contents

                                                      Structure xmlModule
                                                      struct _xmlModule + Module xmlmodule from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlmodule from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      basic API for dynamic module loading, used by libexslt added in 2.6.17

                                                      Table of Contents

                                                      Structure xmlModule
                                                      struct _xmlModule The content of this structure is not made public by the API.
                                                      Enum xmlModuleOption
                                                       
                                                      Typedef xmlModule * xmlModulePtr
                                                      diff --git a/doc/html/libxml-xmlreader.html b/doc/html/libxml-xmlreader.html
                                                      index f02707a..f010f65 100644
                                                      --- a/doc/html/libxml-xmlreader.html
                                                      +++ b/doc/html/libxml-xmlreader.html
                                                      @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline }
                                                       Module xmlreader from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlreader from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      API of the XML streaming API based on C# interfaces.

                                                      Table of Contents

                                                      Enum xmlParserProperties
                                                      +    Module xmlreader from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlreader from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      API of the XML streaming API based on C# interfaces.

                                                      Table of Contents

                                                      Enum xmlParserProperties
                                                       
                                                      Enum xmlParserSeverities
                                                       
                                                      Enum xmlReaderTypes
                                                       
                                                      Structure xmlTextReader
                                                      struct _xmlTextReader @@ -185,7 +185,7 @@ The content of this structure is not made public by the API.

                                                      Provides the number of attributes of the current node

                                                      reader:the xmlTextReaderPtr used
                                                      Returns:0 i no attributes, -1 in case of error or the attribute count

                                                      Function: xmlTextReaderBaseUri

                                                      xmlChar *	xmlTextReaderBaseUri	(xmlTextReaderPtr reader)

                                                      The base URI of the node.

                                                      -
                                                      reader:the xmlTextReaderPtr used
                                                      Returns:the base URI or NULL if not available

                                                      Function: xmlTextReaderByteConsumed

                                                      long	xmlTextReaderByteConsumed	(xmlTextReaderPtr reader)
                                                      +
                                                      reader:the xmlTextReaderPtr used
                                                      Returns:the base URI or NULL if not available, if non NULL it need to be freed by the caller.

                                                      Function: xmlTextReaderByteConsumed

                                                      long	xmlTextReaderByteConsumed	(xmlTextReaderPtr reader)

                                                      This function provides the current index of the parser used by the reader, relative to the start of the current entity. This function actually just wraps a call to xmlBytesConsumed() for the parser context associated with the reader. See xmlBytesConsumed() for more information.

                                                      reader:an XML reader
                                                      Returns:the index in bytes from the beginning of the entity or -1 in case the index could not be computed.

                                                      Function: xmlTextReaderClose

                                                      int	xmlTextReaderClose		(xmlTextReaderPtr reader)

                                                      This method releases any resources allocated by the current instance changes the state to Closed and close any underlying input.

                                                      @@ -250,9 +250,9 @@ void xmlTextReaderErrorFunc (void * arg,
                                                      const char * msg,

                                                      Retrieve the validity status from the parser context

                                                      reader:the xmlTextReaderPtr used
                                                      Returns:the flag value 1 if valid, 0 if no, and -1 in case of error

                                                      Function: xmlTextReaderLocalName

                                                      xmlChar *	xmlTextReaderLocalName	(xmlTextReaderPtr reader)

                                                      The local name of the node.

                                                      -
                                                      reader:the xmlTextReaderPtr used
                                                      Returns:the local name or NULL if not available

                                                      Function: xmlTextReaderLocatorBaseURI

                                                      xmlChar *	xmlTextReaderLocatorBaseURI	(xmlTextReaderLocatorPtr locator)
                                                      +
                                                      reader:the xmlTextReaderPtr used
                                                      Returns:the local name or NULL if not available, if non NULL it need to be freed by the caller.

                                                      Function: xmlTextReaderLocatorBaseURI

                                                      xmlChar *	xmlTextReaderLocatorBaseURI	(xmlTextReaderLocatorPtr locator)

                                                      Obtain the base URI for the given locator.

                                                      -
                                                      locator:the xmlTextReaderLocatorPtr used
                                                      Returns:the base URI or NULL in case of error.

                                                      Function: xmlTextReaderLocatorLineNumber

                                                      int	xmlTextReaderLocatorLineNumber	(xmlTextReaderLocatorPtr locator)
                                                      +
                                                      locator:the xmlTextReaderLocatorPtr used
                                                      Returns:the base URI or NULL in case of error, if non NULL it need to be freed by the caller.

                                                      Function: xmlTextReaderLocatorLineNumber

                                                      int	xmlTextReaderLocatorLineNumber	(xmlTextReaderLocatorPtr locator)

                                                      Obtain the line number for the given locator.

                                                      locator:the xmlTextReaderLocatorPtr used
                                                      Returns:the line number or -1 in case of error.

                                                      Function: xmlTextReaderLookupNamespace

                                                      xmlChar *	xmlTextReaderLookupNamespace	(xmlTextReaderPtr reader, 
                                                      const xmlChar * prefix)

                                                      Resolves a namespace prefix in the scope of the current element.

                                                      @@ -270,9 +270,9 @@ void xmlTextReaderErrorFunc (void * arg,
                                                      const char * msg,

                                                      Moves the position of the current instance to the next attribute associated with the current node.

                                                      reader:the xmlTextReaderPtr used
                                                      Returns:1 in case of success, -1 in case of error, 0 if not found

                                                      Function: xmlTextReaderName

                                                      xmlChar *	xmlTextReaderName	(xmlTextReaderPtr reader)

                                                      The qualified name of the node, equal to Prefix :LocalName.

                                                      -
                                                      reader:the xmlTextReaderPtr used
                                                      Returns:the local name or NULL if not available

                                                      Function: xmlTextReaderNamespaceUri

                                                      xmlChar *	xmlTextReaderNamespaceUri	(xmlTextReaderPtr reader)
                                                      +
                                                      reader:the xmlTextReaderPtr used
                                                      Returns:the local name or NULL if not available, if non NULL it need to be freed by the caller.

                                                      Function: xmlTextReaderNamespaceUri

                                                      xmlChar *	xmlTextReaderNamespaceUri	(xmlTextReaderPtr reader)

                                                      The URI defining the namespace associated with the node.

                                                      -
                                                      reader:the xmlTextReaderPtr used
                                                      Returns:the namespace URI or NULL if not available

                                                      Function: xmlTextReaderNext

                                                      int	xmlTextReaderNext		(xmlTextReaderPtr reader)
                                                      +
                                                      reader:the xmlTextReaderPtr used
                                                      Returns:the namespace URI or NULL if not available, if non NULL it need to be freed by the caller.

                                                      Function: xmlTextReaderNext

                                                      int	xmlTextReaderNext		(xmlTextReaderPtr reader)

                                                      Skip to the node following the current one in document order while avoiding the subtree if any.

                                                      reader:the xmlTextReaderPtr used
                                                      Returns:1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error

                                                      Function: xmlTextReaderNextSibling

                                                      int	xmlTextReaderNextSibling	(xmlTextReaderPtr reader)

                                                      Skip to the node following the current one in document order while avoiding the subtree if any. Currently implemented only for Readers built on a document

                                                      @@ -282,7 +282,7 @@ void xmlTextReaderErrorFunc (void * arg,
                                                      const char * msg,

                                                      The value indicating whether to normalize white space and attribute values. Since attribute value and end of line normalizations are a MUST in the XML specification only the value true is accepted. The broken bahaviour of accepting out of range character entities like &#0; is of course not supported either.

                                                      reader:the xmlTextReaderPtr used
                                                      Returns:1 or -1 in case of error.

                                                      Function: xmlTextReaderPrefix

                                                      xmlChar *	xmlTextReaderPrefix	(xmlTextReaderPtr reader)

                                                      A shorthand reference to the namespace associated with the node.

                                                      -
                                                      reader:the xmlTextReaderPtr used
                                                      Returns:the prefix or NULL if not available

                                                      Function: xmlTextReaderPreserve

                                                      xmlNodePtr	xmlTextReaderPreserve	(xmlTextReaderPtr reader)
                                                      +
                                                      reader:the xmlTextReaderPtr used
                                                      Returns:the prefix or NULL if not available, if non NULL it need to be freed by the caller.

                                                      Function: xmlTextReaderPreserve

                                                      xmlNodePtr	xmlTextReaderPreserve	(xmlTextReaderPtr reader)

                                                      This tells the XML Reader to preserve the current node. The caller must also use xmlTextReaderCurrentDoc() to keep an handle on the resulting document once parsing has finished

                                                      reader:the xmlTextReaderPtr used
                                                      Returns:the xmlNodePtr or NULL in case of error.

                                                      Function: xmlTextReaderPreservePattern

                                                      int	xmlTextReaderPreservePattern	(xmlTextReaderPtr reader, 
                                                      const xmlChar * pattern,
                                                      const xmlChar ** namespaces)

                                                      This tells the XML Reader to preserve all nodes matched by the pattern. The caller must also use xmlTextReaderCurrentDoc() to keep an handle on the resulting document once parsing has finished

                                                      @@ -324,4 +324,4 @@ void xmlTextReaderErrorFunc (void * arg,
                                                      const char * msg,

                                                      Provides the text value of the node if present

                                                      reader:the xmlTextReaderPtr used
                                                      Returns:the string or NULL if not available. The result must be deallocated with xmlFree()

                                                      Function: xmlTextReaderXmlLang

                                                      xmlChar *	xmlTextReaderXmlLang	(xmlTextReaderPtr reader)

                                                      The xml:lang scope within which the node resides.

                                                      -
                                                      reader:the xmlTextReaderPtr used
                                                      Returns:the xml:lang value or NULL if none exists.

                                                      Daniel Veillard

                                                      +
                                                      reader:the xmlTextReaderPtr used
                                                      Returns:the xml:lang value or NULL if none exists., if non NULL it need to be freed by the caller.

                                                      Daniel Veillard

                                                      diff --git a/doc/html/libxml-xmlregexp.html b/doc/html/libxml-xmlregexp.html index 15de2f4..13f55b0 100644 --- a/doc/html/libxml-xmlregexp.html +++ b/doc/html/libxml-xmlregexp.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module xmlregexp from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlregexp from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      basic API for libxml regular expressions handling used for XML Schemas and validation.

                                                      Table of Contents

                                                      Structure xmlExpCtxt
                                                      struct _xmlExpCtxt + Module xmlregexp from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlregexp from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      basic API for libxml regular expressions handling used for XML Schemas and validation.

                                                      Table of Contents

                                                      Structure xmlExpCtxt
                                                      struct _xmlExpCtxt The content of this structure is not made public by the API.
                                                      Typedef xmlExpCtxt * xmlExpCtxtPtr
                                                       
                                                      Structure xmlExpNode
                                                      struct _xmlExpNode diff --git a/doc/html/libxml-xmlsave.html b/doc/html/libxml-xmlsave.html index 8609169..7442a98 100644 --- a/doc/html/libxml-xmlsave.html +++ b/doc/html/libxml-xmlsave.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module xmlsave from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlsave from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      API to save document or subtree of document

                                                      Table of Contents

                                                      Structure xmlSaveCtxt
                                                      struct _xmlSaveCtxt + Module xmlsave from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlsave from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      API to save document or subtree of document

                                                      Table of Contents

                                                      Structure xmlSaveCtxt
                                                      struct _xmlSaveCtxt The content of this structure is not made public by the API.
                                                      Typedef xmlSaveCtxt * xmlSaveCtxtPtr
                                                       
                                                      Enum xmlSaveOption
                                                      diff --git a/doc/html/libxml-xmlschemas.html b/doc/html/libxml-xmlschemas.html
                                                      index aa4b76f..eea85b2 100644
                                                      --- a/doc/html/libxml-xmlschemas.html
                                                      +++ b/doc/html/libxml-xmlschemas.html
                                                      @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline }
                                                       Module xmlschemas from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlschemas from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      interface to the XML Schemas handling and schema validity checking, it is incomplete right now.

                                                      Table of Contents

                                                      Structure xmlSchema
                                                      struct _xmlSchema + Module xmlschemas from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlschemas from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      interface to the XML Schemas handling and schema validity checking, it is incomplete right now.

                                                      Table of Contents

                                                      Structure xmlSchema
                                                      struct _xmlSchema
                                                      Structure xmlSchemaParserCtxt
                                                      struct _xmlSchemaParserCtxt The content of this structure is not made public by the API.
                                                      Typedef xmlSchemaParserCtxt * xmlSchemaParserCtxtPtr
                                                      diff --git a/doc/html/libxml-xmlschemastypes.html b/doc/html/libxml-xmlschemastypes.html
                                                      index ef44e80..e625809 100644
                                                      --- a/doc/html/libxml-xmlschemastypes.html
                                                      +++ b/doc/html/libxml-xmlschemastypes.html
                                                      @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline }
                                                       Module xmlschemastypes from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlschemastypes from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      module providing the XML Schema Datatypes implementation both definition and validity checking

                                                      Table of Contents

                                                      Enum xmlSchemaWhitespaceValueType
                                                      +    Module xmlschemastypes from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlschemastypes from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      module providing the XML Schema Datatypes implementation both definition and validity checking

                                                      Table of Contents

                                                      Enum xmlSchemaWhitespaceValueType
                                                       
                                                      int	xmlSchemaCheckFacet		(xmlSchemaFacetPtr facet, 
                                                      xmlSchemaTypePtr typeDecl,
                                                      xmlSchemaParserCtxtPtr pctxt,
                                                      const xmlChar * name)
                                                      void	xmlSchemaCleanupTypes		(void)
                                                      xmlChar *	xmlSchemaCollapseString	(const xmlChar * value)
                                                      diff --git a/doc/html/libxml-xmlstring.html b/doc/html/libxml-xmlstring.html index f7c9a64..91b62de 100644 --- a/doc/html/libxml-xmlstring.html +++ b/doc/html/libxml-xmlstring.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module xmlstring from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlstring from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      type and interfaces needed for the internal string handling of the library, especially UTF8 processing.

                                                      Table of Contents

                                                      #define BAD_CAST
                                                      Typedef unsigned char xmlChar
                                                      +    Module xmlstring from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlstring from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      type and interfaces needed for the internal string handling of the library, especially UTF8 processing.

                                                      Table of Contents

                                                      #define BAD_CAST
                                                      Typedef unsigned char xmlChar
                                                       
                                                      xmlChar *	xmlCharStrdup		(const char * cur)
                                                      xmlChar *	xmlCharStrndup		(const char * cur, 
                                                      int len)
                                                      int	xmlCheckUTF8			(const unsigned char * utf)
                                                      @@ -20,7 +20,7 @@ A:link, A:visited, A:active { text-decoration: underline }
                                                      int	xmlStrQEqual			(const xmlChar * pref, 
                                                      const xmlChar * name,
                                                      const xmlChar * str)
                                                      int	xmlStrVPrintf			(xmlChar * buf, 
                                                      int len,
                                                      const xmlChar * msg,
                                                      va_list ap)
                                                      int	xmlStrcasecmp			(const xmlChar * str1, 
                                                      const xmlChar * str2)
                                                      -
                                                      const xmlChar *	xmlStrcasestr		(const xmlChar * str, 
                                                      xmlChar * val)
                                                      +
                                                      const xmlChar *	xmlStrcasestr		(const xmlChar * str, 
                                                      const xmlChar * val)
                                                      xmlChar *	xmlStrcat		(xmlChar * cur, 
                                                      const xmlChar * add)
                                                      const xmlChar *	xmlStrchr		(const xmlChar * str, 
                                                      xmlChar val)
                                                      int	xmlStrcmp			(const xmlChar * str1, 
                                                      const xmlChar * str2)
                                                      @@ -63,7 +63,7 @@ A:link, A:visited, A:active { text-decoration: underline }

                                                      Formats @msg and places result into @buf.

                                                      buf:the result buffer.
                                                      len:the result buffer length.
                                                      msg:the message with printf formatting.
                                                      ap:extra parameters for the message.
                                                      Returns:the number of characters written to @buf or -1 if an error occurs.

                                                      Function: xmlStrcasecmp

                                                      int	xmlStrcasecmp			(const xmlChar * str1, 
                                                      const xmlChar * str2)

                                                      a strcasecmp for xmlChar's

                                                      -
                                                      str1:the first xmlChar *
                                                      str2:the second xmlChar *
                                                      Returns:the integer result of the comparison

                                                      Function: xmlStrcasestr

                                                      const xmlChar *	xmlStrcasestr		(const xmlChar * str, 
                                                      xmlChar * val)
                                                      +
                                                      str1:the first xmlChar *
                                                      str2:the second xmlChar *
                                                      Returns:the integer result of the comparison

                                                      Function: xmlStrcasestr

                                                      const xmlChar *	xmlStrcasestr		(const xmlChar * str, 
                                                      const xmlChar * val)

                                                      a case-ignoring strstr for xmlChar's

                                                      str:the xmlChar * array (haystack)
                                                      val:the xmlChar to search (needle)
                                                      Returns:the xmlChar * for the first occurrence or NULL.

                                                      Function: xmlStrcat

                                                      xmlChar *	xmlStrcat		(xmlChar * cur, 
                                                      const xmlChar * add)

                                                      a strcat for array of xmlChar's. Since they are supposed to be encoded in UTF-8 or an encoding with 8bit based chars, we assume a termination mark of '0'.

                                                      diff --git a/doc/html/libxml-xmlunicode.html b/doc/html/libxml-xmlunicode.html index 7ee50ef..b3514d0 100644 --- a/doc/html/libxml-xmlunicode.html +++ b/doc/html/libxml-xmlunicode.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module xmlunicode from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlunicode from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      API for the Unicode character APIs This file is automatically generated from the UCS description files of the Unicode Character Database

                                                      Table of Contents

                                                      int	xmlUCSIsAegeanNumbers		(int code)
                                                      + Module xmlunicode from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlunicode from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      API for the Unicode character APIs This file is automatically generated from the UCS description files of the Unicode Character Database

                                                      Table of Contents

                                                      int	xmlUCSIsAegeanNumbers		(int code)
                                                      int	xmlUCSIsAlphabeticPresentationForms	(int code)
                                                      int	xmlUCSIsArabic			(int code)
                                                      int	xmlUCSIsArabicPresentationFormsA	(int code)
                                                      diff --git a/doc/html/libxml-xmlversion.html b/doc/html/libxml-xmlversion.html index 3317c0a..65a6ef4 100644 --- a/doc/html/libxml-xmlversion.html +++ b/doc/html/libxml-xmlversion.html @@ -10,12 +10,12 @@ A:link, A:visited, A:active { text-decoration: underline } Module xmlversion from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlversion from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      compile-time version informations for the XML library

                                                      Table of Contents

                                                      #define ATTRIBUTE_ALLOC_SIZE
                                                      #define ATTRIBUTE_PRINTF
                                                      #define ATTRIBUTE_UNUSED
                                                      #define DEBUG_MEMORY_LOCATION
                                                      #define LIBXML_AUTOMATA_ENABLED
                                                      #define LIBXML_C14N_ENABLED
                                                      #define LIBXML_CATALOG_ENABLED
                                                      #define LIBXML_DEBUG_ENABLED
                                                      #define LIBXML_DEBUG_RUNTIME
                                                      #define LIBXML_DOCB_ENABLED
                                                      #define LIBXML_DOTTED_VERSION
                                                      #define LIBXML_EXPR_ENABLED
                                                      #define LIBXML_FTP_ENABLED
                                                      #define LIBXML_HTML_ENABLED
                                                      #define LIBXML_HTTP_ENABLED
                                                      #define LIBXML_ICONV_ENABLED
                                                      #define LIBXML_ISO8859X_ENABLED
                                                      #define LIBXML_LEGACY_ENABLED
                                                      #define LIBXML_MODULES_ENABLED
                                                      #define LIBXML_MODULE_EXTENSION
                                                      #define LIBXML_OUTPUT_ENABLED
                                                      #define LIBXML_PATTERN_ENABLED
                                                      #define LIBXML_PUSH_ENABLED
                                                      #define LIBXML_READER_ENABLED
                                                      #define LIBXML_REGEXP_ENABLED
                                                      #define LIBXML_SAX1_ENABLED
                                                      #define LIBXML_SCHEMAS_ENABLED
                                                      #define LIBXML_SCHEMATRON_ENABLED
                                                      #define LIBXML_TEST_VERSION
                                                      #define LIBXML_THREAD_ENABLED
                                                      #define LIBXML_TREE_ENABLED
                                                      #define LIBXML_UNICODE_ENABLED
                                                      #define LIBXML_VALID_ENABLED
                                                      #define LIBXML_VERSION
                                                      #define LIBXML_VERSION_EXTRA
                                                      #define LIBXML_VERSION_STRING
                                                      #define LIBXML_WRITER_ENABLED
                                                      #define LIBXML_XINCLUDE_ENABLED
                                                      #define LIBXML_XPATH_ENABLED
                                                      #define LIBXML_XPTR_ENABLED
                                                      #define LIBXML_ZLIB_ENABLED
                                                      #define WITHOUT_TRIO
                                                      #define WITH_TRIO
                                                      void	xmlCheckVersion			(int version)
                                                      + Module xmlversion from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlversion from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      compile-time version informations for the XML library

                                                      Table of Contents

                                                      #define ATTRIBUTE_UNUSED
                                                      #define DEBUG_MEMORY_LOCATION
                                                      #define LIBXML_ATTR_ALLOC_SIZE
                                                      #define LIBXML_ATTR_FORMAT
                                                      #define LIBXML_AUTOMATA_ENABLED
                                                      #define LIBXML_C14N_ENABLED
                                                      #define LIBXML_CATALOG_ENABLED
                                                      #define LIBXML_DEBUG_ENABLED
                                                      #define LIBXML_DEBUG_RUNTIME
                                                      #define LIBXML_DOCB_ENABLED
                                                      #define LIBXML_DOTTED_VERSION
                                                      #define LIBXML_EXPR_ENABLED
                                                      #define LIBXML_FTP_ENABLED
                                                      #define LIBXML_HTML_ENABLED
                                                      #define LIBXML_HTTP_ENABLED
                                                      #define LIBXML_ICONV_ENABLED
                                                      #define LIBXML_ISO8859X_ENABLED
                                                      #define LIBXML_LEGACY_ENABLED
                                                      #define LIBXML_MODULES_ENABLED
                                                      #define LIBXML_MODULE_EXTENSION
                                                      #define LIBXML_OUTPUT_ENABLED
                                                      #define LIBXML_PATTERN_ENABLED
                                                      #define LIBXML_PUSH_ENABLED
                                                      #define LIBXML_READER_ENABLED
                                                      #define LIBXML_REGEXP_ENABLED
                                                      #define LIBXML_SAX1_ENABLED
                                                      #define LIBXML_SCHEMAS_ENABLED
                                                      #define LIBXML_SCHEMATRON_ENABLED
                                                      #define LIBXML_TEST_VERSION
                                                      #define LIBXML_THREAD_ENABLED
                                                      #define LIBXML_TREE_ENABLED
                                                      #define LIBXML_UNICODE_ENABLED
                                                      #define LIBXML_VALID_ENABLED
                                                      #define LIBXML_VERSION
                                                      #define LIBXML_VERSION_EXTRA
                                                      #define LIBXML_VERSION_STRING
                                                      #define LIBXML_WRITER_ENABLED
                                                      #define LIBXML_XINCLUDE_ENABLED
                                                      #define LIBXML_XPATH_ENABLED
                                                      #define LIBXML_XPTR_ENABLED
                                                      #define LIBXML_ZLIB_ENABLED
                                                      #define WITHOUT_TRIO
                                                      #define WITH_TRIO
                                                      void	xmlCheckVersion			(int version)

                                                      Description

                                                      -

                                                      Macro: ATTRIBUTE_ALLOC_SIZE

                                                      #define ATTRIBUTE_ALLOC_SIZE

                                                      Macro used to indicate to GCC this is an allocator function

                                                      -

                                                      Macro: ATTRIBUTE_PRINTF

                                                      #define ATTRIBUTE_PRINTF

                                                      Macro used to indicate to GCC the parameter are printf like

                                                      Macro: ATTRIBUTE_UNUSED

                                                      #define ATTRIBUTE_UNUSED

                                                      Macro used to signal to GCC unused function parameters

                                                      Macro: DEBUG_MEMORY_LOCATION

                                                      #define DEBUG_MEMORY_LOCATION

                                                      Whether the memory debugging is configured in

                                                      +

                                                      Macro: LIBXML_ATTR_ALLOC_SIZE

                                                      #define LIBXML_ATTR_ALLOC_SIZE

                                                      Macro used to indicate to GCC this is an allocator function

                                                      +

                                                      Macro: LIBXML_ATTR_FORMAT

                                                      #define LIBXML_ATTR_FORMAT

                                                      Macro used to indicate to GCC the parameter are printf like

                                                      Macro: LIBXML_AUTOMATA_ENABLED

                                                      #define LIBXML_AUTOMATA_ENABLED

                                                      Whether the automata interfaces are compiled in

                                                      Macro: LIBXML_C14N_ENABLED

                                                      #define LIBXML_C14N_ENABLED

                                                      Whether the Canonicalization support is configured in

                                                      Macro: LIBXML_CATALOG_ENABLED

                                                      #define LIBXML_CATALOG_ENABLED

                                                      Whether the Catalog support is configured in

                                                      diff --git a/doc/html/libxml-xmlwriter.html b/doc/html/libxml-xmlwriter.html index 1d3c6fd..7804ce0 100644 --- a/doc/html/libxml-xmlwriter.html +++ b/doc/html/libxml-xmlwriter.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module xmlwriter from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlwriter from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      text writing API for XML

                                                      Table of Contents

                                                      #define xmlTextWriterWriteDocType
                                                      #define xmlTextWriterWriteProcessingInstruction
                                                      Structure xmlTextWriter
                                                      struct _xmlTextWriter + Module xmlwriter from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xmlwriter from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      text writing API for XML

                                                      Table of Contents

                                                      #define xmlTextWriterWriteDocType
                                                      #define xmlTextWriterWriteProcessingInstruction
                                                      Structure xmlTextWriter
                                                      struct _xmlTextWriter The content of this structure is not made public by the API.
                                                      Typedef xmlTextWriter * xmlTextWriterPtr
                                                       
                                                      void	xmlFreeTextWriter		(xmlTextWriterPtr writer)
                                                      diff --git a/doc/html/libxml-xpath.html b/doc/html/libxml-xpath.html index ce71616..8d66504 100644 --- a/doc/html/libxml-xpath.html +++ b/doc/html/libxml-xpath.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module xpath from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xpath from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      API for the XML Path Language implementation XML Path Language implementation XPath is a language for addressing parts of an XML document, designed to be used by both XSLT and XPointer

                                                      Table of Contents

                                                      #define XML_XPATH_CHECKNS
                                                      #define XML_XPATH_NOVAR
                                                      #define xmlXPathNodeSetGetLength
                                                      #define xmlXPathNodeSetIsEmpty
                                                      #define xmlXPathNodeSetItem
                                                      Structure xmlNodeSet
                                                      struct _xmlNodeSet + Module xpath from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xpath from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      API for the XML Path Language implementation XML Path Language implementation XPath is a language for addressing parts of an XML document, designed to be used by both XSLT and XPointer

                                                      Table of Contents

                                                      #define XML_XPATH_CHECKNS
                                                      #define XML_XPATH_NOVAR
                                                      #define xmlXPathNodeSetGetLength
                                                      #define xmlXPathNodeSetIsEmpty
                                                      #define xmlXPathNodeSetItem
                                                      Structure xmlNodeSet
                                                      struct _xmlNodeSet
                                                      Typedef xmlNodeSet * xmlNodeSetPtr
                                                       
                                                      Structure xmlXPathAxis
                                                      struct _xmlXPathAxis
                                                      Typedef xmlXPathAxis * xmlXPathAxisPtr
                                                      diff --git a/doc/html/libxml-xpathInternals.html b/doc/html/libxml-xpathInternals.html
                                                      index d3ac35f..2377f2e 100644
                                                      --- a/doc/html/libxml-xpathInternals.html
                                                      +++ b/doc/html/libxml-xpathInternals.html
                                                      @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline }
                                                       Module xpathInternals from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xpathInternals from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      internal interfaces for XML Path Language implementation used to build new modules on top of XPath like XPointer and XSLT

                                                      Table of Contents

                                                      #define CAST_TO_BOOLEAN
                                                      #define CAST_TO_NUMBER
                                                      #define CAST_TO_STRING
                                                      #define CHECK_ARITY
                                                      #define CHECK_ERROR
                                                      #define CHECK_ERROR0
                                                      #define CHECK_TYPE
                                                      #define CHECK_TYPE0
                                                      #define XP_ERROR
                                                      #define XP_ERROR0
                                                      #define xmlXPathCheckError
                                                      #define xmlXPathEmptyNodeSet
                                                      #define xmlXPathGetContextNode
                                                      #define xmlXPathGetDocument
                                                      #define xmlXPathGetError
                                                      #define xmlXPathReturnBoolean
                                                      #define xmlXPathReturnEmptyNodeSet
                                                      #define xmlXPathReturnEmptyString
                                                      #define xmlXPathReturnExternal
                                                      #define xmlXPathReturnFalse
                                                      #define xmlXPathReturnNodeSet
                                                      #define xmlXPathReturnNumber
                                                      #define xmlXPathReturnString
                                                      #define xmlXPathReturnTrue
                                                      #define xmlXPathSetArityError
                                                      #define xmlXPathSetError
                                                      #define xmlXPathSetTypeError
                                                      #define xmlXPathStackIsExternal
                                                      #define xmlXPathStackIsNodeSet
                                                      xmlXPathObjectPtr	valuePop	(xmlXPathParserContextPtr ctxt)
                                                      + Module xpathInternals from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xpathInternals from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      internal interfaces for XML Path Language implementation used to build new modules on top of XPath like XPointer and XSLT

                                                      Table of Contents

                                                      #define CAST_TO_BOOLEAN
                                                      #define CAST_TO_NUMBER
                                                      #define CAST_TO_STRING
                                                      #define CHECK_ARITY
                                                      #define CHECK_ERROR
                                                      #define CHECK_ERROR0
                                                      #define CHECK_TYPE
                                                      #define CHECK_TYPE0
                                                      #define XP_ERROR
                                                      #define XP_ERROR0
                                                      #define xmlXPathCheckError
                                                      #define xmlXPathEmptyNodeSet
                                                      #define xmlXPathGetContextNode
                                                      #define xmlXPathGetDocument
                                                      #define xmlXPathGetError
                                                      #define xmlXPathReturnBoolean
                                                      #define xmlXPathReturnEmptyNodeSet
                                                      #define xmlXPathReturnEmptyString
                                                      #define xmlXPathReturnExternal
                                                      #define xmlXPathReturnFalse
                                                      #define xmlXPathReturnNodeSet
                                                      #define xmlXPathReturnNumber
                                                      #define xmlXPathReturnString
                                                      #define xmlXPathReturnTrue
                                                      #define xmlXPathSetArityError
                                                      #define xmlXPathSetError
                                                      #define xmlXPathSetTypeError
                                                      #define xmlXPathStackIsExternal
                                                      #define xmlXPathStackIsNodeSet
                                                      xmlXPathObjectPtr	valuePop	(xmlXPathParserContextPtr ctxt)
                                                      int	valuePush			(xmlXPathParserContextPtr ctxt, 
                                                      xmlXPathObjectPtr value)
                                                      void	xmlXPathAddValues		(xmlXPathParserContextPtr ctxt)
                                                      void	xmlXPathBooleanFunction		(xmlXPathParserContextPtr ctxt, 
                                                      int nargs)
                                                      @@ -333,7 +333,7 @@ A:link, A:visited, A:active { text-decoration: underline }

                                                      Register a new function. If @f is NULL it unregisters the function

                                                      ctxt:the XPath context
                                                      name:the function name
                                                      ns_uri:the function namespace URI
                                                      f:the function implementation or NULL
                                                      Returns:0 in case of success, -1 in case of error

                                                      Function: xmlXPathRegisterNs

                                                      int	xmlXPathRegisterNs		(xmlXPathContextPtr ctxt, 
                                                      const xmlChar * prefix,
                                                      const xmlChar * ns_uri)

                                                      Register a new namespace. If @ns_uri is NULL it unregisters the namespace

                                                      -
                                                      ctxt:the XPath context
                                                      prefix:the namespace prefix
                                                      ns_uri:the namespace name
                                                      Returns:0 in case of success, -1 in case of error

                                                      Function: xmlXPathRegisterVariable

                                                      int	xmlXPathRegisterVariable	(xmlXPathContextPtr ctxt, 
                                                      const xmlChar * name,
                                                      xmlXPathObjectPtr value)
                                                      +
                                                      ctxt:the XPath context
                                                      prefix:the namespace prefix cannot be NULL or empty string
                                                      ns_uri:the namespace name
                                                      Returns:0 in case of success, -1 in case of error

                                                      Function: xmlXPathRegisterVariable

                                                      int	xmlXPathRegisterVariable	(xmlXPathContextPtr ctxt, 
                                                      const xmlChar * name,
                                                      xmlXPathObjectPtr value)

                                                      Register a new variable value. If @value is NULL it unregisters the variable

                                                      ctxt:the XPath context
                                                      name:the variable name
                                                      value:the variable value or NULL
                                                      Returns:0 in case of success, -1 in case of error

                                                      Function: xmlXPathRegisterVariableLookup

                                                      void	xmlXPathRegisterVariableLookup	(xmlXPathContextPtr ctxt, 
                                                      xmlXPathVariableLookupFunc f,
                                                      void * data)

                                                      register an external mechanism to do variable lookup

                                                      diff --git a/doc/html/libxml-xpointer.html b/doc/html/libxml-xpointer.html index 45f8d7d..1e4eb13 100644 --- a/doc/html/libxml-xpointer.html +++ b/doc/html/libxml-xpointer.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module xpointer from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xpointer from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      API to handle XML Pointers Base implementation was made accordingly to W3C Candidate Recommendation 7 June 2000

                                                      Table of Contents

                                                      Structure xmlLocationSet
                                                      struct _xmlLocationSet + Module xpointer from libxml2
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      Module xpointer from libxml2

                                                      API Menu
                                                      API Indexes
                                                      Related links

                                                      API to handle XML Pointers Base implementation was made accordingly to W3C Candidate Recommendation 7 June 2000

                                                      Table of Contents

                                                      Structure xmlLocationSet
                                                      struct _xmlLocationSet
                                                      Typedef xmlLocationSet * xmlLocationSetPtr
                                                       
                                                      xmlNodePtr	xmlXPtrBuildNodeList	(xmlXPathObjectPtr obj)
                                                      xmlXPathObjectPtr	xmlXPtrEval	(const xmlChar * str, 
                                                      xmlXPathContextPtr ctx)
                                                      diff --git a/doc/index.html b/doc/index.html index 0b654e3..5eeb33d 100644 --- a/doc/index.html +++ b/doc/index.html @@ -174,7 +174,7 @@ A:link, A:visited, A:active { text-decoration: underline } Windows binaries
                                                    3. - Solaris binaries + Solaris binaries
                                                    4. MacOsX binaries @@ -235,7 +235,7 @@ well-known markup language. Though the library is written in C http://www.w3.org/TR/REC-xml
                                                    5. @@ -288,9 +288,10 @@ conformance statement about it at the moment.

                                                    6. the XMLSec page: an implementation of W3C XML Digital Signature for libxml2
                                                    7. -
                                                    8. also check the related links section below for more related and active +
                                                    9. also check the related links section for more related and active projects.
                                                    10. +

                                                      Hosting sponsored by Open Source CMS services from AOE media.

                                                      Logo designed by Marc Liyanage.

                                                      Daniel Veillard diff --git a/doc/interface.html b/doc/interface.html index f6fc2a9..a3db13b 100644 --- a/doc/interface.html +++ b/doc/interface.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -The SAX interface
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      The XML C parser and toolkit of Gnome

                                                      The SAX interface

                                                      Developer Menu
                                                      API Indexes
                                                      Related links

                                                      Sometimes the DOM tree output is just too large to fit reasonably into +The SAX interface
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      The XML C parser and toolkit of Gnome

                                                      The SAX interface

                                                      Developer Menu
                                                      API Indexes
                                                      Related links

                                                      Sometimes the DOM tree output is just too large to fit reasonably into memory. In that case (and if you don't expect to save back the XML document loaded using libxml), it's better to use the SAX interface of libxml. SAX is a callback-based interface to the parser. Before parsing, diff --git a/doc/intro.html b/doc/intro.html index b03cfdc..4af24dc 100644 --- a/doc/intro.html +++ b/doc/intro.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Introduction
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      The XML C parser and toolkit of Gnome

                                                      Introduction

                                                      Main Menu
                                                      Related links

                                                      This document describes libxml, the XML C parser and toolkit developed for the +Introduction
                                                      Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                      Made with Libxml2 Logo

                                                      The XML C parser and toolkit of Gnome

                                                      Introduction

                                                      Main Menu
                                                      Related links

                                                      This document describes libxml, the XML C parser and toolkit developed for the Gnome project. XML is a standard for building tag-based structured documents/data.

                                                      Here are some key points about libxml:

                                                      • Libxml2 exports Push (progressive) and Pull (blocking) type parser interfaces for both XML and HTML.
                                                      • diff --git a/doc/library.html b/doc/library.html index 04f236d..f958baa 100644 --- a/doc/library.html +++ b/doc/library.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -The parser interfaces
                                                        Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                        Made with Libxml2 Logo

                                                        The XML C parser and toolkit of Gnome

                                                        The parser interfaces

                                                        Developer Menu
                                                        API Indexes
                                                        Related links

                                                        This section is directly intended to help programmers getting bootstrapped +The parser interfaces
                                                        Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                        Made with Libxml2 Logo

                                                        The XML C parser and toolkit of Gnome

                                                        The parser interfaces

                                                        Developer Menu
                                                        API Indexes
                                                        Related links

                                                        This section is directly intended to help programmers getting bootstrapped using the XML tollkit from the C language. It is not intended to be extensive. I hope the automatically generated documents will provide the completeness required, but as a separate set of documents. The interfaces of diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml index 30da57c..5cf19cb 100644 --- a/doc/libxml2-api.xml +++ b/doc/libxml2-api.xml @@ -217,6 +217,10 @@

                                                        Provide Canonical XML and Exclusive XML Canonicalization the c14n modules provides a "Canonical XML" implementation Aleksey Sanin <aleksey@aleksey.com> + + + + @@ -481,6 +485,7 @@ + @@ -1814,6 +1819,7 @@ + @@ -3336,7 +3342,7 @@ compile-time version informations for the XML library Daniel Veillard - + @@ -3345,8 +3351,8 @@ - - + + @@ -3358,20 +3364,20 @@ + - - - + + @@ -3768,12 +3774,6 @@ - - Macro used to indicate to GCC this is an allocator function - - - Macro used to indicate to GCC the parameter are printf like - Macro used to signal to GCC unused function parameters @@ -3910,6 +3910,12 @@ Same as IS_PUBIDCHAR but for single-byte value + + Macro used to indicate to GCC this is an allocator function + + + Macro used to indicate to GCC the parameter are printf like + Whether the automata interfaces are compiled in @@ -4624,8 +4630,11 @@ + + + @@ -5927,6 +5936,7 @@ if necessary or NULL'/> + @@ -6151,6 +6161,7 @@ set at the end of parsing'/> + @@ -6246,7 +6257,10 @@ set at the end of parsing'/> - + @@ -6892,6 +6906,7 @@ Could we use @subtypes for this?'/> + @@ -8581,7 +8596,7 @@ Could we use @subtypes for this?'/> - + @@ -8592,7 +8607,7 @@ Could we use @subtypes for this?'/> - + @@ -8604,7 +8619,7 @@ Could we use @subtypes for this?'/> - + @@ -8616,7 +8631,7 @@ Could we use @subtypes for this?'/> - + @@ -8875,7 +8890,7 @@ Could we use @subtypes for this?'/> - This function name is somewhat misleading. It does not clean up parser state, it cleans up memory allocated by the library itself. It is a cleanup function for the XML library. It tries to reclaim all related global memory allocated for the library processing. It doesn't deallocate any document related memory. One should call xmlCleanupParser() only when the process has finished using the library and all XML/HTML documents built with it. See also xmlInitParser() which has the opposite function of preparing the library for operations. + This function name is somewhat misleading. It does not clean up parser state, it cleans up memory allocated by the library itself. It is a cleanup function for the XML library. It tries to reclaim all related global memory allocated for the library processing. It doesn't deallocate any document related memory. One should call xmlCleanupParser() only when the process has finished using the library and all XML/HTML documents built with it. See also xmlInitParser() which has the opposite function of preparing the library for operations. WARNING: if your application is multithreaded or has plugin support calling this may crash the application if another thread or a plugin is still using libxml2. It's sometimes very hard to guess if libxml2 is in use in the application, some libraries or plugins may use it without notice. In case of doubt abstain from calling this function or do it just before calling exit() to avoid leak reports from valgrind ! @@ -8884,7 +8899,7 @@ Could we use @subtypes for this?'/> - xmlCleanupThreads() is used to to cleanup all the thread related data of the libxml2 library once processing has ended. + xmlCleanupThreads() is used to to cleanup all the thread related data of the libxml2 library once processing has ended. WARNING: if your application is multithreaded or has plugin support calling this may crash the application if another thread or a plugin is still using libxml2. It's sometimes very hard to guess if libxml2 is in use in the application, some libraries or plugins may use it without notice. In case of doubt abstain from calling this function or do it just before calling exit() to avoid leak reports from valgrind ! @@ -10115,7 +10130,7 @@ Could we use @subtypes for this?'/> - xmlGetThreadId() find the current thread ID number + xmlGetThreadId() find the current thread ID number Note that this is likely to be broken on some platforms using pthreads as the specification doesn't mandate pthread_t to be an integer type @@ -11944,7 +11959,7 @@ Could we use @subtypes for this?'/> - parse the declaration for a Mixed Element content The leading '(' and spaces have been skipped in xmlParseElementContentDecl [47] children ::= (choice | seq) ('?' | '*' | '+')? [48] cp ::= (Name | choice | seq) ('?' | '*' | '+')? [49] choice ::= '(' S? cp ( S? '|' S? cp )* S? ')' [50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')' [ VC: Proper Group/PE Nesting ] applies to [49] and [50] TODO Parameter-entity replacement text must be properly nested with parenthesized groups. That is to say, if either of the opening or closing parentheses in a choice, seq, or Mixed construct is contained in the replacement text for a parameter entity, both must be contained in the same replacement text. For interoperability, if a parameter-entity reference appears in a choice, seq, or Mixed construct, its replacement text should not be empty, and neither the first nor last non-blank character of the replacement text should be a connector (| or ,). + parse the declaration for a Mixed Element content The leading '(' and spaces have been skipped in xmlParseElementContentDecl [47] children ::= (choice | seq) ('?' | '*' | '+')? [48] cp ::= (Name | choice | seq) ('?' | '*' | '+')? [49] choice ::= '(' S? cp ( S? '|' S? cp )* S? ')' [50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')' [ VC: Proper Group/PE Nesting ] applies to [49] and [50] TODO Parameter-entity replacement text must be properly nested with parenthesized groups. That is to say, if either of the opening or closing parentheses in a choice, seq, or Mixed construct is contained in the replacement text for a parameter entity, both must be contained in the same replacement text. For interoperability, if a parameter-entity reference appears in a choice, seq, or Mixed construct, its replacement text should not be empty, and neither the first nor last non-blank character of the replacement text should be a connector (| or ,). @@ -12625,7 +12640,7 @@ Could we use @subtypes for this?'/> defined(LIBXML_SAX1_ENABLED) parse an XML in-memory document and build a tree. In the case the document is not Well Formed, a attempt to build a tree is tried anyway - + defined(LIBXML_SAX1_ENABLED) @@ -14301,7 +14316,7 @@ Could we use @subtypes for this?'/> a case-ignoring strstr for xmlChar's - + a strcat for array of xmlChar's. Since they are supposed to be encoded in UTF-8 or an encoding with 8bit based chars, we assume a termination mark of '0'. @@ -14513,7 +14528,7 @@ Could we use @subtypes for this?'/> defined(LIBXML_READER_ENABLED) The base URI of the node. - + @@ -14716,13 +14731,13 @@ Could we use @subtypes for this?'/> defined(LIBXML_READER_ENABLED) The local name of the node. - + defined(LIBXML_READER_ENABLED) Obtain the base URI for the given locator. - + @@ -14781,13 +14796,13 @@ Could we use @subtypes for this?'/> defined(LIBXML_READER_ENABLED) The qualified name of the node, equal to Prefix :LocalName. - + defined(LIBXML_READER_ENABLED) The URI defining the namespace associated with the node. - + @@ -14817,7 +14832,7 @@ Could we use @subtypes for this?'/> defined(LIBXML_READER_ENABLED) A shorthand reference to the namespace associated with the node. - + @@ -14961,7 +14976,7 @@ Could we use @subtypes for this?'/> defined(LIBXML_READER_ENABLED) The xml:lang scope within which the node resides. - + @@ -17040,6 +17055,14 @@ Could we use @subtypes for this?'/> + + defined(LIBXML_XINCLUDE_ENABLED) + Implement the XInclude substitution on the XML node @tree + + + + + defined(LIBXML_XINCLUDE_ENABLED) Set the flags used for further processing of XML resources. @@ -17901,7 +17924,7 @@ Could we use @subtypes for this?'/> Register a new namespace. If @ns_uri is NULL it unregisters the namespace - + diff --git a/doc/libxml2.xsa b/doc/libxml2.xsa index 73f12e3..b9583f6 100644 --- a/doc/libxml2.xsa +++ b/doc/libxml2.xsa @@ -8,17 +8,21 @@ libxml2 - 2.7.2 - Oct 3 2008 + 2.7.3 + Jan 18 2009 http://xmlsoft.org/ - - Portability fix: fix solaris compilation problem, fix compilation - if XPath is not configured in - - Bug fixes: nasty entity bug introduced in 2.7.0, restore old behaviour - when saving an HTML doc with an xml dump function, HTML UTF-8 parsing - bug, fix reader custom error handlers (Riccardo Scussat) - - - Improvement: xmlSave options for more flexibility to save as - XML/HTML/XHTML, handle leading BOM in HTML documents + - Build fix: fix build when HTML support is not included. + - Bug fixes: avoid memory overflow in gigantic text nodes, + indentation problem on the writed (Rob Richards), + xmlAddChildList pointer problem (Rob Richards and Kevin Milburn), + xmlAddChild problem with attribute (Rob Richards and Kris Breuker), + avoid a memory leak in an edge case (Daniel Zimmermann), + deallocate some pthread data (Alex Ott). + - Improvements: configure option to avoid rebuilding docs (Adrian Bunk), + limit text nodes to 10MB max by default, add element traversal + APIs, add a parser option to enable pre 2.7 SAX behavior (Rob Richards), + add gcc malloc checking (Marcus Meissner), add gcc printf like functions + parameters checking (Marcus Meissner). diff --git a/doc/namespaces.html b/doc/namespaces.html index 40f3cf2..f48bd5c 100644 --- a/doc/namespaces.html +++ b/doc/namespaces.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Namespaces
                                                        Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                        Made with Libxml2 Logo

                                                        The XML C parser and toolkit of Gnome

                                                        Namespaces

                                                        Main Menu
                                                        Related links

                                                        The libxml2 library implements XML namespaces support by +Namespaces
                                                        Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                        Made with Libxml2 Logo

                                                        The XML C parser and toolkit of Gnome

                                                        Namespaces

                                                        Main Menu
                                                        Related links

                                                        The libxml2 library implements XML namespaces support by recognizing namespace constructs in the input, and does namespace lookup automatically when building the DOM tree. A namespace declaration is associated with an in-memory structure and all elements or attributes within diff --git a/doc/news.html b/doc/news.html index 50d59a1..81e45f3 100644 --- a/doc/news.html +++ b/doc/news.html @@ -7,12 +7,132 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Releases
                                                        Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                        Made with Libxml2 Logo

                                                        The XML C parser and toolkit of Gnome

                                                        Releases

                                                        Main Menu
                                                        Related links

                                                        Items not finished and worked on, get in touch with the list if you want +Releases
                                                        Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                        Made with Libxml2 Logo

                                                        The XML C parser and toolkit of Gnome

                                                        Releases

                                                        Main Menu
                                                        Related links

                                                        Items not finished and worked on, get in touch with the list if you want to help those

                                                        The change log describes the recents commits -to the SVN code base.

                                                        Here is the list of public releases:

                                                        2.7.3: Jan 18 2009

                                                        • Build fix: fix build when HTML support is not included.
                                                        • +to the SVN code base.

                                                          Here is the list of public releases:

                                                          2.7.4: Sep 10 2009

                                                          • Improvements: + Switch to GIT (GNOME), + Add symbol versioning to libxml2 shared libs (Daniel Veillard) +
                                                          • +
                                                          • Portability: + 593857 try to work around thread pbm MinGW 4.4 (Daniel Veillard), + 594250 rename ATTRIBUTE_ALLOC_SIZE to avoid clashes (Daniel Veillard), + Fix Windows build * relaxng.c: fix windows build (Rob Richards), + Fix the globals.h to use XMLPUBFUN (Paul Smith), + Problem with extern extern in header (Daniel Veillard), + Add -lnetwork for compiling on Haiku (Scott McCreary), + Runtest portability patch for Solaris (Tim Rice), + Small patch to accomodate the Haiku OS (Scott McCreary), + 584605 package VxWorks folder in the distribution (Daniel Veillard), + 574017 Realloc too expensive on most platform (Daniel Veillard), + Fix windows build (Rob Richards), + 545579 doesn't compile without schema support (Daniel Veillard), + xmllint use xmlGetNodePath when not compiled in (Daniel Veillard), + Try to avoid __imp__xmlFree link trouble on msys (Daniel Veillard), + Allow to select the threading system on Windows (LRN), + Fix Solaris binary links, cleanups (Daniel Veillard), + Bug 571059 – MSVC doesn't work with the bakefile (Intron), + fix ATTRIBUTE_PRINTF header clash (Belgabor and Mike Hommey), + fixes for Borland/CodeGear/Embarcadero compilers (Eric Zurcher) +
                                                          • +
                                                          • Documentation: + 544910 typo: "renciliateNs" (Leonid Evdokimov), + Add VxWorks to list of OSes (Daniel Veillard), + Regenerate the documentation and update for git (Daniel Veillard), + 560524 ¿ xmlTextReaderLocalName description (Daniel Veillard), + Added sponsoring by AOE media for the server (Daniel Veillard), + updated URLs for GNOME (Vincent Lefevre), + more warnings about xmlCleanupThreads and xmlCleanupParser (Daniel Veillard) +
                                                          • +
                                                          • Bug fixes: + 594514 memory leaks - duplicate initialization (MOD), + Wrong block opening in htmlNodeDumpOutputInternal (Daniel Veillard), + 492317 Fix Relax-NG validation problems (Daniel Veillard), + 558452 fight with reg test and error report (Daniel Veillard), + 558452 RNG compilation of optional multiple child (Daniel Veillard), + 579746 XSD validation not correct / nilable groups (Daniel Veillard), + 502960 provide namespace stack when parsing entity (Daniel Veillard), + 566012 part 2 fix regresion tests and push mode (Daniel Veillard), + 566012 autodetected encoding and encoding conflict (Daniel Veillard), + 584220 xpointer(/) and xinclude problems (Daniel Veillard), + 587663 Incorrect Attribute-Value Normalization (Daniel Veillard), + 444994 HTML chunked failure for attribute with <> (Daniel Veillard), + Fix end of buffer char being split in XML parser (Daniel Veillard), + Non ASCII character may be split at buffer end (Adiel Mittmann), + 440226 Add xmlXIncludeProcessTreeFlagsData API (Stefan Behnel), + 572129 speed up parsing of large HTML text nodes (Markus Kull), + Fix HTML parsing with 0 character in CDATA (Daniel Veillard), + Fix SetGenericErrorFunc and SetStructured clash (Wang Lam), + 566012 Incomplete EBCDIC parsing support (Martin Kogler), + 541335 HTML avoid creating 2 head or 2 body element (Daniel Veillard), + 541237 error correcting missing end tags in HTML (Daniel Veillard), + 583439 missing line numbers in push mode (Daniel Veillard), + 587867 xmllint --html --xmlout serializing as HTML (Daniel Veillard), + 559501 avoid select and use poll for nanohttp (Raphael Prevost), + 559410 - Regexp bug on (...)? constructs (Daniel Veillard), + Fix a small problem on previous HTML parser patch (Daniel Veillard), + 592430 - HTML parser runs into endless loop (Daniel Veillard), + 447899 potential double free in xmlFreeTextReader (Daniel Veillard), + 446613 small validation bug mixed content with NS (Daniel Veillard), + Fix the problem of revalidating a doc with RNG (Daniel Veillard), + Fix xmlKeepBlanksDefault to not break indent (Nick Wellnhofer), + 512131 refs from externalRef part need to be added (Daniel Veillard), + 512131 crash in xmlRelaxNGValidateFullElement (Daniel Veillard), + 588441 allow '.' in HTML Names even if invalid (Daniel Veillard), + 582913 Fix htmlSetMetaEncoding() to be nicer (Daniel Veillard), + 579317 Try to find the HTML encoding information (Daniel Veillard), + 575875 don't output charset=html (Daniel Veillard), + 571271 fix semantic of xsd:all with minOccurs=0 (Daniel Veillard), + 570702 fix a bug in regexp determinism checking (Daniel Veillard), + 567619 xmlValidateNotationUse missing param test (Daniel Veillard), + 574393 ¿ utf-8 filename magic for compressed files (Hans Breuer), + Fix a couple of problems in the parser (Daniel Veillard), + 585505 ¿ Document ids and refs populated by XSD (Wayne Jensen), + 582906 XSD validating multiple imports of the same schema (Jason Childs), + Bug 582887 ¿ problems validating complex schemas (Jason Childs), + Bug 579729 ¿ fix XSD schemas parsing crash (Miroslav Bajtos), + 576368 ¿ htmlChunkParser with special attributes (Jiri Netolicky), + Bug 565747 ¿ relax anyURI data character checking (Vincent Lefevre), + Preserve attributes of include start on tree copy (Petr Pajas), + Skip silently unrecognized XPointer schemes (Jakub Wilk), + Fix leak on SAX1, xmllint --sax1 option and debug (Daniel Veillard), + potential NULL dereference on non-glibc (Jim Meyering), + Fix an XSD validation crash (Daniel Veillard), + Fix a regression in streaming entities support (Daniel Veillard), + Fix a couple of ABI issues with C14N 1.1 (Aleksey Sanin), + Aleksey Sanin support for c14n 1.1 (Aleksey Sanin), + reader bug fix with entities (Daniel Veillard), + use options from current parser ctxt for external entities (Rob Richards), + 581612 use %s to printf strings (Christian Persch), + 584605 change the threading initialization sequence (Igor Novoseltsev), + 580705 keep line numbers in HTML parser (Aaron Patterson), + 581803 broken HTML table attributes init (Roland Steiner), + do not set error code in xmlNsWarn (Rob Richards), + 564217 fix structured error handling problems, + reuse options from current parser for entities (Rob Richards), + xmlXPathRegisterNs should not allow enpty prefixes (Daniel Veillard), + add a missing check in xmlAddSibling (Kris Breuker), + avoid leaks on errors (Jinmei Tatuya) +
                                                          • +
                                                          • Cleanup: + Chasing dead assignments reported by clang-scan (Daniel Veillard), + A few more safety cleanup raised by scan (Daniel Veillard), + Fixing assorted potential problems raised by scan (Daniel Veillard), + Potential uninitialized arguments raised by scan (Daniel Veillard), + Fix a bunch of scan 'dead increments' and cleanup (Daniel Veillard), + Remove a pedantic warning (Daniel Veillard), + 555833 always use rm -f in uninstall-local (Daniel Veillard), + 542394 xmlRegisterOutputCallbacks MAX_INPUT_CALLBACK (Daniel Veillard), + Autoregenerate libxml2.syms automated checkings (Daniel Veillard), + Make xmlRecoverDoc const (Martin Trappel) (Daniel Veillard), + Both args of xmlStrcasestr are const (Daniel Veillard), + hide the nbParse* variables used for debugging (Mike Hommey), + 570806 changed include of config.h (William M. Brack), + cleanups and error reports when xmlTextWriterVSprintf fails (Jinmei Tatuya) +
                                                          • +

                                                          2.7.3: Jan 18 2009

                                                          • Build fix: fix build when HTML support is not included.
                                                          • Bug fixes: avoid memory overflow in gigantic text nodes, indentation problem on the writed (Rob Richards), xmlAddChildList pointer problem (Rob Richards and Kevin Milburn), @@ -40,7 +160,7 @@ to the SVN code base.< xmlParserCleanup docs
                                                          • Portability fixes: Older Win32 platforms (Rob Richards), MSVC porting fix (Rob Richards), Mac OS X regression tests (Sven Herzberg), - non GNUCC builds (Rob Richards), compilation on Haiku (Andreas Färber) + non GNUCC builds (Rob Richards), compilation on Haiku (Andreas Färber)
                                                          • Bug fixes: various realloc problems (Ashwin), potential double-free (Ashwin), regexp crash, icrash with invalid whitespace facets (Rob @@ -130,9 +250,9 @@ to the SVN code base.< flag fix (Richard Jones), regexp interpretation of \, htmlCreateDocParserCtxt (Jean-Daniel Dupas), configure.in typo (Bjorn Reese), entity content failure, xmlListAppend() fix - (Georges-André Silber), XPath number serialization (William Brack), + (Georges-André Silber), XPath number serialization (William Brack), nanohttp gzipped stream fix (William Brack and Alex Cornejo), - xmlCharEncFirstLine typo (Mark Rowe), uri bug (François Delyon), + xmlCharEncFirstLine typo (Mark Rowe), uri bug (François Delyon), XPath string value of PI nodes (William Brack), XPath node set sorting bugs (William Brack), avoid outputting namespace decl dups in the writer (Rob Richards), xmlCtxtReset bug, UTF-8 encoding @@ -140,7 +260,7 @@ to the SVN code base.< workaround wrong file: URIs, htmlNodeDumpFormatOutput on attributes, invalid character in attribute detection bug, big comments before internal subset streaming bug, HTML parsing of attributes with : in - the name, IDness of name in HTML (Dagfinn I. Mannsåker)
                                                          • + the name, IDness of name in HTML (Dagfinn I. MannsÃ¥ker)
                                                          • Improvement: keep URI query parts in raw form (Richard Jones), embed tag support in HTML (Michael Day)

                                                          2.6.28: Apr 17 2007

                                                          • Documentation: comment fixes (Markus Keim), xpath comments fixes too @@ -152,7 +272,7 @@ to the SVN code base.< (Steven Rainwater), user data propagation in XInclude (Michael Day), standalone and XML decl detection (Michael Day), Python id ouptut for some id, fix the big python string memory leak, URI parsing fixes - (Stéphane Bidoul and William), long comments parsing bug (William), + (Stéphane Bidoul and William), long comments parsing bug (William), concurrent threads initialization (Ted Phelps), invalid char in text XInclude (William), XPath memory leak (William), tab in python problems (Andreas Hanke), XPath node comparison error @@ -162,7 +282,7 @@ to the SVN code base.< min occurs of 0 (William), HTML script/style parsing (Mike Day)
                                                          • Improvement: make xmlTextReaderSetup() public
                                                          • Compilation and postability: fix a missing include problem (William), - __ss_familly on AIX again (Björn Wiberg), compilation without zlib + __ss_familly on AIX again (Björn Wiberg), compilation without zlib (Michael Day), catalog patch for Win32 (Christian Ehrlicher), Windows CE fixes (Andreas Stricke)
                                                          • Various CVS to SVN infrastructure changes
                                                          • @@ -292,7 +412,7 @@ to the SVN code base.< htmlDocDumpMemoryFormat. (Rob Richards),
                                                          • documentation: typo (Michael Day), libxml man page (Albert Chin), save function to XML buffer (Geert Jansen), small doc fix (Aron Stansvik),
                                                          • -

                                                          2.6.22: Sep 12 2005

                                                          • build fixes: compile without schematron (Stéphane Bidoul)
                                                          • +

                                                          2.6.22: Sep 12 2005

                                                          • build fixes: compile without schematron (Stéphane Bidoul)
                                                          • bug fixes: xmlDebugDumpNode on namespace node (Oleg Paraschenko)i, CDATA push parser bug, xmlElemDump problem with XHTML1 doc, XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, fix some @@ -532,7 +652,7 @@ to the SVN code base.< streaming problem (Steve Ball), DTD serialization problem (William), libxml.m4 fixes (Mike Hommey), do not provide destructors as methods on Python classes, xmlReader buffer bug, Python bindings memory interfaces - improvement (with Stéphane Bidoul), Fixed the push parser to be back to + improvement (with Stéphane Bidoul), Fixed the push parser to be back to synchronous behaviour.
                                                          • improvement: custom per-thread I/O enhancement (Rob Richards), register namespace in debug shell (Stefano Debenedetti), Python based regression @@ -640,8 +760,8 @@ to the SVN code base.< callbacks order for XPath callbacks (Frederic Peters)
                                                          • Documentation: python scripts (William Brack), xslt stylesheets (John Fleck), doc (Sven Zimmerman), I/O example.
                                                          • -
                                                          • Python bindings: fixes (William), enum support (Stéphane Bidoul), - structured error reporting (Stéphane Bidoul)
                                                          • +
                                                          • Python bindings: fixes (William), enum support (Stéphane Bidoul), + structured error reporting (Stéphane Bidoul)
                                                          • XInclude: various fixes for conformance, problem related to dictionnary references (William & me), recursion (William)
                                                          • xmlWriter: indentation (Lucas Brasilino), memory leaks (Alfred @@ -756,7 +876,7 @@ to the SVN code base.< and charset information if available.
                                                          • Relax-NG: bug fixes including the one reported by Martijn Faassen and zeroOrMore, better error reporting.
                                                          • -
                                                          • Python bindings (Stéphane Bidoul), never use stdout for errors +
                                                          • Python bindings (Stéphane Bidoul), never use stdout for errors output
                                                          • Portability: all the headers have macros for export and calling convention definitions (Igor Zlatkovic), VMS update (Craig A. Berry), @@ -825,11 +945,11 @@ to the SVN code base.<
                                                          • portability: DJGPP (MsDos) , OpenVMS (Craig A. Berry)
                                                          • William Brack fixed multithreading lock problems
                                                          • IPv6 patch for FTP and HTTP accesses (Archana Shah/Wipro)
                                                          • -
                                                          • Windows fixes (Igor Zlatkovic, Eric Zurcher), threading (Stéphane +
                                                          • Windows fixes (Igor Zlatkovic, Eric Zurcher), threading (Stéphane Bidoul)
                                                          • A few W3C Schemas Structure improvements
                                                          • W3C Schemas Datatype improvements (Charlie Bozeman)
                                                          • -
                                                          • Python bindings for thread globals (Stéphane Bidoul), and method/class +
                                                          • Python bindings for thread globals (Stéphane Bidoul), and method/class generator
                                                          • added --nonet option to xmllint
                                                          • documentation improvements (John Fleck)
                                                          • @@ -887,7 +1007,7 @@ to the SVN code base.<

                                                          2.5.2: Feb 5 2003

                                                          • First implementation of RelaxNG, added --relaxng flag to xmllint
                                                          • Schemas support now compiled in by default.
                                                          • Bug fixes: DTD validation, namespace checking, XInclude and entities, - delegateURI in XML Catalogs, HTML parser, XML reader (Stéphane Bidoul), + delegateURI in XML Catalogs, HTML parser, XML reader (Stéphane Bidoul), XPath parser and evaluation, UTF8ToUTF8 serialization, XML reader memory consumption, HTML parser, HTML serialization in the presence of namespaces
                                                          • @@ -896,17 +1016,17 @@ to the SVN code base.< patches (Stefan Kost)
                                                          • Portability fixes: NetBSD (Julio Merino), Windows (Igor Zlatkovic)
                                                          • Added python bindings for XPointer, contextual error reporting - (Stéphane Bidoul)
                                                          • + (Stéphane Bidoul)
                                                          • URI/file escaping problems (Stefano Zacchiroli)

                                                          2.5.1: Jan 8 2003

                                                          • Fixes a memory leak and configuration/compilation problems in 2.5.0
                                                          • documentation updates (John)
                                                          • a couple of XmlTextReader fixes

                                                          2.5.0: Jan 6 2003

                                                          • New XmltextReader interface based on C# - API (with help of Stéphane Bidoul)
                                                          • + API (with help of Stéphane Bidoul)
                                                          • Windows: more exports, including the new API (Igor)
                                                          • XInclude fallback fix
                                                          • -
                                                          • Python: bindings for the new API, packaging (Stéphane Bidoul), - drv_libxml2.py Python xml.sax driver (Stéphane Bidoul), fixes, speedup +
                                                          • Python: bindings for the new API, packaging (Stéphane Bidoul), + drv_libxml2.py Python xml.sax driver (Stéphane Bidoul), fixes, speedup and iterators for Python-2.2 (Hannu Krosing)
                                                          • Tutorial fixes (john Fleck and Niraj Tolia) xmllint man update (John)
                                                          • @@ -920,7 +1040,7 @@ to the SVN code base.<
                                                          • Improvement/fixes of the XML API generator, and couple of minor code fixes.

                                                          2.4.29: Dec 11 2002

                                                          • Windows fixes (Igor): Windows CE port, pthread linking, python bindings - (Stéphane Bidoul), Mingw (Magnus Henoch), and export list updates
                                                          • + (Stéphane Bidoul), Mingw (Magnus Henoch), and export list updates
                                                          • Fix for prev in python bindings (ERDI Gergo)
                                                          • Fix for entities handling (Marcus Clarke)
                                                          • Refactored the XML and HTML dumps to a single code path, fixed XHTML1 @@ -1154,7 +1274,7 @@ it's actually not compiled in by default. The real fixes are:

                                                            • a coupl
                                                            • a number of reported bugs got fixed, in XPath, iconv detection, XInclude processing
                                                            • XPath string function should now handle unicode correctly
                                                            • -

                                                            2.3.9: May 19 2001

                                                            Lots of bugfixes, and added a basic SGML catalog support:

                                                            • HTML push bugfix #54891 and another patch from Jonas Borgström
                                                            • +

                                                            2.3.9: May 19 2001

                                                            Lots of bugfixes, and added a basic SGML catalog support:

                                                            • HTML push bugfix #54891 and another patch from Jonas Borgström
                                                            • some serious speed optimization again
                                                            • some documentation cleanups
                                                            • trying to get better linking on Solaris (-R)
                                                            • diff --git a/doc/python.html b/doc/python.html index 5810eb2..006fdc4 100644 --- a/doc/python.html +++ b/doc/python.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Python and bindings
                                                              Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                              Made with Libxml2 Logo

                                                              The XML C parser and toolkit of Gnome

                                                              Python and bindings

                                                              Developer Menu
                                                              API Indexes
                                                              Related links

                                                              There are a number of language bindings and wrappers available for +Python and bindings
                                                              Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                              Made with Libxml2 Logo

                                                              The XML C parser and toolkit of Gnome

                                                              Python and bindings

                                                              Developer Menu
                                                              API Indexes
                                                              Related links

                                                              There are a number of language bindings and wrappers available for libxml2, the list below is not exhaustive. Please contact the xml-bindings@gnome.org (archives) in order to get updates to this list or to discuss the specific topic of libxml2 @@ -57,7 +57,7 @@ to be maintained as part of the library in the future, though the Python interface have not yet reached the completeness of the C API.

                                                              Note that some of the Python purist dislike the default set of Python bindings, rather than complaining I suggest they have a look at lxml the more pythonic bindings for libxml2 and libxslt and help Martijn -Faassen complete those.

                                                              Stéphane Bidoul +Faassen complete those.

                                                              Stéphane Bidoul maintains a Windows port of the Python bindings.

                                                              Note to people interested in building bindings, the API is formalized as an XML API description file which allows to diff --git a/doc/search.php b/doc/search.php index 7d94cb7..ce1a25f 100644 --- a/doc/search.php +++ b/doc/search.php @@ -305,8 +305,8 @@ A:link, A:visited, A:active { text-decoration: underline } $id = mysql_result($result, $i, 2); $module = mysql_result($result, $i, 3); $desc = mysql_result($result, $i, 4); - if (strncmp($module, "libxml-", 7) == 0) { - $url = "html/$module"; + if (strncmp($module, "libxml-", 7) == 0) + $url = "html/$module"; if ($id != "") { $url = $url + "#$id"; } diff --git a/doc/site.xsl b/doc/site.xsl index 41ca3fb..6f990f3 100644 --- a/doc/site.xsl +++ b/doc/site.xsl @@ -397,7 +397,7 @@

                                                            • XML-DSig xmlsec
                                                            • FTP
                                                            • Windows binaries
                                                            • -
                                                            • Solaris binaries
                                                            • +
                                                            • Solaris binaries
                                                            • MacOsX binaries
                                                            • lxml Python bindings
                                                            • Perl bindings
                                                            • diff --git a/doc/syms.xsl b/doc/syms.xsl new file mode 100644 index 0000000..ebca88f --- /dev/null +++ b/doc/syms.xsl @@ -0,0 +1,99 @@ + + + + + + + + # +# Officially exported symbols, for which header +# file definitions are installed in /usr/include/libxml2 +# +# Automatically generated from symbols.xml and syms.xsl +# +# Versions here are *fixed* to match the libxml2 version +# at which the symbol was introduced. This ensures that +# a new client app requiring symbol foo() can't accidentally +# run with old libxml2.so not providing foo() - the global +# soname version info can't enforce this since we never +# change the soname +# + + + + + + + + LIBXML2_ + + { + global: + + + + +# + + + + + + + + + } + + LIBXML2_ + + + ; + + + + + + + + + + # + + ; removed in + + + + + + + + + + Failed to find definition in libxml2-api.xml: + + + + + + + ; + + # variable + + + # + + + + + + + + + + + + diff --git a/doc/threads.html b/doc/threads.html index f28d50d..b958d1f 100644 --- a/doc/threads.html +++ b/doc/threads.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Thread safety
                                                              Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                              Made with Libxml2 Logo

                                                              The XML C parser and toolkit of Gnome

                                                              Thread safety

                                                              Developer Menu
                                                              API Indexes
                                                              Related links

                                                              Starting with 2.4.7, libxml2 makes provisions to ensure that concurrent +Thread safety
                                                              Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                              Made with Libxml2 Logo

                                                              The XML C parser and toolkit of Gnome

                                                              Thread safety

                                                              Developer Menu
                                                              API Indexes
                                                              Related links

                                                              Starting with 2.4.7, libxml2 makes provisions to ensure that concurrent threads can safely work in parallel parsing different documents. There is however a couple of things to do to ensure it:

                                                              • configure the library accordingly using the --with-threads options
                                                              • call xmlInitParser() in the "main" thread before using any of the diff --git a/doc/tree.html b/doc/tree.html index b3ab370..3e76aca 100644 --- a/doc/tree.html +++ b/doc/tree.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -The tree output
                                                                Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                                Made with Libxml2 Logo

                                                                The XML C parser and toolkit of Gnome

                                                                The tree output

                                                                Developer Menu
                                                                API Indexes
                                                                Related links

                                                                The parser returns a tree built during the document analysis. The value +The tree output
                                                                Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                                Made with Libxml2 Logo

                                                                The XML C parser and toolkit of Gnome

                                                                The tree output

                                                                Developer Menu
                                                                API Indexes
                                                                Related links

                                                                The parser returns a tree built during the document analysis. The value returned is an xmlDocPtr (i.e., a pointer to an xmlDoc structure). This structure contains information such as the file name, the document type, and a children pointer diff --git a/doc/upgrade.html b/doc/upgrade.html index 5d846c2..c9ca6a0 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Upgrading 1.x code
                                                                Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                                Made with Libxml2 Logo

                                                                The XML C parser and toolkit of Gnome

                                                                Upgrading 1.x code

                                                                Developer Menu
                                                                API Indexes
                                                                Related links

                                                                Incompatible changes:

                                                                Version 2 of libxml2 is the first version introducing serious backward +Upgrading 1.x code
                                                                Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                                Made with Libxml2 Logo

                                                                The XML C parser and toolkit of Gnome

                                                                Upgrading 1.x code

                                                                Developer Menu
                                                                API Indexes
                                                                Related links

                                                                Incompatible changes:

                                                                Version 2 of libxml2 is the first version introducing serious backward incompatible changes. The main goals were:

                                                                • a general cleanup. A number of mistakes inherited from the very early versions couldn't be changed due to compatibility constraints. Example the "childs" element in the nodes.
                                                                • diff --git a/doc/xml.html b/doc/xml.html index c28c31d..306fdbc 100644 --- a/doc/xml.html +++ b/doc/xml.html @@ -34,7 +34,7 @@ other environments.

                                                                  Libxml2 is known to be very portable, the library should build and work without serious troubles on a variety of systems (Linux, Unix, Windows, -CygWin, MacOS, MacOS X, RISC Os, OS/2, VMS, QNX, MVS, ...)

                                                                  +CygWin, MacOS, MacOS X, RISC Os, OS/2, VMS, QNX, MVS, VxWorks, ...)

                                                                  Libxml2 implements a number of existing standards related to markup languages:

                                                                  @@ -112,16 +112,11 @@ conformance statement about it at the moment.

                                                                • the XMLSec page: an implementation of W3C XML Digital Signature for libxml2
                                                                • -
                                                                • also check the related links section below for more related and active +
                                                                • also check the related links section for more related and active projects.
                                                                - +

                                                                Hosting sponsored by Open Source CMS services from AOE media.

                                                                Logo designed by Marc Liyanage.

                                                                @@ -445,10 +440,10 @@ pnode=pxmlDoc->children->children;
                                                              • look for examples of use for libxml2 function using the Gnome code or by asking on Google.
                                                              • Browse + href="http://svn.gnome.org/viewvc/libxml2/trunk/">Browse the libxml2 source , I try to write code as clean and documented as possible, so looking at it may be helpful. In particular the code - of xmllint.c and of the various testXXX.c test programs should + of xmllint.c and of the various testXXX.c test programs should provide good examples of how to do things with the library.
                                                              • @@ -519,7 +514,7 @@ xmlDtdPtr dtd = xmlParseDTD(NULL, filename_of_dtd); /* parse the DTD */
                                                              • George Lebl wrote an article for IBM developerWorks about using libxml.
                                                              • -
                                                              • Check the TODO +
                                                              • Check the TODO file.
                                                              • Read the 1.x to 2.x upgrade path description. If you are starting a new project using libxml you should @@ -646,16 +641,12 @@ database:

                                                                The latest versions of libxml2 can be found on the xmlsoft.org server ( FTP and rsync are available), there are also -mirrors (Australia( Web), France) or on the Gnome FTP server as source archive -, Antonin Sprinzl also provide a -mirror in Austria. (NOTE that you need both the France and +Antonin Sprinzl also provide a +mirror in Austria). (NOTE that you need both the libxml(2) and libxml(2)-devel -packages installed to compile applications using libxml.)

                                                                +packages installed to compile applications using libxml if using RPMs.)

                                                                You can find all the history of libxml(2) and libxslt releases in the old directory. The precompiled @@ -664,15 +655,15 @@ href="http://xmlsoft.org/sources/win32/">win32 directory.

                                                                Binary ports:

                                                                The change log describes the recents commits -to the SVN code base.

                                                                +to the SVN code base.

                                                                Here is the list of public releases:

                                                                +

                                                                2.7.4: Sep 10 2009

                                                                +
                                                                  +
                                                                • Improvements: + Switch to GIT (GNOME), + Add symbol versioning to libxml2 shared libs (Daniel Veillard) +
                                                                • +
                                                                • Portability: + 593857 try to work around thread pbm MinGW 4.4 (Daniel Veillard), + 594250 rename ATTRIBUTE_ALLOC_SIZE to avoid clashes (Daniel Veillard), + Fix Windows build * relaxng.c: fix windows build (Rob Richards), + Fix the globals.h to use XMLPUBFUN (Paul Smith), + Problem with extern extern in header (Daniel Veillard), + Add -lnetwork for compiling on Haiku (Scott McCreary), + Runtest portability patch for Solaris (Tim Rice), + Small patch to accomodate the Haiku OS (Scott McCreary), + 584605 package VxWorks folder in the distribution (Daniel Veillard), + 574017 Realloc too expensive on most platform (Daniel Veillard), + Fix windows build (Rob Richards), + 545579 doesn't compile without schema support (Daniel Veillard), + xmllint use xmlGetNodePath when not compiled in (Daniel Veillard), + Try to avoid __imp__xmlFree link trouble on msys (Daniel Veillard), + Allow to select the threading system on Windows (LRN), + Fix Solaris binary links, cleanups (Daniel Veillard), + Bug 571059 – MSVC doesn't work with the bakefile (Intron), + fix ATTRIBUTE_PRINTF header clash (Belgabor and Mike Hommey), + fixes for Borland/CodeGear/Embarcadero compilers (Eric Zurcher) +
                                                                • +
                                                                • Documentation: + 544910 typo: "renciliateNs" (Leonid Evdokimov), + Add VxWorks to list of OSes (Daniel Veillard), + Regenerate the documentation and update for git (Daniel Veillard), + 560524 ¿ xmlTextReaderLocalName description (Daniel Veillard), + Added sponsoring by AOE media for the server (Daniel Veillard), + updated URLs for GNOME (Vincent Lefevre), + more warnings about xmlCleanupThreads and xmlCleanupParser (Daniel Veillard) +
                                                                • +
                                                                • Bug fixes: + 594514 memory leaks - duplicate initialization (MOD), + Wrong block opening in htmlNodeDumpOutputInternal (Daniel Veillard), + 492317 Fix Relax-NG validation problems (Daniel Veillard), + 558452 fight with reg test and error report (Daniel Veillard), + 558452 RNG compilation of optional multiple child (Daniel Veillard), + 579746 XSD validation not correct / nilable groups (Daniel Veillard), + 502960 provide namespace stack when parsing entity (Daniel Veillard), + 566012 part 2 fix regresion tests and push mode (Daniel Veillard), + 566012 autodetected encoding and encoding conflict (Daniel Veillard), + 584220 xpointer(/) and xinclude problems (Daniel Veillard), + 587663 Incorrect Attribute-Value Normalization (Daniel Veillard), + 444994 HTML chunked failure for attribute with <> (Daniel Veillard), + Fix end of buffer char being split in XML parser (Daniel Veillard), + Non ASCII character may be split at buffer end (Adiel Mittmann), + 440226 Add xmlXIncludeProcessTreeFlagsData API (Stefan Behnel), + 572129 speed up parsing of large HTML text nodes (Markus Kull), + Fix HTML parsing with 0 character in CDATA (Daniel Veillard), + Fix SetGenericErrorFunc and SetStructured clash (Wang Lam), + 566012 Incomplete EBCDIC parsing support (Martin Kogler), + 541335 HTML avoid creating 2 head or 2 body element (Daniel Veillard), + 541237 error correcting missing end tags in HTML (Daniel Veillard), + 583439 missing line numbers in push mode (Daniel Veillard), + 587867 xmllint --html --xmlout serializing as HTML (Daniel Veillard), + 559501 avoid select and use poll for nanohttp (Raphael Prevost), + 559410 - Regexp bug on (...)? constructs (Daniel Veillard), + Fix a small problem on previous HTML parser patch (Daniel Veillard), + 592430 - HTML parser runs into endless loop (Daniel Veillard), + 447899 potential double free in xmlFreeTextReader (Daniel Veillard), + 446613 small validation bug mixed content with NS (Daniel Veillard), + Fix the problem of revalidating a doc with RNG (Daniel Veillard), + Fix xmlKeepBlanksDefault to not break indent (Nick Wellnhofer), + 512131 refs from externalRef part need to be added (Daniel Veillard), + 512131 crash in xmlRelaxNGValidateFullElement (Daniel Veillard), + 588441 allow '.' in HTML Names even if invalid (Daniel Veillard), + 582913 Fix htmlSetMetaEncoding() to be nicer (Daniel Veillard), + 579317 Try to find the HTML encoding information (Daniel Veillard), + 575875 don't output charset=html (Daniel Veillard), + 571271 fix semantic of xsd:all with minOccurs=0 (Daniel Veillard), + 570702 fix a bug in regexp determinism checking (Daniel Veillard), + 567619 xmlValidateNotationUse missing param test (Daniel Veillard), + 574393 ¿ utf-8 filename magic for compressed files (Hans Breuer), + Fix a couple of problems in the parser (Daniel Veillard), + 585505 ¿ Document ids and refs populated by XSD (Wayne Jensen), + 582906 XSD validating multiple imports of the same schema (Jason Childs), + Bug 582887 ¿ problems validating complex schemas (Jason Childs), + Bug 579729 ¿ fix XSD schemas parsing crash (Miroslav Bajtos), + 576368 ¿ htmlChunkParser with special attributes (Jiri Netolicky), + Bug 565747 ¿ relax anyURI data character checking (Vincent Lefevre), + Preserve attributes of include start on tree copy (Petr Pajas), + Skip silently unrecognized XPointer schemes (Jakub Wilk), + Fix leak on SAX1, xmllint --sax1 option and debug (Daniel Veillard), + potential NULL dereference on non-glibc (Jim Meyering), + Fix an XSD validation crash (Daniel Veillard), + Fix a regression in streaming entities support (Daniel Veillard), + Fix a couple of ABI issues with C14N 1.1 (Aleksey Sanin), + Aleksey Sanin support for c14n 1.1 (Aleksey Sanin), + reader bug fix with entities (Daniel Veillard), + use options from current parser ctxt for external entities (Rob Richards), + 581612 use %s to printf strings (Christian Persch), + 584605 change the threading initialization sequence (Igor Novoseltsev), + 580705 keep line numbers in HTML parser (Aaron Patterson), + 581803 broken HTML table attributes init (Roland Steiner), + do not set error code in xmlNsWarn (Rob Richards), + 564217 fix structured error handling problems, + reuse options from current parser for entities (Rob Richards), + xmlXPathRegisterNs should not allow enpty prefixes (Daniel Veillard), + add a missing check in xmlAddSibling (Kris Breuker), + avoid leaks on errors (Jinmei Tatuya) +
                                                                • +
                                                                • Cleanup: + Chasing dead assignments reported by clang-scan (Daniel Veillard), + A few more safety cleanup raised by scan (Daniel Veillard), + Fixing assorted potential problems raised by scan (Daniel Veillard), + Potential uninitialized arguments raised by scan (Daniel Veillard), + Fix a bunch of scan 'dead increments' and cleanup (Daniel Veillard), + Remove a pedantic warning (Daniel Veillard), + 555833 always use rm -f in uninstall-local (Daniel Veillard), + 542394 xmlRegisterOutputCallbacks MAX_INPUT_CALLBACK (Daniel Veillard), + Autoregenerate libxml2.syms automated checkings (Daniel Veillard), + Make xmlRecoverDoc const (Martin Trappel) (Daniel Veillard), + Both args of xmlStrcasestr are const (Daniel Veillard), + hide the nbParse* variables used for debugging (Mike Hommey), + 570806 changed include of config.h (William M. Brack), + cleanups and error reports when xmlTextWriterVSprintf fails (Jinmei Tatuya) +
                                                                • +

                                                                2.7.3: Jan 18 2009

                                                                • Build fix: fix build when HTML support is not included.
                                                                • @@ -768,7 +881,7 @@ to the SVN code base.< xmlParserCleanup docs
                                                                • Portability fixes: Older Win32 platforms (Rob Richards), MSVC porting fix (Rob Richards), Mac OS X regression tests (Sven Herzberg), - non GNUCC builds (Rob Richards), compilation on Haiku (Andreas Färber) + non GNUCC builds (Rob Richards), compilation on Haiku (Andreas Färber)
                                                                • Bug fixes: various realloc problems (Ashwin), potential double-free (Ashwin), regexp crash, icrash with invalid whitespace facets (Rob @@ -871,9 +984,9 @@ to the SVN code base.< flag fix (Richard Jones), regexp interpretation of \, htmlCreateDocParserCtxt (Jean-Daniel Dupas), configure.in typo (Bjorn Reese), entity content failure, xmlListAppend() fix - (Georges-André Silber), XPath number serialization (William Brack), + (Georges-André Silber), XPath number serialization (William Brack), nanohttp gzipped stream fix (William Brack and Alex Cornejo), - xmlCharEncFirstLine typo (Mark Rowe), uri bug (François Delyon), + xmlCharEncFirstLine typo (Mark Rowe), uri bug (François Delyon), XPath string value of PI nodes (William Brack), XPath node set sorting bugs (William Brack), avoid outputting namespace decl dups in the writer (Rob Richards), xmlCtxtReset bug, UTF-8 encoding @@ -881,7 +994,7 @@ to the SVN code base.< workaround wrong file: URIs, htmlNodeDumpFormatOutput on attributes, invalid character in attribute detection bug, big comments before internal subset streaming bug, HTML parsing of attributes with : in - the name, IDness of name in HTML (Dagfinn I. Mannsåker)
                                                                • + the name, IDness of name in HTML (Dagfinn I. MannsÃ¥ker)
                                                                • Improvement: keep URI query parts in raw form (Richard Jones), embed tag support in HTML (Michael Day)
                                                                @@ -897,7 +1010,7 @@ to the SVN code base.< (Steven Rainwater), user data propagation in XInclude (Michael Day), standalone and XML decl detection (Michael Day), Python id ouptut for some id, fix the big python string memory leak, URI parsing fixes - (Stéphane Bidoul and William), long comments parsing bug (William), + (Stéphane Bidoul and William), long comments parsing bug (William), concurrent threads initialization (Ted Phelps), invalid char in text XInclude (William), XPath memory leak (William), tab in python problems (Andreas Hanke), XPath node comparison error @@ -907,7 +1020,7 @@ to the SVN code base.< min occurs of 0 (William), HTML script/style parsing (Mike Day)
                                                              • Improvement: make xmlTextReaderSetup() public
                                                              • Compilation and postability: fix a missing include problem (William), - __ss_familly on AIX again (Björn Wiberg), compilation without zlib + __ss_familly on AIX again (Björn Wiberg), compilation without zlib (Michael Day), catalog patch for Win32 (Christian Ehrlicher), Windows CE fixes (Andreas Stricke)
                                                              • Various CVS to SVN infrastructure changes
                                                              • @@ -1059,7 +1172,7 @@ to the SVN code base.<

                                                                2.6.22: Sep 12 2005

                                                                  -
                                                                • build fixes: compile without schematron (Stéphane Bidoul)
                                                                • +
                                                                • build fixes: compile without schematron (Stéphane Bidoul)
                                                                • bug fixes: xmlDebugDumpNode on namespace node (Oleg Paraschenko)i, CDATA push parser bug, xmlElemDump problem with XHTML1 doc, XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, fix some @@ -1343,7 +1456,7 @@ to the SVN code base.< streaming problem (Steve Ball), DTD serialization problem (William), libxml.m4 fixes (Mike Hommey), do not provide destructors as methods on Python classes, xmlReader buffer bug, Python bindings memory interfaces - improvement (with Stéphane Bidoul), Fixed the push parser to be back to + improvement (with Stéphane Bidoul), Fixed the push parser to be back to synchronous behaviour.
                                                                • improvement: custom per-thread I/O enhancement (Rob Richards), register namespace in debug shell (Stefano Debenedetti), Python based regression @@ -1475,8 +1588,8 @@ to the SVN code base.< callbacks order for XPath callbacks (Frederic Peters)
                                                                • Documentation: python scripts (William Brack), xslt stylesheets (John Fleck), doc (Sven Zimmerman), I/O example.
                                                                • -
                                                                • Python bindings: fixes (William), enum support (Stéphane Bidoul), - structured error reporting (Stéphane Bidoul)
                                                                • +
                                                                • Python bindings: fixes (William), enum support (Stéphane Bidoul), + structured error reporting (Stéphane Bidoul)
                                                                • XInclude: various fixes for conformance, problem related to dictionnary references (William & me), recursion (William)
                                                                • xmlWriter: indentation (Lucas Brasilino), memory leaks (Alfred @@ -1611,7 +1724,7 @@ to the SVN code base.< and charset information if available.
                                                                • Relax-NG: bug fixes including the one reported by Martijn Faassen and zeroOrMore, better error reporting.
                                                                • -
                                                                • Python bindings (Stéphane Bidoul), never use stdout for errors +
                                                                • Python bindings (Stéphane Bidoul), never use stdout for errors output
                                                                • Portability: all the headers have macros for export and calling convention definitions (Igor Zlatkovic), VMS update (Craig A. Berry), @@ -1700,11 +1813,11 @@ to the SVN code base.<
                                                                • portability: DJGPP (MsDos) , OpenVMS (Craig A. Berry)
                                                                • William Brack fixed multithreading lock problems
                                                                • IPv6 patch for FTP and HTTP accesses (Archana Shah/Wipro)
                                                                • -
                                                                • Windows fixes (Igor Zlatkovic, Eric Zurcher), threading (Stéphane +
                                                                • Windows fixes (Igor Zlatkovic, Eric Zurcher), threading (Stéphane Bidoul)
                                                                • A few W3C Schemas Structure improvements
                                                                • W3C Schemas Datatype improvements (Charlie Bozeman)
                                                                • -
                                                                • Python bindings for thread globals (Stéphane Bidoul), and method/class +
                                                                • Python bindings for thread globals (Stéphane Bidoul), and method/class generator
                                                                • added --nonet option to xmllint
                                                                • documentation improvements (John Fleck)
                                                                • @@ -1786,7 +1899,7 @@ to the SVN code base.<
                                                                • First implementation of RelaxNG, added --relaxng flag to xmllint
                                                                • Schemas support now compiled in by default.
                                                                • Bug fixes: DTD validation, namespace checking, XInclude and entities, - delegateURI in XML Catalogs, HTML parser, XML reader (Stéphane Bidoul), + delegateURI in XML Catalogs, HTML parser, XML reader (Stéphane Bidoul), XPath parser and evaluation, UTF8ToUTF8 serialization, XML reader memory consumption, HTML parser, HTML serialization in the presence of namespaces
                                                                • @@ -1795,7 +1908,7 @@ to the SVN code base.< patches (Stefan Kost)
                                                                • Portability fixes: NetBSD (Julio Merino), Windows (Igor Zlatkovic)
                                                                • Added python bindings for XPointer, contextual error reporting - (Stéphane Bidoul)
                                                                • + (Stéphane Bidoul)
                                                                • URI/file escaping problems (Stefano Zacchiroli)
                                                                @@ -1809,11 +1922,11 @@ to the SVN code base.<

                                                                2.5.0: Jan 6 2003

                                                                • New XmltextReader interface based on C# - API (with help of Stéphane Bidoul)
                                                                • + API (with help of Stéphane Bidoul)
                                                                • Windows: more exports, including the new API (Igor)
                                                                • XInclude fallback fix
                                                                • -
                                                                • Python: bindings for the new API, packaging (Stéphane Bidoul), - drv_libxml2.py Python xml.sax driver (Stéphane Bidoul), fixes, speedup +
                                                                • Python: bindings for the new API, packaging (Stéphane Bidoul), + drv_libxml2.py Python xml.sax driver (Stéphane Bidoul), fixes, speedup and iterators for Python-2.2 (Hannu Krosing)
                                                                • Tutorial fixes (john Fleck and Niraj Tolia) xmllint man update (John)
                                                                • @@ -1836,7 +1949,7 @@ to the SVN code base.<

                                                                  2.4.29: Dec 11 2002

                                                                  • Windows fixes (Igor): Windows CE port, pthread linking, python bindings - (Stéphane Bidoul), Mingw (Magnus Henoch), and export list updates
                                                                  • + (Stéphane Bidoul), Mingw (Magnus Henoch), and export list updates
                                                                  • Fix for prev in python bindings (ERDI Gergo)
                                                                  • Fix for entities handling (Marcus Clarke)
                                                                  • Refactored the XML and HTML dumps to a single code path, fixed XHTML1 @@ -2224,7 +2337,7 @@ it's actually not compiled in by default. The real fixes are:

                                                                    Lots of bugfixes, and added a basic SGML catalog support:

                                                                      -
                                                                    • HTML push bugfix #54891 and another patch from Jonas Borgström
                                                                    • +
                                                                    • HTML push bugfix #54891 and another patch from Jonas Borgström
                                                                    • some serious speed optimization again
                                                                    • some documentation cleanups
                                                                    • trying to get better linking on Solaris (-R)
                                                                    • @@ -2819,7 +2932,7 @@ and libxslt and help Martijn Faassen complete those.

                                                                      -

                                                                      Stéphane Bidoul +

                                                                      Stéphane Bidoul maintains a Windows port of the Python bindings.

                                                                      @@ -3643,7 +3756,7 @@ they are clearly labeled as such. For example the following is a wellformed XML document encoded in ISO-8859-1 and using accentuated letters that we French like for both markup and content:

                                                                      <?xml version="1.0" encoding="ISO-8859-1"?>
                                                                      -<très>là</très>
                                                                      +<très>là</très>

                                                                      Having internationalization support in libxml2 means the following:

                                                                        @@ -3670,7 +3783,7 @@ an internationalized fashion by libxml2 too:

                                                                        <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> </head> <body> -<p>W3C crée des standards pour le Web.</body> +<p>W3C crée des standards pour le Web.</body> </html>

                                                                        The internal encoding, how and why

                                                                        @@ -3744,10 +3857,10 @@ sequence:

                                                                        You may end-up with a garbled document, or no document at all ! Example:
                                                                        ~/XML -> ./xmllint err.xml 
                                                                         err.xml:1: error: Input is not proper UTF-8, indicate encoding !
                                                                        -<très>là</très>
                                                                        +<très>là</très>
                                                                            ^
                                                                         err.xml:1: error: Bytes: 0xE8 0x73 0x3E 0x6C
                                                                        -<très>là</très>
                                                                        +<très>là</très>
                                                                            ^
                                                                      • xmlSwitchEncoding() does an encoding name lookup, canonicalize it, and @@ -3807,10 +3920,10 @@ encoding:

                                                                        Here are a few examples based on the same test document:

                                                                        ~/XML -> ./xmllint isolat1 
                                                                         <?xml version="1.0" encoding="ISO-8859-1"?>
                                                                        -<très>là</très>
                                                                        +<très>là</très>
                                                                         ~/XML -> ./xmllint --encode UTF-8 isolat1 
                                                                         <?xml version="1.0" encoding="UTF-8"?>
                                                                        -<très>là  </très>
                                                                        +<très>là  </très>
                                                                         ~/XML -> 

                                                                        The same processing is applied (and reuse most of the code) for HTML I18N @@ -4956,7 +5069,7 @@ manipulate XML files within Gnome since it won't expose the internal structure.

                                                                        The current DOM implementation on top of libxml2 is the gdome2 Gnome module, this +href="http://svn.gnome.org/viewvc/gdome2/trunk/">gdome2 Gnome module, this is a full DOM interface, thanks to Paolo Casarini, check the Gdome2 homepage for more information.

                                                                        diff --git a/doc/xmlcatalog.1 b/doc/xmlcatalog.1 index 1a3173d..2f9287e 100644 --- a/doc/xmlcatalog.1 +++ b/doc/xmlcatalog.1 @@ -2,7 +2,7 @@ .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. -.TH "XMLCATALOG" "1" "$Date: 2006/08/21 08:34:11 $" "libxml2" "" +.TH "XMLCATALOG" "1" "$Date$" "libxml2" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) diff --git a/doc/xmlcatalog_man.xml b/doc/xmlcatalog_man.xml index 08d3a41..46330bb 100644 --- a/doc/xmlcatalog_man.xml +++ b/doc/xmlcatalog_man.xml @@ -26,7 +26,7 @@ - $Date: 2006-08-21 10:34:11 +0200 (Mon, 21 Aug 2006) $ + $Date$ diff --git a/doc/xmldtd.html b/doc/xmldtd.html index fb1f807..0bbb166 100644 --- a/doc/xmldtd.html +++ b/doc/xmldtd.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Validation & DTDs
                                                                        Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                                        Made with Libxml2 Logo

                                                                        The XML C parser and toolkit of Gnome

                                                                        Validation & DTDs

                                                                        Main Menu
                                                                        Related links

                                                                        Table of Content:

                                                                        1. General overview
                                                                        2. +Validation & DTDs
                                                                          Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                                          Made with Libxml2 Logo

                                                                          The XML C parser and toolkit of Gnome

                                                                          Validation & DTDs

                                                                          Main Menu
                                                                          Related links

                                                                          Table of Content:

                                                                          1. General overview
                                                                          2. The definition
                                                                          3. Simple rules
                                                                            1. How to reference a DTD from a document
                                                                            2. diff --git a/doc/xmlio.html b/doc/xmlio.html index ddffe4a..5beee05 100644 --- a/doc/xmlio.html +++ b/doc/xmlio.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -I/O Interfaces
                                                                              Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                                              Made with Libxml2 Logo

                                                                              The XML C parser and toolkit of Gnome

                                                                              I/O Interfaces

                                                                              Developer Menu
                                                                              API Indexes
                                                                              Related links

                                                                              Table of Content:

                                                                              1. General overview
                                                                              2. +I/O Interfaces
                                                                                Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                                                Made with Libxml2 Logo

                                                                                The XML C parser and toolkit of Gnome

                                                                                I/O Interfaces

                                                                                Developer Menu
                                                                                API Indexes
                                                                                Related links

                                                                                Table of Content:

                                                                                1. General overview
                                                                                2. The basic buffer type
                                                                                3. Input I/O handlers
                                                                                4. Output I/O handlers
                                                                                5. diff --git a/doc/xmllint.1 b/doc/xmllint.1 index 18ef917..10caf40 100644 --- a/doc/xmllint.1 +++ b/doc/xmllint.1 @@ -2,7 +2,7 @@ .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. -.TH "XMLLINT" "1" "$Date: 2006/08/21 08:34:11 $" "libxml2" "" +.TH "XMLLINT" "1" "$Date$" "libxml2" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) diff --git a/doc/xmllint.xml b/doc/xmllint.xml index f9f4692..9a41b4e 100644 --- a/doc/xmllint.xml +++ b/doc/xmllint.xml @@ -46,7 +46,7 @@ - $Date: 2006-08-21 10:34:11 +0200 (Mon, 21 Aug 2006) $ + $Date$ diff --git a/doc/xmlmem.html b/doc/xmlmem.html index 5599444..eff65a9 100644 --- a/doc/xmlmem.html +++ b/doc/xmlmem.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Memory Management
                                                                                  Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                                                  Made with Libxml2 Logo

                                                                                  The XML C parser and toolkit of Gnome

                                                                                  Memory Management

                                                                                  Developer Menu
                                                                                  API Indexes
                                                                                  Related links

                                                                                  Table of Content:

                                                                                  1. General overview
                                                                                  2. +Memory Management
                                                                                    Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
                                                                                    Made with Libxml2 Logo

                                                                                    The XML C parser and toolkit of Gnome

                                                                                    Memory Management

                                                                                    Developer Menu
                                                                                    API Indexes
                                                                                    Related links

                                                                                    Table of Content:

                                                                                    1. General overview
                                                                                    2. Setting libxml2 set of memory routines
                                                                                    3. Cleaning up after using the library
                                                                                    4. Debugging routines
                                                                                    5. diff --git a/doc/xmlreader.html b/doc/xmlreader.html index 416f047..38608c1 100644 --- a/doc/xmlreader.html +++ b/doc/xmlreader.html @@ -468,7 +468,7 @@ process to the successor or return 0 if the document end is reached.

                                                                                      Daniel Veillard

                                                                                      -

                                                                                      $Id: xmlreader.html 3320 2005-10-18 19:11:55Z veillard $

                                                                                      +

                                                                                      $Id$

                                                                                      diff --git a/elfgcchack.h b/elfgcchack.h index 14cad6d..84e8151 100644 --- a/elfgcchack.h +++ b/elfgcchack.h @@ -15489,6 +15489,18 @@ extern __typeof (xmlXIncludeProcessTreeFlags) xmlXIncludeProcessTreeFlags__inter #endif #endif +#if defined(LIBXML_XINCLUDE_ENABLED) +#ifdef bottom_xinclude +#undef xmlXIncludeProcessTreeFlagsData +extern __typeof (xmlXIncludeProcessTreeFlagsData) xmlXIncludeProcessTreeFlagsData __attribute((alias("xmlXIncludeProcessTreeFlagsData__internal_alias"))); +#else +#ifndef xmlXIncludeProcessTreeFlagsData +extern __typeof (xmlXIncludeProcessTreeFlagsData) xmlXIncludeProcessTreeFlagsData__internal_alias __attribute((visibility("hidden"))); +#define xmlXIncludeProcessTreeFlagsData xmlXIncludeProcessTreeFlagsData__internal_alias +#endif +#endif +#endif + #if defined(LIBXML_XINCLUDE_ENABLED) #ifdef bottom_xinclude #undef xmlXIncludeSetFlags diff --git a/encoding.c b/encoding.c index e2df797..b86a547 100644 --- a/encoding.c +++ b/encoding.c @@ -1414,7 +1414,7 @@ xmlCleanupCharEncodingHandlers(void) { void xmlRegisterCharEncodingHandler(xmlCharEncodingHandlerPtr handler) { if (handlers == NULL) xmlInitCharEncodingHandlers(); - if (handler == NULL) { + if ((handler == NULL) || (handlers == NULL)) { xmlEncodingErr(XML_I18N_NO_HANDLER, "xmlRegisterCharEncodingHandler: NULL handler !\n", NULL); return; @@ -1458,6 +1458,8 @@ xmlGetCharEncodingHandler(xmlCharEncoding enc) { if (handler != NULL) return(handler); handler = xmlFindCharEncodingHandler("ebcdic"); if (handler != NULL) return(handler); + handler = xmlFindCharEncodingHandler("EBCDIC-US"); + if (handler != NULL) return(handler); break; case XML_CHAR_ENCODING_UCS4BE: handler = xmlFindCharEncodingHandler("ISO-10646-UCS-4"); @@ -1600,14 +1602,17 @@ xmlFindCharEncodingHandler(const char *name) { } upper[i] = 0; - for (i = 0;i < nbCharEncodingHandler; i++) - if (!strcmp(upper, handlers[i]->name)) { + if (handlers != NULL) { + for (i = 0;i < nbCharEncodingHandler; i++) { + if (!strcmp(upper, handlers[i]->name)) { #ifdef DEBUG_ENCODING - xmlGenericError(xmlGenericErrorContext, - "Found registered handler for encoding %s\n", name); + xmlGenericError(xmlGenericErrorContext, + "Found registered handler for encoding %s\n", name); #endif - return(handlers[i]); - } + return(handlers[i]); + } + } + } #ifdef LIBXML_ICONV_ENABLED /* check whether iconv can handle this */ @@ -1735,24 +1740,28 @@ xmlIconvWrapper(iconv_t cd, unsigned char *out, int *outlen, * The real API used by libxml for on-the-fly conversion * * * ************************************************************************/ +int +xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out, + xmlBufferPtr in, int len); /** - * xmlCharEncFirstLine: + * xmlCharEncFirstLineInt: * @handler: char enconding transformation data structure * @out: an xmlBuffer for the output. * @in: an xmlBuffer for the input - * + * @len: number of bytes to convert for the first line, or -1 + * * Front-end for the encoding handler input function, but handle only * the very first line, i.e. limit itself to 45 chars. - * - * Returns the number of byte written if success, or + * + * Returns the number of byte written if success, or * -1 general error * -2 if the transcoding fails (for *in is not valid utf8 string or * the result of transformation can't fit into the encoding we want), or */ int -xmlCharEncFirstLine(xmlCharEncodingHandler *handler, xmlBufferPtr out, - xmlBufferPtr in) { +xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out, + xmlBufferPtr in, int len) { int ret = -2; int written; int toconv; @@ -1769,9 +1778,16 @@ xmlCharEncFirstLine(xmlCharEncodingHandler *handler, xmlBufferPtr out, * 45 chars should be sufficient to reach the end of the encoding * declaration without going too far inside the document content. * on UTF-16 this means 90bytes, on UCS4 this means 180 + * The actual value depending on guessed encoding is passed as @len + * if provided */ - if (toconv > 180) - toconv = 180; + if (len >= 0) { + if (toconv > len) + toconv = len; + } else { + if (toconv > 180) + toconv = 180; + } if (toconv * 2 >= written) { xmlBufferGrow(out, toconv); written = out->size - out->use - 1; @@ -1825,15 +1841,35 @@ xmlCharEncFirstLine(xmlCharEncodingHandler *handler, xmlBufferPtr out, return(ret); } +/** + * xmlCharEncFirstLine: + * @handler: char enconding transformation data structure + * @out: an xmlBuffer for the output. + * @in: an xmlBuffer for the input + * + * Front-end for the encoding handler input function, but handle only + * the very first line, i.e. limit itself to 45 chars. + * + * Returns the number of byte written if success, or + * -1 general error + * -2 if the transcoding fails (for *in is not valid utf8 string or + * the result of transformation can't fit into the encoding we want), or + */ +int +xmlCharEncFirstLine(xmlCharEncodingHandler *handler, xmlBufferPtr out, + xmlBufferPtr in) { + return(xmlCharEncFirstLineInt(handler, out, in, -1)); +} + /** * xmlCharEncInFunc: * @handler: char encoding transformation data structure * @out: an xmlBuffer for the output. * @in: an xmlBuffer for the input - * + * * Generic front-end for the encoding handler input function - * - * Returns the number of byte written if success, or + * + * Returns the number of byte written if success, or * -1 general error * -2 if the transcoding fails (for *in is not valid utf8 string or * the result of transformation can't fit into the encoding we want), or diff --git a/entities.c b/entities.c index c171e97..6aef49f 100644 --- a/entities.c +++ b/entities.c @@ -690,7 +690,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) { } cur++; } - *out++ = 0; + *out = 0; return(buffer); } @@ -772,7 +772,7 @@ xmlEncodeSpecialChars(xmlDocPtr doc ATTRIBUTE_UNUSED, const xmlChar *input) { } cur++; } - *out++ = 0; + *out = 0; return(buffer); } diff --git a/error.c b/error.c index 5f03d94..814e4ea 100644 --- a/error.c +++ b/error.c @@ -132,7 +132,7 @@ xmlSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler) { */ void xmlSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler) { - xmlGenericErrorContext = ctx; + xmlStructuredErrorContext = ctx; xmlStructuredError = handler; } @@ -471,7 +471,7 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel, * if user has defined handler, change data ptr to user's choice */ if (schannel != NULL) - data = xmlGenericErrorContext; + data = xmlStructuredErrorContext; } if ((domain == XML_FROM_VALID) && ((channel == xmlParserValidityError) || @@ -573,7 +573,6 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel, if ((to->file == NULL) && (node != NULL) && (node->doc != NULL)) { to->file = (char *) xmlStrdup(node->doc->URL); } - file = to->file; } to->line = line; if (str1 != NULL) @@ -593,20 +592,23 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel, /* * Find the callback channel if channel param is NULL */ - if ((ctxt != NULL) && (channel == NULL) && (xmlStructuredError == NULL) && (ctxt->sax != NULL)) { + if ((ctxt != NULL) && (channel == NULL) && + (xmlStructuredError == NULL) && (ctxt->sax != NULL)) { if (level == XML_ERR_WARNING) channel = ctxt->sax->warning; else channel = ctxt->sax->error; data = ctxt->userData; } else if (channel == NULL) { - if (xmlStructuredError != NULL) + if ((schannel == NULL) && (xmlStructuredError != NULL)) { schannel = xmlStructuredError; - else + data = xmlStructuredErrorContext; + } else { channel = xmlGenericError; - if (!data) { - data = xmlGenericErrorContext; - } + if (!data) { + data = xmlGenericErrorContext; + } + } } if (schannel != NULL) { schannel(data, to); diff --git a/example/Makefile.in b/example/Makefile.in index cc610a1..2f7c3e9 100644 --- a/example/Makefile.in +++ b/example/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @@ -16,8 +17,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -43,6 +45,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_gjobread_OBJECTS = gjobread.$(OBJEXT) gjobread_OBJECTS = $(am_gjobread_OBJECTS) @@ -54,6 +57,7 @@ gjobread_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ @@ -84,10 +88,6 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@ @@ -96,14 +96,14 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOCB_OBJ = @DOCB_OBJ@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FTP_OBJ = @FTP_OBJ@ GREP = @GREP@ HAVE_ISINF = @HAVE_ISINF@ @@ -117,6 +117,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -128,6 +129,7 @@ LIBXML_VERSION = @LIBXML_VERSION@ LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@ LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@ LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ @@ -136,8 +138,12 @@ MODULE_EXTENSION = @MODULE_EXTENSION@ MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@ MV = @MV@ M_LIBS = @M_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -186,6 +192,7 @@ THREAD_CFLAGS = @THREAD_CFLAGS@ THREAD_LIBS = @THREAD_LIBS@ U = @U@ VERSION = @VERSION@ +VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@ WGET = @WGET@ WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@ WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@ @@ -236,8 +243,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -268,6 +274,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -281,6 +288,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@ @@ -298,14 +306,14 @@ $(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; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu example/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu example/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu example/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu example/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -323,13 +331,16 @@ $(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 +$(am__aclocal_m4_deps): 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 + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list gjobread$(EXEEXT): $(gjobread_OBJECTS) $(gjobread_DEPENDENCIES) @rm -f gjobread$(EXEEXT) $(gjobread_LINK) $(gjobread_OBJECTS) $(gjobread_LDADD) $(LIBS) @@ -344,21 +355,21 @@ distclean-compile: .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -374,14 +385,14 @@ ID: $(HEADERS) $(SOURCES) $(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; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -389,29 +400,34 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -432,13 +448,17 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -466,6 +486,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -487,6 +508,8 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: @@ -495,18 +518,28 @@ install-data-am: install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -544,6 +577,7 @@ uninstall-am: mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/globals.c b/globals.c index cbc6625..1f807d8 100644 --- a/globals.c +++ b/globals.c @@ -46,7 +46,8 @@ static xmlMutexPtr xmlThrDefMutex = NULL; */ void xmlInitGlobals(void) { - xmlThrDefMutex = xmlNewMutex(); + if (xmlThrDefMutex != NULL) + xmlThrDefMutex = xmlNewMutex(); } /** @@ -148,6 +149,7 @@ xmlStrdupFunc xmlMemStrdup = (xmlStrdupFunc) xmlStrdup; #undef xmlGenericError #undef xmlStructuredError #undef xmlGenericErrorContext +#undef xmlStructuredErrorContext #undef xmlGetWarningsDefaultValue #undef xmlIndentTreeOutput #undef xmlTreeIndentString @@ -314,6 +316,13 @@ static xmlStructuredErrorFunc xmlStructuredErrorThrDef = NULL; */ void *xmlGenericErrorContext = NULL; static void *xmlGenericErrorContextThrDef = NULL; +/** + * xmlStructuredErrorContext: + * + * Global setting passed to structured error callbacks + */ +void *xmlStructuredErrorContext = NULL; +static void *xmlStructuredErrorContextThrDef = NULL; xmlError xmlLastError; /* @@ -545,6 +554,7 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs) gs->xmlGenericError = xmlGenericErrorThrDef; gs->xmlStructuredError = xmlStructuredErrorThrDef; gs->xmlGenericErrorContext = xmlGenericErrorContextThrDef; + gs->xmlStructuredErrorContext = xmlStructuredErrorContextThrDef; gs->xmlRegisterNodeDefaultValue = xmlRegisterNodeDefaultValueThrDef; gs->xmlDeregisterNodeDefaultValue = xmlDeregisterNodeDefaultValueThrDef; @@ -573,7 +583,7 @@ xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler) { void xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler) { xmlMutexLock(xmlThrDefMutex); - xmlGenericErrorContextThrDef = ctx; + xmlStructuredErrorContextThrDef = ctx; xmlStructuredErrorThrDef = handler; xmlMutexUnlock(xmlThrDefMutex); } @@ -876,6 +886,15 @@ __xmlGenericErrorContext(void) { return (&xmlGetGlobalState()->xmlGenericErrorContext); } +#undef xmlStructuredErrorContext +void * * +__xmlStructuredErrorContext(void) { + if (IS_MAIN_THREAD) + return (&xmlStructuredErrorContext); + else + return (&xmlGetGlobalState()->xmlStructuredErrorContext); +} + #undef xmlGetWarningsDefaultValue int * __xmlGetWarningsDefaultValue(void) { @@ -910,7 +929,7 @@ int xmlThrDefIndentTreeOutput(int v) { return ret; } -#undef xmlTreeIndentString +#undef xmlTreeIndentString const char * * __xmlTreeIndentString(void) { if (IS_MAIN_THREAD) diff --git a/hash.c b/hash.c index 22f9bb4..b78bc2d 100644 --- a/hash.c +++ b/hash.c @@ -320,7 +320,6 @@ xmlHashFree(xmlHashTablePtr table, xmlHashDeallocator f) { inside_table = 0; iter = next; } - inside_table = 0; } xmlFree(table->table); } diff --git a/include/Makefile.in b/include/Makefile.in index 00844d1..3b44fd3 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @@ -15,8 +16,9 @@ @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -41,6 +43,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -52,10 +55,38 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ @@ -72,10 +103,6 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@ @@ -84,14 +111,14 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOCB_OBJ = @DOCB_OBJ@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FTP_OBJ = @FTP_OBJ@ GREP = @GREP@ HAVE_ISINF = @HAVE_ISINF@ @@ -105,6 +132,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -116,6 +144,7 @@ LIBXML_VERSION = @LIBXML_VERSION@ LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@ LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@ LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ @@ -124,8 +153,12 @@ MODULE_EXTENSION = @MODULE_EXTENSION@ MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@ MV = @MV@ M_LIBS = @M_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -174,6 +207,7 @@ THREAD_CFLAGS = @THREAD_CFLAGS@ THREAD_LIBS = @THREAD_LIBS@ U = @U@ VERSION = @VERSION@ +VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@ WGET = @WGET@ WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@ WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@ @@ -224,8 +258,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -256,6 +289,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -269,6 +303,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = libxml @@ -280,14 +315,14 @@ $(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; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu include/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -305,6 +340,7 @@ $(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 +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -336,7 +372,7 @@ $(RECURSIVE_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ @@ -370,16 +406,16 @@ $(RECURSIVE_CLEAN_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -387,14 +423,14 @@ ID: $(HEADERS) $(SOURCES) $(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; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -406,7 +442,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -415,29 +451,34 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -458,29 +499,44 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ @@ -510,6 +566,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -528,6 +585,8 @@ dvi-am: html: html-recursive +html-am: + info: info-recursive info-am: @@ -536,18 +595,28 @@ install-data-am: install-dvi: install-dvi-recursive +install-dvi-am: + install-exec-am: install-html: install-html-recursive +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: install-pdf: install-pdf-recursive +install-pdf-am: + install-ps: install-ps-recursive +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -568,8 +637,8 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ @@ -585,6 +654,7 @@ uninstall-am: mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/include/libxml/Makefile.in b/include/libxml/Makefile.in index f6650ef..9e6d97c 100644 --- a/include/libxml/Makefile.in +++ b/include/libxml/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @@ -16,8 +17,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -43,6 +45,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = xmlversion.h +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -50,9 +53,23 @@ am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(xmlincdir)" -xmlincHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(xmlinc_HEADERS) ETAGS = etags CTAGS = ctags @@ -73,10 +90,6 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@ @@ -85,14 +98,14 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOCB_OBJ = @DOCB_OBJ@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FTP_OBJ = @FTP_OBJ@ GREP = @GREP@ HAVE_ISINF = @HAVE_ISINF@ @@ -106,6 +119,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -117,6 +131,7 @@ LIBXML_VERSION = @LIBXML_VERSION@ LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@ LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@ LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ @@ -125,8 +140,12 @@ MODULE_EXTENSION = @MODULE_EXTENSION@ MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@ MV = @MV@ M_LIBS = @M_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -175,6 +194,7 @@ THREAD_CFLAGS = @THREAD_CFLAGS@ THREAD_LIBS = @THREAD_LIBS@ U = @U@ VERSION = @VERSION@ +VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@ WGET = @WGET@ WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@ WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@ @@ -225,8 +245,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -257,6 +276,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -270,6 +290,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ xmlincdir = $(includedir)/libxml2/libxml @@ -330,14 +351,14 @@ $(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; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/libxml/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu include/libxml/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/libxml/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/libxml/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -355,6 +376,7 @@ $(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 +$(am__aclocal_m4_deps): xmlversion.h: $(top_builddir)/config.status $(srcdir)/xmlversion.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ @@ -366,34 +388,37 @@ clean-libtool: install-xmlincHEADERS: $(xmlinc_HEADERS) @$(NORMAL_INSTALL) test -z "$(xmlincdir)" || $(MKDIR_P) "$(DESTDIR)$(xmlincdir)" - @list='$(xmlinc_HEADERS)'; for p in $$list; do \ + @list='$(xmlinc_HEADERS)'; test -n "$(xmlincdir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(xmlincHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(xmlincdir)/$$f'"; \ - $(xmlincHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(xmlincdir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(xmlincdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(xmlincdir)" || exit $$?; \ done uninstall-xmlincHEADERS: @$(NORMAL_UNINSTALL) - @list='$(xmlinc_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(xmlincdir)/$$f'"; \ - rm -f "$(DESTDIR)$(xmlincdir)/$$f"; \ - done + @list='$(xmlinc_HEADERS)'; test -n "$(xmlincdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(xmlincdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(xmlincdir)" && rm -f $$files 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; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -401,29 +426,34 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -444,13 +474,17 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -481,6 +515,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -499,6 +534,8 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: @@ -507,20 +544,29 @@ install-data-am: install-xmlincHEADERS install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook - install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -559,6 +605,7 @@ uninstall-am: uninstall-xmlincHEADERS install-exec-hook: $(mkinstalldirs) $(DESTDIR)$(xmlincdir) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/include/libxml/c14n.h b/include/libxml/c14n.h index a8aa737..3011af7 100644 --- a/include/libxml/c14n.h +++ b/include/libxml/c14n.h @@ -52,11 +52,22 @@ extern "C" { * ... */ +/* + * xmlC14NMode: + * + * Predefined values for C14N modes + * + */ +typedef enum { + XML_C14N_1_0 = 0, /* Origianal C14N 1.0 spec */ + XML_C14N_EXCLUSIVE_1_0 = 1, /* Exclusive C14N 1.0 spec */ + XML_C14N_1_1 = 2 /* C14N 1.1 spec */ +} xmlC14NMode; XMLPUBFUN int XMLCALL xmlC14NDocSaveTo (xmlDocPtr doc, xmlNodeSetPtr nodes, - int exclusive, + int mode, /* a xmlC14NMode */ xmlChar **inclusive_ns_prefixes, int with_comments, xmlOutputBufferPtr buf); @@ -64,7 +75,7 @@ XMLPUBFUN int XMLCALL XMLPUBFUN int XMLCALL xmlC14NDocDumpMemory (xmlDocPtr doc, xmlNodeSetPtr nodes, - int exclusive, + int mode, /* a xmlC14NMode */ xmlChar **inclusive_ns_prefixes, int with_comments, xmlChar **doc_txt_ptr); @@ -72,7 +83,7 @@ XMLPUBFUN int XMLCALL XMLPUBFUN int XMLCALL xmlC14NDocSave (xmlDocPtr doc, xmlNodeSetPtr nodes, - int exclusive, + int mode, /* a xmlC14NMode */ xmlChar **inclusive_ns_prefixes, int with_comments, const char* filename, @@ -100,7 +111,7 @@ XMLPUBFUN int XMLCALL xmlC14NExecute (xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback, void* user_data, - int exclusive, + int mode, /* a xmlC14NMode */ xmlChar **inclusive_ns_prefixes, int with_comments, xmlOutputBufferPtr buf); diff --git a/include/libxml/globals.h b/include/libxml/globals.h index 57e25fa..9d688e0 100644 --- a/include/libxml/globals.h +++ b/include/libxml/globals.h @@ -76,6 +76,7 @@ XMLCALL xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc #undef xmlGenericError #undef xmlStructuredError #undef xmlGenericErrorContext +#undef xmlStructuredErrorContext #undef xmlGetWarningsDefaultValue #undef xmlIndentTreeOutput #undef xmlTreeIndentString @@ -158,6 +159,8 @@ struct _xmlGlobalState xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue; xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue; + + void *xmlStructuredErrorContext; }; #ifdef __cplusplus @@ -354,6 +357,14 @@ XMLPUBFUN void * * XMLCALL __xmlGenericErrorContext(void); XMLPUBVAR void * xmlGenericErrorContext; #endif +XMLPUBFUN void * * XMLCALL __xmlStructuredErrorContext(void); +#ifdef LIBXML_THREAD_ENABLED +#define xmlStructuredErrorContext \ +(*(__xmlStructuredErrorContext())) +#else +XMLPUBVAR void * xmlStructuredErrorContext; +#endif + XMLPUBFUN int * XMLCALL __xmlGetWarningsDefaultValue(void); #ifdef LIBXML_THREAD_ENABLED #define xmlGetWarningsDefaultValue \ diff --git a/include/libxml/parser.h b/include/libxml/parser.h index 567addb..148ee03 100644 --- a/include/libxml/parser.h +++ b/include/libxml/parser.h @@ -190,7 +190,10 @@ struct _xmlParserCtxt { const xmlChar *version; /* the XML version string */ const xmlChar *encoding; /* the declared encoding, if any */ int standalone; /* standalone document */ - int html; /* an HTML(1)/Docbook(2) document */ + int html; /* an HTML(1)/Docbook(2) document + * 3 is HTML after + * 10 is HTML after + */ /* Input stream stack */ xmlParserInputPtr input; /* Current input stream */ @@ -594,7 +597,7 @@ typedef void (*cdataBlockSAXFunc) ( * Display and format a warning messages, callback. */ typedef void (XMLCDECL *warningSAXFunc) (void *ctx, - const char *msg, ...) ATTRIBUTE_PRINTF(2,3); + const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * errorSAXFunc: * @ctx: an XML parser context @@ -604,7 +607,7 @@ typedef void (XMLCDECL *warningSAXFunc) (void *ctx, * Display and format an error messages, callback. */ typedef void (XMLCDECL *errorSAXFunc) (void *ctx, - const char *msg, ...) ATTRIBUTE_PRINTF(2,3); + const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * fatalErrorSAXFunc: * @ctx: an XML parser context @@ -616,7 +619,7 @@ typedef void (XMLCDECL *errorSAXFunc) (void *ctx, * get all the callbacks for errors. */ typedef void (XMLCDECL *fatalErrorSAXFunc) (void *ctx, - const char *msg, ...) ATTRIBUTE_PRINTF(2,3); + const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * isStandaloneSAXFunc: * @ctx: the user data (XML parser context) @@ -850,7 +853,7 @@ XMLPUBFUN int XMLCALL * Recovery mode */ XMLPUBFUN xmlDocPtr XMLCALL - xmlRecoverDoc (xmlChar *cur); + xmlRecoverDoc (const xmlChar *cur); XMLPUBFUN xmlDocPtr XMLCALL xmlRecoverMemory (const char *buffer, int size); diff --git a/include/libxml/relaxng.h b/include/libxml/relaxng.h index d3e39e0..bdb0a7d 100644 --- a/include/libxml/relaxng.h +++ b/include/libxml/relaxng.h @@ -32,7 +32,7 @@ typedef xmlRelaxNG *xmlRelaxNGPtr; * * Signature of an error callback from a Relax-NG validation */ -typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...) ATTRIBUTE_PRINTF(2,3); +typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * xmlRelaxNGValidityWarningFunc: @@ -42,7 +42,7 @@ typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg * * Signature of a warning callback from a Relax-NG validation */ -typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...) ATTRIBUTE_PRINTF(2,3); +typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * A schemas validation context diff --git a/include/libxml/valid.h b/include/libxml/valid.h index f1892b0..a2307f1 100644 --- a/include/libxml/valid.h +++ b/include/libxml/valid.h @@ -41,7 +41,7 @@ typedef xmlValidState *xmlValidStatePtr; */ typedef void (XMLCDECL *xmlValidityErrorFunc) (void *ctx, const char *msg, - ...) ATTRIBUTE_PRINTF(2,3); + ...) LIBXML_ATTR_FORMAT(2,3); /** * xmlValidityWarningFunc: @@ -56,7 +56,7 @@ typedef void (XMLCDECL *xmlValidityErrorFunc) (void *ctx, */ typedef void (XMLCDECL *xmlValidityWarningFunc) (void *ctx, const char *msg, - ...) ATTRIBUTE_PRINTF(2,3); + ...) LIBXML_ATTR_FORMAT(2,3); #ifdef IN_LIBXML /** diff --git a/include/libxml/xinclude.h b/include/libxml/xinclude.h index ba9c9b5..863ab25 100644 --- a/include/libxml/xinclude.h +++ b/include/libxml/xinclude.h @@ -89,18 +89,22 @@ typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr; /* * standalone processing */ -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlXIncludeProcess (xmlDocPtr doc); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlXIncludeProcessFlags (xmlDocPtr doc, int flags); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlXIncludeProcessFlagsData(xmlDocPtr doc, int flags, void *data); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL + xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree, + int flags, + void *data); +XMLPUBFUN int XMLCALL xmlXIncludeProcessTree (xmlNodePtr tree); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlXIncludeProcessTreeFlags(xmlNodePtr tree, int flags); /* diff --git a/include/libxml/xmlerror.h b/include/libxml/xmlerror.h index 7cce9c3..e924211 100644 --- a/include/libxml/xmlerror.h +++ b/include/libxml/xmlerror.h @@ -843,7 +843,7 @@ typedef enum { */ typedef void (XMLCDECL *xmlGenericErrorFunc) (void *ctx, const char *msg, - ...) ATTRIBUTE_PRINTF(2,3); + ...) LIBXML_ATTR_FORMAT(2,3); /** * xmlStructuredErrorFunc: * @userData: user provided data for the error callback @@ -874,19 +874,19 @@ XMLPUBFUN void XMLCALL XMLPUBFUN void XMLCDECL xmlParserError (void *ctx, const char *msg, - ...) ATTRIBUTE_PRINTF(2,3); + ...) LIBXML_ATTR_FORMAT(2,3); XMLPUBFUN void XMLCDECL xmlParserWarning (void *ctx, const char *msg, - ...) ATTRIBUTE_PRINTF(2,3); + ...) LIBXML_ATTR_FORMAT(2,3); XMLPUBFUN void XMLCDECL xmlParserValidityError (void *ctx, const char *msg, - ...) ATTRIBUTE_PRINTF(2,3); + ...) LIBXML_ATTR_FORMAT(2,3); XMLPUBFUN void XMLCDECL xmlParserValidityWarning (void *ctx, const char *msg, - ...) ATTRIBUTE_PRINTF(2,3); + ...) LIBXML_ATTR_FORMAT(2,3); XMLPUBFUN void XMLCALL xmlParserPrintFileInfo (xmlParserInputPtr input); XMLPUBFUN void XMLCALL @@ -930,7 +930,7 @@ XMLPUBFUN void XMLCALL int int1, int col, const char *msg, - ...) ATTRIBUTE_PRINTF(16,17); + ...) LIBXML_ATTR_FORMAT(16,17); XMLPUBFUN void XMLCALL __xmlSimpleError (int domain, int code, diff --git a/include/libxml/xmlexports.h b/include/libxml/xmlexports.h index 29a6f54..b90659f 100644 --- a/include/libxml/xmlexports.h +++ b/include/libxml/xmlexports.h @@ -108,7 +108,12 @@ #undef XMLPUBVAR #undef XMLCALL #undef XMLCDECL - #if defined(IN_LIBXML) && !defined(LIBXML_STATIC) + /* + * if defined(IN_LIBXML) this raises problems on mingw with msys + * _imp__xmlFree listed as missing. Try to workaround the problem + * by also making that declaration when compiling client code. + */ + #if !defined(LIBXML_STATIC) #define XMLPUBFUN __declspec(dllexport) #define XMLPUBVAR __declspec(dllexport) #else diff --git a/include/libxml/xmlmemory.h b/include/libxml/xmlmemory.h index 8f3b109..17e375a 100644 --- a/include/libxml/xmlmemory.h +++ b/include/libxml/xmlmemory.h @@ -63,7 +63,7 @@ typedef void (XMLCALL *xmlFreeFunc)(void *mem); * * Returns a pointer to the newly allocated block or NULL in case of error. */ -typedef void *(ATTRIBUTE_ALLOC_SIZE(1) XMLCALL *xmlMallocFunc)(size_t size); +typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) XMLCALL *xmlMallocFunc)(size_t size); /** * xmlReallocFunc: @@ -88,11 +88,11 @@ typedef char *(XMLCALL *xmlStrdupFunc)(const char *str); /* * The 4 interfaces used for all memory handling within libxml. -LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree; -LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc; -LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMallocAtomic; -LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc; -LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup; +LIBXML_DLL_IMPORT xmlFreeFunc xmlFree; +LIBXML_DLL_IMPORT xmlMallocFunc xmlMalloc; +LIBXML_DLL_IMPORT xmlMallocFunc xmlMallocAtomic; +LIBXML_DLL_IMPORT xmlReallocFunc xmlRealloc; +LIBXML_DLL_IMPORT xmlStrdupFunc xmlMemStrdup; */ /* @@ -150,7 +150,7 @@ XMLPUBFUN void XMLCALL XMLPUBFUN void XMLCALL xmlMemoryDump (void); XMLPUBFUN void * XMLCALL - xmlMemMalloc (size_t size) ATTRIBUTE_ALLOC_SIZE(1); + xmlMemMalloc (size_t size) LIBXML_ATTR_ALLOC_SIZE(1); XMLPUBFUN void * XMLCALL xmlMemRealloc (void *ptr,size_t size); XMLPUBFUN void XMLCALL @@ -158,11 +158,11 @@ XMLPUBFUN void XMLCALL XMLPUBFUN char * XMLCALL xmlMemoryStrdup (const char *str); XMLPUBFUN void * XMLCALL - xmlMallocLoc (size_t size, const char *file, int line) ATTRIBUTE_ALLOC_SIZE(1); + xmlMallocLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1); XMLPUBFUN void * XMLCALL xmlReallocLoc (void *ptr, size_t size, const char *file, int line); XMLPUBFUN void * XMLCALL - xmlMallocAtomicLoc (size_t size, const char *file, int line) ATTRIBUTE_ALLOC_SIZE(1); + xmlMallocAtomicLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1); XMLPUBFUN char * XMLCALL xmlMemStrdupLoc (const char *str, const char *file, int line); diff --git a/include/libxml/xmlschemas.h b/include/libxml/xmlschemas.h index ebef3a7..752bc3a 100644 --- a/include/libxml/xmlschemas.h +++ b/include/libxml/xmlschemas.h @@ -92,7 +92,7 @@ typedef xmlSchema *xmlSchemaPtr; * * Signature of an error callback from an XSD validation */ -typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...) ATTRIBUTE_PRINTF(2,3); +typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * xmlSchemaValidityWarningFunc: @@ -102,7 +102,7 @@ typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, * * Signature of a warning callback from an XSD validation */ -typedef void (XMLCDECL *xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...) ATTRIBUTE_PRINTF(2,3); +typedef void (XMLCDECL *xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * A schemas validation context diff --git a/include/libxml/xmlstring.h b/include/libxml/xmlstring.h index 1dfc5ea..0bc6888 100644 --- a/include/libxml/xmlstring.h +++ b/include/libxml/xmlstring.h @@ -59,7 +59,7 @@ XMLPUBFUN const xmlChar * XMLCALL const xmlChar *val); XMLPUBFUN const xmlChar * XMLCALL xmlStrcasestr (const xmlChar *str, - xmlChar *val); + const xmlChar *val); XMLPUBFUN int XMLCALL xmlStrcmp (const xmlChar *str1, const xmlChar *str2); diff --git a/include/libxml/xmlversion.h b/include/libxml/xmlversion.h index e960f09..d0fabef 100644 --- a/include/libxml/xmlversion.h +++ b/include/libxml/xmlversion.h @@ -29,28 +29,28 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); * * the version string like "1.2.3" */ -#define LIBXML_DOTTED_VERSION "2.7.3" +#define LIBXML_DOTTED_VERSION "2.7.4" /** * LIBXML_VERSION: * * the version number: 1.2.3 value is 10203 */ -#define LIBXML_VERSION 20703 +#define LIBXML_VERSION 20704 /** * LIBXML_VERSION_STRING: * * the version number string, 1.2.3 value is "10203" */ -#define LIBXML_VERSION_STRING "20703" +#define LIBXML_VERSION_STRING "20704" /** * LIBXML_VERSION_EXTRA: * * extra version information, used to show a CVS compilation */ -#define LIBXML_VERSION_EXTRA "-CVS2831" +#define LIBXML_VERSION_EXTRA "-GIT120-gd87c5d1" /** * LIBXML_TEST_VERSION: @@ -58,7 +58,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); * Macro to check that the libxml version in use is compatible with * the version the software has been compiled against */ -#define LIBXML_TEST_VERSION xmlCheckVersion(20703); +#define LIBXML_TEST_VERSION xmlCheckVersion(20704); #ifndef VMS #if 0 @@ -398,35 +398,35 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); #endif /** - * ATTRIBUTE_ALLOC_SIZE: + * LIBXML_ATTR_ALLOC_SIZE: * * Macro used to indicate to GCC this is an allocator function */ -#ifndef ATTRIBUTE_ALLOC_SIZE +#ifndef LIBXML_ATTR_ALLOC_SIZE # if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) -# define ATTRIBUTE_ALLOC_SIZE(x) __attribute__((alloc_size(x))) +# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x))) # else -# define ATTRIBUTE_ALLOC_SIZE(x) +# define LIBXML_ATTR_ALLOC_SIZE(x) # endif #else -# define ATTRIBUTE_ALLOC_SIZE(x) +# define LIBXML_ATTR_ALLOC_SIZE(x) #endif /** - * ATTRIBUTE_PRINTF: + * LIBXML_ATTR_FORMAT: * * Macro used to indicate to GCC the parameter are printf like */ -#ifndef ATTRIBUTE_PRINTF +#ifndef LIBXML_ATTR_FORMAT # if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) -# define ATTRIBUTE_PRINTF(fmt,args) __attribute__((__format__(__printf__,fmt,args))) +# define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args))) # else -# define ATTRIBUTE_PRINTF(fmt,args) +# define LIBXML_ATTR_FORMAT(fmt,args) # endif #else -# define ATTRIBUTE_PRINTF(fmt,args) +# define LIBXML_ATTR_FORMAT(fmt,args) #endif #else /* ! __GNUC__ */ @@ -437,17 +437,17 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); */ #define ATTRIBUTE_UNUSED /** - * ATTRIBUTE_ALLOC_SIZE: + * LIBXML_ATTR_ALLOC_SIZE: * * Macro used to indicate to GCC this is an allocator function */ -#define ATTRIBUTE_ALLOC_SIZE(x) +#define LIBXML_ATTR_ALLOC_SIZE(x) /** - * ATTRIBUTE_PRINTF: + * LIBXML_ATTR_FORMAT: * * Macro used to indicate to GCC the parameter are printf like */ -#define ATTRIBUTE_PRINTF(fmt,args) +#define LIBXML_ATTR_FORMAT(fmt,args) #endif /* __GNUC__ */ #ifdef __cplusplus diff --git a/include/libxml/xmlversion.h.in b/include/libxml/xmlversion.h.in index 05c9f29..4739f3a 100644 --- a/include/libxml/xmlversion.h.in +++ b/include/libxml/xmlversion.h.in @@ -398,35 +398,35 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); #endif /** - * ATTRIBUTE_ALLOC_SIZE: + * LIBXML_ATTR_ALLOC_SIZE: * * Macro used to indicate to GCC this is an allocator function */ -#ifndef ATTRIBUTE_ALLOC_SIZE +#ifndef LIBXML_ATTR_ALLOC_SIZE # if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) -# define ATTRIBUTE_ALLOC_SIZE(x) __attribute__((alloc_size(x))) +# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x))) # else -# define ATTRIBUTE_ALLOC_SIZE(x) +# define LIBXML_ATTR_ALLOC_SIZE(x) # endif #else -# define ATTRIBUTE_ALLOC_SIZE(x) +# define LIBXML_ATTR_ALLOC_SIZE(x) #endif /** - * ATTRIBUTE_PRINTF: + * LIBXML_ATTR_FORMAT: * * Macro used to indicate to GCC the parameter are printf like */ -#ifndef ATTRIBUTE_PRINTF +#ifndef LIBXML_ATTR_FORMAT # if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) -# define ATTRIBUTE_PRINTF(fmt,args) __attribute__((__format__(__printf__,fmt,args))) +# define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args))) # else -# define ATTRIBUTE_PRINTF(fmt,args) +# define LIBXML_ATTR_FORMAT(fmt,args) # endif #else -# define ATTRIBUTE_PRINTF(fmt,args) +# define LIBXML_ATTR_FORMAT(fmt,args) #endif #else /* ! __GNUC__ */ @@ -437,17 +437,17 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); */ #define ATTRIBUTE_UNUSED /** - * ATTRIBUTE_ALLOC_SIZE: + * LIBXML_ATTR_ALLOC_SIZE: * * Macro used to indicate to GCC this is an allocator function */ -#define ATTRIBUTE_ALLOC_SIZE(x) +#define LIBXML_ATTR_ALLOC_SIZE(x) /** - * ATTRIBUTE_PRINTF: + * LIBXML_ATTR_FORMAT: * * Macro used to indicate to GCC the parameter are printf like */ -#define ATTRIBUTE_PRINTF(fmt,args) +#define LIBXML_ATTR_FORMAT(fmt,args) #endif /* __GNUC__ */ #ifdef __cplusplus diff --git a/include/libxml/xmlwriter.h b/include/libxml/xmlwriter.h index df4509d..91e683c 100644 --- a/include/libxml/xmlwriter.h +++ b/include/libxml/xmlwriter.h @@ -70,12 +70,12 @@ extern "C" { XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer, const char *format, ...) - ATTRIBUTE_PRINTF(2,3); + LIBXML_ATTR_FORMAT(2,3); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer, const char *format, va_list argptr) - ATTRIBUTE_PRINTF(2,0); + LIBXML_ATTR_FORMAT(2,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteComment(xmlTextWriterPtr writer, const xmlChar * @@ -105,13 +105,13 @@ extern "C" { xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer, const xmlChar * name, const char *format, ...) - ATTRIBUTE_PRINTF(3,4); + LIBXML_ATTR_FORMAT(3,4); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer, const xmlChar * name, const char *format, va_list argptr) - ATTRIBUTE_PRINTF(3,0); + LIBXML_ATTR_FORMAT(3,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteElement(xmlTextWriterPtr writer, const xmlChar * name, @@ -123,7 +123,7 @@ extern "C" { const xmlChar * name, const xmlChar * namespaceURI, const char *format, ...) - ATTRIBUTE_PRINTF(5,6); + LIBXML_ATTR_FORMAT(5,6); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer, const xmlChar * prefix, @@ -131,7 +131,7 @@ extern "C" { const xmlChar * namespaceURI, const char *format, va_list argptr) - ATTRIBUTE_PRINTF(5,0); + LIBXML_ATTR_FORMAT(5,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteElementNS(xmlTextWriterPtr writer, const xmlChar * @@ -148,11 +148,11 @@ extern "C" { XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer, const char *format, ...) - ATTRIBUTE_PRINTF(2,3); + LIBXML_ATTR_FORMAT(2,3); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer, const char *format, va_list argptr) - ATTRIBUTE_PRINTF(2,0); + LIBXML_ATTR_FORMAT(2,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteRawLen(xmlTextWriterPtr writer, const xmlChar * content, int len); @@ -163,13 +163,13 @@ extern "C" { writer, const char *format, ...) - ATTRIBUTE_PRINTF(2,3); + LIBXML_ATTR_FORMAT(2,3); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatString(xmlTextWriterPtr writer, const char *format, va_list argptr) - ATTRIBUTE_PRINTF(2,0); + LIBXML_ATTR_FORMAT(2,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteString(xmlTextWriterPtr writer, const xmlChar * content); @@ -204,13 +204,13 @@ extern "C" { xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer, const xmlChar * name, const char *format, ...) - ATTRIBUTE_PRINTF(3,4); + LIBXML_ATTR_FORMAT(3,4); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer, const xmlChar * name, const char *format, va_list argptr) - ATTRIBUTE_PRINTF(3,0); + LIBXML_ATTR_FORMAT(3,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteAttribute(xmlTextWriterPtr writer, const xmlChar * name, @@ -222,7 +222,7 @@ extern "C" { const xmlChar * name, const xmlChar * namespaceURI, const char *format, ...) - ATTRIBUTE_PRINTF(5,6); + LIBXML_ATTR_FORMAT(5,6); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer, const xmlChar * prefix, @@ -230,7 +230,7 @@ extern "C" { const xmlChar * namespaceURI, const char *format, va_list argptr) - ATTRIBUTE_PRINTF(5,0); + LIBXML_ATTR_FORMAT(5,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteAttributeNS(xmlTextWriterPtr writer, const xmlChar * @@ -257,12 +257,12 @@ extern "C" { xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer, const xmlChar * target, const char *format, ...) - ATTRIBUTE_PRINTF(3,4); + LIBXML_ATTR_FORMAT(3,4); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer, const xmlChar * target, const char *format, va_list argptr) - ATTRIBUTE_PRINTF(3,0); + LIBXML_ATTR_FORMAT(3,0); XMLPUBFUN int XMLCALL xmlTextWriterWritePI(xmlTextWriterPtr writer, const xmlChar * target, @@ -287,11 +287,11 @@ extern "C" { XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer, const char *format, ...) - ATTRIBUTE_PRINTF(2,3); + LIBXML_ATTR_FORMAT(2,3); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer, const char *format, va_list argptr) - ATTRIBUTE_PRINTF(2,0); + LIBXML_ATTR_FORMAT(2,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteCDATA(xmlTextWriterPtr writer, const xmlChar * content); @@ -315,14 +315,14 @@ extern "C" { const xmlChar * pubid, const xmlChar * sysid, const char *format, ...) - ATTRIBUTE_PRINTF(5,6); + LIBXML_ATTR_FORMAT(5,6); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer, const xmlChar * name, const xmlChar * pubid, const xmlChar * sysid, const char *format, va_list argptr) - ATTRIBUTE_PRINTF(5,0); + LIBXML_ATTR_FORMAT(5,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteDTD(xmlTextWriterPtr writer, const xmlChar * name, @@ -353,13 +353,13 @@ extern "C" { xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer, const xmlChar * name, const char *format, ...) - ATTRIBUTE_PRINTF(3,4); + LIBXML_ATTR_FORMAT(3,4); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer, const xmlChar * name, const char *format, va_list argptr) - ATTRIBUTE_PRINTF(3,0); + LIBXML_ATTR_FORMAT(3,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDElement(xmlTextWriterPtr writer, const xmlChar * @@ -383,13 +383,13 @@ extern "C" { xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer, const xmlChar * name, const char *format, ...) - ATTRIBUTE_PRINTF(3,4); + LIBXML_ATTR_FORMAT(3,4); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer, const xmlChar * name, const char *format, va_list argptr) - ATTRIBUTE_PRINTF(3,0); + LIBXML_ATTR_FORMAT(3,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr writer, const xmlChar * @@ -414,14 +414,14 @@ extern "C" { int pe, const xmlChar * name, const char *format, ...) - ATTRIBUTE_PRINTF(4,5); + LIBXML_ATTR_FORMAT(4,5); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer, int pe, const xmlChar * name, const char *format, va_list argptr) - ATTRIBUTE_PRINTF(4,0); + LIBXML_ATTR_FORMAT(4,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDInternalEntity(xmlTextWriterPtr writer, int pe, diff --git a/include/wsockcompat.h b/include/wsockcompat.h index 18fab37..f4bdab4 100644 --- a/include/wsockcompat.h +++ b/include/wsockcompat.h @@ -15,6 +15,7 @@ header when compiled with Borland C++ 6 */ #if defined(__BORLANDC__) && !defined(__cplusplus) #define inline __inline +#define _inline __inline #endif #include diff --git a/libxml.spec.in b/libxml.spec.in index 324b12c..688811a 100644 --- a/libxml.spec.in +++ b/libxml.spec.in @@ -4,12 +4,10 @@ Version: @VERSION@ Release: 1 License: MIT Group: Development/Libraries -Source: ftp://xmlsoft.org/libxml2-%{version}.tar.gz +Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -BuildRequires: python python-devel zlib-devel +BuildRequires: python python-devel zlib-devel pkgconfig URL: http://xmlsoft.org/ -Prefix: %{_prefix} -Docdir: %{_docdir} %description This library allows to manipulate XML files. It includes support @@ -62,14 +60,14 @@ at parse time or later once the document has been modified. %build %configure -make +make %{_smp_mflags} gzip -9 ChangeLog %install rm -fr %{buildroot} %makeinstall -(cd doc/examples ; make clean ; rm -rf .deps) +(cd doc/examples ; make clean ; rm -rf .deps Makefile) gzip -9 doc/libxml2-api.xml rm -f $RPM_BUILD_ROOT%{_libdir}/*.la @@ -91,17 +89,18 @@ rm -fr %{buildroot} %doc %{_mandir}/man3/libxml.3* %{_libdir}/lib*.so.* -%{prefix}/bin/xmllint -%{prefix}/bin/xmlcatalog +%{_bindir}/xmllint +%{_bindir}/xmlcatalog %files devel %defattr(-, root, root) %doc %{_mandir}/man1/xml2-config.1* -%doc AUTHORS ChangeLog.gz NEWS README Copyright TODO +%doc AUTHORS ChangeLog.gz NEWS README Copyright %doc doc/*.html doc/html doc/*.gif doc/*.png %doc doc/tutorial doc/libxml2-api.xml.gz %doc doc/examples +%doc %dir %{_datadir}/gtk-doc/html/libxml2 %doc %{_datadir}/gtk-doc/html/libxml2/*.devhelp %doc %{_datadir}/gtk-doc/html/libxml2/*.html %doc %{_datadir}/gtk-doc/html/libxml2/*.png @@ -110,9 +109,9 @@ rm -fr %{buildroot} %{_libdir}/lib*.so %{_libdir}/*a %{_libdir}/*.sh -%{prefix}/include/* -%{prefix}/bin/xml2-config -%{prefix}/share/aclocal/libxml.m4 +%{_includedir}/* +%{_bindir}/xml2-config +%{_datadir}/aclocal/libxml.m4 %{_libdir}/pkgconfig/libxml-2.0.pc %files python %defattr(-, root, root) diff --git a/libxml2.spec b/libxml2.spec index ace05f6..1a1c9ae 100644 --- a/libxml2.spec +++ b/libxml2.spec @@ -1,15 +1,13 @@ Summary: Library providing XML and HTML support Name: libxml2 -Version: 2.7.3 +Version: 2.7.4 Release: 1 License: MIT Group: Development/Libraries -Source: ftp://xmlsoft.org/libxml2-%{version}.tar.gz +Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -BuildRequires: python python-devel zlib-devel +BuildRequires: python python-devel zlib-devel pkgconfig URL: http://xmlsoft.org/ -Prefix: %{_prefix} -Docdir: %{_docdir} %description This library allows to manipulate XML files. It includes support @@ -62,14 +60,14 @@ at parse time or later once the document has been modified. %build %configure -make +make %{_smp_mflags} gzip -9 ChangeLog %install rm -fr %{buildroot} %makeinstall -(cd doc/examples ; make clean ; rm -rf .deps) +(cd doc/examples ; make clean ; rm -rf .deps Makefile) gzip -9 doc/libxml2-api.xml rm -f $RPM_BUILD_ROOT%{_libdir}/*.la @@ -91,17 +89,18 @@ rm -fr %{buildroot} %doc %{_mandir}/man3/libxml.3* %{_libdir}/lib*.so.* -%{prefix}/bin/xmllint -%{prefix}/bin/xmlcatalog +%{_bindir}/xmllint +%{_bindir}/xmlcatalog %files devel %defattr(-, root, root) %doc %{_mandir}/man1/xml2-config.1* -%doc AUTHORS ChangeLog.gz NEWS README Copyright TODO +%doc AUTHORS ChangeLog.gz NEWS README Copyright %doc doc/*.html doc/html doc/*.gif doc/*.png %doc doc/tutorial doc/libxml2-api.xml.gz %doc doc/examples +%doc %dir %{_datadir}/gtk-doc/html/libxml2 %doc %{_datadir}/gtk-doc/html/libxml2/*.devhelp %doc %{_datadir}/gtk-doc/html/libxml2/*.html %doc %{_datadir}/gtk-doc/html/libxml2/*.png @@ -110,9 +109,9 @@ rm -fr %{buildroot} %{_libdir}/lib*.so %{_libdir}/*a %{_libdir}/*.sh -%{prefix}/include/* -%{prefix}/bin/xml2-config -%{prefix}/share/aclocal/libxml.m4 +%{_includedir}/* +%{_bindir}/xml2-config +%{_datadir}/aclocal/libxml.m4 %{_libdir}/pkgconfig/libxml-2.0.pc %files python %defattr(-, root, root) @@ -128,6 +127,6 @@ rm -fr %{buildroot} %doc doc/python.html %changelog -* Sun Jan 18 2009 Daniel Veillard -- upstream release 2.7.3 see http://xmlsoft.org/news.html +* Thu Sep 10 2009 Daniel Veillard +- upstream release 2.7.4 see http://xmlsoft.org/news.html diff --git a/libxml2.syms b/libxml2.syms new file mode 100644 index 0000000..5a95175 --- /dev/null +++ b/libxml2.syms @@ -0,0 +1,2233 @@ +# +# Officially exported symbols, for which header +# file definitions are installed in /usr/include/libxml2 +# +# Automatically generated from symbols.xml and syms.xsl +# +# Versions here are *fixed* to match the libxml2 version +# at which the symbol was introduced. This ensures that +# a new client app requiring symbol foo() can't accidentally +# run with old libxml2.so not providing foo() - the global +# soname version info can't enforce this since we never +# change the soname +# + +LIBXML2_2.4.30 { + global: + +# debugXML + xmlBoolToText; + xmlDebugDumpAttr; + xmlDebugDumpAttrList; + xmlDebugDumpDTD; + xmlDebugDumpDocument; + xmlDebugDumpDocumentHead; + xmlDebugDumpEntities; + xmlDebugDumpNode; + xmlDebugDumpNodeList; + xmlDebugDumpOneNode; + xmlDebugDumpString; + xmlLsCountNode; + xmlLsOneNode; + xmlShell; + xmlShellBase; + xmlShellCat; + xmlShellDir; + xmlShellDu; + xmlShellList; + xmlShellLoad; + xmlShellPrintNode; + xmlShellPrintXPathError; + xmlShellPrintXPathResult; + xmlShellPwd; + xmlShellSave; + xmlShellValidate; + xmlShellWrite; + +# xpointer + xmlXPtrBuildNodeList; + xmlXPtrEval; + xmlXPtrEvalRangePredicate; + xmlXPtrFreeLocationSet; + xmlXPtrLocationSetAdd; + xmlXPtrLocationSetCreate; + xmlXPtrLocationSetDel; + xmlXPtrLocationSetMerge; + xmlXPtrLocationSetRemove; + xmlXPtrNewCollapsedRange; + xmlXPtrNewContext; + xmlXPtrNewLocationSetNodeSet; + xmlXPtrNewLocationSetNodes; + xmlXPtrNewRange; + xmlXPtrNewRangeNodeObject; + xmlXPtrNewRangeNodePoint; + xmlXPtrNewRangeNodes; + xmlXPtrNewRangePointNode; + xmlXPtrNewRangePoints; + xmlXPtrRangeToFunction; + xmlXPtrWrapLocationSet; + +# SAX + attribute; + attributeDecl; + cdataBlock; + characters; + checkNamespace; + comment; + +# SAX2 + docbDefaultSAXHandlerInit; + +# SAX + elementDecl; + endDocument; + endElement; + entityDecl; + externalSubset; + getColumnNumber; + getEntity; + getLineNumber; + getNamespace; + getParameterEntity; + getPublicId; + getSystemId; + globalNamespace; + hasExternalSubset; + hasInternalSubset; + +# SAX2 + htmlDefaultSAXHandlerInit; + +# SAX + ignorableWhitespace; + initdocbDefaultSAXHandler; + inithtmlDefaultSAXHandler; + initxmlDefaultSAXHandler; + internalSubset; + isStandalone; + namespaceDecl; + notationDecl; + processingInstruction; + reference; + resolveEntity; + setDocumentLocator; + setNamespace; + startDocument; + startElement; + unparsedEntityDecl; + +# SAX2 + xmlDefaultSAXHandlerInit; + +# parserInternals + htmlCreateFileParserCtxt; + htmlInitAutoClose; + inputPop; + inputPush; + namePop; + namePush; + nodePop; + nodePush; + xmlCheckLanguageID; + xmlCopyChar; + xmlCopyCharMultiByte; + xmlCreateEntityParserCtxt; + xmlCreateFileParserCtxt; + xmlCreateMemoryParserCtxt; + xmlCurrentChar; + xmlDecodeEntities; + xmlFreeInputStream; + xmlHandleEntity; + +# chvalid + xmlIsBaseChar; + xmlIsBlank; + xmlIsChar; + xmlIsCombining; + xmlIsDigit; + xmlIsExtender; + xmlIsIdeographic; + +# parserInternals + xmlIsLetter; + +# chvalid + xmlIsPubidChar; + +# parserInternals + xmlNamespaceParseNCName; + xmlNamespaceParseNSDef; + xmlNamespaceParseQName; + xmlNewEntityInputStream; + xmlNewInputFromFile; + xmlNewInputStream; + +# parser + xmlNewParserCtxt; + +# parserInternals + xmlNewStringInputStream; + xmlNextChar; + xmlParseAttValue; + xmlParseAttribute; + xmlParseAttributeListDecl; + xmlParseAttributeType; + xmlParseCDSect; + xmlParseCharData; + xmlParseCharRef; + xmlParseComment; + xmlParseContent; + xmlParseDefaultDecl; + xmlParseDocTypeDecl; + xmlParseElement; + xmlParseElementChildrenContentDecl; + xmlParseElementContentDecl; + xmlParseElementDecl; + xmlParseElementMixedContentDecl; + xmlParseEncName; + xmlParseEncodingDecl; + xmlParseEndTag; + xmlParseEntityDecl; + xmlParseEntityRef; + xmlParseEntityValue; + xmlParseEnumeratedType; + xmlParseEnumerationType; + xmlParseExternalID; + xmlParseExternalSubset; + xmlParseMarkupDecl; + xmlParseMisc; + xmlParseName; + xmlParseNamespace; + xmlParseNmtoken; + xmlParseNotationDecl; + xmlParseNotationType; + xmlParsePEReference; + xmlParsePI; + xmlParsePITarget; + xmlParsePubidLiteral; + xmlParseQuotedString; + xmlParseReference; + xmlParseSDDecl; + xmlParseStartTag; + xmlParseSystemLiteral; + xmlParseTextDecl; + xmlParseVersionInfo; + xmlParseVersionNum; + xmlParseXMLDecl; + xmlParserHandlePEReference; + xmlParserHandleReference; + xmlParserInputShrink; + xmlPopInput; + xmlPushInput; + xmlScanName; + xmlSetEntityReferenceFunc; + xmlSkipBlankChars; + xmlSplitQName; + xmlStringComment; # variable + xmlStringCurrentChar; + xmlStringDecodeEntities; + xmlStringText; # variable + xmlStringTextNoenc; # variable + xmlSwitchEncoding; + xmlSwitchToEncoding; + +# c14n + xmlC14NDocDumpMemory; + xmlC14NDocSave; + xmlC14NDocSaveTo; + xmlC14NExecute; + +# catalog + xmlACatalogAdd; + xmlACatalogDump; + xmlACatalogRemove; + xmlACatalogResolve; + xmlACatalogResolvePublic; + xmlACatalogResolveSystem; + xmlACatalogResolveURI; + xmlCatalogAdd; + xmlCatalogAddLocal; + xmlCatalogCleanup; + xmlCatalogConvert; + xmlCatalogDump; + xmlCatalogFreeLocal; + xmlCatalogGetDefaults; + xmlCatalogGetPublic; + xmlCatalogGetSystem; + xmlCatalogIsEmpty; + xmlCatalogLocalResolve; + xmlCatalogLocalResolveURI; + xmlCatalogRemove; + xmlCatalogResolve; + xmlCatalogResolvePublic; + xmlCatalogResolveSystem; + xmlCatalogResolveURI; + xmlCatalogSetDebug; + xmlCatalogSetDefaultPrefer; + xmlCatalogSetDefaults; + xmlConvertSGMLCatalog; + xmlFreeCatalog; + xmlInitializeCatalog; + xmlLoadACatalog; + xmlLoadCatalog; + xmlLoadCatalogs; + xmlLoadSGMLSuperCatalog; + xmlNewCatalog; + xmlParseCatalogFile; + +# xpathInternals + valuePop; + valuePush; + xmlXPathAddValues; + xmlXPathBooleanFunction; + xmlXPathCeilingFunction; + xmlXPathCompareValues; + xmlXPathConcatFunction; + xmlXPathContainsFunction; + xmlXPathCountFunction; + xmlXPathDebugDumpCompExpr; + xmlXPathDebugDumpObject; + xmlXPathDifference; + xmlXPathDistinct; + xmlXPathDistinctSorted; + xmlXPathDivValues; + xmlXPathEqualValues; + xmlXPathEvalExpr; + xmlXPathEvaluatePredicateResult; + xmlXPathFalseFunction; + xmlXPathFloorFunction; + xmlXPathFreeParserContext; + xmlXPathFunctionLookup; + xmlXPathFunctionLookupNS; + xmlXPathHasSameNodes; + xmlXPathIdFunction; + xmlXPathIntersection; + xmlXPathIsNodeType; + xmlXPathLangFunction; + xmlXPathLastFunction; + xmlXPathLeading; + xmlXPathLeadingSorted; + xmlXPathLocalNameFunction; + xmlXPathModValues; + xmlXPathMultValues; + xmlXPathNamespaceURIFunction; + xmlXPathNewBoolean; + xmlXPathNewCString; + xmlXPathNewFloat; + xmlXPathNewNodeSet; + xmlXPathNewNodeSetList; + xmlXPathNewParserContext; + xmlXPathNewString; + xmlXPathNewValueTree; + xmlXPathNextAncestor; + xmlXPathNextAncestorOrSelf; + xmlXPathNextAttribute; + xmlXPathNextChild; + xmlXPathNextDescendant; + xmlXPathNextDescendantOrSelf; + xmlXPathNextFollowing; + xmlXPathNextFollowingSibling; + xmlXPathNextNamespace; + xmlXPathNextParent; + xmlXPathNextPreceding; + xmlXPathNextPrecedingSibling; + xmlXPathNextSelf; + xmlXPathNodeLeading; + xmlXPathNodeLeadingSorted; + xmlXPathNodeSetAdd; + xmlXPathNodeSetAddNs; + xmlXPathNodeSetAddUnique; + xmlXPathNodeSetContains; + xmlXPathNodeSetDel; + xmlXPathNodeSetFreeNs; + xmlXPathNodeSetMerge; + xmlXPathNodeSetRemove; + xmlXPathNodeSetSort; + xmlXPathNodeTrailing; + xmlXPathNodeTrailingSorted; + xmlXPathNormalizeFunction; + xmlXPathNotEqualValues; + xmlXPathNotFunction; + xmlXPathNsLookup; + xmlXPathNumberFunction; + xmlXPathParseNCName; + xmlXPathParseName; + xmlXPathPopBoolean; + xmlXPathPopExternal; + xmlXPathPopNodeSet; + xmlXPathPopNumber; + xmlXPathPopString; + xmlXPathPositionFunction; + xmlXPathRegisterAllFunctions; + xmlXPathRegisterFunc; + xmlXPathRegisterFuncLookup; + xmlXPathRegisterFuncNS; + xmlXPathRegisterNs; + xmlXPathRegisterVariable; + xmlXPathRegisterVariableLookup; + xmlXPathRegisterVariableNS; + xmlXPathRegisteredFuncsCleanup; + xmlXPathRegisteredNsCleanup; + xmlXPathRegisteredVariablesCleanup; + xmlXPathRoot; + xmlXPathRoundFunction; + xmlXPathStartsWithFunction; + xmlXPathStringEvalNumber; + xmlXPathStringFunction; + xmlXPathStringLengthFunction; + xmlXPathSubValues; + xmlXPathSubstringAfterFunction; + xmlXPathSubstringBeforeFunction; + xmlXPathSubstringFunction; + xmlXPathSumFunction; + xmlXPathTrailing; + xmlXPathTrailingSorted; + xmlXPathTranslateFunction; + xmlXPathTrueFunction; + xmlXPathValueFlipSign; + xmlXPathVariableLookup; + xmlXPathVariableLookupNS; + xmlXPathWrapCString; + xmlXPathWrapExternal; + xmlXPathWrapNodeSet; + xmlXPathWrapString; + xmlXPatherror; + +# xmlautomata + xmlAutomataCompile; + xmlAutomataGetInitState; + xmlAutomataIsDeterminist; + xmlAutomataNewAllTrans; + xmlAutomataNewCountTrans; + xmlAutomataNewCountedTrans; + xmlAutomataNewCounter; + xmlAutomataNewCounterTrans; + xmlAutomataNewEpsilon; + xmlAutomataNewOnceTrans; + xmlAutomataNewState; + xmlAutomataNewTransition; + xmlAutomataSetFinalState; + xmlFreeAutomata; + xmlNewAutomata; + +# HTMLtree + htmlDocContentDumpFormatOutput; + htmlDocContentDumpOutput; + htmlDocDump; + htmlDocDumpMemory; + htmlGetMetaEncoding; + htmlIsBooleanAttr; + htmlNewDoc; + htmlNewDocNoDtD; + htmlNodeDump; + htmlNodeDumpFile; + htmlNodeDumpFileFormat; + htmlNodeDumpFormatOutput; + htmlNodeDumpOutput; + htmlSaveFile; + htmlSaveFileEnc; + htmlSaveFileFormat; + htmlSetMetaEncoding; + +# nanoftp + xmlNanoFTPCheckResponse; + xmlNanoFTPCleanup; + xmlNanoFTPClose; + xmlNanoFTPCloseConnection; + xmlNanoFTPConnect; + xmlNanoFTPConnectTo; + xmlNanoFTPCwd; + xmlNanoFTPFreeCtxt; + xmlNanoFTPGet; + xmlNanoFTPGetConnection; + xmlNanoFTPGetResponse; + xmlNanoFTPGetSocket; + xmlNanoFTPInit; + xmlNanoFTPList; + xmlNanoFTPNewCtxt; + xmlNanoFTPOpen; + xmlNanoFTPProxy; + xmlNanoFTPQuit; + xmlNanoFTPRead; + xmlNanoFTPScanProxy; + xmlNanoFTPUpdateURL; + +# DOCBparser + docbCreateFileParserCtxt; + docbCreatePushParserCtxt; + docbEncodeEntities; + docbFreeParserCtxt; + docbParseChunk; + docbParseDoc; + docbParseDocument; + docbParseFile; + docbSAXParseDoc; + docbSAXParseFile; + +# xpath + xmlXPathCastBooleanToNumber; + xmlXPathCastBooleanToString; + xmlXPathCastNodeSetToBoolean; + xmlXPathCastNodeSetToNumber; + xmlXPathCastNodeSetToString; + xmlXPathCastNodeToNumber; + xmlXPathCastNodeToString; + xmlXPathCastNumberToBoolean; + xmlXPathCastNumberToString; + xmlXPathCastStringToBoolean; + xmlXPathCastStringToNumber; + xmlXPathCastToBoolean; + xmlXPathCastToNumber; + xmlXPathCastToString; + xmlXPathCmpNodes; + xmlXPathCompile; + xmlXPathCompiledEval; + xmlXPathConvertBoolean; + xmlXPathConvertNumber; + xmlXPathConvertString; + xmlXPathEval; + xmlXPathEvalExpression; + xmlXPathEvalPredicate; + xmlXPathFreeCompExpr; + xmlXPathFreeContext; + xmlXPathFreeNodeSet; + xmlXPathFreeNodeSetList; + xmlXPathFreeObject; + xmlXPathInit; + xmlXPathIsInf; + xmlXPathIsNaN; + xmlXPathNAN; # variable + xmlXPathNINF; # variable + xmlXPathNewContext; + xmlXPathNodeSetCreate; + xmlXPathObjectCopy; + xmlXPathPINF; # variable + +# xlink + xlinkGetDefaultDetect; + xlinkGetDefaultHandler; + xlinkIsLink; + xlinkSetDefaultDetect; + xlinkSetDefaultHandler; + +# entities + xmlAddDocEntity; + xmlAddDtdEntity; + xmlCleanupPredefinedEntities; + xmlCopyEntitiesTable; + xmlCreateEntitiesTable; + xmlDumpEntitiesTable; + xmlDumpEntityDecl; + xmlEncodeEntities; + xmlEncodeEntitiesReentrant; + xmlEncodeSpecialChars; + xmlFreeEntitiesTable; + xmlGetDocEntity; + xmlGetDtdEntity; + xmlGetParameterEntity; + xmlGetPredefinedEntity; + xmlInitializePredefinedEntities; + +# xinclude + xmlXIncludeProcess; + +# list + xmlLinkGetData; + xmlListAppend; + xmlListClear; + xmlListCopy; + xmlListCreate; + xmlListDelete; + xmlListDup; + xmlListEmpty; + xmlListEnd; + xmlListFront; + xmlListInsert; + xmlListMerge; + xmlListPopBack; + xmlListPopFront; + xmlListPushBack; + xmlListPushFront; + xmlListRemoveAll; + xmlListRemoveFirst; + xmlListRemoveLast; + xmlListReverse; + xmlListReverseSearch; + xmlListReverseWalk; + xmlListSearch; + xmlListSize; + xmlListSort; + xmlListWalk; + +# xmlmemory + xmlInitMemory; + xmlMallocLoc; + xmlMemDisplay; + xmlMemFree; + xmlMemGet; + xmlMemMalloc; + xmlMemRealloc; + xmlMemSetup; + xmlMemShow; + xmlMemStrdupLoc; + xmlMemUsed; + xmlMemoryDump; + xmlMemoryStrdup; + xmlReallocLoc; + +# xmlIO + xmlAllocOutputBuffer; + xmlAllocParserInputBuffer; + xmlCheckFilename; + xmlCleanupInputCallbacks; + xmlCleanupOutputCallbacks; + xmlFileClose; + xmlFileMatch; + xmlFileOpen; + xmlFileRead; + xmlFreeParserInputBuffer; + xmlIOFTPClose; + xmlIOFTPMatch; + xmlIOFTPOpen; + xmlIOFTPRead; + xmlIOHTTPClose; + xmlIOHTTPMatch; + xmlIOHTTPOpen; + xmlIOHTTPOpenW; + xmlIOHTTPRead; + xmlNoNetExternalEntityLoader; + xmlNormalizeWindowsPath; + xmlOutputBufferClose; + xmlOutputBufferCreateFd; + xmlOutputBufferCreateFile; + xmlOutputBufferCreateFilename; + xmlOutputBufferCreateIO; + xmlOutputBufferFlush; + xmlOutputBufferWrite; + xmlOutputBufferWriteString; + xmlParserGetDirectory; + xmlParserInputBufferCreateFd; + xmlParserInputBufferCreateFile; + xmlParserInputBufferCreateFilename; + xmlParserInputBufferCreateIO; + xmlParserInputBufferCreateMem; + xmlParserInputBufferGrow; + xmlParserInputBufferPush; + xmlParserInputBufferRead; + xmlRegisterDefaultInputCallbacks; + xmlRegisterDefaultOutputCallbacks; + xmlRegisterHTTPPostCallbacks; + xmlRegisterInputCallbacks; + xmlRegisterOutputCallbacks; + +# xmlversion + xmlCheckVersion; + +# valid + xmlAddAttributeDecl; + xmlAddElementDecl; + xmlAddID; + xmlAddNotationDecl; + xmlAddRef; + xmlCopyAttributeTable; + xmlCopyElementContent; + xmlCopyElementTable; + xmlCopyEnumeration; + xmlCopyNotationTable; + xmlCreateEnumeration; + xmlDumpAttributeDecl; + xmlDumpAttributeTable; + xmlDumpElementDecl; + xmlDumpElementTable; + xmlDumpNotationDecl; + xmlDumpNotationTable; + xmlFreeAttributeTable; + xmlFreeElementContent; + xmlFreeElementTable; + xmlFreeEnumeration; + xmlFreeIDTable; + xmlFreeNotationTable; + xmlFreeRefTable; + xmlGetDtdAttrDesc; + xmlGetDtdElementDesc; + xmlGetDtdNotationDesc; + xmlGetDtdQAttrDesc; + xmlGetDtdQElementDesc; + xmlGetID; + xmlGetRefs; + xmlIsID; + xmlIsMixedElement; + xmlIsRef; + xmlNewElementContent; + xmlRemoveID; + xmlRemoveRef; + xmlSnprintfElementContent; + +# tree + xmlSplitQName2; + +# valid + xmlSprintfElementContent; + xmlValidBuildContentModel; + xmlValidCtxtNormalizeAttributeValue; + xmlValidGetPotentialChildren; + xmlValidGetValidElements; + xmlValidNormalizeAttributeValue; + xmlValidateAttributeDecl; + xmlValidateAttributeValue; + xmlValidateDocument; + xmlValidateDocumentFinal; + xmlValidateDtd; + xmlValidateDtdFinal; + xmlValidateElement; + xmlValidateElementDecl; + xmlValidateNameValue; + xmlValidateNamesValue; + xmlValidateNmtokenValue; + xmlValidateNmtokensValue; + xmlValidateNotationDecl; + xmlValidateNotationUse; + xmlValidateOneAttribute; + xmlValidateOneElement; + xmlValidateOneNamespace; + xmlValidateRoot; + +# HTMLparser + UTF8ToHtml; + htmlAutoCloseTag; + htmlCreatePushParserCtxt; + htmlEncodeEntities; + htmlEntityLookup; + htmlEntityValueLookup; + htmlFreeParserCtxt; + htmlHandleOmittedElem; + htmlIsAutoClosed; + htmlIsScriptAttribute; + htmlParseCharRef; + htmlParseChunk; + htmlParseDoc; + htmlParseDocument; + htmlParseElement; + htmlParseEntityRef; + htmlParseFile; + htmlSAXParseDoc; + htmlSAXParseFile; + htmlTagLookup; + +# xmlstring + xmlCharStrdup; + xmlCharStrndup; + +# parser + xmlCleanupParser; + xmlClearNodeInfoSeq; + xmlClearParserCtxt; + xmlCreateDocParserCtxt; + xmlCreateIOParserCtxt; + xmlCreatePushParserCtxt; + xmlFreeParserCtxt; + xmlGetExternalEntityLoader; + xmlGetFeature; + xmlGetFeaturesList; + +# globals + xmlGetWarningsDefaultValue; # variable + +# parser + xmlIOParseDTD; + xmlInitNodeInfoSeq; + xmlInitParser; + xmlInitParserCtxt; + xmlKeepBlanksDefault; + xmlLineNumbersDefault; + xmlLoadExternalEntity; + xmlNewIOInputStream; + xmlParseBalancedChunkMemory; + xmlParseBalancedChunkMemoryRecover; + xmlParseChunk; + xmlParseCtxtExternalEntity; + xmlParseDTD; + xmlParseDoc; + xmlParseDocument; + xmlParseEntity; + xmlParseExtParsedEnt; + xmlParseExternalEntity; + xmlParseFile; + xmlParseMemory; + xmlParserAddNodeInfo; + xmlParserFindNodeInfo; + xmlParserFindNodeInfoIndex; + xmlParserInputGrow; + xmlParserInputRead; + xmlPedanticParserDefault; + xmlRecoverDoc; + xmlRecoverFile; + xmlRecoverMemory; + xmlSAXParseDTD; + xmlSAXParseDoc; + xmlSAXParseEntity; + xmlSAXParseFile; + xmlSAXParseFileWithData; + xmlSAXParseMemory; + xmlSAXParseMemoryWithData; + xmlSAXUserParseFile; + xmlSAXUserParseMemory; + xmlSetExternalEntityLoader; + xmlSetFeature; + xmlSetupParserForBuffer; + xmlStopParser; + +# xmlstring + xmlStrEqual; + xmlStrcasecmp; + xmlStrcasestr; + xmlStrcat; + xmlStrchr; + xmlStrcmp; + xmlStrdup; + xmlStrlen; + xmlStrncasecmp; + xmlStrncat; + xmlStrncmp; + xmlStrndup; + xmlStrstr; + xmlStrsub; + +# parser + xmlSubstituteEntitiesDefault; + +# xmlreader + xmlFreeTextReader; + xmlNewTextReader; + xmlNewTextReaderFilename; + xmlTextReaderAttributeCount; + xmlTextReaderBaseUri; + xmlTextReaderDepth; + xmlTextReaderHasAttributes; + xmlTextReaderHasValue; + xmlTextReaderIsDefault; + xmlTextReaderIsEmptyElement; + xmlTextReaderLocalName; + xmlTextReaderName; + xmlTextReaderNamespaceUri; + xmlTextReaderNodeType; + xmlTextReaderPrefix; + xmlTextReaderQuoteChar; + xmlTextReaderRead; + xmlTextReaderValue; + xmlTextReaderXmlLang; + +# globals + docbDefaultSAXHandler; # variable + htmlDefaultSAXHandler; # variable + xmlDefaultSAXHandler; # variable + xmlDefaultSAXLocator; # variable + xmlDoValidityCheckingDefaultValue; # variable + xmlFree; # variable + xmlGenericError; # variable + xmlGenericErrorContext; # variable + xmlInitializeGlobalState; + xmlKeepBlanksDefaultValue; # variable + xmlLineNumbersDefaultValue; # variable + xmlLoadExtDtdDefaultValue; # variable + xmlMalloc; # variable + xmlMemStrdup; # variable + xmlParserDebugEntities; # variable + xmlParserVersion; # variable + xmlPedanticParserDefaultValue; # variable + xmlRealloc; # variable + xmlSaveNoEmptyTags; # variable + xmlSubstituteEntitiesDefaultValue; # variable + xmlTreeIndentString; # variable + +# threads + xmlCleanupThreads; + xmlFreeMutex; + xmlFreeRMutex; + xmlGetGlobalState; + xmlGetThreadId; + xmlInitThreads; + xmlIsMainThread; + xmlLockLibrary; + xmlMutexLock; + xmlMutexUnlock; + xmlNewMutex; + xmlNewRMutex; + xmlRMutexLock; + xmlRMutexUnlock; + xmlUnlockLibrary; + +# hash + xmlHashAddEntry; + xmlHashAddEntry2; + xmlHashAddEntry3; + xmlHashCopy; + xmlHashCreate; + xmlHashFree; + xmlHashLookup; + xmlHashLookup2; + xmlHashLookup3; + xmlHashRemoveEntry; + xmlHashRemoveEntry2; + xmlHashRemoveEntry3; + xmlHashScan; + xmlHashScan3; + xmlHashScanFull; + xmlHashScanFull3; + xmlHashSize; + xmlHashUpdateEntry; + xmlHashUpdateEntry2; + xmlHashUpdateEntry3; + +# xmlerror + initGenericErrorDefaultFunc; + xmlParserError; + xmlParserPrintFileContext; + xmlParserPrintFileInfo; + xmlParserValidityError; + xmlParserValidityWarning; + xmlParserWarning; + xmlSetGenericErrorFunc; + +# globals + oldXMLWDcompatibility; # variable + +# tree + xmlAddChild; + xmlAddChildList; + xmlAddNextSibling; + xmlAddPrevSibling; + xmlAddSibling; + xmlBufferAdd; + xmlBufferAddHead; + +# globals + xmlBufferAllocScheme; # variable + +# tree + xmlBufferCCat; + xmlBufferCat; + xmlBufferContent; + xmlBufferCreate; + xmlBufferCreateSize; + xmlBufferDump; + xmlBufferEmpty; + xmlBufferFree; + xmlBufferGrow; + xmlBufferLength; + xmlBufferResize; + xmlBufferSetAllocationScheme; + xmlBufferShrink; + xmlBufferWriteCHAR; + xmlBufferWriteChar; + xmlBufferWriteQuotedString; + xmlCopyDoc; + xmlCopyDtd; + xmlCopyNamespace; + xmlCopyNamespaceList; + xmlCopyNode; + xmlCopyNodeList; + xmlCopyProp; + xmlCopyPropList; + xmlCreateIntSubset; + +# globals + xmlDefaultBufferSize; # variable + +# tree + xmlDocCopyNode; + xmlDocDump; + xmlDocDumpFormatMemory; + xmlDocDumpFormatMemoryEnc; + xmlDocDumpMemory; + xmlDocDumpMemoryEnc; + xmlDocFormatDump; + xmlDocGetRootElement; + xmlDocSetRootElement; + xmlElemDump; + xmlFreeDoc; + xmlFreeDtd; + xmlFreeNode; + xmlFreeNodeList; + xmlFreeNs; + xmlFreeNsList; + xmlFreeProp; + xmlFreePropList; + xmlGetBufferAllocationScheme; + xmlGetCompressMode; + xmlGetDocCompressMode; + xmlGetIntSubset; + xmlGetLastChild; + xmlGetLineNo; + xmlGetNodePath; + xmlGetNsList; + xmlGetNsProp; + xmlGetProp; + xmlHasNsProp; + xmlHasProp; + +# globals + xmlIndentTreeOutput; # variable + +# tree + xmlIsBlankNode; + xmlIsXHTML; + xmlNewCDataBlock; + xmlNewCharRef; + xmlNewChild; + xmlNewComment; + xmlNewDoc; + xmlNewDocComment; + xmlNewDocFragment; + xmlNewDocNode; + xmlNewDocNodeEatName; + xmlNewDocProp; + xmlNewDocRawNode; + xmlNewDocText; + xmlNewDocTextLen; + xmlNewDtd; + xmlNewGlobalNs; + xmlNewNode; + xmlNewNodeEatName; + xmlNewNs; + xmlNewNsProp; + xmlNewNsPropEatName; + xmlNewPI; + xmlNewProp; + xmlNewReference; + xmlNewText; + xmlNewTextChild; + xmlNewTextLen; + xmlNodeAddContent; + xmlNodeAddContentLen; + xmlNodeDump; + xmlNodeDumpOutput; + xmlNodeGetBase; + xmlNodeGetContent; + xmlNodeGetLang; + xmlNodeGetSpacePreserve; + xmlNodeIsText; + xmlNodeListGetRawString; + xmlNodeListGetString; + xmlNodeSetBase; + xmlNodeSetContent; + xmlNodeSetContentLen; + xmlNodeSetLang; + xmlNodeSetName; + xmlNodeSetSpacePreserve; + xmlReconciliateNs; + xmlRemoveProp; + xmlReplaceNode; + xmlSaveFile; + xmlSaveFileEnc; + xmlSaveFileTo; + xmlSaveFormatFile; + xmlSaveFormatFileEnc; + xmlSaveFormatFileTo; + xmlSearchNs; + xmlSearchNsByHref; + xmlSetBufferAllocationScheme; + xmlSetCompressMode; + xmlSetDocCompressMode; + xmlSetListDoc; + xmlSetNs; + xmlSetNsProp; + xmlSetProp; + xmlSetTreeDoc; + xmlStringGetNodeList; + xmlStringLenGetNodeList; + xmlTextConcat; + xmlTextMerge; + xmlUnlinkNode; + xmlUnsetNsProp; + xmlUnsetProp; + +# xmlregexp + xmlRegExecPushString; + xmlRegFreeExecCtxt; + xmlRegFreeRegexp; + xmlRegNewExecCtxt; + xmlRegexpCompile; + xmlRegexpExec; + xmlRegexpIsDeterminist; + xmlRegexpPrint; + +# nanohttp + xmlNanoHTTPAuthHeader; + xmlNanoHTTPCleanup; + xmlNanoHTTPClose; + xmlNanoHTTPFetch; + xmlNanoHTTPInit; + xmlNanoHTTPMethod; + xmlNanoHTTPMethodRedir; + xmlNanoHTTPOpen; + xmlNanoHTTPOpenRedir; + xmlNanoHTTPRead; + xmlNanoHTTPReturnCode; + xmlNanoHTTPSave; + xmlNanoHTTPScanProxy; + +# xmlunicode + xmlUCSIsAlphabeticPresentationForms; + xmlUCSIsArabic; + xmlUCSIsArabicPresentationFormsA; + xmlUCSIsArabicPresentationFormsB; + xmlUCSIsArmenian; + xmlUCSIsArrows; + xmlUCSIsBasicLatin; + xmlUCSIsBengali; + xmlUCSIsBlock; + xmlUCSIsBlockElements; + xmlUCSIsBopomofo; + xmlUCSIsBopomofoExtended; + xmlUCSIsBoxDrawing; + xmlUCSIsBraillePatterns; + xmlUCSIsByzantineMusicalSymbols; + xmlUCSIsCJKCompatibility; + xmlUCSIsCJKCompatibilityForms; + xmlUCSIsCJKCompatibilityIdeographs; + xmlUCSIsCJKCompatibilityIdeographsSupplement; + xmlUCSIsCJKRadicalsSupplement; + xmlUCSIsCJKSymbolsandPunctuation; + xmlUCSIsCJKUnifiedIdeographs; + xmlUCSIsCJKUnifiedIdeographsExtensionA; + xmlUCSIsCJKUnifiedIdeographsExtensionB; + xmlUCSIsCat; + xmlUCSIsCatC; + xmlUCSIsCatCc; + xmlUCSIsCatCf; + xmlUCSIsCatCo; + xmlUCSIsCatCs; + xmlUCSIsCatL; + xmlUCSIsCatLl; + xmlUCSIsCatLm; + xmlUCSIsCatLo; + xmlUCSIsCatLt; + xmlUCSIsCatLu; + xmlUCSIsCatM; + xmlUCSIsCatMc; + xmlUCSIsCatMe; + xmlUCSIsCatMn; + xmlUCSIsCatN; + xmlUCSIsCatNd; + xmlUCSIsCatNl; + xmlUCSIsCatNo; + xmlUCSIsCatP; + xmlUCSIsCatPc; + xmlUCSIsCatPd; + xmlUCSIsCatPe; + xmlUCSIsCatPf; + xmlUCSIsCatPi; + xmlUCSIsCatPo; + xmlUCSIsCatPs; + xmlUCSIsCatS; + xmlUCSIsCatSc; + xmlUCSIsCatSk; + xmlUCSIsCatSm; + xmlUCSIsCatSo; + xmlUCSIsCatZ; + xmlUCSIsCatZl; + xmlUCSIsCatZp; + xmlUCSIsCatZs; + xmlUCSIsCherokee; + xmlUCSIsCombiningDiacriticalMarks; + xmlUCSIsCombiningHalfMarks; + xmlUCSIsCombiningMarksforSymbols; + xmlUCSIsControlPictures; + xmlUCSIsCurrencySymbols; + xmlUCSIsCyrillic; + xmlUCSIsDeseret; + xmlUCSIsDevanagari; + xmlUCSIsDingbats; + xmlUCSIsEnclosedAlphanumerics; + xmlUCSIsEnclosedCJKLettersandMonths; + xmlUCSIsEthiopic; + xmlUCSIsGeneralPunctuation; + xmlUCSIsGeometricShapes; + xmlUCSIsGeorgian; + xmlUCSIsGothic; + xmlUCSIsGreek; + xmlUCSIsGreekExtended; + xmlUCSIsGujarati; + xmlUCSIsGurmukhi; + xmlUCSIsHalfwidthandFullwidthForms; + xmlUCSIsHangulCompatibilityJamo; + xmlUCSIsHangulJamo; + xmlUCSIsHangulSyllables; + xmlUCSIsHebrew; + xmlUCSIsHighPrivateUseSurrogates; + xmlUCSIsHighSurrogates; + xmlUCSIsHiragana; + xmlUCSIsIPAExtensions; + xmlUCSIsIdeographicDescriptionCharacters; + xmlUCSIsKanbun; + xmlUCSIsKangxiRadicals; + xmlUCSIsKannada; + xmlUCSIsKatakana; + xmlUCSIsKhmer; + xmlUCSIsLao; + xmlUCSIsLatin1Supplement; + xmlUCSIsLatinExtendedA; + xmlUCSIsLatinExtendedAdditional; + xmlUCSIsLatinExtendedB; + xmlUCSIsLetterlikeSymbols; + xmlUCSIsLowSurrogates; + xmlUCSIsMalayalam; + xmlUCSIsMathematicalAlphanumericSymbols; + xmlUCSIsMathematicalOperators; + xmlUCSIsMiscellaneousSymbols; + xmlUCSIsMiscellaneousTechnical; + xmlUCSIsMongolian; + xmlUCSIsMusicalSymbols; + xmlUCSIsMyanmar; + xmlUCSIsNumberForms; + xmlUCSIsOgham; + xmlUCSIsOldItalic; + xmlUCSIsOpticalCharacterRecognition; + xmlUCSIsOriya; + xmlUCSIsPrivateUse; + xmlUCSIsRunic; + xmlUCSIsSinhala; + xmlUCSIsSmallFormVariants; + xmlUCSIsSpacingModifierLetters; + xmlUCSIsSpecials; + xmlUCSIsSuperscriptsandSubscripts; + xmlUCSIsSyriac; + xmlUCSIsTags; + xmlUCSIsTamil; + xmlUCSIsTelugu; + xmlUCSIsThaana; + xmlUCSIsThai; + xmlUCSIsTibetan; + xmlUCSIsUnifiedCanadianAboriginalSyllabics; + xmlUCSIsYiRadicals; + xmlUCSIsYiSyllables; + +# uri + xmlBuildURI; + xmlCreateURI; + xmlFreeURI; + xmlNormalizeURIPath; + xmlParseURI; + xmlParseURIReference; + xmlPrintURI; + xmlSaveUri; + xmlURIEscape; + xmlURIEscapeStr; + xmlURIUnescapeString; + +# encoding + UTF8Toisolat1; + isolat1ToUTF8; + xmlAddEncodingAlias; + xmlCharEncCloseFunc; + xmlCharEncFirstLine; + xmlCharEncInFunc; + xmlCharEncOutFunc; + +# xmlstring + xmlCheckUTF8; + +# encoding + xmlCleanupCharEncodingHandlers; + xmlCleanupEncodingAliases; + xmlDelEncodingAlias; + xmlDetectCharEncoding; + xmlFindCharEncodingHandler; + xmlGetCharEncodingHandler; + xmlGetCharEncodingName; + xmlGetEncodingAlias; + +# xmlstring + xmlGetUTF8Char; + +# encoding + xmlInitCharEncodingHandlers; + xmlNewCharEncodingHandler; + xmlParseCharEncoding; + xmlRegisterCharEncodingHandler; + +# xmlstring + xmlUTF8Strlen; + xmlUTF8Strloc; + xmlUTF8Strndup; + xmlUTF8Strpos; + xmlUTF8Strsize; + xmlUTF8Strsub; +} ; + +LIBXML2_2.5.0 { + global: + +# globals + xmlDeregisterNodeDefault; + xmlDeregisterNodeDefaultValue; # variable + xmlRegisterNodeDefault; + xmlRegisterNodeDefaultValue; # variable + +# xmlreader + xmlTextReaderClose; + xmlTextReaderCurrentDoc; + xmlTextReaderCurrentNode; + xmlTextReaderGetAttributeNo; + xmlTextReaderGetAttributeNs; + xmlTextReaderGetAttribute; + xmlTextReaderGetParserProp; + xmlTextReaderGetRemainder; + xmlTextReaderLookupNamespace; + xmlTextReaderMoveToAttributeNo; + xmlTextReaderMoveToAttributeNs; + xmlTextReaderMoveToAttribute; + xmlTextReaderMoveToElement; + xmlTextReaderMoveToFirstAttribute; + xmlTextReaderMoveToNextAttribute; + xmlTextReaderNormalization; + xmlTextReaderReadAttributeValue; + xmlTextReaderReadInnerXml; + xmlTextReaderReadOuterXml; + xmlTextReaderReadState; + xmlTextReaderReadString; + xmlTextReaderSetParserProp; + +# valid + xmlValidatePopElement; + xmlValidatePushCData; + xmlValidatePushElement; +} LIBXML2_2.4.30; + +LIBXML2_2.5.2 { + global: + +# tree + xmlGetNoNsProp; + +# HTMLparser + htmlAttrAllowed; + htmlElementAllowedHere; + htmlElementStatusHere; + htmlNodeStatus; + +# relaxng + xmlRelaxNGCleanupTypes; + xmlRelaxNGDump; + xmlRelaxNGFreeParserCtxt; + xmlRelaxNGFree; + xmlRelaxNGFreeValidCtxt; + xmlRelaxNGNewMemParserCtxt; + xmlRelaxNGNewParserCtxt; + xmlRelaxNGNewValidCtxt; + xmlRelaxNGParse; + xmlRelaxNGSetParserErrors; + xmlRelaxNGSetValidErrors; + xmlRelaxNGValidateDoc; + +# xmlreader + xmlTextReaderGetErrorHandler; + xmlTextReaderLocatorBaseURI; + xmlTextReaderLocatorLineNumber; + xmlTextReaderSetErrorHandler; + +# relaxng +# xmlRelaxNGValidateStream; removed in 2.5.5 +} LIBXML2_2.5.0; + +LIBXML2_2.5.4 { + global: + +# uri + xmlCanonicPath; + +# relaxng + xmlRelaxNGDumpTree; + +# tree + xmlValidateName; + xmlValidateNCName; + xmlValidateNMToken; + xmlValidateQName; +} LIBXML2_2.5.2; + +LIBXML2_2.5.5 { + global: + +# nanoftp + xmlNanoFTPDele; +} LIBXML2_2.5.4; + +LIBXML2_2.5.6 { + global: + +# xpath + xmlXPathOrderDocElems; +} LIBXML2_2.5.5; + +LIBXML2_2.5.7 { + global: + +# HTMLparser + htmlCreateMemoryParserCtxt; + +# xmlautomata + xmlAutomataNewTransition2; + +# tree + xmlBuildQName; + +# xmlmemory + xmlGcMemGet; + xmlGcMemSetup; + +# globals + xmlMallocAtomic; # variable + +# xmlregexp + xmlRegExecPushString2; + +# relaxng + xmlRelaxNGNewDocParserCtxt; + xmlRelaxNGValidateFullElement; + xmlRelaxNGValidatePopElement; + xmlRelaxNGValidatePushCData; + xmlRelaxNGValidatePushElement; + +# xmlreader + xmlTextReaderExpand; + xmlTextReaderIsValid; + xmlTextReaderNext; + xmlTextReaderRelaxNGSetSchema; + xmlTextReaderRelaxNGValidate; +} LIBXML2_2.5.6; + +LIBXML2_2.5.8 { + global: + +# globals + xmlCleanupGlobals; + xmlInitGlobals; + +# valid + xmlFreeValidCtxt; + xmlNewValidCtxt; + +# schemasInternals + xmlSchemaFreeType; + +# xmlschemas + xmlSchemaDump; + xmlSchemaFreeParserCtxt; + xmlSchemaFreeValidCtxt; + xmlSchemaFree; + xmlSchemaNewMemParserCtxt; + xmlSchemaNewParserCtxt; + xmlSchemaNewValidCtxt; + xmlSchemaParse; + xmlSchemaSetParserErrors; + xmlSchemaSetValidErrors; + xmlSchemaValidateDoc; + xmlSchemaValidateStream; + +# xmlschemastypes + xmlSchemaCheckFacet; + xmlSchemaCleanupTypes; + xmlSchemaCompareValues; + xmlSchemaFreeFacet; + xmlSchemaFreeValue; + xmlSchemaGetPredefinedType; + xmlSchemaInitTypes; + xmlSchemaNewFacet; + xmlSchemaValidateFacet; + xmlSchemaValidatePredefinedType; + xmlSchemaValPredefTypeNode; + +# globals + xmlThrDefBufferAllocScheme; + xmlThrDefDefaultBufferSize; + xmlThrDefDeregisterNodeDefault; + xmlThrDefDoValidityCheckingDefaultValue; + xmlThrDefGetWarningsDefaultValue; + xmlThrDefIndentTreeOutput; + xmlThrDefKeepBlanksDefaultValue; + xmlThrDefLineNumbersDefaultValue; + xmlThrDefLoadExtDtdDefaultValue; + xmlThrDefParserDebugEntities; + xmlThrDefPedanticParserDefaultValue; + xmlThrDefRegisterNodeDefault; + xmlThrDefSaveNoEmptyTags; + xmlThrDefSetGenericErrorFunc; + xmlThrDefSubstituteEntitiesDefaultValue; + xmlThrDefTreeIndentString; +} LIBXML2_2.5.7; + +LIBXML2_2.5.9 { + global: + +# xmlmemory + xmlMallocAtomicLoc; + +# relaxng + xmlRelaxNGGetParserErrors; + xmlRelaxNGGetValidErrors; + +# tree + xmlSplitQName3; + +# xmlstring + xmlUTF8Charcmp; + xmlUTF8Size; + +# xinclude + xmlXIncludeProcessTree; +} LIBXML2_2.5.8; + +LIBXML2_2.6.0 { + global: + +# SAX2 + xmlSAX2AttributeDecl; + xmlSAX2CDataBlock; + xmlSAX2Characters; + xmlSAX2Comment; + xmlSAX2ElementDecl; + xmlSAX2EndDocument; + xmlSAX2EndElementNs; + xmlSAX2EndElement; + xmlSAX2EntityDecl; + xmlSAX2ExternalSubset; + xmlSAX2GetColumnNumber; + xmlSAX2GetEntity; + xmlSAX2GetLineNumber; + xmlSAX2GetParameterEntity; + xmlSAX2GetPublicId; + xmlSAX2GetSystemId; + xmlSAX2HasExternalSubset; + xmlSAX2HasInternalSubset; + xmlSAX2IgnorableWhitespace; + xmlSAX2InitDefaultSAXHandler; + xmlSAX2InitDocbDefaultSAXHandler; + xmlSAX2InitHtmlDefaultSAXHandler; + xmlSAX2InternalSubset; + xmlSAX2IsStandalone; + xmlSAX2NotationDecl; + xmlSAX2ProcessingInstruction; + xmlSAX2Reference; + xmlSAX2ResolveEntity; + xmlSAX2SetDocumentLocator; + xmlSAX2StartDocument; + xmlSAX2StartElementNs; + xmlSAX2StartElement; + xmlSAX2UnparsedEntityDecl; + xmlSAXDefaultVersion; + xmlSAXVersion; + +# HTMLparser + htmlCtxtReadDoc; + htmlCtxtReadFd; + htmlCtxtReadFile; + htmlCtxtReadIO; + htmlCtxtReadMemory; + htmlCtxtReset; + htmlCtxtUseOptions; + htmlReadDoc; + htmlReadFd; + htmlReadFile; + htmlReadIO; + htmlReadMemory; + +# tree + xmlBufferCreateStatic; + +# chvalid + xmlCharInRange; + +# xmlIO + xmlCheckHTTPInput; + +# xmlerror + xmlCopyError; + xmlCtxtGetLastError; + xmlGetLastError; + xmlResetError; + xmlResetLastError; + xmlSetStructuredErrorFunc; + +# parser + xmlCtxtReadDoc; + xmlCtxtReadFd; + xmlCtxtReadFile; + xmlCtxtReadIO; + xmlCtxtReadMemory; + +# xmlerror + xmlCtxtResetLastError; + +# parser + xmlCtxtReset; + xmlCtxtUseOptions; + xmlReadDoc; + xmlReadFd; + xmlReadFile; + xmlReadIO; + xmlReadMemory; + +# xmlstring + xmlStrPrintf; + xmlStrQEqual; + +# dict + xmlDictCreate; + xmlDictFree; + xmlDictLookup; + xmlDictOwns; + xmlDictQLookup; + xmlDictReference; + xmlDictSize; + +# parserInternals + xmlErrMemory; + xmlParserMaxDepth; # variable + xmlStringLenDecodeEntities; + xmlSwitchInputEncoding; + +# xmlwriter + xmlFreeTextWriter; + xmlNewTextWriterFilename; + xmlNewTextWriterMemory; + xmlNewTextWriter; + xmlTextWriterEndAttribute; + xmlTextWriterEndCDATA; + xmlTextWriterEndDocument; + xmlTextWriterEndDTD; + xmlTextWriterEndElement; + xmlTextWriterEndPI; + xmlTextWriterFlush; + xmlTextWriterFullEndElement; + xmlTextWriterStartAttributeNS; + xmlTextWriterStartAttribute; + xmlTextWriterStartCDATA; + xmlTextWriterStartDocument; + xmlTextWriterStartDTDAttlist; + xmlTextWriterStartDTDElement; + xmlTextWriterStartDTDEntity; + xmlTextWriterStartDTD; + xmlTextWriterStartElementNS; + xmlTextWriterStartElement; + xmlTextWriterStartPI; + xmlTextWriterWriteAttributeNS; + xmlTextWriterWriteAttribute; + xmlTextWriterWriteBase64; + xmlTextWriterWriteBinHex; + xmlTextWriterWriteCDATA; + xmlTextWriterWriteComment; + xmlTextWriterWriteDTDAttlist; + xmlTextWriterWriteDTDElement; + xmlTextWriterWriteDTDEntity; + xmlTextWriterWriteDTDExternalEntity; + xmlTextWriterWriteDTDInternalEntity; + xmlTextWriterWriteDTDNotation; + xmlTextWriterWriteDTD; + xmlTextWriterWriteElementNS; + xmlTextWriterWriteElement; + xmlTextWriterWriteFormatAttributeNS; + xmlTextWriterWriteFormatAttribute; + xmlTextWriterWriteFormatCDATA; + xmlTextWriterWriteFormatComment; + xmlTextWriterWriteFormatDTDAttlist; + xmlTextWriterWriteFormatDTDElement; + xmlTextWriterWriteFormatDTDInternalEntity; + xmlTextWriterWriteFormatDTD; + xmlTextWriterWriteFormatElementNS; + xmlTextWriterWriteFormatElement; + xmlTextWriterWriteFormatPI; + xmlTextWriterWriteFormatRaw; + xmlTextWriterWriteFormatString; + xmlTextWriterWritePI; + xmlTextWriterWriteRawLen; + xmlTextWriterWriteRaw; + xmlTextWriterWriteString; + xmlTextWriterWriteVFormatAttributeNS; + xmlTextWriterWriteVFormatAttribute; + xmlTextWriterWriteVFormatCDATA; + xmlTextWriterWriteVFormatComment; + xmlTextWriterWriteVFormatDTDAttlist; + xmlTextWriterWriteVFormatDTDElement; + xmlTextWriterWriteVFormatDTDInternalEntity; + xmlTextWriterWriteVFormatDTD; + xmlTextWriterWriteVFormatElementNS; + xmlTextWriterWriteVFormatElement; + xmlTextWriterWriteVFormatPI; + xmlTextWriterWriteVFormatRaw; + xmlTextWriterWriteVFormatString; + +# hash + xmlHashQLookup2; + xmlHashQLookup3; + xmlHashQLookup; + +# chvalid + xmlIsBaseCharGroup; # variable + xmlIsCharGroup; # variable + xmlIsCombiningGroup; # variable + xmlIsDigitGroup; # variable + xmlIsExtenderGroup; # variable + xmlIsIdeographicGroup; # variable + xmlIsPubidChar_tab; # variable + +# globals + xmlLastError; # variable + +# nanohttp + xmlNanoHTTPEncoding; + xmlNanoHTTPMimeType; + xmlNanoHTTPRedir; + +# tree + xmlNodeBufGetContent; + +# xmlIO + xmlParserInputBufferCreateStatic; + +# xmlreader + xmlReaderForDoc; + xmlReaderForFd; + xmlReaderForFile; + xmlReaderForIO; + xmlReaderForMemory; + xmlReaderNewDoc; + xmlReaderNewFd; + xmlReaderNewFile; + xmlReaderNewIO; + xmlReaderNewMemory; + xmlReaderNewWalker; + xmlReaderWalker; + xmlTextReaderConstBaseUri; + xmlTextReaderConstLocalName; + xmlTextReaderConstNamespaceUri; + xmlTextReaderConstName; + xmlTextReaderConstPrefix; + xmlTextReaderConstString; + xmlTextReaderConstValue; + xmlTextReaderConstXmlLang; + xmlTextReaderNextSibling; + xmlTextReaderPreserve; + +# globals + xmlStructuredError; # variable + xmlThrDefSetStructuredErrorFunc; + +# xpathInternals + xmlXPathErr; + +# SAX2 +# xmlSAX2CheckNamespace; removed in 2.6.10 +# xmlSAX2GetNamespace; removed in 2.6.10 +# xmlSAX2GlobalNamespace; removed in 2.6.10 +# xmlSAX2NamespaceDecl; removed in 2.6.10 +# xmlSAX2SetNamespace; removed in 2.6.10 +} LIBXML2_2.5.9; + +LIBXML2_2.6.1 { + global: + +# parser + xmlCtxtResetPush; +} LIBXML2_2.6.0; + +LIBXML2_2.6.2 { + global: + +# parserInternals + xmlCreateURLParserCtxt; + +# xmlschemas + xmlSchemaNewDocParserCtxt; + +# xmlstring + xmlStrVPrintf; + +# xinclude + xmlXIncludeFreeContext; + xmlXIncludeNewContext; + xmlXIncludeProcessNode; +} LIBXML2_2.6.1; + +LIBXML2_2.6.3 { + global: + +# pattern + xmlFreePatternList; + xmlFreePattern; + xmlPatterncompile; + xmlPatternMatch; + +# xmlwriter + xmlNewTextWriterDoc; + xmlNewTextWriterPushParser; + xmlNewTextWriterTree; + +# xmlreader + xmlTextReaderPreservePattern; + +# xmlunicode + xmlUCSIsAegeanNumbers; + xmlUCSIsBuhid; + xmlUCSIsCombiningDiacriticalMarksforSymbols; + xmlUCSIsCypriotSyllabary; + xmlUCSIsCyrillicSupplement; + xmlUCSIsGreekandCoptic; + xmlUCSIsHanunoo; + xmlUCSIsKatakanaPhoneticExtensions; + xmlUCSIsKhmerSymbols; + xmlUCSIsLimbu; + xmlUCSIsLinearBIdeograms; + xmlUCSIsLinearBSyllabary; + xmlUCSIsMiscellaneousMathematicalSymbolsA; + xmlUCSIsMiscellaneousMathematicalSymbolsB; + xmlUCSIsMiscellaneousSymbolsandArrows; + xmlUCSIsOsmanya; + xmlUCSIsPhoneticExtensions; + xmlUCSIsPrivateUseArea; + xmlUCSIsShavian; + xmlUCSIsSupplementalArrowsA; + xmlUCSIsSupplementalArrowsB; + xmlUCSIsSupplementalMathematicalOperators; + xmlUCSIsSupplementaryPrivateUseAreaA; + xmlUCSIsSupplementaryPrivateUseAreaB; + xmlUCSIsTagalog; + xmlUCSIsTagbanwa; + xmlUCSIsTaiLe; + xmlUCSIsTaiXuanJingSymbols; + xmlUCSIsUgaritic; + xmlUCSIsVariationSelectorsSupplement; + xmlUCSIsVariationSelectors; + xmlUCSIsYijingHexagramSymbols; + +# xinclude + xmlXIncludeProcessFlags; + xmlXIncludeProcessTreeFlags; + xmlXIncludeSetFlags; +} LIBXML2_2.6.2; + +LIBXML2_2.6.5 { + global: + +# xmlmemory + xmlCleanupMemory; + +# dict + xmlDictCreateSub; + +# relaxng + xmlRelaxParserSetFlag; + +# xmlstring + xmlStrncatNew; + +# xmlwriter + xmlTextWriterSetIndentString; + xmlTextWriterSetIndent; + +# xpath + xmlXPathCtxtCompile; +} LIBXML2_2.6.3; + +LIBXML2_2.6.6 { + global: + +# tree + xmlAttrSerializeTxtContent; + +# parser + xmlByteConsumed; + +# xmlreader + xmlTextReaderSetStructuredErrorHandler; +} LIBXML2_2.6.5; + +LIBXML2_2.6.7 { + global: + +# xmlwriter + xmlTextWriterEndComment; + xmlTextWriterStartComment; +} LIBXML2_2.6.6; + +LIBXML2_2.6.8 { + global: + +# xmlsave + xmlSaveClose; + xmlSaveDoc; + xmlSaveFlush; + xmlSaveToFd; + xmlSaveToFilename; + xmlSaveToIO; + xmlSaveTree; + +# xmlwriter + xmlTextWriterEndDTDAttlist; + xmlTextWriterEndDTDElement; + xmlTextWriterEndDTDEntity; + xmlTextWriterWriteDTDExternalEntityContents; +} LIBXML2_2.6.7; + +LIBXML2_2.6.10 { + global: + +# xmlIO + xmlOutputBufferWriteEscape; + xmlPopInputCallbacks; + +# xmlsave + xmlSaveSetAttrEscape; + xmlSaveSetEscape; +} LIBXML2_2.6.8; + +LIBXML2_2.6.11 { + global: + +# uri + xmlBuildRelativeURI; + +# globals + xmlOutputBufferCreateFilenameDefault; + xmlOutputBufferCreateFilenameValue; # variable + xmlParserInputBufferCreateFilenameDefault; + xmlParserInputBufferCreateFilenameValue; # variable + xmlThrDefOutputBufferCreateFilenameDefault; + xmlThrDefParserInputBufferCreateFilenameDefault; + +# schemasInternals + xmlSchemaFreeWildcard; + +# xmlschemastypes + xmlSchemaCollapseString; + xmlSchemaGetBuiltInListSimpleTypeItemType; + xmlSchemaGetBuiltInType; + xmlSchemaIsBuiltInTypeFacet; + xmlSchemaValidateListSimpleTypeFacet; +} LIBXML2_2.6.10; + +LIBXML2_2.6.12 { + global: + +# parser + xmlParseInNodeContext; + +# xmlschemastypes + xmlSchemaGetFacetValueAsULong; + xmlSchemaValidateLengthFacet; + xmlSchemaValPredefTypeNodeNoNorm; + +# xmlschemas + xmlSchemaGetParserErrors; + xmlSchemaGetValidErrors; +} LIBXML2_2.6.11; + +LIBXML2_2.6.14 { + global: + +# xmlautomata + xmlAutomataNewCountTrans2; + xmlAutomataNewOnceTrans2; + +# nanohttp + xmlNanoHTTPContentLength; + +# xmlschemas + xmlSchemaSetValidOptions; + xmlSchemaValidateOneElement; + xmlSchemaValidCtxtGetOptions; +} LIBXML2_2.6.12; + +LIBXML2_2.6.15 { + global: + +# debugXML + xmlDebugCheckDocument; + +# tree + xmlDocCopyNodeList; + xmlNewDocPI; + +# xmlreader + xmlTextReaderConstEncoding; + xmlTextReaderConstXmlVersion; + xmlTextReaderIsNamespaceDecl; + xmlTextReaderStandalone; +} LIBXML2_2.6.14; + +LIBXML2_2.6.16 { + global: + +# xmlmemory + xmlMemBlocks; + +# relaxng + xmlRelaxNGInitTypes; +} LIBXML2_2.6.15; + +LIBXML2_2.6.17 { + global: + +# dict + xmlDictExists; + +# xmlmodule + xmlModuleClose; + xmlModuleFree; + xmlModuleOpen; + xmlModuleSymbol; + +# xmlregexp + xmlRegExecErrInfo; + xmlRegExecNextValues; + +# xmlschemastypes + xmlSchemaWhiteSpaceReplace; + +# xmlreader + xmlTextReaderGetParserColumnNumber; + xmlTextReaderGetParserLineNumber; +} LIBXML2_2.6.16; + +LIBXML2_2.6.18 { + global: + +# valid + xmlCopyDocElementContent; + xmlFreeDocElementContent; + xmlNewDocElementContent; + +# dict + xmlDictCleanup; + +# hash + xmlHashCreateDict; + +# pattern + xmlFreeStreamCtxt; + xmlPatternFromRoot; + xmlPatternGetStreamCtxt; + xmlPatternMaxDepth; + xmlPatternStreamable; + xmlStreamPop; + xmlStreamPushAttr; + xmlStreamPush; + +# xmlschemastypes + xmlSchemaCompareValuesWhtsp; + xmlSchemaCopyValue; + xmlSchemaGetCanonValue; + xmlSchemaNewNOTATIONValue; + xmlSchemaNewStringValue; + +# xmlreader + xmlTextReaderByteConsumed; +} LIBXML2_2.6.17; + +LIBXML2_2.6.19 { + global: + +# xmlschemastypes + xmlSchemaGetValType; + xmlSchemaValidateFacetWhtsp; + xmlSchemaValidateLengthFacetWhtsp; +} LIBXML2_2.6.18; + +LIBXML2_2.6.20 { + global: + +# tree + xmlDOMWrapAdoptNode; + xmlDOMWrapFreeCtxt; + xmlDOMWrapNewCtxt; + xmlDOMWrapReconcileNamespaces; + xmlDOMWrapRemoveNode; + +# xmlschemastypes + xmlSchemaGetCanonValueWhtsp; + xmlSchemaNewQNameValue; + xmlSchemaValueAppend; + xmlSchemaValueGetAsBoolean; + xmlSchemaValueGetAsString; + xmlSchemaValueGetNext; + +# xmlschemas + xmlSchemaIsValid; + xmlSchemaSAXPlug; + xmlSchemaSAXUnplug; + xmlSchemaValidateFile; + +# xmlreader + xmlTextReaderSchemaValidate; + xmlTextReaderSetSchema; +} LIBXML2_2.6.19; + +LIBXML2_2.6.21 { + global: + +# xmlautomata + xmlAutomataNewNegTrans; + +# xmlregexp + emptyExp; # variable + forbiddenExp; # variable + xmlExpCtxtNbCons; + xmlExpCtxtNbNodes; + xmlExpDump; + xmlExpExpDerive; + xmlExpFreeCtxt; + xmlExpFree; + xmlExpGetLanguage; + xmlExpGetStart; + xmlExpIsNillable; + xmlExpMaxToken; + xmlExpNewAtom; + xmlExpNewCtxt; + xmlExpNewOr; + xmlExpNewRange; + xmlExpNewSeq; + xmlExpParse; + xmlExpRef; + xmlExpStringDerive; + xmlExpSubsume; + +# parser + xmlHasFeature; + +# uri + xmlParseURIRaw; + +# pattern + xmlPatternMinDepth; + +# relaxng + xmlRelaxNGSetValidStructuredErrors; + +# xmlschemas + xmlSchemaSetValidStructuredErrors; + +# schematron + xmlSchematronFreeParserCtxt; + xmlSchematronFree; + xmlSchematronFreeValidCtxt; + xmlSchematronNewDocParserCtxt; + xmlSchematronNewMemParserCtxt; + xmlSchematronNewParserCtxt; + xmlSchematronNewValidCtxt; + xmlSchematronParse; + xmlSchematronValidateDoc; +} LIBXML2_2.6.20; + +LIBXML2_2.6.23 { + global: + +# HTMLtree + htmlDocDumpMemoryFormat; + +# xmlIO + xmlOutputBufferCreateBuffer; + +# xmlsave + xmlSaveToBuffer;# suppressed in 2.6.11, readded in 2.6.23 + + +# xmlschemas + xmlSchemaSetParserStructuredErrors; + +# pattern + xmlStreamPushNode; + xmlStreamWantsAnyNode; + +# xmlreader + xmlTextReaderSchemaValidateCtxt; +} LIBXML2_2.6.21; + +LIBXML2_2.6.24 { + global: + +# tree + xmlDOMWrapCloneNode; + +# relaxng + xmlRelaxNGSetParserStructuredErrors; +} LIBXML2_2.6.23; + +LIBXML2_2.6.25 { + global: + +# xpath + xmlXPathContextSetCache; +} LIBXML2_2.6.24; + +LIBXML2_2.6.27 { + global: + +# HTMLparser + htmlNewParserCtxt; + +# uri + xmlPathToURI; + +# xinclude + xmlXIncludeProcessFlagsData; + +# xpath + xmlXPathCompiledEvalToBoolean; +} LIBXML2_2.6.25; + +LIBXML2_2.6.28 { + global: + +# xmlreader + xmlTextReaderSetup; +} LIBXML2_2.6.27; + +LIBXML2_2.6.29 { + global: + +# threads + xmlDllMain; +} LIBXML2_2.6.28; + +LIBXML2_2.6.32 { + global: + +# schematron + xmlSchematronSetValidStructuredErrors; +} LIBXML2_2.6.29; + +LIBXML2_2.7.0 { + global: + +# xmlmemory + xmlMemDisplayLast; + +# entities + xmlNewEntity; + +# xmlschemas + xmlSchemaValidCtxtGetParserCtxt; +} LIBXML2_2.6.32; + +LIBXML2_2.7.3 { + global: + +# tree + xmlChildElementCount; + xmlFirstElementChild; + xmlLastElementChild; + xmlNextElementSibling; + xmlPreviousElementSibling; +} LIBXML2_2.7.0; + +LIBXML2_2.7.4 { + global: + +# globals + xmlStructuredErrorContext; # variable + +# xinclude + xmlXIncludeProcessTreeFlagsData; +} LIBXML2_2.7.3; + diff --git a/ltmain.sh b/ltmain.sh old mode 100644 new mode 100755 index 8e5a930..6939dcc --- a/ltmain.sh +++ b/ltmain.sh @@ -1,52 +1,83 @@ -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun configure. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007 Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify +# Generated from ltmain.m4sh. + +# ltmain.sh (GNU libtool) 2.2.6 +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # -# This program is distributed in the hope that it will be useful, but +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -basename="s,^.*/,,g" - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -progname=`echo "$progpath" | $SED $basename` -modename="$progname" +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 +# Usage: $progname [OPTION]... [MODE-ARG]... +# +# Provide generalized library-building support services. +# +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print informational messages (default) +# --version print version information +# -h, --help print short or long help message +# +# MODE must be one of the following: +# +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory +# +# MODE-ARGS vary depending on the MODE. +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. +# +# When reporting a bug, please describe a test case to reproduce it and +# include the following information: +# +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.2.6 +# automake: $automake_version +# autoconf: $autoconf_version +# +# Report bugs to . PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=1.5.24 -TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)" +VERSION=2.2.6 +TIMESTAMP="" +package_revision=1.3012 -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -60,98 +91,261 @@ fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh -# Check that we have a working $echo. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : -else - # Restart under the correct shell, and then maybe $echo will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE -fi +dirname="s,/[^/]*$,," +basename="s,^.*/,," + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} -# Global variables. -mode=$default_mode -nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= -execute_dlfiles= -duplicate_deps=no -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 +# Generated shell functions inserted here. + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +# In the unlikely event $progname began with a '-', it would play havoc with +# func_echo (imagine progname=-n), so we prepend ./ in that case: +func_dirname_and_basename "$progpath" +progname=$func_basename_result +case $progname in + -*) progname=./$progname ;; +esac + +# Make sure we have an absolute path for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=$func_dirname_result + progdir=`cd "$progdir" && pwd` + progpath="$progdir/$progname" + ;; + *) + save_IFS="$IFS" + IFS=: + for progdir in $PATH; do + IFS="$save_IFS" + test -x "$progdir/$progname" && break + done + IFS="$save_IFS" + test -n "$progdir" || progdir=`pwd` + progpath="$progdir/$progname" + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed="${SED}"' -e 1s/^X//' +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Re-`\' parameter expansions in output of double_quote_subst that were +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' +# in input to double_quote_subst, that '$' was protected from expansion. +# Since each input `\' is now two `\'s, look for any number of runs of +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. +bs='\\' +bs2='\\\\' +bs4='\\\\\\\\' +dollar='\$' +sed_double_backslash="\ + s/$bs4/&\\ +/g + s/^$bs2$dollar/$bs&/ + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g + s/\n//g" + +# Standard options: +opt_dry_run=false +opt_help=false +opt_quiet=false +opt_verbose=false +opt_warning=: + +# func_echo arg... +# Echo program name prefixed message, along with the current mode +# name if it has been set yet. +func_echo () +{ + $ECHO "$progname${mode+: }$mode: $*" +} + +# func_verbose arg... +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $opt_verbose && func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + +# func_error arg... +# Echo program name prefixed message to standard error. +func_error () +{ + $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 +} + +# func_warning arg... +# Echo program name prefixed warning message to standard error. +func_warning () +{ + $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +} + +# func_fatal_error arg... +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + +# func_fatal_help arg... +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + func_error ${1+"$@"} + func_fatal_error "$help" +} +help="Try \`$progname --help' for more information." ## default + + +# func_grep expression filename +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_mkdir_p directory-path +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + my_directory_path="$1" + my_dir_list= + + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + + # Protect directory names starting with `-' + case $my_directory_path in + -*) my_directory_path="./$my_directory_path" ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$my_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + my_dir_list="$my_directory_path:$my_dir_list" + + # If the last portion added has no slash in it, the list is done + case $my_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` + done + my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` + + save_mkdir_p_IFS="$IFS"; IFS=':' + for my_dir in $my_dir_list; do + IFS="$save_mkdir_p_IFS" + # mkdir can fail with a `File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$my_dir" 2>/dev/null || : + done + IFS="$save_mkdir_p_IFS" + + # Bail out if we (or some other process) failed to create a directory. + test -d "$my_directory_path" || \ + func_fatal_error "Failed to create \`$1'" + fi +} -##################################### -# Shell function definitions: -# This seems to be the best place for them # func_mktempdir [string] # Make a temporary directory that won't clash with other running @@ -161,7 +355,7 @@ func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" - if test "$run" = ":"; then + if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else @@ -170,528 +364,789 @@ func_mktempdir () my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" - save_mktempdir_umask=`umask` - umask 0077 - $mkdir "$my_tmpdir" - umask $save_mktempdir_umask + save_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$my_tmpdir" + umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || { - $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 - exit $EXIT_FAILURE - } + test -d "$my_tmpdir" || \ + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi - $echo "X$my_tmpdir" | $Xsed + $ECHO "X$my_tmpdir" | $Xsed } -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () +# func_quote_for_eval arg +# Aesthetically quote ARG to be evaled later. +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT +# is double-quoted, suitable for a subsequent eval, whereas +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters +# which are still active within double quotes backslashified. +func_quote_for_eval () { - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ - $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | \ - $SED -n -e '1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; + case $1 in + *[\\\`\"\$]*) + func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; + *) + func_quote_for_eval_unquoted_result="$1" ;; + esac + + case $func_quote_for_eval_unquoted_result in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and and variable + # expansion for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + ;; + *) + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac - ;; - 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 () +# func_quote_for_expand arg +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () { - 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. + case $1 in + *[\\\`\"]*) + my_arg=`$ECHO "X$1" | $Xsed \ + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) - for z in $available_tags; do - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case "$@ " in - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - $echo "$modename: unable to infer tagged configuration" - $echo "$modename: specify a tag with \`--tag'" 1>&2 - exit $EXIT_FAILURE -# else -# $echo "$modename: using $tagname tagged configuration" - fi - ;; - esac - fi + my_arg="$1" ;; + esac + + case $my_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + my_arg="\"$my_arg\"" + ;; + esac + + func_quote_for_expand_result="$my_arg" } -# func_extract_an_archive dir oldlib -func_extract_an_archive () +# func_show_eval cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () { - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" + my_cmd="$1" + my_fail_exp="${2-:}" - $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" - $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 - exit $EXIT_FAILURE + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$my_cmd" + my_status=$? + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi fi } -# func_extract_archives gentop oldlib ... -func_extract_archives () + +# func_show_eval_locale cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () { - my_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 + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$lt_user_locale + $my_cmd" + my_status=$? + eval "$lt_safe_locale" + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi fi +} - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - extracted_serial=`expr $extracted_serial + 1` - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - $show "${rm}r $my_xdir" - $run ${rm}r "$my_xdir" - $show "$mkdir $my_xdir" - $run $mkdir "$my_xdir" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then - exit $exit_status - fi - case $host in - *-darwin*) - $show "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - if test -z "$run"; then - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` - darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` - if test -n "$darwin_arches"; then - darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - $show "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we have a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - lipo -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - ${rm}r unfat-$$ - cd "$darwin_orig_dir" - else - cd "$darwin_orig_dir" - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - fi # $run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - func_extract_archives_result="$my_oldobjs" + + + +# func_version +# Echo version message to standard output and exit. +func_version () +{ + $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p + }' < "$progpath" + exit $? +} + +# func_usage +# Echo short help message to standard output and exit. +func_usage () +{ + $SED -n '/^# Usage:/,/# -h/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p + }' < "$progpath" + $ECHO + $ECHO "run \`$progname --help | more' for full usage" + exit $? +} + +# func_help +# Echo long help message to standard output and exit. +func_help () +{ + $SED -n '/^# Usage:/,/# Report bugs to/ { + s/^# // + s/^# *$// + s*\$progname*'$progname'* + s*\$host*'"$host"'* + s*\$SHELL*'"$SHELL"'* + s*\$LTCC*'"$LTCC"'* + s*\$LTCFLAGS*'"$LTCFLAGS"'* + s*\$LD*'"$LD"'* + s/\$with_gnu_ld/'"$with_gnu_ld"'/ + s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + p + }' < "$progpath" + exit $? +} + +# func_missing_arg argname +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + func_error "missing argument for $1" + exit_cmd=exit } -# End of Shell function definitions -##################################### -# Darwin sucks -eval std_shrext=\"$shrext_cmds\" +exit_cmd=: -disable_libs=no -# Parse our command line options once, thoroughly. -while test "$#" -gt 0 -do - arg="$1" + + + +# 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 - case $arg in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <&2 - exit $EXIT_FAILURE - ;; - esac +magic="%%%MAGIC variable%%%" +magic_exe="%%%MAGIC EXE variable%%%" - 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 +# Global variables. +# $mode is unset +nonopt= +execute_dlfiles= +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 - prev= - prevopt= - continue - fi +opt_dry_run=false +opt_duplicate_deps=false +opt_silent=false +opt_debug=: - # Have we seen a non-optional argument yet? - case $arg in - --help) - show_help=yes - ;; +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +# func_fatal_configuration arg... +# Echo program name prefixed message to standard error, followed by +# a configuration failure hint, and exit. +func_fatal_configuration () +{ + func_error ${1+"$@"} + func_error "See the $PACKAGE documentation for more information." + func_fatal_error "Fatal configuration error." +} - --version) - echo "\ -$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP -Copyright (C) 2007 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - exit $? - ;; +# func_config +# Display the configuration for all the tags in this script. +func_config () +{ + re_begincf='^# ### BEGIN LIBTOOL' + re_endcf='^# ### END LIBTOOL' + + # Default configuration. + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" - --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" + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done - exit $? - ;; - - --debug) - $echo "$progname: enabling shell trace mode" - set -x - preserve_args="$preserve_args $arg" - ;; - --dry-run | -n) - run=: - ;; + exit $? +} - --features) - $echo "host: $host" +# func_features +# Display the features supported by this script. +func_features () +{ + $ECHO "host: $host" if test "$build_libtool_libs" = yes; then - $echo "enable shared libraries" + $ECHO "enable shared libraries" else - $echo "disable shared libraries" + $ECHO "disable shared libraries" fi if test "$build_old_libs" = yes; then - $echo "enable static libraries" + $ECHO "enable static libraries" else - $echo "disable static libraries" + $ECHO "disable static libraries" fi + exit $? - ;; +} - --finish) mode="finish" ;; +# func_enable_tag tagname +# Verify that TAGNAME is valid, and either flag an error and exit, or +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist +# variable here. +func_enable_tag () +{ + # Global variable: + tagname="$1" - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf="/$re_begincf/,/$re_endcf/p" - --preserve-dup-deps) duplicate_deps="yes" ;; + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac - --quiet | --silent) - show=: - preserve_args="$preserve_args $arg" - ;; + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; + *) + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + +# Parse options once, thoroughly. This comes as soon as possible in +# the script to make things like `libtool --version' happen quickly. +{ - --tag) - prevopt="--tag" - prev=tag - preserve_args="$preserve_args --tag" + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift ;; - --tag=*) - set tag "$optarg" ${1+"$@"} - shift - prev=tag - preserve_args="$preserve_args --tag" + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift ;; - - -dlopen) - prevopt="-dlopen" - prev=execute_dlfiles + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift ;; - - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift ;; - - *) - nonopt="$arg" - break + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac -done -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE -fi + # Parse non-mode specific arguments: + while test "$#" -gt 0; do + opt="$1" + shift -case $disable_libs in -no) - ;; -shared) - build_libtool_libs=no - build_old_libs=yes - ;; -static) - build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` - ;; -esac + case $opt in + --config) func_config ;; -# 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= + --debug) preserve_args="$preserve_args $opt" + func_echo "enabling shell trace mode" + opt_debug='set -x' + $opt_debug + ;; -if test -z "$show_help"; then + -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break + execute_dlfiles="$execute_dlfiles $1" + shift + ;; - # 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 + --dry-run | -n) opt_dry_run=: ;; + --features) func_features ;; + --finish) mode="finish" ;; + + --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break + case $1 in + # Valid mode arguments: + clean) ;; + compile) ;; + execute) ;; + finish) ;; + install) ;; + link) ;; + relink) ;; + uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; + esac + + mode="$1" + shift + ;; + + --preserve-dup-deps) + opt_duplicate_deps=: ;; + + --quiet|--silent) preserve_args="$preserve_args $opt" + opt_silent=: + ;; + + --verbose| -v) preserve_args="$preserve_args $opt" + opt_silent=false + ;; + + --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break + preserve_args="$preserve_args $opt $1" + func_enable_tag "$1" # tagname is set here + shift + ;; + + # Separate optargs to long options: + -dlopen=*|--mode=*|--tag=*) + func_opt_split "$opt" + set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} + shift + ;; + + -\?|-h) func_usage ;; + --help) opt_help=: ;; + --version) func_version ;; + + -*) func_fatal_help "unrecognized option \`$opt'" ;; + + *) nonopt="$opt" + break + ;; + esac + done + + + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: ;; *) - # If we have no mode, but dlfiles were specified, then do execute mode. - test -n "$execute_dlfiles" && mode=execute + opt_duplicate_compiler_generated_deps=$opt_duplicate_deps + ;; + esac - # 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 + # Having warned about all mis-specified options, bail out if + # anything was wrong. + $exit_cmd $EXIT_FAILURE +} + +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF fi - ;; - esac + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +## ----------- ## +## Main. ## +## ----------- ## + +$opt_help || { + # Sanity checks first: + func_check_version_match + + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" fi + test -z "$mode" && func_fatal_error "error: you must specify a MODE." + + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # 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 + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" - help="Try \`$modename --help --mode=$mode' for more information." + help="Try \`$progname --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 - ;; +# func_lalib_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} - target ) - libobj="$arg" - arg_mode=normal - continue - ;; +# func_lalib_unsafe_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if `file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case "$lalib_p_line" in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test "$lalib_p" = yes +} - 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 - ;; +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + func_lalib_p "$1" +} - -static | -prefer-pic | -prefer-non-pic) - later="$later $arg" - continue - ;; +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} - -no-suppress) +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_ltwrapper_scriptname_result="" + if func_ltwrapper_executable_p "$1"; then + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" + fi +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $opt_debug + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs + eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# `FILE.' does not work on cygwin managed mounts. +func_source () +{ + $opt_debug + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $opt_debug + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_quote_for_eval "$arg" + CC_quoted="$CC_quoted $func_quote_for_eval_result" + 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. + func_quote_for_eval "$arg" + CC_quoted="$CC_quoted $func_quote_for_eval_result" + done + case "$@ " in + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with \`--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=${1} + if test "$build_libtool_libs" = yes; then + write_lobj=\'${2}\' + else + write_lobj=none + fi + + if test "$build_old_libs" = yes; then + write_oldobj=\'${3}\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T <\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - lastarg="$lastarg $arg" + func_quote_for_eval "$arg" + lastarg="$lastarg $func_quote_for_eval_result" done IFS="$save_ifs" - lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result # 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. # @@ -738,65 +1187,42 @@ if test -z "$show_help"; then esac # case $arg_mode # Aesthetically quote the previous argument. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - case $lastarg in - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, and some SunOS ksh mistreat backslash-escaping - # in scan sets (worked around with variable expansion), - # and furthermore cannot handle '|' '&' '(' ')' in scan sets - # at all, so we specify them separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" - ;; - esac - - base_compile="$base_compile $lastarg" + func_quote_for_eval "$lastarg" + base_compile="$base_compile $func_quote_for_eval_result" done # for arg case $arg_mode in arg) - $echo "$modename: you must specify an argument for -Xcompile" - exit $EXIT_FAILURE + func_fatal_error "you must specify an argument for -Xcompile" ;; target) - $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. - [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + test -z "$libobj" && { + func_basename "$srcfile" + libobj="$func_basename_result" + } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo - xform='[cCFSifmso]' case $libobj in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.ii) xform=ii ;; - *.class) xform=class ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.[fF][09]?) xform=[fF][09]. ;; - *.for) xform=for ;; - *.java) xform=java ;; - *.obj) xform=obj ;; + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ + *.[fF][09]? | *.for | *.java | *.obj | *.sx) + func_xform "$libobj" + libobj=$func_xform_result + ;; esac - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - case $libobj in - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 - exit $EXIT_FAILURE + func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac @@ -804,7 +1230,15 @@ if test -z "$show_help"; then for arg in $later; do case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + continue + ;; + -static) + build_libtool_libs=no build_old_libs=yes continue ;; @@ -821,28 +1255,17 @@ if test -z "$show_help"; then esac done - qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` - case $qlibobj in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qlibobj="\"$qlibobj\"" ;; - esac - test "X$libobj" != "X$qlibobj" \ - && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." - objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then - xdir= - else - xdir=$xdir/ - fi + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && func_warning "libobj name \`$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname="$func_basename_result" + xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then @@ -851,12 +1274,9 @@ if test -z "$show_help"; then 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*) + cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac @@ -868,10 +1288,8 @@ if test -z "$show_help"; then # 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} + 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 @@ -881,13 +1299,13 @@ if test -z "$show_help"; then # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then - until $run ln "$progpath" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then - $echo "\ + $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` @@ -898,34 +1316,22 @@ 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 + $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi - $echo "$srcfile" > "$lockfile" + removelist="$removelist $output_obj" + $ECHO "$srcfile" > "$lockfile" fi + $opt_dry_run || $RM $removelist + removelist="$removelist $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi - qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` - case $qsrcfile in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qsrcfile="\"$qsrcfile\"" ;; - esac - - $run $rm "$libobj" "${libobj}T" - - # Create a libtool object file (analogous to a ".la" file), - # but don't create it if we're doing a dry run. - test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ + $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` @@ -978,45 +1371,27 @@ 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 + $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - $show "$mv $output_obj $lobj" - if $run $mv $output_obj $lobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' 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 "\ + $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` @@ -1050,5458 +1420,6777 @@ 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 + $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - $show "$mv $output_obj $obj" - if $run $mv $output_obj $obj; then : - else - error=$? - $run $rm $removelist - exit $error - fi + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi - - # Append the name of the non-PIC object the libtool object file. - # Only append if the libtool object file exists. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done +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. - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes +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." + ;; - # 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" + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - # 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 +Compile a source file into a libtool library object. - 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. +This mode accepts the following additional options: - # 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= + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -shared do not build a \`.o' file suitable for static linking + -static only build a \`.o' file suitable for static linking - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. - 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 +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'." + ;; - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" +Automatically set library path, then run a program. - 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 +This mode accepts the following additional options: - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi + -dlopen FILE add the directory containing FILE to the library path - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi +This mode sets the library path environment variable according to \`-dlopen' +flags. - # 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" +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. - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. +Then, COMMAND is executed, with ARGS as arguments." + ;; - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - done - else - $echo "$modename: link input file \`$save_arg' does not exist" - exit $EXIT_FAILURE - fi - arg=$save_arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - compile_command="$compile_command $wl$qarg" - finalize_command="$finalize_command $wl$qarg" - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - darwin_framework|darwin_framework_skip) - test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - prev= - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" +Complete the installation of libtool libraries. - prevarg="$arg" +Each LIBDIR is a directory that contains libtool libraries. - 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 - ;; +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." + ;; - -allow-undefined) - # FIXME: remove this flag sometime in the future. - $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 - continue - ;; + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -avoid-version) - avoid_version=yes - continue - ;; +Install executables or libraries. - -dlopen) - prev=dlfiles - continue - ;; +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. - -dlpreopen) - prev=dlprefiles - continue - ;; +The following components of INSTALL-COMMAND are treated specially: - -export-dynamic) - export_dynamic=yes - continue - ;; + -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -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 - ;; +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; - -framework|-arch|-isysroot) - case " $CC " in - *" ${arg} ${1} "* | *" ${arg} ${1} "*) - prev=darwin_framework_skip ;; - *) compiler_flags="$compiler_flags $arg" - prev=darwin_framework ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -inst-prefix-dir) - prev=inst_prefix - continue - ;; +Link object files or libraries together to form another library, or to +create an executable program. - # 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 - ;; +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. - -L*) - dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - notinst_path="$notinst_path $dir" - fi - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; +The following components of LINK-COMMAND are treated specially: - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs -framework System" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; + -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 + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - -model) - compile_command="$compile_command $arg" - compiler_flags="$compiler_flags $arg" - finalize_command="$finalize_command $arg" - prev=xcompiler - continue - ;; +All other options (arguments beginning with \`-') are ignored. - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; +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. - -module) - module=yes - continue - ;; +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. - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m* pass through architecture-specific compiler args for GCC - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - compiler_flags="$compiler_flags $arg" - continue +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." ;; - -shrext) - prev=shrext - continue - ;; + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -no-fast-install) - fast_install=no - continue - ;; +Remove libraries from an installation directory. - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 - $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; +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. - -no-undefined) - allow_undefined=no - continue - ;; +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; - -objectlist) - prev=objectlist - continue - ;; + *) + func_fatal_help "invalid operation mode \`$mode'" + ;; + esac - -o) prev=output ;; + $ECHO + $ECHO "Try \`$progname --help' for more information about other modes." - -precious-files-regex) - prev=precious_regex - continue - ;; + exit $? +} - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; + # Now that we've collected a possible --mode arg, show help if necessary + $opt_help && func_mode_help - -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 - ;; +# func_mode_execute arg... +func_mode_execute () +{ + $opt_debug + # The first argument is the command name. + cmd="$nonopt" + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + test -f "$file" \ + || func_fatal_help "\`$file' is not a file" - -thread-safe) - thread_safe=yes - continue - ;; + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$lib' is not a valid libtool archive" - -version-info) - prev=vinfo - continue - ;; - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; + # Read the libtool library. + dlname= + library_names= + func_source "$file" - -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/^ //"` - ;; + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "\`$file' was not linked with \`-export-dynamic'" + continue + fi - -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/^ //"` - ;; + func_dirname "$file" "" "." + dir="$func_dirname_result" - -Xcompiler) - prev=xcompiler - continue + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + fi + fi ;; - -Xlinker) - prev=xlinker - continue + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir="$func_dirname_result" ;; - -XCClinker) - prev=xcclinker + *) + func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; + esac - # 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= + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac + # 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 - 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 + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi + # 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 func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file="$progdir/$program" + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_quote_for_eval "$file" + args="$args $func_quote_for_eval_result" + done - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" + if test "X$opt_dry_run" = Xfalse; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi + $lt_unset $lt_var + fi" + done - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - 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 +} - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi +test "$mode" = execute && func_mode_execute ${1+"$@"} - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. +# func_mode_finish arg... +func_mode_finish () +{ + $opt_debug + libdirs="$nonopt" + admincmds= - # 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 -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done - 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 + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' fi - ;; + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; + # Exit here if they wanted silent mode. + $opt_silent && exit $EXIT_SUCCESS - *.la) - # A libtool-controlled library. + $ECHO "X----------------------------------------------------------------------" | $Xsed + $ECHO "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + $ECHO + $ECHO "If you ever happen to want to link against installed libraries" + $ECHO "in a given directory, LIBDIR, you must either use libtool, and" + $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" + $ECHO "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" + $ECHO " during execution" + fi + if test -n "$runpath_var"; then + $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" + $ECHO " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" - 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" + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + $ECHO + + $ECHO "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" + $ECHO "pages." + ;; + *) + $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + $ECHO "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS +} + +test "$mode" = finish && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $opt_debug + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $ECHO "X$nonopt" | $GREP shtool >/dev/null; then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + install_prog="$install_prog$func_quote_for_eval_result" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then prev= else - deplibs="$deplibs $arg" + dest=$arg + continue fi - continue ;; + esac - # 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 + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + install_prog="$install_prog $func_quote_for_eval_result" + done - # 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 + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi + test -n "$prev" && \ + func_fatal_help "the \`$prev' option requires an argument" - 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" + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi fi - oldlibs= - # calculate the name of the file, without its directory - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` - libobjs_save="$libobjs" + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result - 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\'\` + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + func_dirname_and_basename "$dest" "" "." + destdir="$func_dirname_result" + destname="$func_basename_result" - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - # Create the object directory. - if test ! -d "$output_objdir"; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then - exit $exit_status - fi + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "\`$dest' is not a directory" fi - - # 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 - ;; + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; *) - duplicate_compiler_generated_deps=$duplicate_deps + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "\`$destdir' must be an absolute directory name" + ;; + esac + done ;; 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 + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do - # 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" ;; + # 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. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - case $linkmode in - lib) - passes="conv link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 - exit $EXIT_FAILURE + func_dirname "$file" "/" "" + dir="$func_dirname_result" + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking \`$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname="$1" + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme="$stripme" + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" + ;; + esac ;; esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - for pass in $passes; do - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 - continue + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' 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 + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if (${SED} -e '2q' $lib | - grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - library_names= - old_library= - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - *) - $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - if eval $echo \"$deplib\" 2>/dev/null \ - | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $echo - $echo "*** Warning: Trying to link with static lib archive $deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because the file extensions .$libext of this argument makes me believe" - $echo "*** that it is just a static archive that I should not used here." - else - $echo - $echo "*** Warning: Linking the shared library $output against the" - $echo "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else - $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 - exit $EXIT_FAILURE - fi - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE + # Do each command in the postinstall commands. + lib="$destdir/$realname" + func_execute_cmds "$postinstall_cmds" 'exit $?' fi - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= + # Install the pseudo-library for information purposes. + func_basename "$file" + name="$func_basename_result" + instname="$dir/$name"i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; - # Read the .la file - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac + *.lo) + # Install (i.e. copy) a libtool object. - 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" + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" fi - if 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 + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to \`$destfile'" + ;; + esac + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' - # 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 + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi + exit $EXIT_SUCCESS + ;; - # 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 + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; *) - 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" + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script \`$wrapper'" + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "\`$lib' has not been installed in \`$libdir'" + finalize=no + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + $opt_dry_run || { + if test "$finalize" = yes; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file="$func_basename_result" + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_silent || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink \`$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file="$outputname" + else + func_warning "cannot relink \`$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac ;; esac - laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done - # 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" + for file in $staticlibs; do + func_basename "$file" + name="$func_basename_result" + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test "$mode" = install && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $opt_debug + my_outputname="$1" + my_originator="$2" + my_pic_p="${3-no}" + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms="${my_outputname}S.c" + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${my_outputname}.nm" + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + func_verbose "generating symbol list for \`$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_verbose "extracting global C symbols from \`$progfile'" + $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" + $opt_dry_run || { + eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } fi - fi # $installed = yes - name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + fi - # 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 + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" fi - # 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" + + # 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 - newdlprefiles="$newdlprefiles $dir/$linklib" + $GREP -v "^: " < "$nlist" > "$nlist"S 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" + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else - deplibs="$lib $deplibs" # used for prog,scan pass + $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" fi - continue - fi + $ECHO >> "$output_objdir/$my_dlsyms" "\ - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +" + case $host in + *cygwin* | *mingw* | *cegcc* ) + $ECHO >> "$output_objdir/$my_dlsyms" "\ +/* DATA imports from DLLs on WIN32 con't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs. */" + lt_dlsym_const= ;; + *osf5*) + echo >> "$output_objdir/$my_dlsyms" "\ +/* This system does not cope well with relocations in const data */" + lt_dlsym_const= ;; + *) + lt_dlsym_const=const ;; + esac - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi + $ECHO >> "$output_objdir/$my_dlsyms" "\ +extern $lt_dlsym_const lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[]; +$lt_dlsym_const lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{\ + { \"$my_originator\", (void *) 0 }," - 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... + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + $ECHO >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *" $absdir "*) ;; - *) temp_rpath="$temp_rpath $absdir" ;; - esac - fi +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif - # 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... +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run - 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 + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + if test "X$my_pic_p" != Xno; then + pic_flag_for_symtable=" $pic_flag" + fi + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) symtab_cflags="$symtab_cflags $arg" ;; + esac + done - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes ; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - # This is a shared library + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - # 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 + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' - 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 + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for \`$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. - # 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" + # 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 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 +# 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 () +{ + $opt_debug + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | + $SED -n -e ' + 1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - $show "generating import library for \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$old_archive_from_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a module then we can not link against - # it, someone is ignoring the new warnings I added - if /usr/bin/file -L $add 2> /dev/null | - $EGREP ": [^:]* bundle" >/dev/null ; then - $echo "** Warning, lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $echo - $echo "** And there doesn't seem to be a static archive available" - $echo "** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" - exit $EXIT_FAILURE - fi +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $opt_debug + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + 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 +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $opt_debug + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" - 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. + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib="$func_basename_result" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" - # 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 + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`basename "$darwin_archive"` + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done - 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 + func_extract_archives_result="$my_oldobjs" +} - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -L*) path="$deplib" ;; - *.la) - dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$deplib" && dir="." - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - fi - ;; - esac - if grep "^installed=no" $deplib > /dev/null; then - path="$absdir/$objdir" - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - if test "$absdir" != "$libdir"; then - $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - fi - path="$absdir" - fi - depdepl= - case $host in - *-*-darwin*) - # we do not want to link against static libs, - # but need to link against shared - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$path/$depdepl" ; then - depdepl="$path/$depdepl" - fi - # do not add paths which are already there - case " $newlib_search_path " in - *" $path "*) ;; - *) newlib_search_path="$newlib_search_path $path";; - esac - fi - path="" - ;; - *) - path="-L$path" - ;; - esac - ;; - -l*) - case $host in - *-*-darwin*) - # Again, we only want to link against shared libraries - eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` - for tmp in $newlib_search_path ; do - if test -f "$tmp/lib$tmp_libs.dylib" ; then - eval depdepl="$tmp/lib$tmp_libs.dylib" - break - fi - done - path="" - ;; - *) continue ;; - esac - ;; - *) continue ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - case " $deplibs " in - *" $depdepl "*) ;; - *) deplibs="$depdepl $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" +# func_emit_wrapper_part1 [arg=no] +# +# Emit the first part of a libtool wrapper script on stdout. +# For more information, see the description associated with +# func_emit_wrapper(), below. +func_emit_wrapper_part1 () +{ + func_emit_wrapper_part1_arg1=no + if test -n "$1" ; then + func_emit_wrapper_part1_arg1=$1 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 + $ECHO "\ +#! $SHELL - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 - fi +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 - fi +# 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' - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 - fi +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 - fi +# 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 - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 - fi +relink_command=\"$relink_command\" - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 - fi +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + 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 "\ - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. - 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 - ;; + # 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 - 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" + file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done +" +} +# end: func_emit_wrapper_part1 + +# func_emit_wrapper_part2 [arg=no] +# +# Emit the second part of a libtool wrapper script on stdout. +# For more information, see the description associated with +# func_emit_wrapper(), below. +func_emit_wrapper_part2 () +{ + func_emit_wrapper_part2_arg1=no + if test -n "$1" ; then + func_emit_wrapper_part2_arg1=$1 fi - fi - if test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 - fi + $ECHO "\ - set dummy $rpath - if test "$#" -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 fi - install_libdir="$2" + fi - 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 + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" fi - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 + $ECHO "\ + + 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 "\ + # 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 - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" fi - else - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - IFS="$save_ifs" + $ECHO "\ + 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* | *-cegcc*) + $ECHO "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} +# end: func_emit_wrapper_part2 + - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=no + if test -n "$1" ; then + func_emit_wrapper_arg1=$1 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 + # split this up so that func_emit_cwrapperexe_src + # can call each part independently. + func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" + func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" +} - case $vinfo_number in - yes) - number_major="$2" - number_minor="$3" - number_revision="$4" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - esac - ;; - no) - current="$2" - revision="$3" - age="$4" - ;; - esac - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac +# func_to_host_path arg +# +# Convert paths to host format when used with build tools. +# Intended for use with "native" mingw (where libtool itself +# is running under the msys shell), or in the following cross- +# build environments: +# $build $host +# mingw (msys) mingw [e.g. native] +# cygwin mingw +# *nix + wine mingw +# where wine is equipped with the `winepath' executable. +# In the native mingw case, the (msys) shell automatically +# converts paths for any non-msys applications it launches, +# but that facility isn't available from inside the cwrapper. +# Similar accommodations are necessary for $host mingw and +# $build cygwin. Calling this function does no harm for other +# $host/$build combinations not listed above. +# +# ARG is the path (on $build) that should be converted to +# the proper representation for $host. The result is stored +# in $func_to_host_path_result. +func_to_host_path () +{ + func_to_host_path_result="$1" + if test -n "$1" ; then + case $host in + *mingw* ) + lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + case $build in + *mingw* ) # actually, msys + # awkward: cmd appends spaces to result + lt_sed_strip_trailing_spaces="s/[ ]*\$//" + func_to_host_path_tmp1=`( cmd //c echo "$1" |\ + $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + *cygwin* ) + func_to_host_path_tmp1=`cygpath -w "$1"` + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + * ) + # Unfortunately, winepath does not exit with a non-zero + # error code, so we are forced to check the contents of + # stdout. On the other hand, if the command is not + # found, the shell will set an exit code of 127 and print + # *an error message* to stdout. So we must check for both + # error code of zero AND non-empty stdout, which explains + # the odd construction: + func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` + if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + else + # Allow warning below. + func_to_host_path_result="" + fi + ;; + esac + if test -z "$func_to_host_path_result" ; then + func_error "Could not determine host path corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_path_result="$1" + fi + ;; + esac + fi +} +# end: func_to_host_path - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac +# func_to_host_pathlist arg +# +# Convert pathlists to host format when used with build tools. +# See func_to_host_path(), above. This function supports the +# following $build/$host combinations (but does no harm for +# combinations not listed here): +# $build $host +# mingw (msys) mingw [e.g. native] +# cygwin mingw +# *nix + wine mingw +# +# Path separators are also converted from $build format to +# $host format. If ARG begins or ends with a path separator +# character, it is preserved (but converted to $host format) +# on output. +# +# ARG is a pathlist (on $build) that should be converted to +# the proper representation on $host. The result is stored +# in $func_to_host_pathlist_result. +func_to_host_pathlist () +{ + func_to_host_pathlist_result="$1" + if test -n "$1" ; then + case $host in + *mingw* ) + lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_to_host_pathlist_tmp2="$1" + # Once set for this call, this variable should not be + # reassigned. It is used in tha fallback case. + func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e 's|^:*||' -e 's|:*$||'` + case $build in + *mingw* ) # Actually, msys. + # Awkward: cmd appends spaces to result. + lt_sed_strip_trailing_spaces="s/[ ]*\$//" + func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ + $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + *cygwin* ) + func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + * ) + # unfortunately, winepath doesn't convert pathlists + func_to_host_pathlist_result="" + func_to_host_pathlist_oldIFS=$IFS + IFS=: + for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do + IFS=$func_to_host_pathlist_oldIFS + if test -n "$func_to_host_pathlist_f" ; then + func_to_host_path "$func_to_host_pathlist_f" + if test -n "$func_to_host_path_result" ; then + if test -z "$func_to_host_pathlist_result" ; then + func_to_host_pathlist_result="$func_to_host_path_result" + else + func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" + fi + fi + fi + IFS=: + done + IFS=$func_to_host_pathlist_oldIFS + ;; + esac + if test -z "$func_to_host_pathlist_result" ; then + func_error "Could not determine the host path(s) corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This may break if $1 contains DOS-style drive + # specifications. The fix is not to complicate the expression + # below, but for the user to provide a working wine installation + # with winepath so that path translation in the cross-to-mingw + # case works properly. + lt_replace_pathsep_nix_to_dos="s|:|;|g" + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ + $SED -e "$lt_replace_pathsep_nix_to_dos"` + fi + # Now, add the leading and trailing path separators back + case "$1" in + :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" + ;; + esac + case "$1" in + *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" + ;; + esac + ;; + esac + fi +} +# end: func_to_host_pathlist - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat <&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - fi +/* $cwrappersource - temporary wrapper executable for $objdir/$outputname + Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; + The $output program cannot be directly executed until all the libtool + libraries that it depends on are installed. - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; + This wrapper executable should never be moved out of the build directory. + If it is, it will not operate correctly. - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; + Currently, it simply execs the wrapper *script* "$SHELL $output", + but could eventually absorb all of the scripts functionality and + exec $objdir/$outputname directly. +*/ +EOF + cat <<"EOF" +#include +#include +#ifdef _MSC_VER +# include +# include +# include +# define setmode _setmode +#else +# include +# include +# ifdef __CYGWIN__ +# include +# define HAVE_SETENV +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include - freebsd-elf) - major=".$current" - versuffix=".$current"; - ;; +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - major=`expr $current - $age` - else - major=`expr $current - $age + 1` - fi - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif - # 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 +#ifdef _MSC_VER +# define S_IXUSR _S_IEXEC +# define stat _stat +# ifndef _INTPTR_T_DEFINED +# define intptr_t int +# endif +#endif - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif - linux) - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - ;; +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif - osf) - major=.`expr $current - $age` - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" +#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 */ - # 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 +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; +#ifdef __CYGWIN__ +# define FOPEN_WB "wb" +#endif - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - major=`expr $current - $age` - versuffix="-$major" - ;; +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) - *) - $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 +#undef LTWRAPPER_DEBUGPRINTF +#if defined DEBUGWRAPPER +# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args +static void +ltwrapper_debugprintf (const char *fmt, ...) +{ + va_list args; + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); +} +#else +# define LTWRAPPER_DEBUGPRINTF(args) +#endif - # 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 +const char *program_name = NULL; - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_fatal (const char *message, ...); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_opt_process_env_set (const char *arg); +void lt_opt_process_env_prepend (const char *arg); +void lt_opt_process_env_append (const char *arg); +int lt_split_name_value (const char *arg, char** name, char** value); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); + +static const char *script_text_part1 = +EOF - # 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 + func_emit_wrapper_part1 yes | + $SED -e 's/\([\\"]\)/\\\1/g' \ + -e 's/^/ "/' -e 's/$/\\n"/' + echo ";" + cat </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 +static const char *script_text_part2 = +EOF + func_emit_wrapper_part2 yes | + $SED -e 's/\([\\"]\)/\\\1/g' \ + -e 's/^/ "/' -e 's/$/\\n"/' + echo ";" + + cat <"))); + for (i = 0; i < newargc; i++) + { + LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); + } - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $rm conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null \ - | grep " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for file magic test)" - else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a file magic. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - for a_deplib in $deplibs; do - name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval \\$echo \"$libname_spec\"` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval $echo \"$potent_lib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a regex pattern. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ - -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` - done - fi - if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ - | grep . >/dev/null; then - $echo - if test "X$deplibs_check_method" = "Xnone"; then - $echo "*** Warning: inter-library dependencies are not supported in this platform." - else - $echo "*** Warning: inter-library dependencies are not known to be supported." - fi - $echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $echo - $echo "*** Warning: libtool could not satisfy all declared inter-library" - $echo "*** dependencies of module $libname. Therefore, libtool will create" - $echo "*** a static module, that should work as long as the dlopening" - $echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $echo "*** The inter-library dependencies that have been dropped here will be" - $echo "*** automatically added whenever a program is linked with this library" - $echo "*** or is declared to -dlopen it." + case $host_os in + mingw*) + cat <<"EOF" + /* execv doesn't actually work on mingw as expected on unix */ + rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); + if (rval == -1) + { + /* failed to start process */ + LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); + return 127; + } + return rval; +EOF + ;; + *) + cat <<"EOF" + execv (lt_argv_zero, newargz); + return rval; /* =127, but avoids unused variable warning */ +EOF + ;; + esac - 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 + cat <<"EOF" +} +void * +xmalloc (size_t num) +{ + void *p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" + return p; +} +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), + string) : NULL; +} - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= +const char * +base_name (const char *name) +{ + const char *base; - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - case $archive_cmds in - *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; - *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; - esac - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char) name[0]) && name[1] == ':') + name += 2; +#endif - 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 + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} - # 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 +int +check_executable (const char *path) +{ + struct stat st; - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi + LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", + path ? (*path ? path : "EMPTY!") : "NULL!")); + if ((!path) || (!*path)) + return 0; - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done + if ((stat (path, &st) >= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - if len=`expr "X$cmd" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - $show "$cmd" - $run eval "$cmd" || exit $? - skipped_export=false - else - # The command line is too long to execute in one step. - $show "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex"; then - $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" - $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$mv \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$mv "${export_symbols}T" "$export_symbols"' - fi - fi - fi + LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", + path ? (*path ? path : "EMPTY!") : "NULL!")); + if ((!path) || (!*path)) + return 0; - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' - fi + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char *concat_name; - 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" + LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", + wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); - 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 + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; - # 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 + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif - # 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 + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); - if test "X$skipped_export" != "X:" && - len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise. - $echo "creating reloadable object files..." + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$echo "X$output" | $Xsed -e "$basename"` +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", + tmp_pathspec)); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - delfiles= - last_robj= - k=1 - output=$output_objdir/$output_la-${k}.$objext - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" - if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; }; then - objlist="$objlist $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - k=`expr $k + 1` - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - len=1 - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - - if ${skipped_export-false}; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - libobjs=$output - # Append the command to create the export file. - eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" - fi - - # Set up a command to remove the reloadable object files - # after they are used. - i=0 - while test "$i" -lt "$k" - do - i=`expr $i + 1` - delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" - done + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + char *errstr = strerror (errno); + lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); + } + } + XFREE (tmp_pathspec); - $echo "creating a temporary reloadable object file: $output" + if (!has_symlinks) + { + return xstrdup (pathspec); + } - # 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" + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal ("Could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} - libobjs=$output - # Restore the value of output. - output=$save_output +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; - 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. + assert (str != NULL); + assert (pat != NULL); - # 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 + len = strlen (str); + patlen = strlen (pat); - # Append the command to remove the reloadable object files - # to the just-reset $cmds. - eval cmds=\"\$cmds~\$rm $delfiles\" - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? + if (patlen <= len) + { + str += len - patlen; + if (strcmp (str, pat) == 0) + *str = '\0'; + } + return str; +} - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi +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"); - exit $lt_exit - } - done - IFS="$save_ifs" + if (exit_status >= 0) + exit (exit_status); +} - # 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 $? +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - fi - fi +void +lt_setenv (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", + (name ? name : ""), + (value ? value : ""))); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + int len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} - exit $EXIT_SUCCESS - fi +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + int orig_value_len = strlen (orig_value); + int add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} - # 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 +int +lt_split_name_value (const char *arg, char** name, char** value) +{ + const char *p; + int len; + if (!arg || !*arg) + return 1; - # 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 - ;; + p = strchr (arg, (int)'='); - obj) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 - fi + if (!p) + return 1; - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 - fi + *value = xstrdup (++p); - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 - fi + len = strlen (arg) - strlen (*value); + *name = XMALLOC (char, len); + strncpy (*name, arg, len-1); + (*name)[len - 1] = '\0'; - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 - fi + return 0; +} - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 - fi +void +lt_opt_process_env_set (const char *arg) +{ + char *name = NULL; + char *value = NULL; - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 - fi + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); + } - 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 + lt_setenv (name, value); + XFREE (name); + XFREE (value); +} - # Delete the old objects. - $run $rm $obj $libobj +void +lt_opt_process_env_prepend (const char *arg) +{ + char *name = NULL; + char *value = NULL; + char *new_value = NULL; - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); + } - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" + new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + XFREE (name); + XFREE (value); +} - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi +void +lt_opt_process_env_append (const char *arg) +{ + char *name = NULL; + char *value = NULL; + char *new_value = NULL; - # 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 + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); + } - 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" + new_value = lt_extend_str (getenv (name), value, 1); + lt_setenv (name, new_value); + XFREE (new_value); + XFREE (name); + XFREE (value); +} - # 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 +void +lt_update_exe_path (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + (name ? name : ""), + (value ? value : ""))); - exit $EXIT_SUCCESS - fi + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + int len = strlen (new_value); + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[len-1] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi +void +lt_update_lib_path (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + (name ? name : ""), + (value ? value : ""))); - # 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 (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} - 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 +EOF +} +# end: func_emit_cwrapperexe_src - exit $EXIT_SUCCESS - ;; +# func_mode_link arg... +func_mode_link () +{ + $opt_debug + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no - 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 + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll which has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 - fi + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= - 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 + avoid_version=no + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=no + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module="${wl}-single_module" + func_infer_tag $base_compile - 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 /'` + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break ;; esac + done - 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 + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" ;; - *) new_libs="$new_libs $deplib" ;; esac - done - compile_deplibs="$new_libs" - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes else - # 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 + dlself=needless + export_dynamic=yes fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; 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" - ;; + expsyms) + export_symbols="$arg" + test -f "$arg" \ + || func_fatal_error "symbol file \`$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) deplibs="$deplibs $qarg.ltframework" # this is fixed later + ;; 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 + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. - if test -n "$dlsyms"; then - case $dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${outputname}.nm" + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= - $show "$rm $nlist ${nlist}S ${nlist}T" - $run $rm "$nlist" "${nlist}S" "${nlist}T" + # Read the .lo file + func_source "$arg" - # Parse the name list into a source file. - $show "creating $output_objdir/$dlsyms" + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi - test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ -/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" -#ifdef __cplusplus -extern \"C\" { -#endif + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" -/* Prevent the only kind of declaration conflicts we can make. */ -#define lt_preloaded_symbols some_other_symbol + 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 -/* External symbol declarations for the compiler. */\ -" + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi - if test "$dlself" = yes; then - $show "generating symbol list for \`$output'" + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi - test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" + # 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" - # 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'" + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi done - - if test -n "$exclude_expsyms"; then - $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - if test -n "$export_symbols_regex"; then - $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $run $rm $export_symbols - $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - else - $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - fi + else + func_fatal_error "link input file \`$arg' does not exist" fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" - name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` - $run eval '$echo ": $name " >> "$nlist"' - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -z "$run"; then - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $mv "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if grep -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - grep -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' - else - $echo '/* NONE */' >> "$output_objdir/$dlsyms" - fi - - $echo >> "$output_objdir/$dlsyms" "\ - -#undef lt_preloaded_symbols - -#if defined (__STDC__) && __STDC__ -# define lt_ptr void * -#else -# define lt_ptr char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -" - - case $host in - *cygwin* | *mingw* ) - $echo >> "$output_objdir/$dlsyms" "\ -/* DATA imports from DLLs on WIN32 can't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs */ -struct { -" - ;; - * ) - $echo >> "$output_objdir/$dlsyms" "\ -const struct { -" - ;; - esac - - - $echo >> "$output_objdir/$dlsyms" "\ - const char *name; - lt_ptr address; -} -lt_preloaded_symbols[] = -{\ -" - - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - fi - - pic_flag_for_symtable= - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; - esac;; - *-*-hpux*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag";; - esac + arg=$save_arg + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; esac - - # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. - case $host in - *cygwin* | *mingw* ) - if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - else - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - fi - ;; - * ) - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - ;; - esac + 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 + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + weak) + weak_libs="$weak_libs $arg" + prev= + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue ;; *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit $EXIT_FAILURE + eval "$prev=\"\$arg\"" + prev= + continue ;; esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - fi - - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` - link_command="$compile_command$compile_rpath" + fi # test -n "$prev" - # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" - exit_status=$? + prevarg="$arg" - # Delete the generated files. - if test -n "$dlsyms"; then - $show "$rm $output_objdir/${outputname}S.${objext}" - $run $rm "$output_objdir/${outputname}S.${objext}" + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" fi + continue + ;; - exit $exit_status - fi - - if test -n "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) - # Absolute path. - rpath="$rpath$dir:" - ;; - *) - # Relative path: add a thisdir entry. - rpath="$rpath\$thisdir/$dir:" - ;; - esac - done - temp_rpath="$rpath" - fi + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "\`-allow-undefined' must not be used because it is the default" + ;; - 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 + -avoid-version) + avoid_version=yes + continue + ;; - 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 + -dlopen) + prev=dlfiles + continue + ;; - 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 + -dlpreopen) + prev=dlprefiles + continue + ;; - 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" + -export-dynamic) + export_dynamic=yes + continue + ;; - $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 - $echo "$modename: \`$output' will be relinked during installation" 1>&2 - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` - else - # fast_install is set to needless - relink_command= - fi + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" + prev=expsyms_regex fi - fi - - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + continue + ;; - # Delete the old output files. - $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + -framework) + prev=framework + continue + ;; - $show "$link_command" - $run eval "$link_command" || exit $? + -inst-prefix-dir) + prev=inst_prefix + continue + ;; - # Now create the wrapper script. - $show "creating $output" + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; - # 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" + -L*) + func_stripname '-L' '' "$arg" + dir=$func_stripname_result + if test -z "$dir"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" + func_fatal_error "need path for \`-L' option" fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` - fi - - # Quote $echo for shipping. - if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + fi + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of \`$dir'" + dir="$absdir" + ;; esac - 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$,,'` ;; + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; esac - # test for cygwin because mv fails w/o .exe extensions case $host in - *cygwin*) - exeext=.exe - outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; - *) exeext= ;; + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; esac - case $host in - *cygwin* | *mingw* ) - output_name=`basename $output` - output_path=`dirname $output` - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $rm $cwrappersource $cwrapper - trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - cat > $cwrappersource <> $cwrappersource<<"EOF" -#include -#include -#include -#include -#include -#include -#include -#include -#include + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; + esac + continue + ;; -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif + -multi_module) + single_module="${wl}-multi_module" + continue + ;; -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif + -no-fast-install) + fast_install=no + continue + ;; -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" + func_warning "assuming \`-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; -#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 */ + -no-undefined) + allow_undefined=no + continue + ;; -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ + -objectlist) + prev=objectlist + continue + ;; -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) + -o) prev=output ;; -/* -DDEBUG is fairly common in CFLAGS. */ -#undef DEBUG -#if defined DEBUGWRAPPER -# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) -#else -# define DEBUG(format, ...) -#endif + -precious-files-regex) + prev=precious_regex + continue + ;; -const char *program_name = NULL; + -release) + prev=release + continue + ;; -void * xmalloc (size_t num); -char * xstrdup (const char *string); -const char * base_name (const char *name); -char * find_executable(const char *wrapper); -int check_executable(const char *path); -char * strendzap(char *str, const char *pat); -void lt_fatal (const char *message, ...); + -rpath) + prev=rpath + continue + ;; -int -main (int argc, char *argv[]) -{ - char **newargz; - int i; + -R) + prev=xrpath + continue + ;; - program_name = (char *) xstrdup (base_name (argv[0])); - DEBUG("(main) argv[0] : %s\n",argv[0]); - DEBUG("(main) program_name : %s\n",program_name); - newargz = XMALLOC(char *, argc+2); -EOF + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; - cat >> $cwrappersource <> $cwrappersource <<"EOF" - newargz[1] = find_executable(argv[0]); - if (newargz[1] == NULL) - lt_fatal("Couldn't find %s", argv[0]); - DEBUG("(main) found exe at : %s\n",newargz[1]); - /* we know the script has the same name, without the .exe */ - /* so make sure newargz[1] doesn't end in .exe */ - strendzap(newargz[1],".exe"); - for (i = 1; i < argc; i++) - newargz[i+1] = xstrdup(argv[i]); - newargz[argc+1] = NULL; + -shrext) + prev=shrext + continue + ;; - for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" - return 127; -} + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; -void * -xmalloc (size_t num) -{ - void * p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); + -weak) + prev=weak + continue + ;; - return p; -} + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + arg="$arg $wl$func_quote_for_eval_result" + compiler_flags="$compiler_flags $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL -; -} + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + arg="$arg $wl$func_quote_for_eval_result" + compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" + linker_flags="$linker_flags $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; -const char * -base_name (const char *name) -{ - const char *base; + -Xcompiler) + prev=xcompiler + continue + ;; -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char)name[0]) && name[1] == ':') - name += 2; -#endif + -Xlinker) + prev=xlinker + continue + ;; - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} + -XCClinker) + prev=xcclinker + continue + ;; -int -check_executable(const char * path) -{ - struct stat st; + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; - DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); - if ((!path) || (!*path)) - return 0; + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -F/path gives path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" + func_append finalize_command " $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; - if ((stat (path, &st) >= 0) && - ( - /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ -#if defined (S_IXOTH) - ((st.st_mode & S_IXOTH) == S_IXOTH) || -#endif -#if defined (S_IXGRP) - ((st.st_mode & S_IXGRP) == S_IXGRP) || -#endif - ((st.st_mode & S_IXUSR) == S_IXUSR)) - ) - return 1; - else - return 0; -} + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise */ -char * -find_executable (const char* wrapper) -{ - int has_slash = 0; - const char* p; - const char* p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char* concat_name; + *.$objext) + # A standard object. + objs="$objs $arg" + ;; - DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); + *.lo) + # A libtool-controlled object. - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif + # Read the .lo file + func_source "$arg" - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char* path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char* q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR(*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - return NULL; -} + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" -char * -strendzap(char *str, const char *pat) -{ - size_t len, patlen; + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" - assert(str != NULL); - assert(pat != NULL); + 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 - len = strlen(str); - patlen = strlen(pat); + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi - if (patlen <= len) - { - str += len - patlen; - if (strcmp(str, pat) == 0) - *str = '\0'; - } - return str; -} + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi -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"); + # 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" - if (exit_status >= 0) - exit (exit_status); -} + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + ;; -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} -EOF - # we should really use a build-platform specific compiler - # here, but OTOH, the wrappers (shell script and this C one) - # are only useful if you want to execute the "real" binary. - # Since the "real" binary is built for $host, then this - # wrapper might as well be built for $host, too. - $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource - ;; - esac - $rm $output - trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; - $echo > $output "\ -#! $SHELL + *.la) + # A libtool-controlled library. -# $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. + 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 + ;; -# 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' + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + esac # arg -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop -# 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 + test -n "$prev" && \ + func_fatal_help "the \`$prevarg' option requires an argument" -relink_command=\"$relink_command\" + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi -# 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! - : + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname="$func_basename_result" + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else - # Restart under the correct shell, and then maybe \$echo will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + shlib_search_path= fi - fi\ -" - $echo >> $output "\ + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - # Find the directory that this script lives in. - thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" + # Create the object directory. + func_mkdir_p "$output_objdir" - # 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%/[^/]*\$%%'\` + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_duplicate_deps ; 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 $opt_duplicate_compiler_generated_deps; 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 dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test "$linkmode,$pass" = "lib,link"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs="$tmp_deplibs" + fi + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test "$linkmode,$pass" = "lib,dlpreopen"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + case $lib in + *.la) func_source "$lib" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` + case " $weak_libs " in + *" $deplib_base "*) ;; + *) deplibs="$deplibs $deplib" ;; + esac + done + done + libs="$dlprefiles" + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags="$compiler_flags $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + func_warning "\`-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test "$linkmode" = lib; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + *.ltframework) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + *) + func_warning "\`-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + func_stripname '-R' '' "$deplib" + dir=$func_stripname_result + # 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) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + $ECHO + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because the file extensions .$libext of this argument makes me believe" + $ECHO "*** that it is just a static archive that I should not use here." + else + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + ;; + esac + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + 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 + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" + fi + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "\`$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && 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 + func_fatal_error "cannot find name of link library for \`$lib'" + 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" + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" + fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + 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 + func_fatal_error "cannot find name of link library for \`$lib'" + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + 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 + func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir="$ladir" + fi + ;; + esac + func_basename "$lib" + laname="$func_basename_result" + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + fi + # 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" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + dlpreconveniencelibs="$dlpreconveniencelibs $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*) func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath:" in + *"$absdir:"*) ;; + *) temp_rpath="$temp_rpath$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + notinst_deplibs="$notinst_deplibs $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule="" + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule="$dlpremoduletest" + break + fi + done + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + $ECHO + if test "$linkmode" = prog; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) 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 + shift + realname="$1" + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + func_basename "$soroot" + soname="$func_basename_result" + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from \`$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for \`$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we can not + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null ; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $ECHO + $ECHO "*** And there doesn't seem to be a static archive available" + $ECHO "*** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + elif test -n "$old_library"; then + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$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 + func_fatal_configuration "unsupported hardcode properties" + 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 && + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + $ECHO + $ECHO "*** Warning: This system can not link to static lib archive $lib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + $ECHO "*** But as you try to build a module library, libtool will still create " + $ECHO "*** a static module, that should work as long as the dlopening application" + $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + $ECHO + $ECHO "*** However, this would only work if libtool was able to extract symbol" + $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" + $ECHO "*** not find such a program. So, this module is probably useless." + $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + 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 $opt_duplicate_deps ; 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) + func_dirname "$deplib" "" "." + dir="$func_dirname_result" + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of \`$dir'" + absdir="$dir" + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl" ; then + depdepl="$absdir/$objdir/$depdepl" + darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" + path= + fi + fi + ;; + *) + path="-L$absdir/$objdir" + ;; + esac + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "\`$deplib' seems to be moved" + + path="-L$absdir" + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test "$pass" = link; then + if test "$linkmode" = "prog"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) 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" + fi + if test "$linkmode" = prog || test "$linkmode" = lib; then + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "\`-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "\`-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test "$module" = no && \ + func_fatal_help "libtool library \`$output' must begin with \`lib'" + + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + else + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + test "$dlself" != no && \ + func_warning "\`-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test "$#" -gt 1 && \ + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "\`-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + shift + IFS="$save_ifs" + + test -n "$7" && \ + func_fatal_help "too many parameters to \`-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$1" + number_minor="$2" + number_revision="$3" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + esac + ;; + no) + current="$1" + revision="$2" + age="$3" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT \`$current' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION \`$revision' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE \`$age' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE \`$age' is greater than the current interface number \`$current'" + func_fatal_error "\`$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current" + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + qnx) + major=".$current" + versuffix=".$current" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + + *) + func_fatal_configuration "unknown library version type \`$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + func_warning "undefined symbols not allowed in $host shared libraries" + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + fi + + func_generate_dlsyms "$libname" "$libname" "yes" + libobjs="$libobjs $symfileobj" + test "X$libobjs" = "X " && libobjs= + + 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 | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + removelist="$removelist $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + 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 "X$lib_search_path " | $Xsed -e "s% $path % %g"` + # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` + # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -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* | *-cegcc*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + 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. + $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 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 + ;; + *) + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + 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 \"X$potent_lib\"" 2>/dev/null | $Xsed -e 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 + ;; + *) + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + ;; + esac + 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" | $Xsed -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 with the System framework + newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + $ECHO + $ECHO "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + $ECHO "*** a static module, that should work as long as the dlopening" + $ECHO "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + $ECHO + $ECHO "*** However, this would only work if libtool was able to extract symbol" + $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" + $ECHO "*** not find such a program. So, this module is probably useless." + $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + $ECHO "*** The inter-library dependencies that have been dropped here will be" + $ECHO "*** automatically added whenever a program is linked with this library" + $ECHO "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + $ECHO + $ECHO "*** Since this library must not contain undefined symbols," + $ECHO "*** because either the platform does not support them or" + $ECHO "*** it was explicitly requested with -no-undefined," + $ECHO "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + 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 - # 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 + 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 - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname="$1" + shift - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi - if test "$fast_install" = yes; then - $echo >> $output "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" + lib="$output_objdir/$realname" + linknames= + for link + do + linknames="$linknames $link" + done - if test ! -f \"\$progdir/\$program\" || \\ - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= - file=\"\$\$-\$program\" + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols="$output_objdir/$libname.uexp" + delfiles="$delfiles $export_symbols" + fi - if test ! -d \"\$progdir\"; then - $mkdir \"\$progdir\" - else - $rm \"\$progdir/\$file\" - fi" + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols="$export_symbols" + export_symbols= + always_export_symbols=yes + fi + fi + ;; + esac - $echo >> $output "\ + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + func_len " $cmd" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi - # 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 + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + 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\" -" + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi - $echo >> $output "\ + 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 -f \"\$progdir/\$program\"; then" + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test "$compiler_needs_object" = yes && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" - # 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\" + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi - # 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/::*\$//'\` + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi - export $shlibpath_var -" + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? 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 -" + # 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 - $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+\"\$@\"} -" - ;; + if test "X$skipped_export" != "X:" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. - *) - $echo >> $output "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \$*\" - exit $EXIT_FAILURE - fi - else - # The program doesn't exist. - \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$echo \"This script is just a wrapper for \$program.\" 1>&2 - $echo \"See the $PACKAGE documentation for more information.\" 1>&2 - exit $EXIT_FAILURE - fi -fi\ -" - chmod +x $output - fi - exit $EXIT_SUCCESS - ;; - esac + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + output_la=`$ECHO "X$output" | $Xsed -e "$basename"` - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 - 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 "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then + output=${output_objdir}/${output_la}.lnkscript + func_verbose "creating GNU ld script: $output" + $ECHO 'INPUT (' > $output + for obj in $save_libobjs + do + $ECHO "$obj" >> $output + done + $ECHO ')' >> $output + delfiles="$delfiles $output" + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then + output=${output_objdir}/${output_la}.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test "$compiler_needs_object" = yes; then + firstobj="$1 " + shift + fi + for obj + do + $ECHO "$obj" >> $output + done + delfiles="$delfiles $output" + output=$firstobj\"$file_list_spec$output\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-${k}.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test "X$objlist" = X || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + 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~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + if test -n "$last_robj"; then + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + fi + delfiles="$delfiles $output" - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + else + output= + fi + + if ${skipped_export-false}; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + fi - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - $echo "X$obj" | $Xsed -e 's%^.*/%%' - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "copying selected object files to avoid basename conflicts..." + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi - if test -z "$gentop"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + exit $lt_exit + } + done + IFS="$save_ifs" - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$gentop"; then - exit $exit_status + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - counter=`expr $counter + 1` - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - $run ln "$obj" "$gentop/$newobj" || - $run cp "$obj" "$gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi + if ${skipped_export-false}; then + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + fi - eval cmds=\"$old_archive_cmds\" + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + fi - 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 + libobjs=$output + # Restore the value of output. + output=$save_output - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - for obj in $save_oldobjs - do - oldobjs="$objlist $obj" - objlist="$objlist $obj" - eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; then - : + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds else - # 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= + cmds=$module_cmds 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\" + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi 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 + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - $show "creating $output" + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" - # 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" + func_extract_archives $gentop $dlprefiles + libobjs="$libobjs $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? - # 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 + # Restore the uninstalled library and exit + if test "$mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - for lib in $dlfiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlfiles="$newdlfiles $libdir/$name" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlprefiles="$newdlprefiles $libdir/$name" - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $rm $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $echo > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' -# Version information for $libname. -current=$current -age=$age -revision=$revision + exit $lt_exit + } + done + IFS="$save_ifs" -# Is this an already installed library? -installed=$installed + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? -# Should we warn about portability when linking against -modules? -shouldnotlink=$module + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' + exit $EXIT_SUCCESS + fi -# 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\"" + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done - 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 $? + # 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 ;; - esac - exit $EXIT_SUCCESS - ;; - # libtool install mode - install) - modename="$modename: install" + obj) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for objects" + fi - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $echo "X$nonopt" | grep shtool > /dev/null; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for objects" ;; 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" + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for objects" - # 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 + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for objects" - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) prev=$arg ;; - -s) - stripme=" -s" - continue - ;; - -*) + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "\`-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object \`$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result ;; *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi + libobj= + obj="$output" ;; 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 + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + generated="$generated $gentop" - 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 + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi fi - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - # Strip any trailing slash from the destination. - dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + # 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 - # 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%^.*/%%'` + output="$obj" + func_execute_cmds "$reload_cmds" 'exit $?' - # 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 + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS fi - 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 + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS ;; - esac - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for programs" - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do + test -n "$release" && \ + func_warning "\`-release' is ignored for programs" - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" + test "$preload" = yes \ + && test "$dlopen_support" = unknown \ + && test "$dlopen_self" = unknown \ + && test "$dlopen_self_static" = unknown && \ + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; + esac - *.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 + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + ;; + esac fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac - 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" ;; + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; esac - fi + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" - 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\$%%"` + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" - # 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 "$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 - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` + # 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 - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` + 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* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" - $echo "$modename: warning: relinking \`$file'" 1>&2 - $show "$relink_command" - if $run eval "$relink_command"; then : + 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 - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - exit $EXIT_FAILURE + 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" - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift + 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 - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - # 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 + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - if test "$linkname" != "$realname"; then - $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - fi - done - fi + wrappers_required=yes + case $host in + *cygwin* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + *cegcc) + # Disable wrappers for cegcc, we are cross compiling anyway. + wrappers_required=no + ;; + *) + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + esac + if test "$wrappers_required" = no; then + # Replace the output file specification. + compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" - # Do each command in the postinstall commands. - lib="$destdir/$realname" - cmds=$postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' - exit $lt_exit - } - done - IFS="$save_ifs" + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' 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" - ;; + exit $exit_status + fi - *.lo) - # Install (i.e. copy) a libtool object. + 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 - # 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" + 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 - - # 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 $? + 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 - # 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 + 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. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' exit $EXIT_SUCCESS - ;; + fi - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "\`$output' will be relinked during installation" + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$ECHO "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 - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" fi + fi - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - file=`$echo $file|${SED} 's,.exe$,,'` - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin*|*mingw*) - wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` - ;; - *) - wrapper=$file - ;; - esac - if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then - notinst_deplibs= - relink_command= - - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac + # Replace the output file specification. + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - # 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 + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - 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 + func_show_eval "$link_command" 'exit $?' - relink_command= - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac + # Now create the wrapper script. + func_verbose "creating $output" - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then - tmpdir=`func_mktempdir` - file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` - - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - ${rm}r "$tmpdir" - continue - fi - file="$outputname" - else - $echo "$modename: warning: cannot relink \`$file'" 1>&2 - fi + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" else - # Install the binary that we compiled earlier. - file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi - fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + fi - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` - ;; - esac - ;; + # 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 not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; esac - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - test -n "$outputname" && ${rm}r "$tmpdir" - ;; - esac - done + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } - for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host" ; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - # Set up the ranlib parameters. - oldlib="$destdir/$name" + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do - if test -n "$stripme" && test -n "$old_striplib"; then - $show "$old_striplib $oldlib" - $run eval "$old_striplib $oldlib" || exit $? + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save $symfileobj" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then + oldobjs="$oldobjs $symfileobj" + fi + fi + addlibs="$old_convenience" 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 "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" - if test -n "$future_libdirs"; then - $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" + 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 - ;; + # 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 - # libtool finish mode - finish) - modename="$modename: finish" - libdirs="$nonopt" - admincmds= + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done + func_extract_archives $gentop $dlprefiles + oldobjs="$oldobjs $func_extract_archives_result" + fi - 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" + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $ECHO "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase="$func_basename_result" + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac 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 + eval cmds=\"$old_archive_cmds\" - $echo "X----------------------------------------------------------------------" | $Xsed - $echo "Libraries have been installed in:" - for libdir in $libdirs; do - $echo " $libdir" + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' done - $echo - $echo "If you ever happen to want to link against installed libraries" - $echo "in a given directory, LIBDIR, you must either use libtool, and" - $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - $echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - $echo " during execution" - fi - if test -n "$runpath_var"; then - $echo " - add LIBDIR to the \`$runpath_var' environment variable" - $echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - $echo " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $echo " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $echo - $echo "See any operating system documentation about shared libraries for" - $echo "more information, such as the ld(1) and ld.so(8) manual pages." - $echo "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS - ;; - - # libtool execute mode - execute) - modename="$modename: execute" + test -n "$generated" && \ + func_show_eval "${RM}r$generated" - # 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 + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + func_verbose "creating $output" - 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 : + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi - # Read the libtool library. - dlname= - library_names= + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlfiles="$newdlfiles $libdir/$name" + ;; + *) newdlfiles="$newdlfiles $lib" ;; + esac + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlprefiles="$newdlprefiles $libdir/$name" + ;; + esac + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + 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 | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac +# The name that we can dlopen(3). +dlname='$tdlname' - # 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 +# Names of this library. +library_names='$library_names' - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. +# The name of the static archive. +old_library='$old_library' - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE - fi - fi - ;; +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' - *.lo) - # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - ;; +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' - *) - $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 - continue - ;; - esac +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" +# Version information for $libname. +current=$current +age=$age +revision=$revision - # 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 +# Is this an already installed library? +installed=$installed - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" +# Should we warn about portability when linking against -modules? +shouldnotlink=$module - # 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 +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' - # 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 +# 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 + } - if test -z "$run"; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} - # Restore saved environment variables - for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - fi" - done +{ test "$mode" = link || test "$mode" = relink; } && + func_mode_link ${1+"$@"} - # 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" +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $opt_debug + RM="$nonopt" files= rmforce= exit_status=0 @@ -6513,30 +8202,28 @@ relink_command=\"$relink_command\"" for arg do case $arg in - -f) rm="$rm $arg"; rmforce=yes ;; - -*) rm="$rm $arg" ;; + -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 + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" rmdirs= origobjdir="$objdir" for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$file"; then - dir=. + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then objdir="$origobjdir" else objdir="$dir/$origobjdir" fi - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + func_basename "$file" + name="$func_basename_result" test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates @@ -6548,9 +8235,9 @@ relink_command=\"$relink_command\"" 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 + 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 @@ -6564,8 +8251,8 @@ relink_command=\"$relink_command\"" 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 + if func_lalib_p "$file"; then + func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do @@ -6580,39 +8267,17 @@ relink_command=\"$relink_command\"" *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. - cmds=$postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. - 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" + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; @@ -6622,20 +8287,20 @@ relink_command=\"$relink_command\"" *.lo) # Possibly a libtool object, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + if func_lalib_p "$file"; then # Read the .lo file - . $dir/$name + func_source $dir/$name # Add PIC object to the list of files to remove. - if test -n "$pic_object" \ - && test "$pic_object" != none; then + 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 + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi @@ -6646,17 +8311,26 @@ relink_command=\"$relink_command\"" noexename=$name case $file in *.exe) - file=`$echo $file|${SED} 's,.exe$,,'` - noexename=`$echo $name|${SED} 's,.exe$,,'` + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe 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 + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + rmfiles="$rmfiles $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles @@ -6671,239 +8345,38 @@ relink_command=\"$relink_command\"" fi ;; esac - $show "$rm $rmfiles" - $run $rm $rmfiles || exit_status=1 + func_show_eval "$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 + func_show_eval "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 +{ test "$mode" = uninstall || test "$mode" = clean; } && + func_mode_uninstall ${1+"$@"} - 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" +test -z "$mode" && { + help="$generic_help" + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode \`$mode'" if test -n "$exec_cmd"; then - eval exec $exec_cmd + 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. +exit $exit_status -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - -uninstall) - $echo \ -"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - -*) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; -esac - -$echo -$echo "Try \`$modename --help' for more information about other modes." - -exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting @@ -6917,14 +8390,17 @@ exit $? # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared -disable_libs=shared +build_libtool_libs=no +build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static -disable_libs=static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: +# vi:sw=2 + diff --git a/macos/src/XMLTestPrefix.h.orig b/macos/src/XMLTestPrefix.h.orig deleted file mode 100644 index 3e84255..0000000 --- a/macos/src/XMLTestPrefix.h.orig +++ /dev/null @@ -1 +0,0 @@ -int test_main(int argc, char **argv); #define main(X,Y) test_main(X,Y) \ No newline at end of file diff --git a/nanohttp.c b/nanohttp.c index 9001ae5..80e79ed 100644 --- a/nanohttp.c +++ b/nanohttp.c @@ -54,9 +54,13 @@ #ifdef HAVE_SYS_TIME_H #include #endif +#ifndef HAVE_POLL_H #ifdef HAVE_SYS_SELECT_H #include #endif +#else +#include +#endif #ifdef HAVE_STRINGS_H #include #endif @@ -146,6 +150,7 @@ typedef struct xmlNanoHTTPCtxt { int inlen; /* len of the input buffer */ int last; /* return code for last operation */ int returnValue; /* the protocol return value */ + int version; /* the protocol version */ int ContentLength; /* specified content length from HTTP header */ char *contentType; /* the MIME type for the input */ char *location; /* the new URL in case of redirect */ @@ -439,51 +444,62 @@ xmlNanoHTTPFreeCtxt(xmlNanoHTTPCtxtPtr ctxt) { */ static int -xmlNanoHTTPSend(xmlNanoHTTPCtxtPtr ctxt, const char * xmt_ptr, int outlen) { - - int total_sent = 0; +xmlNanoHTTPSend(xmlNanoHTTPCtxtPtr ctxt, const char *xmt_ptr, int outlen) +{ + int total_sent = 0; +#ifdef HAVE_POLL_H + struct pollfd p; +#else + struct timeval tv; + fd_set wfd; +#endif - if ( (ctxt->state & XML_NANO_HTTP_WRITE) && (xmt_ptr != NULL ) ) { + if ((ctxt->state & XML_NANO_HTTP_WRITE) && (xmt_ptr != NULL)) { while (total_sent < outlen) { int nsent = send(ctxt->fd, xmt_ptr + total_sent, - outlen - total_sent, 0); - if (nsent>0) + outlen - total_sent, 0); + + if (nsent > 0) total_sent += nsent; - else if ( ( nsent == -1 ) && + else if ((nsent == -1) && #if defined(EAGAIN) && EAGAIN != EWOULDBLOCK - ( socket_errno( ) != EAGAIN ) && -#endif - ( socket_errno( ) != EWOULDBLOCK ) ) { - __xmlIOErr(XML_FROM_HTTP, 0, "send failed\n"); - if ( total_sent == 0 ) - total_sent = -1; - break; - } - else { - /* - ** No data sent - ** Since non-blocking sockets are used, wait for - ** socket to be writable or default timeout prior - ** to retrying. - */ - - struct timeval tv; - fd_set wfd; - - tv.tv_sec = timeout; - tv.tv_usec = 0; - FD_ZERO( &wfd ); + (socket_errno() != EAGAIN) && +#endif + (socket_errno() != EWOULDBLOCK)) { + __xmlIOErr(XML_FROM_HTTP, 0, "send failed\n"); + if (total_sent == 0) + total_sent = -1; + break; + } else { + /* + * No data sent + * Since non-blocking sockets are used, wait for + * socket to be writable or default timeout prior + * to retrying. + */ +#ifndef HAVE_POLL_H + if (ctxt->fd > FD_SETSIZE) + return -1; + + tv.tv_sec = timeout; + tv.tv_usec = 0; + FD_ZERO(&wfd); #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4018) #endif - FD_SET( ctxt->fd, &wfd ); + FD_SET(ctxt->fd, &wfd); #ifdef _MSC_VER #pragma warning(pop) #endif - (void)select( ctxt->fd + 1, NULL, &wfd, NULL, &tv ); - } - } + (void) select(ctxt->fd + 1, NULL, &wfd, NULL, &tv); +#else + p.fd = ctxt->fd; + p.events = POLLOUT; + (void) poll(&p, 1, timeout * 1000); +#endif /* !HAVE_POLL_H */ + } + } } return total_sent; @@ -500,96 +516,117 @@ xmlNanoHTTPSend(xmlNanoHTTPCtxtPtr ctxt, const char * xmt_ptr, int outlen) { */ static int -xmlNanoHTTPRecv(xmlNanoHTTPCtxtPtr ctxt) { +xmlNanoHTTPRecv(xmlNanoHTTPCtxtPtr ctxt) +{ +#ifdef HAVE_POLL_H + struct pollfd p; +#else fd_set rfd; struct timeval tv; +#endif while (ctxt->state & XML_NANO_HTTP_READ) { - if (ctxt->in == NULL) { - ctxt->in = (char *) xmlMallocAtomic(65000 * sizeof(char)); - if (ctxt->in == NULL) { - xmlHTTPErrMemory("allocating input"); - ctxt->last = -1; - return(-1); - } - ctxt->inlen = 65000; - ctxt->inptr = ctxt->content = ctxt->inrptr = ctxt->in; - } - if (ctxt->inrptr > ctxt->in + XML_NANO_HTTP_CHUNK) { - int delta = ctxt->inrptr - ctxt->in; - int len = ctxt->inptr - ctxt->inrptr; - - memmove(ctxt->in, ctxt->inrptr, len); - ctxt->inrptr -= delta; - ctxt->content -= delta; - ctxt->inptr -= delta; - } + if (ctxt->in == NULL) { + ctxt->in = (char *) xmlMallocAtomic(65000 * sizeof(char)); + if (ctxt->in == NULL) { + xmlHTTPErrMemory("allocating input"); + ctxt->last = -1; + return (-1); + } + ctxt->inlen = 65000; + ctxt->inptr = ctxt->content = ctxt->inrptr = ctxt->in; + } + if (ctxt->inrptr > ctxt->in + XML_NANO_HTTP_CHUNK) { + int delta = ctxt->inrptr - ctxt->in; + int len = ctxt->inptr - ctxt->inrptr; + + memmove(ctxt->in, ctxt->inrptr, len); + ctxt->inrptr -= delta; + ctxt->content -= delta; + ctxt->inptr -= delta; + } if ((ctxt->in + ctxt->inlen) < (ctxt->inptr + XML_NANO_HTTP_CHUNK)) { - int d_inptr = ctxt->inptr - ctxt->in; - int d_content = ctxt->content - ctxt->in; - int d_inrptr = ctxt->inrptr - ctxt->in; - char * tmp_ptr = ctxt->in; + int d_inptr = ctxt->inptr - ctxt->in; + int d_content = ctxt->content - ctxt->in; + int d_inrptr = ctxt->inrptr - ctxt->in; + char *tmp_ptr = ctxt->in; - ctxt->inlen *= 2; + ctxt->inlen *= 2; ctxt->in = (char *) xmlRealloc(tmp_ptr, ctxt->inlen); - if (ctxt->in == NULL) { - xmlHTTPErrMemory("allocating input buffer"); - xmlFree( tmp_ptr ); - ctxt->last = -1; - return(-1); - } + if (ctxt->in == NULL) { + xmlHTTPErrMemory("allocating input buffer"); + xmlFree(tmp_ptr); + ctxt->last = -1; + return (-1); + } ctxt->inptr = ctxt->in + d_inptr; ctxt->content = ctxt->in + d_content; ctxt->inrptr = ctxt->in + d_inrptr; - } - ctxt->last = recv(ctxt->fd, ctxt->inptr, XML_NANO_HTTP_CHUNK, 0); - if (ctxt->last > 0) { - ctxt->inptr += ctxt->last; - return(ctxt->last); - } - if (ctxt->last == 0) { - return(0); - } - if (ctxt->last == -1) { - switch (socket_errno()) { - case EINPROGRESS: - case EWOULDBLOCK: + } + ctxt->last = recv(ctxt->fd, ctxt->inptr, XML_NANO_HTTP_CHUNK, 0); + if (ctxt->last > 0) { + ctxt->inptr += ctxt->last; + return (ctxt->last); + } + if (ctxt->last == 0) { + return (0); + } + if (ctxt->last == -1) { + switch (socket_errno()) { + case EINPROGRESS: + case EWOULDBLOCK: #if defined(EAGAIN) && EAGAIN != EWOULDBLOCK - case EAGAIN: + case EAGAIN: +#endif + break; + + case ECONNRESET: + case ESHUTDOWN: + return (0); + + default: + __xmlIOErr(XML_FROM_HTTP, 0, "recv failed\n"); + return (-1); + } + } +#ifdef HAVE_POLL_H + p.fd = ctxt->fd; + p.events = POLLIN; + if ((poll(&p, 1, timeout * 1000) < 1) +#if defined(EINTR) + && (errno != EINTR) #endif - break; + ) + return (0); +#else /* !HAVE_POLL_H */ + if (ctxt->fd > FD_SETSIZE) + return 0; - case ECONNRESET: - case ESHUTDOWN: - return ( 0 ); + tv.tv_sec = timeout; + tv.tv_usec = 0; + FD_ZERO(&rfd); - default: - __xmlIOErr(XML_FROM_HTTP, 0, "recv failed\n"); - return(-1); - } - } - - tv.tv_sec = timeout; - tv.tv_usec = 0; - FD_ZERO(&rfd); #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4018) #endif - FD_SET(ctxt->fd, &rfd); + + FD_SET(ctxt->fd, &rfd); + #ifdef _MSC_VER #pragma warning(pop) #endif - - if ( (select(ctxt->fd+1, &rfd, NULL, NULL, &tv)<1) + + if ((select(ctxt->fd + 1, &rfd, NULL, NULL, &tv) < 1) #if defined(EINTR) - && (errno != EINTR) + && (errno != EINTR) #endif - ) - return(0); + ) + return (0); +#endif /* !HAVE_POLL_H */ } - return(0); + return (0); } /** @@ -686,6 +723,7 @@ xmlNanoHTTPScanAnswer(xmlNanoHTTPCtxtPtr ctxt, const char *line) { } if ((*cur != 0) && (*cur != ' ') && (*cur != '\t')) return; ctxt->returnValue = ret; + ctxt->version = version; } else if (!xmlStrncasecmp(BAD_CAST line, BAD_CAST"Content-Type:", 13)) { const xmlChar *charset, *last, *mime; cur += 13; @@ -803,87 +841,96 @@ xmlNanoHTTPScanAnswer(xmlNanoHTTPCtxtPtr ctxt, const char *line) { static int xmlNanoHTTPConnectAttempt(struct sockaddr *addr) { +#ifndef HAVE_POLL_H fd_set wfd; #ifdef _WINSOCKAPI_ fd_set xfd; #endif struct timeval tv; +#else /* !HAVE_POLL_H */ + struct pollfd p; +#endif /* !HAVE_POLL_H */ int status; + int addrlen; + SOCKET s; - + #ifdef SUPPORT_IP6 if (addr->sa_family == AF_INET6) { - s = socket (PF_INET6, SOCK_STREAM, IPPROTO_TCP); - addrlen = sizeof (struct sockaddr_in6); - } - else + s = socket(PF_INET6, SOCK_STREAM, IPPROTO_TCP); + addrlen = sizeof(struct sockaddr_in6); + } else #endif { - s = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP); - addrlen = sizeof (struct sockaddr_in); + s = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); + addrlen = sizeof(struct sockaddr_in); } - if (s==-1) { + if (s == -1) { #ifdef DEBUG_HTTP - perror("socket"); + perror("socket"); #endif - __xmlIOErr(XML_FROM_HTTP, 0, "socket failed\n"); - return(-1); + __xmlIOErr(XML_FROM_HTTP, 0, "socket failed\n"); + return (-1); } - #ifdef _WINSOCKAPI_ { - u_long one = 1; + u_long one = 1; - status = ioctlsocket(s, FIONBIO, &one) == SOCKET_ERROR ? -1 : 0; + status = ioctlsocket(s, FIONBIO, &one) == SOCKET_ERROR ? -1 : 0; } #else /* _WINSOCKAPI_ */ #if defined(VMS) { - int enable = 1; - status = ioctl(s, FIONBIO, &enable); + int enable = 1; + + status = ioctl(s, FIONBIO, &enable); } #else /* VMS */ #if defined(__BEOS__) && !defined(__HAIKU__) - { - bool noblock = true; - status = setsockopt(s, SOL_SOCKET, SO_NONBLOCK, &noblock, sizeof(noblock)); - } + { + bool noblock = true; + + status = + setsockopt(s, SOL_SOCKET, SO_NONBLOCK, &noblock, + sizeof(noblock)); + } #else /* __BEOS__ */ if ((status = fcntl(s, F_GETFL, 0)) != -1) { #ifdef O_NONBLOCK - status |= O_NONBLOCK; + status |= O_NONBLOCK; #else /* O_NONBLOCK */ #ifdef F_NDELAY - status |= F_NDELAY; + status |= F_NDELAY; #endif /* F_NDELAY */ #endif /* !O_NONBLOCK */ - status = fcntl(s, F_SETFL, status); + status = fcntl(s, F_SETFL, status); } if (status < 0) { #ifdef DEBUG_HTTP - perror("nonblocking"); + perror("nonblocking"); #endif - __xmlIOErr(XML_FROM_HTTP, 0, "error setting non-blocking IO\n"); - closesocket(s); - return(-1); + __xmlIOErr(XML_FROM_HTTP, 0, "error setting non-blocking IO\n"); + closesocket(s); + return (-1); } #endif /* !__BEOS__ */ #endif /* !VMS */ #endif /* !_WINSOCKAPI_ */ - if (connect (s, addr, addrlen) == -1) { - switch (socket_errno()) { - case EINPROGRESS: - case EWOULDBLOCK: - break; - default: - __xmlIOErr(XML_FROM_HTTP, 0, "error connecting to HTTP server"); - closesocket(s); - return(-1); - } - } - + if (connect(s, addr, addrlen) == -1) { + switch (socket_errno()) { + case EINPROGRESS: + case EWOULDBLOCK: + break; + default: + __xmlIOErr(XML_FROM_HTTP, 0, + "error connecting to HTTP server"); + closesocket(s); + return (-1); + } + } +#ifndef HAVE_POLL_H tv.tv_sec = timeout; tv.tv_usec = 0; @@ -891,63 +938,80 @@ xmlNanoHTTPConnectAttempt(struct sockaddr *addr) #pragma warning(push) #pragma warning(disable: 4018) #endif + if (s > FD_SETSIZE) + return -1; FD_ZERO(&wfd); FD_SET(s, &wfd); -#ifdef _WINSOCKAPI_ +#ifdef _WINSOCKAPI_ FD_ZERO(&xfd); FD_SET(s, &xfd); - - switch(select(s+1, NULL, &wfd, &xfd, &tv)) + + switch (select(s + 1, NULL, &wfd, &xfd, &tv)) #else - switch(select(s+1, NULL, &wfd, NULL, &tv)) + switch (select(s + 1, NULL, &wfd, NULL, &tv)) #endif #ifdef _MSC_VER #pragma warning(pop) #endif + +#else /* !HAVE_POLL_H */ + p.fd = s; + p.events = POLLOUT; + switch (poll(&p, 1, timeout * 1000)) +#endif /* !HAVE_POLL_H */ + { - case 0: - /* Time out */ - __xmlIOErr(XML_FROM_HTTP, 0, "Connect attempt timed out"); - closesocket(s); - return(-1); - case -1: - /* Ermm.. ?? */ - __xmlIOErr(XML_FROM_HTTP, 0, "Connect failed"); - closesocket(s); - return(-1); + case 0: + /* Time out */ + __xmlIOErr(XML_FROM_HTTP, 0, "Connect attempt timed out"); + closesocket(s); + return (-1); + case -1: + /* Ermm.. ?? */ + __xmlIOErr(XML_FROM_HTTP, 0, "Connect failed"); + closesocket(s); + return (-1); } - if ( FD_ISSET(s, &wfd) +#ifndef HAVE_POLL_H + if (FD_ISSET(s, &wfd) #ifdef _WINSOCKAPI_ - || FD_ISSET(s, &xfd) + || FD_ISSET(s, &xfd) #endif - ) { - XML_SOCKLEN_T len; - len = sizeof(status); + ) +#else /* !HAVE_POLL_H */ + if (p.revents == POLLOUT) +#endif /* !HAVE_POLL_H */ + { + XML_SOCKLEN_T len; + + len = sizeof(status); #ifdef SO_ERROR - if (getsockopt(s, SOL_SOCKET, SO_ERROR, (char*)&status, &len) < 0 ) { - /* Solaris error code */ - __xmlIOErr(XML_FROM_HTTP, 0, "getsockopt failed\n"); - return (-1); - } -#endif - if ( status ) { - __xmlIOErr(XML_FROM_HTTP, 0, "Error connecting to remote host"); - closesocket(s); - errno = status; - return (-1); - } + if (getsockopt(s, SOL_SOCKET, SO_ERROR, (char *) &status, &len) < + 0) { + /* Solaris error code */ + __xmlIOErr(XML_FROM_HTTP, 0, "getsockopt failed\n"); + return (-1); + } +#endif + if (status) { + __xmlIOErr(XML_FROM_HTTP, 0, + "Error connecting to remote host"); + closesocket(s); + errno = status; + return (-1); + } } else { - /* pbm */ - __xmlIOErr(XML_FROM_HTTP, 0, "select failed\n"); - closesocket(s); - return (-1); + /* pbm */ + __xmlIOErr(XML_FROM_HTTP, 0, "select failed\n"); + closesocket(s); + return (-1); } - - return(s); + + return (s); } - + /** * xmlNanoHTTPConnectHost: * @host: the host name @@ -1273,7 +1337,6 @@ xmlNanoHTTPMethodRedir(const char *URL, const char *method, const char *input, xmlNanoHTTPCtxtPtr ctxt; char *bp, *p; int blen, ret; - int head; int nbRedirects = 0; char *redirURL = NULL; #ifdef DEBUG_HTTP @@ -1435,11 +1498,9 @@ retry: } ctxt->state = XML_NANO_HTTP_READ; - head = 1; while ((p = xmlNanoHTTPReadLine(ctxt)) != NULL) { - if (head && (*p == 0)) { - head = 0; + if (*p == 0) { ctxt->content = ctxt->inrptr; xmlFree(p); break; diff --git a/parser.c b/parser.c index 9db664f..e415339 100644 --- a/parser.c +++ b/parser.c @@ -83,6 +83,10 @@ static void xmlFatalErr(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *info); +static xmlParserCtxtPtr +xmlCreateEntityParserCtxtInternal(const xmlChar *URL, const xmlChar *ID, + const xmlChar *base, xmlParserCtxtPtr pctx); + /************************************************************************ * * * Arbitrary limits set in the parser. See XML_PARSE_HUGE * @@ -198,8 +202,8 @@ static const char *xmlW3CPIs[] = { /* DEPR void xmlParserHandleReference(xmlParserCtxtPtr ctxt); */ -xmlEntityPtr xmlParseStringPEReference(xmlParserCtxtPtr ctxt, - const xmlChar **str); +static xmlEntityPtr xmlParseStringPEReference(xmlParserCtxtPtr ctxt, + const xmlChar **str); static xmlParserErrors xmlParseExternalEntityPrivate(xmlDocPtr doc, xmlParserCtxtPtr oldctxt, @@ -246,14 +250,15 @@ xmlErrAttributeDup(xmlParserCtxtPtr ctxt, const xmlChar * prefix, return; if (ctxt != NULL) ctxt->errNo = XML_ERR_ATTRIBUTE_REDEFINED; + if (prefix == NULL) __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, - ctxt->errNo, XML_ERR_FATAL, NULL, 0, + XML_ERR_ATTRIBUTE_REDEFINED, XML_ERR_FATAL, NULL, 0, (const char *) localname, NULL, NULL, 0, 0, "Attribute %s redefined\n", localname); else __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, - ctxt->errNo, XML_ERR_FATAL, NULL, 0, + XML_ERR_ATTRIBUTE_REDEFINED, XML_ERR_FATAL, NULL, 0, (const char *) prefix, (const char *) localname, NULL, 0, 0, "Attribute %s:%s redefined\n", prefix, localname); @@ -489,7 +494,7 @@ xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, if (ctxt != NULL) ctxt->errNo = error; __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error, - XML_ERR_FATAL, NULL, 0, NULL, NULL, NULL, 0, 0, msg); + XML_ERR_FATAL, NULL, 0, NULL, NULL, NULL, 0, 0, "%s", msg); if (ctxt != NULL) { ctxt->wellFormed = 0; if (ctxt->recovery == 0) @@ -519,13 +524,21 @@ xmlWarningMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, if ((ctxt != NULL) && (ctxt->sax != NULL) && (ctxt->sax->initialized == XML_SAX2_MAGIC)) schannel = ctxt->sax->serror; - __xmlRaiseError(schannel, + if (ctxt != NULL) { + __xmlRaiseError(schannel, (ctxt->sax) ? ctxt->sax->warning : NULL, ctxt->userData, ctxt, NULL, XML_FROM_PARSER, error, XML_ERR_WARNING, NULL, 0, (const char *) str1, (const char *) str2, NULL, 0, 0, msg, (const char *) str1, (const char *) str2); + } else { + __xmlRaiseError(schannel, NULL, NULL, + ctxt, NULL, XML_FROM_PARSER, error, + XML_ERR_WARNING, NULL, 0, + (const char *) str1, (const char *) str2, NULL, 0, 0, + msg, (const char *) str1, (const char *) str2); + } } /** @@ -551,14 +564,20 @@ xmlValidityError(xmlParserCtxtPtr ctxt, xmlParserErrors error, if ((ctxt->sax != NULL) && (ctxt->sax->initialized == XML_SAX2_MAGIC)) schannel = ctxt->sax->serror; } - __xmlRaiseError(schannel, + if (ctxt != NULL) { + __xmlRaiseError(schannel, ctxt->vctxt.error, ctxt->vctxt.userData, ctxt, NULL, XML_FROM_DTD, error, XML_ERR_ERROR, NULL, 0, (const char *) str1, (const char *) str2, NULL, 0, 0, msg, (const char *) str1, (const char *) str2); - if (ctxt != NULL) { ctxt->valid = 0; + } else { + __xmlRaiseError(schannel, NULL, NULL, + ctxt, NULL, XML_FROM_DTD, error, + XML_ERR_ERROR, NULL, 0, (const char *) str1, + (const char *) str2, NULL, 0, 0, + msg, (const char *) str1, (const char *) str2); } } @@ -723,8 +742,6 @@ xmlNsWarn(xmlParserCtxtPtr ctxt, xmlParserErrors error, if ((ctxt != NULL) && (ctxt->disableSAX != 0) && (ctxt->instate == XML_PARSER_EOF)) return; - if (ctxt != NULL) - ctxt->errNo = error; __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error, XML_ERR_WARNING, NULL, 0, (const char *) info1, (const char *) info2, (const char *) info3, 0, 0, msg, @@ -1342,8 +1359,8 @@ xmlCheckLanguageID(const xmlChar * lang) * * ************************************************************************/ -xmlEntityPtr xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, - const xmlChar ** str); +static xmlEntityPtr xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, + const xmlChar ** str); #ifdef SAX2 /** @@ -2614,7 +2631,7 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, else c = 0; } - buffer[nbchars++] = 0; + buffer[nbchars] = 0; return(buffer); mem_error: @@ -2917,12 +2934,15 @@ xmlSplitQName(xmlParserCtxtPtr ctxt, const xmlChar *name, xmlChar **prefix) { * Routines to parse Name, NCName and NmToken * * * ************************************************************************/ -unsigned long nbParseName = 0; -unsigned long nbParseNmToken = 0; -unsigned long nbParseNCName = 0; -unsigned long nbParseNCNameComplex = 0; -unsigned long nbParseNameComplex = 0; -unsigned long nbParseStringName = 0; +#ifdef DEBUG +static unsigned long nbParseName = 0; +static unsigned long nbParseNmToken = 0; +static unsigned long nbParseNCName = 0; +static unsigned long nbParseNCNameComplex = 0; +static unsigned long nbParseNameComplex = 0; +static unsigned long nbParseStringName = 0; +#endif + /* * The two following functions are related to the change of accepted * characters for Name and NmToken in the Revision 5 of XML-1.0 @@ -3012,7 +3032,9 @@ xmlParseNameComplex(xmlParserCtxtPtr ctxt) { int c; int count = 0; +#ifdef DEBUG nbParseNameComplex++; +#endif /* * Handler for more complex cases @@ -3128,7 +3150,9 @@ xmlParseName(xmlParserCtxtPtr ctxt) { GROW; +#ifdef DEBUG nbParseName++; +#endif /* * Accelerator for simple ASCII names @@ -3165,7 +3189,9 @@ xmlParseNCNameComplex(xmlParserCtxtPtr ctxt) { int c; int count = 0; +#ifdef DEBUG nbParseNCNameComplex++; +#endif /* * Handler for more complex cases @@ -3211,7 +3237,9 @@ xmlParseNCName(xmlParserCtxtPtr ctxt) { const xmlChar *ret; int count = 0; +#ifdef DEBUG nbParseNCName++; +#endif /* * Accelerator for simple ASCII names @@ -3306,7 +3334,9 @@ xmlParseStringName(xmlParserCtxtPtr ctxt, const xmlChar** str) { int len = 0, l; int c; +#ifdef DEBUG nbParseStringName++; +#endif c = CUR_SCHAR(cur, l); if (!xmlIsNameStartChar(ctxt, c)) { @@ -3380,7 +3410,9 @@ xmlParseNmtoken(xmlParserCtxtPtr ctxt) { int c; int count = 0; +#ifdef DEBUG nbParseNmToken++; +#endif GROW; c = CUR_CHAR(l); @@ -3688,7 +3720,12 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) { if (rep != NULL) { current = rep; while (*current != 0) { /* non input consuming */ - buf[len++] = *current++; + if ((*current == 0xD) || (*current == 0xA) || + (*current == 0x9)) { + buf[len++] = 0x20; + current++; + } else + buf[len++] = *current++; if (len > buf_size - 10) { growBuffer(buf, 10); } @@ -3978,7 +4015,7 @@ xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) { return(buf); } -void xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata); +static void xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata); /* * used for the test in the inner loop of the char data testing @@ -4183,7 +4220,7 @@ get_more: * of xmlParseCharData() when the parsing requires handling * of non-ASCII characters. */ -void +static void xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata) { xmlChar buf[XML_PARSER_BIG_BUFFER_SIZE + 5]; int nbchar = 0; @@ -5306,7 +5343,8 @@ xmlParseNotationType(xmlParserCtxtPtr ctxt) { if (name == NULL) { xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED, "Name expected in NOTATION declaration\n"); - return(ret); + xmlFreeEnumeration(ret); + return(NULL); } tmp = ret; while (tmp != NULL) { @@ -5322,7 +5360,10 @@ xmlParseNotationType(xmlParserCtxtPtr ctxt) { } if (tmp == NULL) { cur = xmlCreateEnumeration(name); - if (cur == NULL) return(ret); + if (cur == NULL) { + xmlFreeEnumeration(ret); + return(NULL); + } if (last == NULL) ret = last = cur; else { last->next = cur; @@ -5333,9 +5374,8 @@ xmlParseNotationType(xmlParserCtxtPtr ctxt) { } while (RAW == '|'); if (RAW != ')') { xmlFatalErr(ctxt, XML_ERR_NOTATION_NOT_FINISHED, NULL); - if ((last != NULL) && (last != ret)) - xmlFreeEnumeration(last); - return(ret); + xmlFreeEnumeration(ret); + return(NULL); } NEXT; return(ret); @@ -5390,7 +5430,10 @@ xmlParseEnumerationType(xmlParserCtxtPtr ctxt) { cur = xmlCreateEnumeration(name); if (!xmlDictOwns(ctxt->dict, name)) xmlFree(name); - if (cur == NULL) return(ret); + if (cur == NULL) { + xmlFreeEnumeration(ret); + return(NULL); + } if (last == NULL) ret = last = cur; else { last->next = cur; @@ -5738,7 +5781,8 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt, int inputchk) { if (cur->c2 != NULL) cur->c2->parent = cur; } - ret->ocur = XML_ELEMENT_CONTENT_MULT; + if (ret != NULL) + ret->ocur = XML_ELEMENT_CONTENT_MULT; if ((ctxt->validate) && (ctxt->input->id != inputchk)) { xmlValidityError(ctxt, XML_ERR_ENTITY_BOUNDARY, "Element content declaration doesn't start and stop in the same entity\n", @@ -5758,9 +5802,10 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt, int inputchk) { } /** - * xmlParseElementChildrenContentDecl: + * xmlParseElementChildrenContentDeclPriv: * @ctxt: an XML parser context * @inputchk: the input used for the current entity, needed for boundary checks + * @depth: the level of recursion * * parse the declaration for a Mixed Element content * The leading '(' and spaces have been skipped in xmlParseElementContentDecl @@ -5788,12 +5833,20 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt, int inputchk) { * Returns the tree of xmlElementContentPtr describing the element * hierarchy. */ -xmlElementContentPtr -xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) { +static xmlElementContentPtr +xmlParseElementChildrenContentDeclPriv(xmlParserCtxtPtr ctxt, int inputchk, + int depth) { xmlElementContentPtr ret = NULL, cur = NULL, last = NULL, op = NULL; const xmlChar *elem; xmlChar type = 0; + if (((depth > 128) && ((ctxt->options & XML_PARSE_HUGE) == 0)) || + (depth > 2048)) { + xmlFatalErrMsgInt(ctxt, XML_ERR_ELEMCONTENT_NOT_FINISHED, +"xmlParseElementChildrenContentDecl : depth %d too deep, use XML_PARSE_HUGE\n", + depth); + return(NULL); + } SKIP_BLANKS; GROW; if (RAW == '(') { @@ -5802,7 +5855,8 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) { /* Recurse on first child */ NEXT; SKIP_BLANKS; - cur = ret = xmlParseElementChildrenContentDecl(ctxt, inputid); + cur = ret = xmlParseElementChildrenContentDeclPriv(ctxt, inputid, + depth + 1); SKIP_BLANKS; GROW; } else { @@ -5934,7 +5988,8 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) { /* Recurse on second child */ NEXT; SKIP_BLANKS; - last = xmlParseElementChildrenContentDecl(ctxt, inputid); + last = xmlParseElementChildrenContentDeclPriv(ctxt, inputid, + depth + 1); SKIP_BLANKS; } else { elem = xmlParseName(ctxt); @@ -6044,6 +6099,42 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) { return(ret); } +/** + * xmlParseElementChildrenContentDecl: + * @ctxt: an XML parser context + * @inputchk: the input used for the current entity, needed for boundary checks + * + * parse the declaration for a Mixed Element content + * The leading '(' and spaces have been skipped in xmlParseElementContentDecl + * + * [47] children ::= (choice | seq) ('?' | '*' | '+')? + * + * [48] cp ::= (Name | choice | seq) ('?' | '*' | '+')? + * + * [49] choice ::= '(' S? cp ( S? '|' S? cp )* S? ')' + * + * [50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')' + * + * [ VC: Proper Group/PE Nesting ] applies to [49] and [50] + * TODO Parameter-entity replacement text must be properly nested + * with parenthesized groups. That is to say, if either of the + * opening or closing parentheses in a choice, seq, or Mixed + * construct is contained in the replacement text for a parameter + * entity, both must be contained in the same replacement text. For + * interoperability, if a parameter-entity reference appears in a + * choice, seq, or Mixed construct, its replacement text should not + * be empty, and neither the first nor last non-blank character of + * the replacement text should be a connector (| or ,). + * + * Returns the tree of xmlElementContentPtr describing the element + * hierarchy. + */ +xmlElementContentPtr +xmlParseElementChildrenContentDecl(xmlParserCtxtPtr ctxt, int inputchk) { + /* stub left for API/ABI compat */ + return(xmlParseElementChildrenContentDeclPriv(ctxt, inputchk, 1)); +} + /** * xmlParseElementContentDecl: * @ctxt: an XML parser context @@ -6080,7 +6171,7 @@ xmlParseElementContentDecl(xmlParserCtxtPtr ctxt, const xmlChar *name, tree = xmlParseElementMixedContentDecl(ctxt, inputid); res = XML_ELEMENT_TYPE_MIXED; } else { - tree = xmlParseElementChildrenContentDecl(ctxt, inputid); + tree = xmlParseElementChildrenContentDeclPriv(ctxt, inputid, 1); res = XML_ELEMENT_TYPE_ELEMENT; } SKIP_BLANKS; @@ -7202,7 +7293,7 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) { * Returns the xmlEntityPtr if found, or NULL otherwise. The str pointer * is updated to the current location in the string. */ -xmlEntityPtr +static xmlEntityPtr xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) { xmlChar *name; const xmlChar *ptr; @@ -7217,7 +7308,6 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) { return(NULL); ptr++; - cur = *ptr; name = xmlParseStringName(ctxt, &ptr); if (name == NULL) { xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED, @@ -7611,7 +7701,7 @@ xmlLoadEntityContent(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) { * Returns the string of the entity content. * str is updated to the current value of the index */ -xmlEntityPtr +static xmlEntityPtr xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) { const xmlChar *ptr; xmlChar cur; @@ -7624,7 +7714,6 @@ xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) { if (cur != '%') return(NULL); ptr++; - cur = *ptr; name = xmlParseStringName(ctxt, &ptr); if (name == NULL) { xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED, @@ -8288,7 +8377,7 @@ xmlParseQName(xmlParserCtxtPtr ctxt, const xmlChar **prefix) { static const xmlChar * xmlParseQNameAndCompare(xmlParserCtxtPtr ctxt, xmlChar const *name, xmlChar const *prefix) { - const xmlChar *cmp = name; + const xmlChar *cmp; const xmlChar *in; const xmlChar *ret; const xmlChar *prefix2; @@ -8297,7 +8386,7 @@ xmlParseQNameAndCompare(xmlParserCtxtPtr ctxt, xmlChar const *name, GROW; in = ctxt->input->cur; - + cmp = prefix; while (*in != 0 && *in == *cmp) { ++in; @@ -9111,6 +9200,8 @@ xmlParseEndTag2(xmlParserCtxtPtr ctxt, const xmlChar *prefix, */ if (name != (xmlChar*)1) { if (name == NULL) name = BAD_CAST "unparseable"; + if ((line == 0) && (ctxt->node != NULL)) + line = ctxt->node->line; xmlFatalErrMsgStrIntStr(ctxt, XML_ERR_TAG_NAME_MISMATCH, "Opening and ending tag mismatch: %s line %d and %s\n", ctxt->name, line, name); @@ -9330,8 +9421,8 @@ xmlParseContent(xmlParserCtxtPtr ctxt) { void xmlParseElement(xmlParserCtxtPtr ctxt) { const xmlChar *name; - const xmlChar *prefix; - const xmlChar *URI; + const xmlChar *prefix = NULL; + const xmlChar *URI = NULL; xmlParserNodeInfo node_info; int line, tlen; xmlNodePtr ret; @@ -9930,6 +10021,12 @@ xmlParseXMLDecl(xmlParserCtxtPtr ctxt) { } xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED, "Blank needed here\n"); } + + /* + * We can grow the input buffer freely at that point + */ + GROW; + SKIP_BLANKS; ctxt->input->standalone = xmlParseSDDecl(ctxt); @@ -10032,8 +10129,9 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) { /* * Check for the XMLDecl in the Prolog. + * do not GROW here to avoid the detected encoder to decode more + * than just the first line */ - GROW; if ((CMP5(CUR_PTR, '<', '?', 'x', 'm', 'l')) && (IS_BLANK_CH(NXT(5)))) { /* @@ -10700,8 +10798,8 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { break; case XML_PARSER_START_TAG: { const xmlChar *name; - const xmlChar *prefix; - const xmlChar *URI; + const xmlChar *prefix = NULL; + const xmlChar *URI = NULL; int nsNr = ctxt->nsNr; if ((avail < 2) && (ctxt->inputNr == 1)) @@ -11415,6 +11513,7 @@ int xmlParseChunk(xmlParserCtxtPtr ctxt, const char *chunk, int size, int terminate) { int end_in_lf = 0; + int remain = 0; if (ctxt == NULL) return(XML_ERR_INTERNAL_ERROR); @@ -11427,12 +11526,41 @@ xmlParseChunk(xmlParserCtxtPtr ctxt, const char *chunk, int size, end_in_lf = 1; size--; } + +xmldecl_done: + if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) && (ctxt->input->buf != NULL) && (ctxt->instate != XML_PARSER_EOF)) { int base = ctxt->input->base - ctxt->input->buf->buffer->content; int cur = ctxt->input->cur - ctxt->input->base; int res; - + + /* + * Specific handling if we autodetected an encoding, we should not + * push more than the first line ... which depend on the encoding + * And only push the rest once the final encoding was detected + */ + if ((ctxt->instate == XML_PARSER_START) && (ctxt->input != NULL) && + (ctxt->input->buf != NULL) && (ctxt->input->buf->encoder != NULL)) { + int len = 45; + + if ((xmlStrcasestr(BAD_CAST ctxt->input->buf->encoder->name, + BAD_CAST "UTF-16")) || + (xmlStrcasestr(BAD_CAST ctxt->input->buf->encoder->name, + BAD_CAST "UTF16"))) + len = 90; + else if ((xmlStrcasestr(BAD_CAST ctxt->input->buf->encoder->name, + BAD_CAST "UCS-4")) || + (xmlStrcasestr(BAD_CAST ctxt->input->buf->encoder->name, + BAD_CAST "UCS4"))) + len = 180; + + if (ctxt->input->buf->rawconsumed < len) + len -= ctxt->input->buf->rawconsumed; + + remain = size - len; + size = len; + } res =xmlParserInputBufferPush(ctxt->input->buf, size, chunk); if (res < 0) { ctxt->errNo = XML_PARSER_EOF; @@ -11453,7 +11581,7 @@ xmlParseChunk(xmlParserCtxtPtr ctxt, const char *chunk, int size, if ((in->encoder != NULL) && (in->buffer != NULL) && (in->raw != NULL)) { int nbchars; - + nbchars = xmlCharEncInFunc(in->encoder, in->buffer, in->raw); if (nbchars < 0) { /* TODO 2.6.0 */ @@ -11464,13 +11592,23 @@ xmlParseChunk(xmlParserCtxtPtr ctxt, const char *chunk, int size, } } } - xmlParseTryOrFinish(ctxt, terminate); + if (remain != 0) + xmlParseTryOrFinish(ctxt, 0); + else + xmlParseTryOrFinish(ctxt, terminate); + if ((ctxt->errNo != XML_ERR_OK) && (ctxt->disableSAX == 1)) + return(ctxt->errNo); + + if (remain != 0) { + chunk += size; + size = remain; + remain = 0; + goto xmldecl_done; + } if ((end_in_lf == 1) && (ctxt->input != NULL) && (ctxt->input->buf != NULL)) { xmlParserInputBufferPush(ctxt->input->buf, 1, "\r"); } - if ((ctxt->errNo != XML_ERR_OK) && (ctxt->disableSAX == 1)) - return(ctxt->errNo); if (terminate) { /* * Check for termination @@ -12034,8 +12172,6 @@ xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, const xmlChar *URL, int ret = 0; xmlChar start[4]; xmlCharEncoding enc; - xmlParserInputPtr inputStream; - char *directory = NULL; if (ctx == NULL) return(-1); @@ -12051,27 +12187,11 @@ xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, const xmlChar *URL, if (ctx->myDoc == NULL) /* @@ relax but check for dereferences */ return(-1); - ctxt = xmlNewParserCtxt(); + ctxt = xmlCreateEntityParserCtxtInternal(URL, ID, NULL, ctx); if (ctxt == NULL) { return(-1); } - ctxt->userData = ctxt; - ctxt->_private = ctx->_private; - - inputStream = xmlLoadExternalEntity((char *)URL, (char *)ID, ctxt); - if (inputStream == NULL) { - xmlFreeParserCtxt(ctxt); - return(-1); - } - - inputPush(ctxt, inputStream); - - if ((ctxt->directory == NULL) && (directory == NULL)) - directory = xmlParserGetDirectory((char *)URL); - if ((ctxt->directory == NULL) && (directory != NULL)) - ctxt->directory = directory; - oldsax = ctxt->sax; ctxt->sax = ctx->sax; xmlDetectSAX2(ctxt); @@ -12264,7 +12384,7 @@ xmlParseExternalEntityPrivate(xmlDocPtr doc, xmlParserCtxtPtr oldctxt, return(XML_ERR_INTERNAL_ERROR); - ctxt = xmlCreateEntityParserCtxt(URL, ID, NULL); + ctxt = xmlCreateEntityParserCtxtInternal(URL, ID, NULL, oldctxt); if (ctxt == NULL) return(XML_WAR_UNDECLARED_ENTITY); ctxt->userData = ctxt; if (oldctxt != NULL) { @@ -12394,7 +12514,9 @@ xmlParseExternalEntityPrivate(xmlDocPtr doc, xmlParserCtxtPtr oldctxt, * Record in the parent context the number of entities replacement * done when parsing that reference. */ - oldctxt->nbentities += ctxt->nbentities; + if (oldctxt != NULL) + oldctxt->nbentities += ctxt->nbentities; + /* * Also record the size of the entity parsed */ @@ -12512,6 +12634,9 @@ xmlParseBalancedChunkMemoryInternal(xmlParserCtxtPtr oldctxt, xmlNodePtr last = NULL; int size; xmlParserErrors ret = XML_ERR_OK; +#ifdef SAX2 + int i; +#endif if (((oldctxt->depth > 40) && ((oldctxt->options & XML_PARSE_HUGE) == 0)) || (oldctxt->depth > 1024)) { @@ -12538,6 +12663,13 @@ xmlParseBalancedChunkMemoryInternal(xmlParserCtxtPtr oldctxt, ctxt->str_xmlns = xmlDictLookup(ctxt->dict, BAD_CAST "xmlns", 5); ctxt->str_xml_ns = xmlDictLookup(ctxt->dict, XML_XML_NAMESPACE, 36); +#ifdef SAX2 + /* propagate namespaces down the entity */ + for (i = 0;i < oldctxt->nsNr;i += 2) { + nsPush(ctxt, oldctxt->nsTab[i], oldctxt->nsTab[i+1]); + } +#endif + oldsax = ctxt->sax; ctxt->sax = oldctxt->sax; xmlDetectSAX2(ctxt); @@ -12643,7 +12775,9 @@ xmlParseBalancedChunkMemoryInternal(xmlParserCtxtPtr oldctxt, * Record in the parent context the number of entities replacement * done when parsing that reference. */ - oldctxt->nbentities += ctxt->nbentities; + if (oldctxt != NULL) + oldctxt->nbentities += ctxt->nbentities; + /* * Also record the last error if any */ @@ -13099,10 +13233,11 @@ xmlParseEntity(const char *filename) { #endif /* LIBXML_SAX1_ENABLED */ /** - * xmlCreateEntityParserCtxt: + * xmlCreateEntityParserCtxtInternal: * @URL: the entity URL * @ID: the entity PUBLIC ID * @base: a possible base for the target URI + * @pctx: parser context used to set options on new context * * Create a parser context for an external entity * Automatic support for ZLIB/Compress compressed document is provided @@ -13110,9 +13245,9 @@ xmlParseEntity(const char *filename) { * * Returns the new parser context or NULL */ -xmlParserCtxtPtr -xmlCreateEntityParserCtxt(const xmlChar *URL, const xmlChar *ID, - const xmlChar *base) { +static xmlParserCtxtPtr +xmlCreateEntityParserCtxtInternal(const xmlChar *URL, const xmlChar *ID, + const xmlChar *base, xmlParserCtxtPtr pctx) { xmlParserCtxtPtr ctxt; xmlParserInputPtr inputStream; char *directory = NULL; @@ -13123,6 +13258,11 @@ xmlCreateEntityParserCtxt(const xmlChar *URL, const xmlChar *ID, return(NULL); } + if (pctx != NULL) { + ctxt->options = pctx->options; + ctxt->_private = pctx->_private; + } + uri = xmlBuildURI(URL, base); if (uri == NULL) { @@ -13157,6 +13297,25 @@ xmlCreateEntityParserCtxt(const xmlChar *URL, const xmlChar *ID, return(ctxt); } +/** + * xmlCreateEntityParserCtxt: + * @URL: the entity URL + * @ID: the entity PUBLIC ID + * @base: a possible base for the target URI + * + * Create a parser context for an external entity + * Automatic support for ZLIB/Compress compressed document is provided + * by default if found at compile-time. + * + * Returns the new parser context or NULL + */ +xmlParserCtxtPtr +xmlCreateEntityParserCtxt(const xmlChar *URL, const xmlChar *ID, + const xmlChar *base) { + return xmlCreateEntityParserCtxtInternal(URL, ID, base, NULL); + +} + /************************************************************************ * * * Front ends when parsing from a file * @@ -13325,7 +13484,7 @@ xmlSAXParseFile(xmlSAXHandlerPtr sax, const char *filename, */ xmlDocPtr -xmlRecoverDoc(xmlChar *cur) { +xmlRecoverDoc(const xmlChar *cur) { return(xmlSAXParseDoc(NULL, cur, 1)); } @@ -13527,6 +13686,8 @@ xmlSAXParseMemoryWithData(xmlSAXHandlerPtr sax, const char *buffer, xmlDocPtr ret; xmlParserCtxtPtr ctxt; + xmlInitParser(); + ctxt = xmlCreateMemoryParserCtxt(buffer, size); if (ctxt == NULL) return(NULL); if (sax != NULL) { @@ -13552,7 +13713,7 @@ xmlSAXParseMemoryWithData(xmlSAXHandlerPtr sax, const char *buffer, if (sax != NULL) ctxt->sax = NULL; xmlFreeParserCtxt(ctxt); - + return(ret); } @@ -13615,14 +13776,16 @@ xmlDocPtr xmlRecoverMemory(const char *buffer, int size) { * * A better SAX parsing routine. * parse an XML in-memory buffer and call the given SAX handler routines. - * + * * Returns 0 in case of success or a error number otherwise */ int xmlSAXUserParseMemory(xmlSAXHandlerPtr sax, void *user_data, const char *buffer, int size) { int ret = 0; xmlParserCtxtPtr ctxt; - + + xmlInitParser(); + ctxt = xmlCreateMemoryParserCtxt(buffer, size); if (ctxt == NULL) return -1; if (ctxt->sax != (xmlSAXHandlerPtr) &xmlDefaultSAXHandler) @@ -13632,7 +13795,7 @@ int xmlSAXUserParseMemory(xmlSAXHandlerPtr sax, void *user_data, if (user_data != NULL) ctxt->userData = user_data; - + xmlParseDocument(ctxt); if (ctxt->wellFormed) @@ -13806,11 +13969,11 @@ xmlInitParser(void) { __xmlGlobalInitMutexLock(); if (xmlParserInitialized == 0) { #endif + xmlInitGlobals(); + xmlInitThreads(); if ((xmlGenericError == xmlGenericErrorDefaultFunc) || (xmlGenericError == NULL)) initGenericErrorDefaultFunc(NULL); - xmlInitGlobals(); - xmlInitThreads(); xmlInitMemory(); xmlInitCharEncodingHandlers(); xmlDefaultSAXHandlerInit(); @@ -13844,6 +14007,14 @@ xmlInitParser(void) { * the library and all XML/HTML documents built with it. * See also xmlInitParser() which has the opposite function of preparing * the library for operations. + * + * WARNING: if your application is multithreaded or has plugin support + * calling this may crash the application if another thread or + * a plugin is still using libxml2. It's sometimes very hard to + * guess if libxml2 is in use in the application, some libraries + * or plugins may use it without notice. In case of doubt abstain + * from calling this function or do it just before calling exit() + * to avoid leak reports from valgrind ! */ void diff --git a/parserInternals.c b/parserInternals.c index 758c6b3..ff20435 100644 --- a/parserInternals.c +++ b/parserInternals.c @@ -494,20 +494,26 @@ xmlNextChar(xmlParserCtxtPtr ctxt) if (c & 0x80) { if (c == 0xC0) goto encoding_error; - if (cur[1] == 0) + if (cur[1] == 0) { xmlParserInputGrow(ctxt->input, INPUT_CHUNK); + cur = ctxt->input->cur; + } if ((cur[1] & 0xc0) != 0x80) goto encoding_error; if ((c & 0xe0) == 0xe0) { unsigned int val; - if (cur[2] == 0) + if (cur[2] == 0) { xmlParserInputGrow(ctxt->input, INPUT_CHUNK); + cur = ctxt->input->cur; + } if ((cur[2] & 0xc0) != 0x80) goto encoding_error; if ((c & 0xf0) == 0xf0) { - if (cur[3] == 0) + if (cur[3] == 0) { xmlParserInputGrow(ctxt->input, INPUT_CHUNK); + cur = ctxt->input->cur; + } if (((c & 0xf8) != 0xf0) || ((cur[3] & 0xc0) != 0x80)) goto encoding_error; @@ -640,18 +646,24 @@ xmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) { if (c & 0x80) { if (((c & 0x40) == 0) || (c == 0xC0)) goto encoding_error; - if (cur[1] == 0) + if (cur[1] == 0) { xmlParserInputGrow(ctxt->input, INPUT_CHUNK); + cur = ctxt->input->cur; + } if ((cur[1] & 0xc0) != 0x80) goto encoding_error; if ((c & 0xe0) == 0xe0) { - if (cur[2] == 0) + if (cur[2] == 0) { xmlParserInputGrow(ctxt->input, INPUT_CHUNK); + cur = ctxt->input->cur; + } if ((cur[2] & 0xc0) != 0x80) goto encoding_error; if ((c & 0xf0) == 0xf0) { - if (cur[3] == 0) + if (cur[3] == 0) { xmlParserInputGrow(ctxt->input, INPUT_CHUNK); + cur = ctxt->input->cur; + } if (((c & 0xf8) != 0xf0) || ((cur[3] & 0xc0) != 0x80)) goto encoding_error; @@ -933,6 +945,17 @@ xmlCopyChar(int len ATTRIBUTE_UNUSED, xmlChar *out, int val) { * * ************************************************************************/ +/* defined in encoding.c, not public */ +int +xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out, + xmlBufferPtr in, int len); + +static int +xmlSwitchToEncodingInt(xmlParserCtxtPtr ctxt, + xmlCharEncodingHandlerPtr handler, int len); +static int +xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input, + xmlCharEncodingHandlerPtr handler, int len); /** * xmlSwitchEncoding: * @ctxt: the parser context @@ -947,6 +970,7 @@ int xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc) { xmlCharEncodingHandlerPtr handler; + int len = -1; if (ctxt == NULL) return(-1); switch (enc) { @@ -990,9 +1014,33 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc) (ctxt->input->cur[2] == 0xBF)) { ctxt->input->cur += 3; } - break ; - default: - break; + len = 90; + break; + case XML_CHAR_ENCODING_UCS2: + len = 90; + break; + case XML_CHAR_ENCODING_UCS4BE: + case XML_CHAR_ENCODING_UCS4LE: + case XML_CHAR_ENCODING_UCS4_2143: + case XML_CHAR_ENCODING_UCS4_3412: + len = 180; + break; + case XML_CHAR_ENCODING_EBCDIC: + case XML_CHAR_ENCODING_8859_1: + case XML_CHAR_ENCODING_8859_2: + case XML_CHAR_ENCODING_8859_3: + case XML_CHAR_ENCODING_8859_4: + case XML_CHAR_ENCODING_8859_5: + case XML_CHAR_ENCODING_8859_6: + case XML_CHAR_ENCODING_8859_7: + case XML_CHAR_ENCODING_8859_8: + case XML_CHAR_ENCODING_8859_9: + case XML_CHAR_ENCODING_ASCII: + case XML_CHAR_ENCODING_2022_JP: + case XML_CHAR_ENCODING_SHIFT_JIS: + case XML_CHAR_ENCODING_EUC_JP: + len = 45; + break; } handler = xmlGetCharEncodingHandler(enc); if (handler == NULL) { @@ -1083,7 +1131,7 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc) if (handler == NULL) return(-1); ctxt->charset = XML_CHAR_ENCODING_UTF8; - return(xmlSwitchToEncoding(ctxt, handler)); + return(xmlSwitchToEncodingInt(ctxt, handler, len)); } /** @@ -1091,15 +1139,16 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc) * @ctxt: the parser context * @input: the input stream * @handler: the encoding handler + * @len: the number of bytes to convert for the first line or -1 * * change the input functions when discovering the character encoding * of a given entity. * * Returns 0 in case of success, -1 otherwise */ -int -xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input, - xmlCharEncodingHandlerPtr handler) +static int +xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input, + xmlCharEncodingHandlerPtr handler, int len) { int nbchars; @@ -1196,9 +1245,10 @@ xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input, * parsed with the autodetected encoding * into the parser reading buffer. */ - nbchars = xmlCharEncFirstLine(input->buf->encoder, - input->buf->buffer, - input->buf->raw); + nbchars = xmlCharEncFirstLineInt(input->buf->encoder, + input->buf->buffer, + input->buf->raw, + len); } if (nbchars < 0) { xmlErrInternal(ctxt, @@ -1224,8 +1274,9 @@ xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input, } /** - * xmlSwitchToEncoding: + * xmlSwitchInputEncoding: * @ctxt: the parser context + * @input: the input stream * @handler: the encoding handler * * change the input functions when discovering the character encoding @@ -1234,13 +1285,32 @@ xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input, * Returns 0 in case of success, -1 otherwise */ int -xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler) -{ +xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input, + xmlCharEncodingHandlerPtr handler) { + return(xmlSwitchInputEncodingInt(ctxt, input, handler, -1)); +} + +/** + * xmlSwitchToEncodingInt: + * @ctxt: the parser context + * @handler: the encoding handler + * @len: the lenght to convert or -1 + * + * change the input functions when discovering the character encoding + * of a given entity, and convert only @len bytes of the output, this + * is needed on auto detect to allows any declared encoding later to + * convert the actual content after the xmlDecl + * + * Returns 0 in case of success, -1 otherwise + */ +static int +xmlSwitchToEncodingInt(xmlParserCtxtPtr ctxt, + xmlCharEncodingHandlerPtr handler, int len) { int ret = 0; if (handler != NULL) { if (ctxt->input != NULL) { - ret = xmlSwitchInputEncoding(ctxt, ctxt->input, handler); + ret = xmlSwitchInputEncodingInt(ctxt, ctxt->input, handler, len); } else { xmlErrInternal(ctxt, "xmlSwitchToEncoding : no input\n", NULL); @@ -1250,11 +1320,27 @@ xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler) * The parsing is now done in UTF8 natively */ ctxt->charset = XML_CHAR_ENCODING_UTF8; - } else + } else return(-1); return(ret); } +/** + * xmlSwitchToEncoding: + * @ctxt: the parser context + * @handler: the encoding handler + * + * change the input functions when discovering the character encoding + * of a given entity. + * + * Returns 0 in case of success, -1 otherwise + */ +int +xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler) +{ + return (xmlSwitchToEncodingInt(ctxt, handler, -1)); +} + /************************************************************************ * * * Commodity functions to handle entities processing * @@ -2067,7 +2153,7 @@ xmlKeepBlanksDefault(int val) { int old = xmlKeepBlanksDefaultValue; xmlKeepBlanksDefaultValue = val; - xmlIndentTreeOutput = !val; + if (!val) xmlIndentTreeOutput = 1; return(old); } diff --git a/python/Makefile.in b/python/Makefile.in index 5f96636..7417c02 100644 --- a/python/Makefile.in +++ b/python/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @@ -17,8 +18,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -45,15 +47,30 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = setup.py +CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pythondir)" "$(DESTDIR)$(docsdir)" \ "$(DESTDIR)$(pythondir)" "$(DESTDIR)$(pythondir)" -pythonLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(python_LTLIBRARIES) @WITH_PYTHON_TRUE@libxml2mod_la_DEPENDENCIES = $(mylibs) am__libxml2mod_la_SOURCES_DIST = libxml.c types.c @@ -68,6 +85,7 @@ libxml2mod_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ @@ -86,17 +104,42 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive -dist_docsDATA_INSTALL = $(INSTALL_DATA) am__dist_python_DATA_DIST = drv_libxml2.py -dist_pythonDATA_INSTALL = $(INSTALL_DATA) -pythonDATA_INSTALL = $(INSTALL_DATA) DATA = $(dist_docs_DATA) $(dist_python_DATA) $(python_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ @@ -113,10 +156,6 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@ @@ -125,14 +164,14 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOCB_OBJ = @DOCB_OBJ@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FTP_OBJ = @FTP_OBJ@ GREP = @GREP@ HAVE_ISINF = @HAVE_ISINF@ @@ -146,6 +185,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -157,6 +197,7 @@ LIBXML_VERSION = @LIBXML_VERSION@ LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@ LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@ LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ @@ -165,8 +206,12 @@ MODULE_EXTENSION = @MODULE_EXTENSION@ MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@ MV = @MV@ M_LIBS = @M_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -215,6 +260,7 @@ THREAD_CFLAGS = @THREAD_CFLAGS@ THREAD_LIBS = @THREAD_LIBS@ U = @U@ VERSION = @VERSION@ +VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@ WGET = @WGET@ WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@ WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@ @@ -265,8 +311,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -297,6 +342,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -310,6 +356,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @@ -364,14 +411,14 @@ $(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; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign python/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign python/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign python/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign python/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -389,25 +436,30 @@ $(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 +$(am__aclocal_m4_deps): setup.py: $(top_builddir)/config.status $(srcdir)/setup.py.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-pythonLTLIBRARIES: $(python_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(pythondir)" || $(MKDIR_P) "$(DESTDIR)$(pythondir)" - @list='$(python_LTLIBRARIES)'; for p in $$list; do \ + @list='$(python_LTLIBRARIES)'; test -n "$(pythondir)" || list=; \ + list2=; for p in $$list; do \ if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pythonLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pythondir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pythonLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pythondir)/$$f"; \ + list2="$$list2 $$p"; \ else :; fi; \ - done + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pythondir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pythondir)"; \ + } uninstall-pythonLTLIBRARIES: @$(NORMAL_UNINSTALL) - @list='$(python_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pythondir)/$$p'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pythondir)/$$p"; \ + @list='$(python_LTLIBRARIES)'; test -n "$(pythondir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pythondir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pythondir)/$$f"; \ done clean-pythonLTLIBRARIES: @@ -433,21 +485,21 @@ distclean-compile: .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -460,54 +512,63 @@ clean-libtool: install-dist_docsDATA: $(dist_docs_DATA) @$(NORMAL_INSTALL) test -z "$(docsdir)" || $(MKDIR_P) "$(DESTDIR)$(docsdir)" - @list='$(dist_docs_DATA)'; for p in $$list; do \ + @list='$(dist_docs_DATA)'; test -n "$(docsdir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(dist_docsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docsdir)/$$f'"; \ - $(dist_docsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docsdir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docsdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(docsdir)" || exit $$?; \ done uninstall-dist_docsDATA: @$(NORMAL_UNINSTALL) - @list='$(dist_docs_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(docsdir)/$$f'"; \ - rm -f "$(DESTDIR)$(docsdir)/$$f"; \ - done + @list='$(dist_docs_DATA)'; test -n "$(docsdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(docsdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(docsdir)" && rm -f $$files install-dist_pythonDATA: $(dist_python_DATA) @$(NORMAL_INSTALL) test -z "$(pythondir)" || $(MKDIR_P) "$(DESTDIR)$(pythondir)" - @list='$(dist_python_DATA)'; for p in $$list; do \ + @list='$(dist_python_DATA)'; test -n "$(pythondir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(dist_pythonDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pythondir)/$$f'"; \ - $(dist_pythonDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pythondir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythondir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pythondir)" || exit $$?; \ done uninstall-dist_pythonDATA: @$(NORMAL_UNINSTALL) - @list='$(dist_python_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pythondir)/$$f'"; \ - rm -f "$(DESTDIR)$(pythondir)/$$f"; \ - done + @list='$(dist_python_DATA)'; test -n "$(pythondir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pythondir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pythondir)" && rm -f $$files install-pythonDATA: $(python_DATA) @$(NORMAL_INSTALL) test -z "$(pythondir)" || $(MKDIR_P) "$(DESTDIR)$(pythondir)" - @list='$(python_DATA)'; for p in $$list; do \ + @list='$(python_DATA)'; test -n "$(pythondir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pythonDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pythondir)/$$f'"; \ - $(pythonDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pythondir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythondir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pythondir)" || exit $$?; \ done uninstall-pythonDATA: @$(NORMAL_UNINSTALL) - @list='$(python_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pythondir)/$$f'"; \ - rm -f "$(DESTDIR)$(pythondir)/$$f"; \ - done + @list='$(python_DATA)'; test -n "$(pythondir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pythondir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pythondir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -533,7 +594,7 @@ $(RECURSIVE_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ @@ -567,16 +628,16 @@ $(RECURSIVE_CLEAN_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -584,14 +645,14 @@ ID: $(HEADERS) $(SOURCES) $(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; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -603,7 +664,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -612,29 +673,34 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -655,29 +721,44 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ @@ -711,6 +792,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -732,6 +814,8 @@ dvi-am: html: html-recursive +html-am: + info: info-recursive info-am: @@ -741,18 +825,28 @@ install-data-am: install-dist_docsDATA install-dist_pythonDATA \ install-dvi: install-dvi-recursive +install-dvi-am: + install-exec-am: install-html: install-html-recursive +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: install-pdf: install-pdf-recursive +install-pdf-am: + install-ps: install-ps-recursive +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -776,8 +870,8 @@ ps-am: uninstall-am: uninstall-dist_docsDATA uninstall-dist_pythonDATA \ uninstall-pythonDATA uninstall-pythonLTLIBRARIES -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ @@ -811,6 +905,7 @@ uninstall-am: uninstall-dist_docsDATA uninstall-dist_pythonDATA \ tests test: all cd tests && $(MAKE) MAKEFLAGS+=--silent tests + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/python/TODO b/python/TODO index ae3e74d..f446f6e 100644 --- a/python/TODO +++ b/python/TODO @@ -1,6 +1,6 @@ TODO for the libxml2 Python wrappers - $Id: TODO,v 1.8 2002/02/06 16:06:57 veillard Exp $ + $Id$ Things to do: ------------- diff --git a/python/libxml.c b/python/libxml.c index 3f2ede7..3f01761 100644 --- a/python/libxml.c +++ b/python/libxml.c @@ -2416,6 +2416,7 @@ libxml_prev(ATTRIBUTE_UNUSED PyObject * self, PyObject * args) res = (xmlNodePtr) attr->prev; } + break; case XML_NAMESPACE_DECL: res = NULL; break; diff --git a/python/libxml.py b/python/libxml.py index 18cfad2..c861a70 100644 --- a/python/libxml.py +++ b/python/libxml.py @@ -466,7 +466,7 @@ class xmlCore: Note: If any child nodes referred to the removed namespaces, they will be left with dangling links. You should call - renciliateNs() to fix those pointers. + renconciliateNs() to fix those pointers. Note: This method does not free memory taken by the ns definitions. You will need to free it manually with the diff --git a/python/setup.py b/python/setup.py index 1fc700c..9f0aaa0 100755 --- a/python/setup.py +++ b/python/setup.py @@ -226,7 +226,7 @@ else: setup (name = "libxml2-python", # On *nix, the version number is created from setup.py.in # On windows, it is set by configure.js - version = "2.7.3", + version = "2.7.4", description = descr, author = "Daniel Veillard", author_email = "veillard@redhat.com", diff --git a/python/tests/Makefile.in b/python/tests/Makefile.in index ec3036f..ab41539 100644 --- a/python/tests/Makefile.in +++ b/python/tests/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @@ -16,8 +17,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -43,6 +45,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -50,9 +53,23 @@ am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(exampledir)" -dist_exampleDATA_INSTALL = $(INSTALL_DATA) DATA = $(dist_example_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -71,10 +88,6 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@ @@ -83,14 +96,14 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOCB_OBJ = @DOCB_OBJ@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FTP_OBJ = @FTP_OBJ@ GREP = @GREP@ HAVE_ISINF = @HAVE_ISINF@ @@ -104,6 +117,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -115,6 +129,7 @@ LIBXML_VERSION = @LIBXML_VERSION@ LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@ LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@ LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ @@ -123,8 +138,12 @@ MODULE_EXTENSION = @MODULE_EXTENSION@ MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@ MV = @MV@ M_LIBS = @M_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -173,6 +192,7 @@ THREAD_CFLAGS = @THREAD_CFLAGS@ THREAD_LIBS = @THREAD_LIBS@ U = @U@ VERSION = @VERSION@ +VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@ WGET = @WGET@ WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@ WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@ @@ -223,8 +243,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -255,6 +274,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -268,6 +288,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ exampledir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)/examples @@ -333,14 +354,14 @@ $(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; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu python/tests/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu python/tests/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu python/tests/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu python/tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -358,6 +379,7 @@ $(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 +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -367,20 +389,23 @@ clean-libtool: install-dist_exampleDATA: $(dist_example_DATA) @$(NORMAL_INSTALL) test -z "$(exampledir)" || $(MKDIR_P) "$(DESTDIR)$(exampledir)" - @list='$(dist_example_DATA)'; for p in $$list; do \ + @list='$(dist_example_DATA)'; test -n "$(exampledir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(dist_exampleDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(exampledir)/$$f'"; \ - $(dist_exampleDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(exampledir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(exampledir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(exampledir)" || exit $$?; \ done uninstall-dist_exampleDATA: @$(NORMAL_UNINSTALL) - @list='$(dist_example_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(exampledir)/$$f'"; \ - rm -f "$(DESTDIR)$(exampledir)/$$f"; \ - done + @list='$(dist_example_DATA)'; test -n "$(exampledir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(exampledir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(exampledir)" && rm -f $$files tags: TAGS TAGS: @@ -404,13 +429,17 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -441,6 +470,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -457,6 +487,8 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: @@ -465,18 +497,28 @@ install-data-am: install-dist_exampleDATA install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -526,6 +568,7 @@ uninstall-am: uninstall-dist_exampleDATA clean: rm -f *.pyc core + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/python/tests/readererr.py b/python/tests/readererr.py index ab8eb18..0dad36e 100644 --- a/python/tests/readererr.py +++ b/python/tests/readererr.py @@ -10,7 +10,7 @@ import sys libxml2.debugMemory(1) expect="""--> (3) test1:1:xmlns: URI foo is not absolute ---> (4) test1:1:Opening and ending tag mismatch: c line 0 and a +--> (4) test1:1:Opening and ending tag mismatch: c line 1 and a """ err="" def myErrorHandler(arg,msg,severity,locator): diff --git a/relaxng.c b/relaxng.c index 6459769..d124d72 100644 --- a/relaxng.c +++ b/relaxng.c @@ -414,6 +414,7 @@ struct _xmlRelaxNGDocument { xmlDocPtr doc; /* the associated XML document */ xmlRelaxNGDefinePtr content; /* the definitions */ xmlRelaxNGPtr schema; /* the schema */ + int externalRef; /* 1 if an external ref */ }; @@ -1006,7 +1007,7 @@ xmlRelaxNGNewStates(xmlRelaxNGValidCtxtPtr ctxt, int size) xmlRelaxNGStatesPtr ret; if ((ctxt != NULL) && - (ctxt->freeState != NULL) && (ctxt->freeStatesNr > 0)) { + (ctxt->freeStates != NULL) && (ctxt->freeStatesNr > 0)) { ctxt->freeStatesNr--; ret = ctxt->freeStates[ctxt->freeStatesNr]; ret->nbState = 0; @@ -1970,6 +1971,7 @@ xmlRelaxNGLoadExternalRef(xmlRelaxNGParserCtxtPtr ctxt, ret->doc = doc; ret->href = xmlStrdup(URL); ret->next = ctxt->documents; + ret->externalRef = 1; ctxt->documents = ret; /* @@ -2372,6 +2374,9 @@ xmlRelaxNGAddValidError(xmlRelaxNGValidCtxtPtr ctxt, } else { node = seq = NULL; } + if ((node == NULL) && (seq == NULL)) { + node = ctxt->pnode; + } xmlRelaxNGShowValidError(ctxt, err, node, seq, arg1, arg2); } /* @@ -2849,6 +2854,10 @@ xmlRelaxNGCleanupTypes(void) * * ************************************************************************/ +/* from automata.c but not exported */ +void xmlAutomataSetFlags(xmlAutomataPtr am, int flags); + + static int xmlRelaxNGTryCompile(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGDefinePtr def); @@ -3032,6 +3041,17 @@ xmlRelaxNGCompile(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGDefinePtr def) ctxt->am = xmlNewAutomata(); if (ctxt->am == NULL) return (-1); + + /* + * assume identical strings but not same pointer are different + * atoms, needed for non-determinism detection + * That way if 2 elements with the same name are in a choice + * branch the automata is found non-deterministic and + * we fallback to the normal validation which does the right + * thing of exploring both choices. + */ + xmlAutomataSetFlags(ctxt->am, 1); + ctxt->state = xmlAutomataGetInitState(ctxt->am); while (list != NULL) { xmlRelaxNGCompile(ctxt, list); @@ -3063,6 +3083,7 @@ xmlRelaxNGCompile(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGDefinePtr def) ctxt->am = xmlNewAutomata(); if (ctxt->am == NULL) return (-1); + xmlAutomataSetFlags(ctxt->am, 1); ctxt->state = xmlAutomataGetInitState(ctxt->am); while (list != NULL) { xmlRelaxNGCompile(ctxt, list); @@ -3071,6 +3092,11 @@ xmlRelaxNGCompile(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGDefinePtr def) xmlAutomataSetFinalState(ctxt->am, ctxt->state); def->contModel = xmlAutomataCompile(ctxt->am); if (!xmlRegexpIsDeterminist(def->contModel)) { +#ifdef DEBUG_COMPILE + xmlGenericError(xmlGenericErrorContext, + "Content model not determinist %s\n", + def->name); +#endif /* * we can only use the automata if it is determinist */ @@ -3098,7 +3124,11 @@ xmlRelaxNGCompile(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGDefinePtr def) case XML_RELAXNG_OPTIONAL:{ xmlAutomataStatePtr oldstate = ctxt->state; - xmlRelaxNGCompile(ctxt, def->content); + list = def->content; + while (list != NULL) { + xmlRelaxNGCompile(ctxt, list); + list = list->next; + } xmlAutomataNewEpsilon(ctxt->am, oldstate, ctxt->state); break; } @@ -3440,6 +3470,9 @@ xmlRelaxNGGetDataTypeLibrary(xmlRelaxNGParserCtxtPtr ctxt ATTRIBUTE_UNUSED, { xmlChar *ret, *escape; + if (node == NULL) + return(NULL); + if ((IS_RELAXNG(node, "data")) || (IS_RELAXNG(node, "value"))) { ret = xmlGetProp(node, BAD_CAST "datatypeLibrary"); if (ret != NULL) { @@ -4615,6 +4648,70 @@ xmlRelaxNGParseDefine(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node) return (ret); } +/** + * xmlRelaxNGParseImportRef: + * @payload: the parser context + * @data: the current grammar + * @name: the reference name + * + * Import import one references into the current grammar + */ +static void +xmlRelaxNGParseImportRef(void *payload, void *data, xmlChar *name) { + xmlRelaxNGParserCtxtPtr ctxt = (xmlRelaxNGParserCtxtPtr) data; + xmlRelaxNGDefinePtr def = (xmlRelaxNGDefinePtr) payload; + int tmp; + + tmp = xmlHashAddEntry(ctxt->grammar->refs, name, def); + if (tmp < 0) { + xmlRelaxNGDefinePtr prev; + + prev = (xmlRelaxNGDefinePtr) + xmlHashLookup(ctxt->grammar->refs, def->name); + if (prev == NULL) { + if (def->name != NULL) { + xmlRngPErr(ctxt, NULL, XML_RNGP_REF_CREATE_FAILED, + "Error refs definitions '%s'\n", + def->name, NULL); + } else { + xmlRngPErr(ctxt, NULL, XML_RNGP_REF_CREATE_FAILED, + "Error refs definitions\n", + NULL, NULL); + } + } else { + def->nextHash = prev->nextHash; + prev->nextHash = def; + } + } +} + +/** + * xmlRelaxNGParseImportRefs: + * @ctxt: the parser context + * @grammar: the sub grammar + * + * Import references from the subgrammar into the current grammar + * + * Returns 0 in case of success, -1 in case of failure + */ +static int +xmlRelaxNGParseImportRefs(xmlRelaxNGParserCtxtPtr ctxt, + xmlRelaxNGGrammarPtr grammar) { + if ((ctxt == NULL) || (grammar == NULL) || (ctxt->grammar == NULL)) + return(-1); + if (grammar->refs == NULL) + return(0); + if (ctxt->grammar->refs == NULL) + ctxt->grammar->refs = xmlHashCreate(10); + if (ctxt->grammar->refs == NULL) { + xmlRngPErr(ctxt, NULL, XML_RNGP_REF_CREATE_FAILED, + "Could not create references hash\n", NULL, NULL); + return(-1); + } + xmlHashScan(grammar->refs, xmlRelaxNGParseImportRef, ctxt); + return(0); +} + /** * xmlRelaxNGProcessExternalRef: * @ctxt: the parser context @@ -4683,6 +4780,8 @@ xmlRelaxNGProcessExternalRef(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node) if ((docu->schema != NULL) && (docu->schema->topgrammar != NULL)) { docu->content = docu->schema->topgrammar->start; + if (docu->schema->topgrammar->refs) + xmlRelaxNGParseImportRefs(ctxt, docu->schema->topgrammar); } /* @@ -5267,7 +5366,7 @@ xmlRelaxNGParseNameClass(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node, } else { xmlRngPErr(ctxt, node, XML_RNGP_CHOICE_CONTENT, "expecting name, anyName, nsName or choice : got %s\n", - node->name, NULL); + (node == NULL ? "nothing" : node->name), NULL); return (NULL); } if (ret != def) { @@ -6133,7 +6232,7 @@ xmlRelaxNGCheckRules(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGDefinePtr cur, int flags, xmlRelaxNGType ptype) { - int nflags = flags; + int nflags; xmlRelaxNGContentType ret, tmp, val = XML_RELAXNG_CONTENT_EMPTY; while (cur != NULL) { @@ -6157,6 +6256,16 @@ xmlRelaxNGCheckRules(xmlRelaxNGParserCtxtPtr ctxt, "Found forbidden pattern data/except//ref\n", NULL, NULL); } + if (cur->content == NULL) { + if (cur->type == XML_RELAXNG_PARENTREF) + xmlRngPErr(ctxt, cur->node, XML_RNGP_REF_NO_DEF, + "Internal found no define for parent refs\n", + NULL, NULL); + else + xmlRngPErr(ctxt, cur->node, XML_RNGP_REF_NO_DEF, + "Internal found no define for ref %s\n", + (cur->name ? cur->name: BAD_CAST "null"), NULL); + } if (cur->depth > -4) { cur->depth = -4; ret = xmlRelaxNGCheckRules(ctxt, cur->content, @@ -6408,6 +6517,10 @@ xmlRelaxNGCheckRules(xmlRelaxNGParserCtxtPtr ctxt, if (ptype == XML_RELAXNG_GROUP) { val = xmlRelaxNGGroupContentType(val, ret); } else if (ptype == XML_RELAXNG_INTERLEAVE) { + /* + * TODO: scan complain that tmp is never used, seems on purpose + * need double-checking + */ tmp = xmlRelaxNGGroupContentType(val, ret); if (tmp != XML_RELAXNG_CONTENT_ERROR) tmp = xmlRelaxNGMaxContentType(val, ret); @@ -6495,6 +6608,7 @@ xmlRelaxNGParseGrammar(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr nodes) ctxt); } + /* @@@@ */ ctxt->grammar = old; @@ -8345,7 +8459,7 @@ xmlRelaxNGValidateFullElement(xmlRelaxNGValidCtxtPtr ctxt, ret = -1; else ret = 1; - xmlRelaxNGFreeValidState(ctxt, state); + xmlRelaxNGFreeValidState(ctxt, ctxt->state); ctxt->state = NULL; #ifdef DEBUG_PROGRESSIVE if (ret < 0) @@ -8815,8 +8929,11 @@ xmlRelaxNGValidateValue(xmlRelaxNGValidCtxtPtr ctxt, case XML_RELAXNG_REF: case XML_RELAXNG_PARENTREF: if (define->content == NULL) { - } - ret = xmlRelaxNGValidateValue(ctxt, define->content); + VALID_ERR(XML_RELAXNG_ERR_NODEFINE); + ret = -1; + } else { + ret = xmlRelaxNGValidateValue(ctxt, define->content); + } break; default: TODO ret = -1; @@ -9323,6 +9440,7 @@ xmlRelaxNGValidateInterleave(xmlRelaxNGValidCtxtPtr ctxt, oldstate = ctxt->states->tabState[ctxt->states->nbState - 1]; ctxt->states->tabState[ctxt->states->nbState - 1] = NULL; + ctxt->states->nbState--; } } for (j = 0; j < ctxt->states->nbState ; j++) { @@ -9331,7 +9449,11 @@ xmlRelaxNGValidateInterleave(xmlRelaxNGValidCtxtPtr ctxt, xmlRelaxNGFreeStates(ctxt, ctxt->states); ctxt->states = NULL; if (found == 0) { - VALID_ERR2(XML_RELAXNG_ERR_INTEREXTRA, cur->name); + if (cur == NULL) { + VALID_ERR2(XML_RELAXNG_ERR_INTEREXTRA, "noname"); + } else { + VALID_ERR2(XML_RELAXNG_ERR_INTEREXTRA, cur->name); + } ret = -1; ctxt->state = oldstate; goto done; @@ -9878,8 +10000,8 @@ xmlRelaxNGValidateState(xmlRelaxNGValidCtxtPtr ctxt, } for (i = 0; i < ctxt->states->nbState; i++) { xmlRelaxNGFreeValidState(ctxt, - ctxt->states-> - tabState[i]); + ctxt->states->tabState[i]); + ctxt->states->tabState[i] = NULL; } xmlRelaxNGFreeStates(ctxt, ctxt->states); ctxt->flags = oldflags; @@ -10001,11 +10123,8 @@ xmlRelaxNGValidateState(xmlRelaxNGValidCtxtPtr ctxt, } else { for (j = 0; j < ctxt->states->nbState; j++) { xmlRelaxNGAddStates(ctxt, res, - xmlRelaxNGCopyValidState(ctxt, - ctxt-> - states-> - tabState - [j])); + xmlRelaxNGCopyValidState(ctxt, + ctxt->states->tabState[j])); } } oldflags = ctxt->flags; @@ -10034,10 +10153,7 @@ xmlRelaxNGValidateState(xmlRelaxNGValidCtxtPtr ctxt, j++) { tmp = xmlRelaxNGAddStates(ctxt, res, - ctxt-> - states-> - tabState - [j]); + ctxt->states->tabState[j]); if (tmp == 1) progress = 1; } @@ -10071,9 +10187,7 @@ xmlRelaxNGValidateState(xmlRelaxNGValidCtxtPtr ctxt, } else if (ctxt->states != NULL) { for (j = 0; j < ctxt->states->nbState; j++) { tmp = xmlRelaxNGAddStates(ctxt, res, - ctxt-> - states-> - tabState[j]); + ctxt->states->tabState[j]); if (tmp == 1) progress = 1; } @@ -10111,8 +10225,7 @@ xmlRelaxNGValidateState(xmlRelaxNGValidCtxtPtr ctxt, for (i = base; i < res->nbState; i++) xmlRelaxNGAddStates(ctxt, states, xmlRelaxNGCopyValidState - (ctxt, - res->tabState[i])); + (ctxt, res->tabState[i])); ctxt->states = states; } } @@ -10634,6 +10747,60 @@ xmlRelaxNGValidateDocument(xmlRelaxNGValidCtxtPtr ctxt, xmlDocPtr doc) return (ret); } +/** + * xmlRelaxNGCleanPSVI: + * @node: an input element or document + * + * Call this routine to speed up XPath computation on static documents. + * This stamps all the element nodes with the document order + * Like for line information, the order is kept in the element->content + * field, the value stored is actually - the node number (starting at -1) + * to be able to differentiate from line numbers. + * + * Returns the number of elements found in the document or -1 in case + * of error. + */ +static void +xmlRelaxNGCleanPSVI(xmlNodePtr node) { + xmlNodePtr cur; + + if ((node == NULL) || + ((node->type != XML_ELEMENT_NODE) && + (node->type != XML_DOCUMENT_NODE) && + (node->type != XML_HTML_DOCUMENT_NODE))) + return; + if (node->type == XML_ELEMENT_NODE) + node->psvi = NULL; + + cur = node->children; + while (cur != NULL) { + if (cur->type == XML_ELEMENT_NODE) { + cur->psvi = NULL; + if (cur->children != NULL) { + cur = cur->children; + continue; + } + } + if (cur->next != NULL) { + cur = cur->next; + continue; + } + do { + cur = cur->parent; + if (cur == NULL) + break; + if (cur == node) { + cur = NULL; + break; + } + if (cur->next != NULL) { + cur = cur->next; + break; + } + } while (cur != NULL); + } + return; +} /************************************************************************ * * * Validation interfaces * @@ -10807,6 +10974,11 @@ xmlRelaxNGValidateDoc(xmlRelaxNGValidCtxtPtr ctxt, xmlDocPtr doc) ctxt->doc = doc; ret = xmlRelaxNGValidateDocument(ctxt, doc); + /* + * Remove all left PSVI + */ + xmlRelaxNGCleanPSVI((xmlNodePtr) doc); + /* * TODO: build error codes */ diff --git a/runsuite.c b/runsuite.c index af8ee5e..e6545fb 100644 --- a/runsuite.c +++ b/runsuite.c @@ -307,7 +307,7 @@ getString(xmlNodePtr cur, const char *xpath) { * * ************************************************************************/ -static int +static int xsdIncorectTestCase(xmlNodePtr cur) { xmlNodePtr test; xmlBufferPtr buf; @@ -319,7 +319,7 @@ xsdIncorectTestCase(xmlNodePtr cur) { if (cur == NULL) { return(0); } - + test = getNext(cur, "./*"); if (test == NULL) { test_log("Failed to find test in correct line %ld\n", diff --git a/runtest.c b/runtest.c index c7d11fa..16196ea 100644 --- a/runtest.c +++ b/runtest.c @@ -1704,9 +1704,11 @@ saxParseTest(const char *filename, const char *result, if (compareFiles(temp, result)) { fprintf(stderr, "Got a difference for %s\n", filename); ret = 1; - } else - unlink(temp); - free(temp); + } + if (temp != NULL) { + unlink(temp); + free(temp); + } /* switch back to structured error handling */ xmlSetGenericErrorFunc(NULL, NULL); @@ -1779,8 +1781,10 @@ oldParseTest(const char *filename, const char *result, } xmlFreeDoc(doc); - unlink(temp); - free(temp); + if (temp != NULL) { + unlink(temp); + free(temp); + } return(res); } @@ -1980,8 +1984,10 @@ noentParseTest(const char *filename, const char *result, } xmlFreeDoc(doc); - unlink(temp); - free(temp); + if (temp != NULL) { + unlink(temp); + free(temp); + } return(res); } @@ -2120,8 +2126,10 @@ streamProcessTest(const char *filename, const char *result, const char *err, testErrorHandler(NULL, "Relax-NG schema %s failed to compile\n", rng); fclose(t); - unlink(temp); - free(temp); + if (temp != NULL) { + unlink(temp); + free(temp); + } return(0); } } @@ -2147,8 +2155,10 @@ streamProcessTest(const char *filename, const char *result, const char *err, if (t != NULL) { fclose(t); ret = compareFiles(temp, result); - unlink(temp); - free(temp); + if (temp != NULL) { + unlink(temp); + free(temp); + } if (ret) { fprintf(stderr, "Result for %s failed\n", filename); return(-1); @@ -2357,8 +2367,10 @@ xpathCommonTest(const char *filename, const char *result, } } - unlink(temp); - free(temp); + if (temp != NULL) { + unlink(temp); + free(temp); + } return(ret); } @@ -2527,8 +2539,10 @@ xmlidDocTest(const char *filename, } } - unlink(temp); - free(temp); + if (temp != NULL) { + unlink(temp); + free(temp); + } xmlFreeDoc(xpathDocument); if (err != NULL) { @@ -2614,8 +2628,10 @@ uriCommonTest(const char *filename, if (f == NULL) { fprintf(stderr, "failed to open input file %s\n", filename); fclose(o); - unlink(temp); - free(temp); + if (temp != NULL) { + unlink(temp); + free(temp); + } return(-1); } @@ -2658,8 +2674,10 @@ uriCommonTest(const char *filename, } } - unlink(temp); - free(temp); + if (temp != NULL) { + unlink(temp); + free(temp); + } return(res); } @@ -2933,8 +2951,10 @@ schemasOneTest(const char *sch, ret = 1; } } - unlink(temp); - free(temp); + if (temp != NULL) { + unlink(temp); + free(temp); + } if ((validResult != 0) && (err != NULL)) { if (compareFileMem(err, testErrors, testErrorsSize)) { @@ -3100,14 +3120,17 @@ rngOneTest(const char *sch, filename); } fclose(schemasOutput); + ret = 0; if (result) { if (compareFiles(temp, result)) { fprintf(stderr, "Result for %s on %s failed\n", filename, sch); ret = 1; } } - unlink(temp); - free(temp); + if (temp != NULL) { + unlink(temp); + free(temp); + } if (err != NULL) { if (compareFileMem(err, testErrors, testErrorsSize)) { @@ -3207,7 +3230,7 @@ rngTest(const char *filename, globfree(&globbuf); xmlRelaxNGFree(schemas); - return(res); + return(ret); } #ifdef LIBXML_READER_ENABLED @@ -3257,7 +3280,8 @@ rngStreamTest(const char *filename, * hack is also done in the Makefile */ if ((!strcmp(prefix, "tutor10_1")) || (!strcmp(prefix, "tutor10_2")) || - (!strcmp(prefix, "tutor3_2")) || (!strcmp(prefix, "307377"))) + (!strcmp(prefix, "tutor3_2")) || (!strcmp(prefix, "307377")) || + (!strcmp(prefix, "tutor8_2"))) disable_err = 1; snprintf(pattern, 499, "./test/relaxng/%s_?.xml", prefix); @@ -3463,7 +3487,7 @@ patternTest(const char *filename, namespaces[j++] = ns->prefix; } namespaces[j++] = NULL; - namespaces[j++] = NULL; + namespaces[j] = NULL; patternc = xmlPatterncompile((const xmlChar *) str, doc->dict, 0, &namespaces[0]); @@ -3511,8 +3535,10 @@ patternTest(const char *filename, fprintf(stderr, "Result for %s failed\n", filename); ret = 1; } - unlink(temp); - free(temp); + if (temp != NULL) { + unlink(temp); + free(temp); + } return(ret); } #endif /* READER */ @@ -3642,7 +3668,6 @@ parse_list(xmlChar *str) { if((str[0] == '\'') && (str[len - 1] == '\'')) { str[len - 1] = '\0'; str++; - len -= 2; } /* * allocate an translation buffer. @@ -3671,7 +3696,7 @@ parse_list(xmlChar *str) { } static int -c14nRunTest(const char* xml_filename, int with_comments, int exclusive, +c14nRunTest(const char* xml_filename, int with_comments, int mode, const char* xpath_filename, const char *ns_filename, const char* result_file) { xmlDocPtr doc; @@ -3733,12 +3758,13 @@ c14nRunTest(const char* xml_filename, int with_comments, int exclusive, /* fprintf(stderr,"File \"%s\" loaded: start canonization\n", xml_filename); */ ret = xmlC14NDocDumpMemory(doc, (xpath) ? xpath->nodesetval : NULL, - exclusive, inclusive_namespaces, + mode, inclusive_namespaces, with_comments, &result); if (ret >= 0) { if(result != NULL) { if (compareFileMem(result_file, (const char *) result, ret)) { fprintf(stderr, "Result mismatch for %s\n", xml_filename); + fprintf(stderr, "RESULT:\n%s\n", (const char*)result); ret = -1; } } @@ -3760,7 +3786,7 @@ c14nRunTest(const char* xml_filename, int with_comments, int exclusive, } static int -c14nCommonTest(const char *filename, int with_comments, int exclusive, +c14nCommonTest(const char *filename, int with_comments, int mode, const char *subdir) { char buf[500]; char prefix[500]; @@ -3793,7 +3819,7 @@ c14nCommonTest(const char *filename, int with_comments, int exclusive, } nb_tests++; - if (c14nRunTest(filename, with_comments, exclusive, + if (c14nRunTest(filename, with_comments, mode, xpath, ns, result) < 0) ret = 1; @@ -3808,21 +3834,28 @@ c14nWithCommentTest(const char *filename, const char *resul ATTRIBUTE_UNUSED, const char *err ATTRIBUTE_UNUSED, int options ATTRIBUTE_UNUSED) { - return(c14nCommonTest(filename, 1, 0, "with-comments")); + return(c14nCommonTest(filename, 1, XML_C14N_1_0, "with-comments")); } static int c14nWithoutCommentTest(const char *filename, const char *resul ATTRIBUTE_UNUSED, const char *err ATTRIBUTE_UNUSED, int options ATTRIBUTE_UNUSED) { - return(c14nCommonTest(filename, 0, 0, "without-comments")); + return(c14nCommonTest(filename, 0, XML_C14N_1_0, "without-comments")); } static int c14nExcWithoutCommentTest(const char *filename, const char *resul ATTRIBUTE_UNUSED, const char *err ATTRIBUTE_UNUSED, int options ATTRIBUTE_UNUSED) { - return(c14nCommonTest(filename, 0, 1, "exc-without-comments")); + return(c14nCommonTest(filename, 0, XML_C14N_EXCLUSIVE_1_0, "exc-without-comments")); +} +static int +c14n11WithoutCommentTest(const char *filename, + const char *resul ATTRIBUTE_UNUSED, + const char *err ATTRIBUTE_UNUSED, + int options ATTRIBUTE_UNUSED) { + return(c14nCommonTest(filename, 0, XML_C14N_1_1, "1-1-without-comments")); } #endif #if defined(LIBXML_THREAD_ENABLED) && defined(LIBXML_CATALOG_ENABLED) && defined (LIBXML_SAX1_ENABLED) @@ -3903,7 +3936,7 @@ thread_specific_data(void *private_data) return ((void *) Okay); } -#if defined(linux) || defined(solaris) || defined(__APPLE_CC__) +#if defined(linux) || defined(__sun) || defined(__APPLE_CC__) #include @@ -4257,6 +4290,9 @@ testDesc testDescriptions[] = { { "C14N exclusive without comments regression tests" , c14nExcWithoutCommentTest, "./test/c14n/exc-without-comments/*.xml", NULL, NULL, NULL, 0 }, + { "C14N 1.1 without comments regression tests" , + c14n11WithoutCommentTest, "./test/c14n/1-1-without-comments/*.xml", NULL, NULL, NULL, + 0 }, #endif #if defined(LIBXML_THREAD_ENABLED) && defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_SAX1_ENABLED) { "Catalog and Threads regression tests" , diff --git a/schematron.c b/schematron.c index 03fa357..07709e2 100644 --- a/schematron.c +++ b/schematron.c @@ -1425,7 +1425,7 @@ xmlSchematronReportSuccess(xmlSchematronValidCtxtPtr ctxt, (pattern == NULL)?NULL:((const char *) pattern->name), (const char *) path, (const char *) report, 0, 0, - msg); + "%s", msg); } else { xmlSchematronReportOutput(ctxt, cur, &msg[0]); } diff --git a/testC14N.c b/testC14N.c index 674fc71..fbfa869 100644 --- a/testC14N.c +++ b/testC14N.c @@ -32,13 +32,17 @@ static void usage(const char *name) { name); fprintf(stderr, "where is one of following:\n"); fprintf(stderr, - "--with-comments \t XML file canonization w comments\n"); + "--with-comments \t XML file canonicalization v1.0 w comments \n"); fprintf(stderr, - "--without-comments \t XML file canonization w/o comments\n"); + "--without-comments \t XML file canonicalization v1.0 w/o comments\n"); fprintf(stderr, - "--exc-with-comments \t Exclusive XML file canonization w comments\n"); + "--1-1-with-comments \t XML file canonicalization v1.1 w comments\n"); fprintf(stderr, - "--exc-without-comments\t Exclusive XML file canonization w/o comments\n"); + "--1-1-without-comments \t XML file canonicalization v1.1 w/o comments\n"); + fprintf(stderr, + "--exc-with-comments \t Exclusive XML file canonicalization v1.0 w comments\n"); + fprintf(stderr, + "--exc-without-comments\t Exclusive XML file canonicalization v1.0 w/o comments\n"); } static xmlXPathObjectPtr @@ -49,7 +53,7 @@ static xmlChar **parse_list(xmlChar *str); /* static void print_xpath_nodes(xmlNodeSetPtr nodes); */ static int -test_c14n(const char* xml_filename, int with_comments, int exclusive, +test_c14n(const char* xml_filename, int with_comments, int mode, const char* xpath_filename, xmlChar **inclusive_namespaces) { xmlDocPtr doc; xmlXPathObjectPtr xpath = NULL; @@ -96,7 +100,7 @@ test_c14n(const char* xml_filename, int with_comments, int exclusive, /* fprintf(stderr,"File \"%s\" loaded: start canonization\n", xml_filename); */ ret = xmlC14NDocDumpMemory(doc, (xpath) ? xpath->nodesetval : NULL, - exclusive, inclusive_namespaces, + mode, inclusive_namespaces, with_comments, &result); if(ret >= 0) { if(result != NULL) { @@ -135,22 +139,26 @@ int main(int argc, char **argv) { fprintf(stderr, "Error: wrong number of arguments.\n"); usage(argv[0]); } else if(strcmp(argv[1], "--with-comments") == 0) { - ret = test_c14n(argv[2], 1, 0, (argc > 3) ? argv[3] : NULL, NULL); + ret = test_c14n(argv[2], 1, XML_C14N_1_0, (argc > 3) ? argv[3] : NULL, NULL); } else if(strcmp(argv[1], "--without-comments") == 0) { - ret = test_c14n(argv[2], 0, 0, (argc > 3) ? argv[3] : NULL, NULL); + ret = test_c14n(argv[2], 0, XML_C14N_1_0, (argc > 3) ? argv[3] : NULL, NULL); + } else if(strcmp(argv[1], "--1-1-with-comments") == 0) { + ret = test_c14n(argv[2], 1, XML_C14N_1_1, (argc > 3) ? argv[3] : NULL, NULL); + } else if(strcmp(argv[1], "--1-1-without-comments") == 0) { + ret = test_c14n(argv[2], 0, XML_C14N_1_1, (argc > 3) ? argv[3] : NULL, NULL); } else if(strcmp(argv[1], "--exc-with-comments") == 0) { xmlChar **list; /* load exclusive namespace from command line */ list = (argc > 4) ? parse_list((xmlChar *)argv[4]) : NULL; - ret = test_c14n(argv[2], 1, 1, (argc > 3) ? argv[3] : NULL, list); + ret = test_c14n(argv[2], 1, XML_C14N_EXCLUSIVE_1_0, (argc > 3) ? argv[3] : NULL, list); if(list != NULL) xmlFree(list); } else if(strcmp(argv[1], "--exc-without-comments") == 0) { xmlChar **list; /* load exclusive namespace from command line */ list = (argc > 4) ? parse_list((xmlChar *)argv[4]) : NULL; - ret = test_c14n(argv[2], 0, 1, (argc > 3) ? argv[3] : NULL, list); + ret = test_c14n(argv[2], 0, XML_C14N_EXCLUSIVE_1_0, (argc > 3) ? argv[3] : NULL, list); if(list != NULL) xmlFree(list); } else { fprintf(stderr, "Error: bad option.\n"); @@ -162,7 +170,7 @@ int main(int argc, char **argv) { */ xmlCleanupParser(); xmlMemoryDump(); - + return((ret >= 0) ? 0 : 1); } @@ -172,7 +180,7 @@ int main(int argc, char **argv) { #define growBufferReentrant() { \ buffer_size *= 2; \ buffer = (xmlChar **) \ - xmlRealloc(buffer, buffer_size * sizeof(xmlChar*)); \ + xmlRealloc(buffer, buffer_size * sizeof(xmlChar*)); \ if (buffer == NULL) { \ perror("realloc failed"); \ return(NULL); \ @@ -194,7 +202,6 @@ parse_list(xmlChar *str) { if((str[0] == '\'') && (str[len - 1] == '\'')) { str[len - 1] = '\0'; str++; - len -= 2; } /* * allocate an translation buffer. @@ -206,7 +213,7 @@ parse_list(xmlChar *str) { return(NULL); } out = buffer; - + while(*str != '\0') { if (out - buffer > buffer_size - 10) { int indx = out - buffer; diff --git a/testapi.c b/testapi.c index 7a6ba3a..da6ce1b 100644 --- a/testapi.c +++ b/testapi.c @@ -991,6 +991,13 @@ static void des_xmlParserNodeInfoSeqPtr(int no ATTRIBUTE_UNUSED, xmlParserNodeIn static void desret_const_xmlParserNodeInfo_ptr(const xmlParserNodeInfo *val ATTRIBUTE_UNUSED) { } +#define gen_nb_void_ptr_ptr 1 +static void ** gen_void_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { + return(NULL); +} +static void des_void_ptr_ptr(int no ATTRIBUTE_UNUSED, void ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { +} + /************************************************************************ * * * WARNING: end of the manually maintained part of the test code * @@ -5345,8 +5352,8 @@ test_xmlC14NDocDumpMemory(void) { int n_doc; xmlNodeSetPtr nodes; /* the nodes set to be included in the canonized image or NULL if all document nodes should be included */ int n_nodes; - int exclusive; /* the exclusive flag (0 - non-exclusive canonicalization; otherwise - exclusive canonicalization) */ - int n_exclusive; + int mode; /* the c14n mode (see @xmlC14NMode) */ + int n_mode; xmlChar ** inclusive_ns_prefixes; /* the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise) */ int n_inclusive_ns_prefixes; int with_comments; /* include comments in the result (!=0) or not (==0) */ @@ -5356,24 +5363,24 @@ test_xmlC14NDocDumpMemory(void) { for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) { for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) { - for (n_exclusive = 0;n_exclusive < gen_nb_int;n_exclusive++) { + for (n_mode = 0;n_mode < gen_nb_int;n_mode++) { for (n_inclusive_ns_prefixes = 0;n_inclusive_ns_prefixes < gen_nb_xmlChar_ptr_ptr;n_inclusive_ns_prefixes++) { for (n_with_comments = 0;n_with_comments < gen_nb_int;n_with_comments++) { for (n_doc_txt_ptr = 0;n_doc_txt_ptr < gen_nb_xmlChar_ptr_ptr;n_doc_txt_ptr++) { mem_base = xmlMemBlocks(); doc = gen_xmlDocPtr(n_doc, 0); nodes = gen_xmlNodeSetPtr(n_nodes, 1); - exclusive = gen_int(n_exclusive, 2); + mode = gen_int(n_mode, 2); inclusive_ns_prefixes = gen_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, 3); with_comments = gen_int(n_with_comments, 4); doc_txt_ptr = gen_xmlChar_ptr_ptr(n_doc_txt_ptr, 5); - ret_val = xmlC14NDocDumpMemory(doc, nodes, exclusive, inclusive_ns_prefixes, with_comments, doc_txt_ptr); + ret_val = xmlC14NDocDumpMemory(doc, nodes, mode, inclusive_ns_prefixes, with_comments, doc_txt_ptr); desret_int(ret_val); call_tests++; des_xmlDocPtr(n_doc, doc, 0); des_xmlNodeSetPtr(n_nodes, nodes, 1); - des_int(n_exclusive, exclusive, 2); + des_int(n_mode, mode, 2); des_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, inclusive_ns_prefixes, 3); des_int(n_with_comments, with_comments, 4); des_xmlChar_ptr_ptr(n_doc_txt_ptr, doc_txt_ptr, 5); @@ -5384,7 +5391,7 @@ test_xmlC14NDocDumpMemory(void) { test_ret++; printf(" %d", n_doc); printf(" %d", n_nodes); - printf(" %d", n_exclusive); + printf(" %d", n_mode); printf(" %d", n_inclusive_ns_prefixes); printf(" %d", n_with_comments); printf(" %d", n_doc_txt_ptr); @@ -5414,8 +5421,8 @@ test_xmlC14NDocSave(void) { int n_doc; xmlNodeSetPtr nodes; /* the nodes set to be included in the canonized image or NULL if all document nodes should be included */ int n_nodes; - int exclusive; /* the exclusive flag (0 - non-exclusive canonicalization; otherwise - exclusive canonicalization) */ - int n_exclusive; + int mode; /* the c14n mode (see @xmlC14NMode) */ + int n_mode; xmlChar ** inclusive_ns_prefixes; /* the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise) */ int n_inclusive_ns_prefixes; int with_comments; /* include comments in the result (!=0) or not (==0) */ @@ -5427,7 +5434,7 @@ test_xmlC14NDocSave(void) { for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) { for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) { - for (n_exclusive = 0;n_exclusive < gen_nb_int;n_exclusive++) { + for (n_mode = 0;n_mode < gen_nb_int;n_mode++) { for (n_inclusive_ns_prefixes = 0;n_inclusive_ns_prefixes < gen_nb_xmlChar_ptr_ptr;n_inclusive_ns_prefixes++) { for (n_with_comments = 0;n_with_comments < gen_nb_int;n_with_comments++) { for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) { @@ -5435,18 +5442,18 @@ test_xmlC14NDocSave(void) { mem_base = xmlMemBlocks(); doc = gen_xmlDocPtr(n_doc, 0); nodes = gen_xmlNodeSetPtr(n_nodes, 1); - exclusive = gen_int(n_exclusive, 2); + mode = gen_int(n_mode, 2); inclusive_ns_prefixes = gen_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, 3); with_comments = gen_int(n_with_comments, 4); filename = gen_fileoutput(n_filename, 5); compression = gen_int(n_compression, 6); - ret_val = xmlC14NDocSave(doc, nodes, exclusive, inclusive_ns_prefixes, with_comments, filename, compression); + ret_val = xmlC14NDocSave(doc, nodes, mode, inclusive_ns_prefixes, with_comments, filename, compression); desret_int(ret_val); call_tests++; des_xmlDocPtr(n_doc, doc, 0); des_xmlNodeSetPtr(n_nodes, nodes, 1); - des_int(n_exclusive, exclusive, 2); + des_int(n_mode, mode, 2); des_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, inclusive_ns_prefixes, 3); des_int(n_with_comments, with_comments, 4); des_fileoutput(n_filename, filename, 5); @@ -5458,7 +5465,7 @@ test_xmlC14NDocSave(void) { test_ret++; printf(" %d", n_doc); printf(" %d", n_nodes); - printf(" %d", n_exclusive); + printf(" %d", n_mode); printf(" %d", n_inclusive_ns_prefixes); printf(" %d", n_with_comments); printf(" %d", n_filename); @@ -5490,8 +5497,8 @@ test_xmlC14NDocSaveTo(void) { int n_doc; xmlNodeSetPtr nodes; /* the nodes set to be included in the canonized image or NULL if all document nodes should be included */ int n_nodes; - int exclusive; /* the exclusive flag (0 - non-exclusive canonicalization; otherwise - exclusive canonicalization) */ - int n_exclusive; + int mode; /* the c14n mode (see @xmlC14NMode) */ + int n_mode; xmlChar ** inclusive_ns_prefixes; /* the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise) */ int n_inclusive_ns_prefixes; int with_comments; /* include comments in the result (!=0) or not (==0) */ @@ -5501,24 +5508,24 @@ test_xmlC14NDocSaveTo(void) { for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) { for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) { - for (n_exclusive = 0;n_exclusive < gen_nb_int;n_exclusive++) { + for (n_mode = 0;n_mode < gen_nb_int;n_mode++) { for (n_inclusive_ns_prefixes = 0;n_inclusive_ns_prefixes < gen_nb_xmlChar_ptr_ptr;n_inclusive_ns_prefixes++) { for (n_with_comments = 0;n_with_comments < gen_nb_int;n_with_comments++) { for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) { mem_base = xmlMemBlocks(); doc = gen_xmlDocPtr(n_doc, 0); nodes = gen_xmlNodeSetPtr(n_nodes, 1); - exclusive = gen_int(n_exclusive, 2); + mode = gen_int(n_mode, 2); inclusive_ns_prefixes = gen_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, 3); with_comments = gen_int(n_with_comments, 4); buf = gen_xmlOutputBufferPtr(n_buf, 5); - ret_val = xmlC14NDocSaveTo(doc, nodes, exclusive, inclusive_ns_prefixes, with_comments, buf); + ret_val = xmlC14NDocSaveTo(doc, nodes, mode, inclusive_ns_prefixes, with_comments, buf); desret_int(ret_val); call_tests++; des_xmlDocPtr(n_doc, doc, 0); des_xmlNodeSetPtr(n_nodes, nodes, 1); - des_int(n_exclusive, exclusive, 2); + des_int(n_mode, mode, 2); des_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, inclusive_ns_prefixes, 3); des_int(n_with_comments, with_comments, 4); des_xmlOutputBufferPtr(n_buf, buf, 5); @@ -5529,7 +5536,7 @@ test_xmlC14NDocSaveTo(void) { test_ret++; printf(" %d", n_doc); printf(" %d", n_nodes); - printf(" %d", n_exclusive); + printf(" %d", n_mode); printf(" %d", n_inclusive_ns_prefixes); printf(" %d", n_with_comments); printf(" %d", n_buf); @@ -14618,14 +14625,14 @@ test_xmlRecoverDoc(void) { xmlChar * cur; /* a pointer to an array of xmlChar */ int n_cur; - for (n_cur = 0;n_cur < gen_nb_xmlChar_ptr;n_cur++) { + for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) { mem_base = xmlMemBlocks(); - cur = gen_xmlChar_ptr(n_cur, 0); + cur = gen_const_xmlChar_ptr(n_cur, 0); - ret_val = xmlRecoverDoc(cur); + ret_val = xmlRecoverDoc((const xmlChar *)cur); desret_xmlDocPtr(ret_val); call_tests++; - des_xmlChar_ptr(n_cur, cur, 0); + des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0); xmlResetLastError(); if (mem_base != xmlMemBlocks()) { printf("Leak of %d blocks found in xmlRecoverDoc", @@ -17371,16 +17378,6 @@ static void des_xmlRelaxNGValidityWarningFunc_ptr(int no ATTRIBUTE_UNUSED, xmlRe } #endif -#ifdef LIBXML_SCHEMAS_ENABLED - -#define gen_nb_void_ptr_ptr 1 -static void ** gen_void_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { - return(NULL); -} -static void des_void_ptr_ptr(int no ATTRIBUTE_UNUSED, void ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { -} -#endif - static int test_xmlRelaxNGGetParserErrors(void) { @@ -27385,6 +27382,54 @@ test_xmlXIncludeProcessTreeFlags(void) { } +static int +test_xmlXIncludeProcessTreeFlagsData(void) { + int test_ret = 0; + +#if defined(LIBXML_XINCLUDE_ENABLED) + int mem_base; + int ret_val; + xmlNodePtr tree; /* an XML node */ + int n_tree; + int flags; /* a set of xmlParserOption used for parsing XML includes */ + int n_flags; + void * data; /* application data that will be passed to the parser context in the _private field of the parser context(s) */ + int n_data; + + for (n_tree = 0;n_tree < gen_nb_xmlNodePtr;n_tree++) { + for (n_flags = 0;n_flags < gen_nb_int;n_flags++) { + for (n_data = 0;n_data < gen_nb_userdata;n_data++) { + mem_base = xmlMemBlocks(); + tree = gen_xmlNodePtr(n_tree, 0); + flags = gen_int(n_flags, 1); + data = gen_userdata(n_data, 2); + + ret_val = xmlXIncludeProcessTreeFlagsData(tree, flags, data); + desret_int(ret_val); + call_tests++; + des_xmlNodePtr(n_tree, tree, 0); + des_int(n_flags, flags, 1); + des_userdata(n_data, data, 2); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlXIncludeProcessTreeFlagsData", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_tree); + printf(" %d", n_flags); + printf(" %d", n_data); + printf("\n"); + } + } + } + } + function_tests++; +#endif + + return(test_ret); +} + + static int test_xmlXIncludeSetFlags(void) { int test_ret = 0; @@ -27429,7 +27474,7 @@ static int test_xinclude(void) { int test_ret = 0; - if (quiet == 0) printf("Testing xinclude : 7 of 9 functions ...\n"); + if (quiet == 0) printf("Testing xinclude : 8 of 10 functions ...\n"); test_ret += test_xmlXIncludeNewContext(); test_ret += test_xmlXIncludeProcess(); test_ret += test_xmlXIncludeProcessFlags(); @@ -27437,6 +27482,7 @@ test_xinclude(void) { test_ret += test_xmlXIncludeProcessNode(); test_ret += test_xmlXIncludeProcessTree(); test_ret += test_xmlXIncludeProcessTreeFlags(); + test_ret += test_xmlXIncludeProcessTreeFlagsData(); test_ret += test_xmlXIncludeSetFlags(); if (test_ret != 0) @@ -36166,16 +36212,16 @@ test_xmlStrcasestr(void) { int n_val; for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) { - for (n_val = 0;n_val < gen_nb_xmlChar_ptr;n_val++) { + for (n_val = 0;n_val < gen_nb_const_xmlChar_ptr;n_val++) { mem_base = xmlMemBlocks(); str = gen_const_xmlChar_ptr(n_str, 0); - val = gen_xmlChar_ptr(n_val, 1); + val = gen_const_xmlChar_ptr(n_val, 1); - ret_val = xmlStrcasestr((const xmlChar *)str, val); + ret_val = xmlStrcasestr((const xmlChar *)str, (const xmlChar *)val); desret_const_xmlChar_ptr(ret_val); call_tests++; des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0); - des_xmlChar_ptr(n_val, val, 1); + des_const_xmlChar_ptr(n_val, (const xmlChar *)val, 1); xmlResetLastError(); if (mem_base != xmlMemBlocks()) { printf("Leak of %d blocks found in xmlStrcasestr", @@ -49648,7 +49694,7 @@ test_xmlXPathRegisterNs(void) { int ret_val; xmlXPathContextPtr ctxt; /* the XPath context */ int n_ctxt; - xmlChar * prefix; /* the namespace prefix */ + xmlChar * prefix; /* the namespace prefix cannot be NULL or empty string */ int n_prefix; xmlChar * ns_uri; /* the namespace name */ int n_ns_uri; diff --git a/threads.c b/threads.c index 2223e8a..8d31393 100644 --- a/threads.c +++ b/threads.c @@ -26,9 +26,7 @@ #endif #ifdef HAVE_PTHREAD_H #include -#endif - -#ifdef HAVE_WIN32_THREADS +#elif HAVE_WIN32_THREADS #include #ifndef HAVE_COMPILER_TLS #include @@ -412,7 +410,7 @@ xmlRMutexUnlock(xmlRMutexPtr tok ATTRIBUTE_UNUSED) if (tok->held == 0) { if (tok->waiters) pthread_cond_signal(&tok->cv); - tok->tid = 0; + memset(&tok->tid, 0, sizeof(tok->tid)); } pthread_mutex_unlock(&tok->lock); #elif defined HAVE_WIN32_THREADS @@ -529,7 +527,8 @@ __xmlGlobalInitMutexUnlock(void) void __xmlGlobalInitMutexDestroy(void) { -#if defined HAVE_WIN32_THREADS +#ifdef HAVE_PTHREAD_H +#elif defined HAVE_WIN32_THREADS if (global_init_lock != NULL) { DeleteCriticalSection(global_init_lock); free(global_init_lock); @@ -593,8 +592,8 @@ xmlNewGlobalState(void) } #endif /* LIBXML_THREAD_ENABLED */ - -#ifdef HAVE_WIN32_THREADS +#ifdef HAVE_PTHREAD_H +#elif HAVE_WIN32_THREADS #if !defined(HAVE_COMPILER_TLS) #if defined(LIBXML_STATIC) && !defined(LIBXML_STATIC_FOR_DLL) typedef struct _xmlGlobalStateCleanupHelperParams { @@ -758,6 +757,8 @@ xmlGetGlobalState(void) * xmlGetThreadId: * * xmlGetThreadId() find the current thread ID number + * Note that this is likely to be broken on some platforms using pthreads + * as the specification doesn't mandate pthread_t to be an integer type * * Returns the current thread ID number */ @@ -765,9 +766,15 @@ int xmlGetThreadId(void) { #ifdef HAVE_PTHREAD_H + pthread_t id; + int ret; + if (libxml_is_threaded == 0) return (0); - return ((int) pthread_self()); + id = pthread_self(); + /* horrible but preserves compat, see warning above */ + memcpy(&ret, &id, sizeof(ret)); + return (ret); #elif defined HAVE_WIN32_THREADS return GetCurrentThreadId(); #elif defined HAVE_BEOS_THREADS @@ -803,7 +810,7 @@ xmlIsMainThread(void) xmlGenericError(xmlGenericErrorContext, "xmlIsMainThread()\n"); #endif #ifdef HAVE_PTHREAD_H - return (mainthread == pthread_self()); + return (pthread_equal(mainthread,pthread_self())); #elif defined HAVE_WIN32_THREADS return (mainthread == GetCurrentThreadId()); #elif defined HAVE_BEOS_THREADS @@ -852,12 +859,6 @@ xmlUnlockLibrary(void) void xmlInitThreads(void) { -#ifdef DEBUG_THREADS - xmlGenericError(xmlGenericErrorContext, "xmlInitThreads()\n"); -#endif -#if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL)) - InitializeCriticalSection(&cleanup_helpers_cs); -#endif #ifdef HAVE_PTHREAD_H if (libxml_is_threaded == -1) { if ((pthread_once != NULL) && @@ -884,6 +885,8 @@ xmlInitThreads(void) libxml_is_threaded = 0; } } +#elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL)) + InitializeCriticalSection(&cleanup_helpers_cs); #endif } @@ -892,6 +895,14 @@ xmlInitThreads(void) * * xmlCleanupThreads() is used to to cleanup all the thread related * data of the libxml2 library once processing has ended. + * + * WARNING: if your application is multithreaded or has plugin support + * calling this may crash the application if another thread or + * a plugin is still using libxml2. It's sometimes very hard to + * guess if libxml2 is in use in the application, some libraries + * or plugins may use it without notice. In case of doubt abstain + * from calling this function or do it just before calling exit() + * to avoid leak reports from valgrind ! */ void xmlCleanupThreads(void) @@ -899,7 +910,10 @@ xmlCleanupThreads(void) #ifdef DEBUG_THREADS xmlGenericError(xmlGenericErrorContext, "xmlCleanupThreads()\n"); #endif -#if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL)) +#ifdef HAVE_PTHREAD_H + if ((libxml_is_threaded) && (pthread_key_delete != NULL)) + pthread_key_delete(globalkey); +#elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL)) if (globalkey != TLS_OUT_OF_INDEXES) { xmlGlobalStateCleanupHelperParams *p; @@ -918,9 +932,6 @@ xmlCleanupThreads(void) globalkey = TLS_OUT_OF_INDEXES; } DeleteCriticalSection(&cleanup_helpers_cs); -#elif defined HAVE_PTHREAD_H - if ((libxml_is_threaded) && (pthread_key_delete != NULL)) - pthread_key_delete(globalkey); #endif } @@ -941,9 +952,7 @@ xmlOnceInit(void) #ifdef HAVE_PTHREAD_H (void) pthread_key_create(&globalkey, xmlFreeGlobalState); mainthread = pthread_self(); -#endif - -#if defined(HAVE_WIN32_THREADS) +#elif defined(HAVE_WIN32_THREADS) if (!run_once.done) { if (InterlockedIncrement(&run_once.control) == 1) { #if !defined(HAVE_COMPILER_TLS) @@ -958,9 +967,7 @@ xmlOnceInit(void) Sleep(0); } } -#endif - -#ifdef HAVE_BEOS_THREADS +#elif HAVE_BEOS_THREADS if (atomic_add(&run_once_init, 1) == 0) { globalkey = tls_allocate(); tls_set(globalkey, NULL); @@ -982,7 +989,8 @@ xmlOnceInit(void) * * Returns TRUE always */ -#if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL)) +#ifdef HAVE_PTHREAD_H +#elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL)) #if defined(LIBXML_STATIC_FOR_DLL) BOOL XMLCALL xmlDllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) diff --git a/tree.c b/tree.c index 8e393da..ffebf06 100644 --- a/tree.c +++ b/tree.c @@ -49,7 +49,8 @@ int __xmlRegisterCallbacks = 0; * * ************************************************************************/ -xmlNsPtr xmlNewReconciliedNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns); +static xmlNsPtr +xmlNewReconciliedNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns); static xmlChar* xmlGetPropNodeValueInternal(xmlAttrPtr prop); @@ -1420,9 +1421,9 @@ xmlStringLenGetNodeList(xmlDocPtr doc, const xmlChar *value, int len) { node = xmlNewDocTextLen(doc, q, cur - q); if (node == NULL) return(ret); if (last == NULL) { - last = ret = node; + ret = node; } else { - last = xmlAddNextSibling(last, node); + xmlAddNextSibling(last, node); } } } @@ -1589,8 +1590,6 @@ xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value) { last = xmlAddNextSibling(last, node); } } - - charval = 0; } } else cur++; @@ -1800,7 +1799,7 @@ xmlNewPropInternal(xmlNodePtr node, xmlNsPtr ns, cur = (xmlAttrPtr) xmlMalloc(sizeof(xmlAttr)); if (cur == NULL) { if ((eatname == 1) && - ((node->doc == NULL) || + ((node == NULL) || (node->doc == NULL) || (!(xmlDictOwns(node->doc->dict, name))))) xmlFree((xmlChar *) name); xmlTreeErrMemory("building attribute"); @@ -1860,7 +1859,8 @@ xmlNewPropInternal(xmlNodePtr node, xmlNsPtr ns, } } - if (xmlIsID((node == NULL) ? NULL : node->doc, node, cur) == 1) + if ((value != NULL) && (node != NULL) && + (xmlIsID(node->doc, node, cur) == 1)) xmlAddID(NULL, node->doc, value, cur); if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue)) @@ -3103,6 +3103,14 @@ xmlAddSibling(xmlNodePtr cur, xmlNodePtr elem) { return(NULL); } + if (cur == elem) { +#ifdef DEBUG_TREE + xmlGenericError(xmlGenericErrorContext, + "xmlAddSibling : cur == elem\n"); +#endif + return(NULL); + } + /* * Constant time is we can rely on the ->parent->last to find * the last sibling. @@ -4160,7 +4168,8 @@ xmlStaticCopyNode(const xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent, if (!extended) goto out; - if ((node->type == XML_ELEMENT_NODE) && (node->nsDef != NULL)) + if (((node->type == XML_ELEMENT_NODE) || + (node->type == XML_XINCLUDE_START)) && (node->nsDef != NULL)) ret->nsDef = xmlCopyNamespaceList(node->nsDef); if (node->ns != NULL) { @@ -4187,7 +4196,8 @@ xmlStaticCopyNode(const xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent, ret->ns = ns; } } - if ((node->type == XML_ELEMENT_NODE) && (node->properties != NULL)) + if (((node->type == XML_ELEMENT_NODE) || + (node->type == XML_XINCLUDE_START)) && (node->properties != NULL)) ret->properties = xmlCopyPropList(ret, node->properties); if (node->type == XML_ENTITY_REF_NODE) { if ((doc == NULL) || (node->doc != doc)) { @@ -6045,7 +6055,7 @@ xmlSearchNsByHref(xmlDocPtr doc, xmlNodePtr node, const xmlChar * href) * @tree or on one of its ancestors then a new prefix is generated. * Returns the (new) namespace definition or NULL in case of error */ -xmlNsPtr +static xmlNsPtr xmlNewReconciliedNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns) { xmlNsPtr def; xmlChar prefix[50]; @@ -7061,11 +7071,13 @@ xmlBufferGrow(xmlBufferPtr buf, unsigned int len) { if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0); if (len + buf->use < buf->size) return(0); -/* - * Windows has a BIG problem on realloc timing, so we try to double - * the buffer size (if that's enough) (bug 146697) - */ -#ifdef WIN32 + /* + * Windows has a BIG problem on realloc timing, so we try to double + * the buffer size (if that's enough) (bug 146697) + * Apparently BSD too, and it's probably best for linux too + * On an embedded system this may be something to change + */ +#if 1 if (buf->size > len) size = buf->size * 2; else @@ -7765,8 +7777,11 @@ xmlDOMWrapStoreNs(xmlDocPtr doc, } } /* Create. */ - ns->next = xmlNewNs(NULL, nsName, prefix); - return (ns->next); + if (ns != NULL) { + ns->next = xmlNewNs(NULL, nsName, prefix); + return (ns->next); + } + return(NULL); } /* diff --git a/trio.c b/trio.c index 3fac2e6..b116ccc 100644 --- a/trio.c +++ b/trio.c @@ -1,6 +1,6 @@ /************************************************************************* * - * $Id: trio.c 3600 2007-04-17 12:44:58Z veillard $ + * $Id$ * * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg. * @@ -733,7 +733,7 @@ typedef struct _trio_userdef_t { * *************************************************************************/ -static TRIO_CONST char rcsid[] = "@(#)$Id: trio.c 3600 2007-04-17 12:44:58Z veillard $"; +static TRIO_CONST char rcsid[] = "@(#)$Id$"; /* * Need this to workaround a parser bug in HP C/iX compiler that fails diff --git a/trio.h b/trio.h index d998f35..eab1b6d 100644 --- a/trio.h +++ b/trio.h @@ -1,6 +1,6 @@ /************************************************************************* * - * $Id: trio.h 1886 2003-04-03 15:28:28Z veillard $ + * $Id$ * * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg. * @@ -29,7 +29,7 @@ * HAVE_CONFIG_H as a compiler option themselves. */ #if defined(HAVE_CONFIG_H) -# include +# include "config.h" #endif #include "triodef.h" diff --git a/triodef.h b/triodef.h index 9ab3af1..fa89416 100644 --- a/triodef.h +++ b/triodef.h @@ -1,6 +1,6 @@ /************************************************************************* * - * $Id: triodef.h 3473 2006-05-31 13:35:28Z veillard $ + * $Id$ * * Copyright (C) 2001 Bjorn Reese * diff --git a/trionan.c b/trionan.c index e160370..95baae1 100644 --- a/trionan.c +++ b/trionan.c @@ -1,6 +1,6 @@ /************************************************************************* * - * $Id: trionan.c 3790 2008-09-01 13:08:57Z veillard $ + * $Id$ * * Copyright (C) 2001 Bjorn Reese * @@ -112,7 +112,7 @@ * Constants */ -static TRIO_CONST char rcsid[] = "@(#)$Id: trionan.c 3790 2008-09-01 13:08:57Z veillard $"; +static TRIO_CONST char rcsid[] = "@(#)$Id$"; #if defined(USE_IEEE_754) diff --git a/trionan.h b/trionan.h index 92de0fd..c5de32b 100644 --- a/trionan.h +++ b/trionan.h @@ -1,6 +1,6 @@ /************************************************************************* * - * $Id: trionan.h 2026 2003-08-06 04:43:55Z wbrack $ + * $Id$ * * Copyright (C) 2001 Bjorn Reese * diff --git a/triop.h b/triop.h index a062c96..8462c56 100644 --- a/triop.h +++ b/triop.h @@ -1,6 +1,6 @@ /************************************************************************* * - * $Id: triop.h 1886 2003-04-03 15:28:28Z veillard $ + * $Id$ * * Copyright (C) 2000 Bjorn Reese and Daniel Stenberg. * diff --git a/triostr.c b/triostr.c index dc5592c..30d13ac 100644 --- a/triostr.c +++ b/triostr.c @@ -1,6 +1,6 @@ /************************************************************************* * - * $Id: triostr.c 3600 2007-04-17 12:44:58Z veillard $ + * $Id$ * * Copyright (C) 2001 Bjorn Reese and Daniel Stenberg. * @@ -101,7 +101,7 @@ struct _trio_string_t */ #if !defined(TRIO_MINIMAL) -static TRIO_CONST char rcsid[] = "@(#)$Id: triostr.c 3600 2007-04-17 12:44:58Z veillard $"; +static TRIO_CONST char rcsid[] = "@(#)$Id$"; #endif /************************************************************************* diff --git a/triostr.h b/triostr.h index 6b8d30f..27f4ace 100644 --- a/triostr.h +++ b/triostr.h @@ -1,6 +1,6 @@ /************************************************************************* * - * $Id: triostr.h 3600 2007-04-17 12:44:58Z veillard $ + * $Id$ * * Copyright (C) 2001 Bjorn Reese and Daniel Stenberg. * diff --git a/uri.c b/uri.c index 28401c8..1e5e03f 100644 --- a/uri.c +++ b/uri.c @@ -1373,7 +1373,7 @@ xmlSaveUri(xmlURIPtr uri) { } ret = temp; } - ret[len++] = 0; + ret[len] = 0; return(ret); } diff --git a/valid.c b/valid.c index 9baba3b..37b55d0 100644 --- a/valid.c +++ b/valid.c @@ -122,7 +122,7 @@ xmlErrValid(xmlValidCtxtPtr ctxt, xmlParserErrors error, __xmlRaiseError(NULL, channel, data, pctxt, NULL, XML_FROM_VALID, error, XML_ERR_ERROR, NULL, 0, NULL, NULL, NULL, 0, 0, - msg); + "%s", msg); } #if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) @@ -637,8 +637,6 @@ xmlValidStateDebug(xmlValidCtxtPtr ctxt) { else if ((doc->intSubset == NULL) && \ (doc->extSubset == NULL)) return(0) -xmlAttributePtr xmlScanAttributeDecl(xmlDtdPtr dtd, const xmlChar *elem); - #ifdef LIBXML_REGEXP_ENABLED /************************************************************************ @@ -1832,53 +1830,6 @@ xmlDumpEnumeration(xmlBufferPtr buf, xmlEnumerationPtr cur) { #endif /* LIBXML_OUTPUT_ENABLED */ #ifdef LIBXML_VALID_ENABLED -/** - * xmlScanAttributeDeclCallback: - * @attr: the attribute decl - * @list: the list to update - * - * Callback called by xmlScanAttributeDecl when a new attribute - * has to be entered in the list. - */ -static void -xmlScanAttributeDeclCallback(xmlAttributePtr attr, xmlAttributePtr *list, - const xmlChar* name ATTRIBUTE_UNUSED) { - attr->nexth = *list; - *list = attr; -} - -/** - * xmlScanAttributeDecl: - * @dtd: pointer to the DTD - * @elem: the element name - * - * When inserting a new element scan the DtD for existing attributes - * for that element and initialize the Attribute chain - * - * Returns the pointer to the first attribute decl in the chain, - * possibly NULL. - */ -xmlAttributePtr -xmlScanAttributeDecl(xmlDtdPtr dtd, const xmlChar *elem) { - xmlAttributePtr ret = NULL; - xmlAttributeTablePtr table; - - if (dtd == NULL) { - return(NULL); - } - if (elem == NULL) { - return(NULL); - } - table = (xmlAttributeTablePtr) dtd->attributes; - if (table == NULL) - return(NULL); - - /* WRONG !!! */ - xmlHashScan3(table, NULL, NULL, elem, - (xmlHashScanner) xmlScanAttributeDeclCallback, &ret); - return(ret); -} - /** * xmlScanIDAttributeDecl: * @ctxt: the validation context @@ -3399,7 +3350,8 @@ int xmlValidateNotationUse(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *notationName) { xmlNotationPtr notaDecl; - if ((doc == NULL) || (doc->intSubset == NULL)) return(-1); + if ((doc == NULL) || (doc->intSubset == NULL) || + (notationName == NULL)) return(-1); notaDecl = xmlGetDtdNotationDesc(doc->intSubset, notationName); if ((notaDecl == NULL) && (doc->extSubset != NULL)) @@ -4100,13 +4052,10 @@ xmlValidNormalizeAttributeValue(xmlDocPtr doc, xmlNodePtr elem, if ((elem->ns != NULL) && (elem->ns->prefix != NULL)) { xmlChar fn[50]; xmlChar *fullname; - + fullname = xmlBuildQName(elem->name, elem->ns->prefix, fn, 50); if (fullname == NULL) return(NULL); - attrDecl = xmlGetDtdAttrDesc(doc->intSubset, fullname, name); - if ((attrDecl == NULL) && (doc->extSubset != NULL)) - attrDecl = xmlGetDtdAttrDesc(doc->extSubset, fullname, name); if ((fullname != fn) && (fullname != elem->name)) xmlFree(fullname); } @@ -4305,15 +4254,15 @@ xmlValidateElementDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc, while (next != NULL) { if (next->type == XML_ELEMENT_CONTENT_ELEMENT) { if ((xmlStrEqual(next->name, name)) && - (xmlStrEqual(next->prefix, cur->prefix))) { - if (cur->prefix == NULL) { + (xmlStrEqual(next->prefix, cur->c1->prefix))) { + if (cur->c1->prefix == NULL) { xmlErrValidNode(ctxt, (xmlNodePtr) elem, XML_DTD_CONTENT_ERROR, "Definition of %s has duplicate references of %s\n", elem->name, name, NULL); } else { xmlErrValidNode(ctxt, (xmlNodePtr) elem, XML_DTD_CONTENT_ERROR, "Definition of %s has duplicate references of %s:%s\n", - elem->name, cur->prefix, name); + elem->name, cur->c1->prefix, name); } ret = 0; } @@ -4322,15 +4271,15 @@ xmlValidateElementDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc, if (next->c1 == NULL) break; if (next->c1->type != XML_ELEMENT_CONTENT_ELEMENT) break; if ((xmlStrEqual(next->c1->name, name)) && - (xmlStrEqual(next->c1->prefix, cur->prefix))) { - if (cur->prefix == NULL) { + (xmlStrEqual(next->c1->prefix, cur->c1->prefix))) { + if (cur->c1->prefix == NULL) { xmlErrValidNode(ctxt, (xmlNodePtr) elem, XML_DTD_CONTENT_ERROR, "Definition of %s has duplicate references to %s\n", elem->name, name, NULL); } else { xmlErrValidNode(ctxt, (xmlNodePtr) elem, XML_DTD_CONTENT_ERROR, "Definition of %s has duplicate references to %s:%s\n", - elem->name, cur->prefix, name); + elem->name, cur->c1->prefix, name); } ret = 0; } diff --git a/win32/Makefile.bcb b/win32/Makefile.bcb index e706dc8..0bc4dbb 100644 --- a/win32/Makefile.bcb +++ b/win32/Makefile.bcb @@ -72,7 +72,7 @@ CFLAGS = $(CFLAGS) -DHAVE_ZLIB_H # The linker and its options. LD = ilink32.exe LDFLAGS = -q -U$(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION) -LDFLAGS = $(LDFLAGS) -L"$(BINDIR);$(LIBPREFIX);$(LIB);$(BCB)\lib\PSdk" +LDFLAGS = $(LDFLAGS) -L"$(BINDIR);$(LIBPREFIX);$(LIB);$(BCB)\lib;$(BCB)\lib\PSdk" LIBS = import32.lib !if "$(WITH_THREADS)" != "no" && "$(DYNRUNTIME)" == "1" LIBS = $(LIBS) cw32mti.lib @@ -84,7 +84,7 @@ LIBS = $(LIBS) cw32i.lib LIBS = $(LIBS) cw32.lib !endif !if "$(WITH_FTP)" == "1" || "$(WITH_HTTP)" == "1" -LIBS = $(LIBS) wsock32.lib +LIBS = $(LIBS) wsock32.lib ws2_32.lib !endif !if "$(WITH_ICONV)" == "1" LIBS = $(LIBS) iconvomf.lib diff --git a/win32/Makefile.msvc.orig b/win32/Makefile.msvc.orig deleted file mode 100644 index ec1950c..0000000 --- a/win32/Makefile.msvc.orig +++ /dev/null @@ -1,462 +0,0 @@ -# Makefile for libxml2, specific for Windows, MSVC and NMAKE. -# -# Take a look at the beginning and modify the variables to suit your -# environment. Having done that, you can do a -# -# nmake [all] to build the libxml and the accompanying utilities. -# nmake clean to remove all compiler output files and return to a -# clean state. -# nmake rebuild to rebuild everything from scratch. This basically does -# a 'nmake clean' and then a 'nmake all'. -# nmake install to install the library and its header files. -# -# March 2002, Igor Zlatkovic - -# There should never be a need to modify anything below this line. -# ---------------------------------------------------------------- - -AUTOCONF = .\config.msvc -!include $(AUTOCONF) - -# Names of various input and output components. -XML_NAME = xml2 -XML_BASENAME = lib$(XML_NAME) -XML_SO = $(XML_BASENAME).dll -XML_IMP = $(XML_BASENAME).lib -XML_DEF = $(XML_BASENAME).def -XML_A = $(XML_BASENAME)_a.lib -XML_A_DLL = $(XML_BASENAME)_a_dll.lib - -# Place where we let the compiler put its output. -BINDIR = bin.msvc -XML_INTDIR = int.msvc -XML_INTDIR_A = int.a.msvc -XML_INTDIR_A_DLL = int.a.dll.msvc -UTILS_INTDIR = int.utils.msvc - -# The preprocessor and its options. -CPP = cl.exe /EP -CPPFLAGS = /nologo /I$(XML_SRCDIR)\include -!if "$(WITH_THREADS)" != "no" -CPPFLAGS = $(CPPFLAGS) /D "_REENTRANT" -!endif - -# The compiler and its options. -CC = cl.exe -CFLAGS = /nologo /D "WIN32" /D "_WINDOWS" /D "_MBCS" /W1 $(CRUNTIME) -CFLAGS = $(CFLAGS) /I$(XML_SRCDIR) /I$(XML_SRCDIR)\include /I$(INCPREFIX) -!if "$(WITH_THREADS)" != "no" -CFLAGS = $(CFLAGS) /D "_REENTRANT" -!endif -!if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls" -CFLAGS = $(CFLAGS) /D "HAVE_WIN32_THREADS" /D "HAVE_COMPILER_TLS" -!else if "$(WITH_THREADS)" == "native" -CFLAGS = $(CFLAGS) /D "HAVE_WIN32_THREADS" -!else if "$(WITH_THREADS)" == "posix" -CFLAGS = $(CFLAGS) /D "HAVE_PTHREAD_H" -!endif -!if "$(WITH_ZLIB)" == "1" -CFLAGS = $(CFLAGS) /D "HAVE_ZLIB_H" -!endif -CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE - -# The linker and its options. -LD = link.exe -LDFLAGS = /nologo /VERSION:$(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION) -LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX) -LIBS = -!if "$(WITH_FTP)" == "1" || "$(WITH_HTTP)" == "1" -LIBS = $(LIBS) wsock32.lib ws2_32.lib -!endif -!if "$(WITH_ICONV)" == "1" -LIBS = $(LIBS) iconv.lib -!endif -!if "$(WITH_ZLIB)" == "1" -LIBS = $(LIBS) zdll.lib -!endif -!if "$(WITH_THREADS)" == "posix" -LIBS = $(LIBS) pthreadVC.lib -!endif -!if "$(WITH_MODULES)" == "1" -LIBS = $(LIBS) kernel32.lib -!endif - -# The archiver and its options. -AR = lib.exe -ARFLAGS = /nologo - -# Optimisation and debug symbols. -!if "$(DEBUG)" == "1" -CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Z7 -LDFLAGS = $(LDFLAGS) /DEBUG -!else -CFLAGS = $(CFLAGS) /D "NDEBUG" /O2 -LDFLAGS = $(LDFLAGS) /OPT:NOWIN98 -!endif - -# Libxml object files. -XML_OBJS = $(XML_INTDIR)\c14n.obj\ - $(XML_INTDIR)\catalog.obj\ - $(XML_INTDIR)\chvalid.obj\ - $(XML_INTDIR)\debugXML.obj\ - $(XML_INTDIR)\dict.obj\ - $(XML_INTDIR)\DOCBparser.obj\ - $(XML_INTDIR)\encoding.obj\ - $(XML_INTDIR)\entities.obj\ - $(XML_INTDIR)\error.obj\ - $(XML_INTDIR)\globals.obj\ - $(XML_INTDIR)\hash.obj\ - $(XML_INTDIR)\HTMLparser.obj\ - $(XML_INTDIR)\HTMLtree.obj\ - $(XML_INTDIR)\legacy.obj\ - $(XML_INTDIR)\list.obj\ - $(XML_INTDIR)\nanoftp.obj\ - $(XML_INTDIR)\nanohttp.obj\ - $(XML_INTDIR)\parser.obj\ - $(XML_INTDIR)\parserInternals.obj\ - $(XML_INTDIR)\pattern.obj\ - $(XML_INTDIR)\relaxng.obj\ - $(XML_INTDIR)\SAX2.obj\ - $(XML_INTDIR)\SAX.obj\ - $(XML_INTDIR)\schematron.obj\ - $(XML_INTDIR)\threads.obj\ - $(XML_INTDIR)\tree.obj\ - $(XML_INTDIR)\uri.obj\ - $(XML_INTDIR)\valid.obj\ - $(XML_INTDIR)\xinclude.obj\ - $(XML_INTDIR)\xlink.obj\ - $(XML_INTDIR)\xmlIO.obj\ - $(XML_INTDIR)\xmlmemory.obj\ - $(XML_INTDIR)\xmlreader.obj\ - $(XML_INTDIR)\xmlregexp.obj\ - $(XML_INTDIR)\xmlmodule.obj\ - $(XML_INTDIR)\xmlsave.obj\ - $(XML_INTDIR)\xmlschemas.obj\ - $(XML_INTDIR)\xmlschemastypes.obj\ - $(XML_INTDIR)\xmlunicode.obj\ - $(XML_INTDIR)\xmlwriter.obj\ - $(XML_INTDIR)\xpath.obj\ - $(XML_INTDIR)\xpointer.obj\ - $(XML_INTDIR)\xmlstring.obj - -# Static libxml object files. -XML_OBJS_A = $(XML_INTDIR_A)\c14n.obj\ - $(XML_INTDIR_A)\catalog.obj\ - $(XML_INTDIR_A)\chvalid.obj\ - $(XML_INTDIR_A)\debugXML.obj\ - $(XML_INTDIR_A)\dict.obj\ - $(XML_INTDIR_A)\DOCBparser.obj\ - $(XML_INTDIR_A)\encoding.obj\ - $(XML_INTDIR_A)\entities.obj\ - $(XML_INTDIR_A)\error.obj\ - $(XML_INTDIR_A)\globals.obj\ - $(XML_INTDIR_A)\hash.obj\ - $(XML_INTDIR_A)\HTMLparser.obj\ - $(XML_INTDIR_A)\HTMLtree.obj\ - $(XML_INTDIR_A)\legacy.obj\ - $(XML_INTDIR_A)\list.obj\ - $(XML_INTDIR_A)\nanoftp.obj\ - $(XML_INTDIR_A)\nanohttp.obj\ - $(XML_INTDIR_A)\parser.obj\ - $(XML_INTDIR_A)\parserInternals.obj\ - $(XML_INTDIR_A)\pattern.obj\ - $(XML_INTDIR_A)\relaxng.obj\ - $(XML_INTDIR_A)\SAX2.obj\ - $(XML_INTDIR_A)\SAX.obj\ - $(XML_INTDIR_A)\schematron.obj\ - $(XML_INTDIR_A)\threads.obj\ - $(XML_INTDIR_A)\tree.obj\ - $(XML_INTDIR_A)\uri.obj\ - $(XML_INTDIR_A)\valid.obj\ - $(XML_INTDIR_A)\xinclude.obj\ - $(XML_INTDIR_A)\xlink.obj\ - $(XML_INTDIR_A)\xmlIO.obj\ - $(XML_INTDIR_A)\xmlmemory.obj\ - $(XML_INTDIR_A)\xmlreader.obj\ - $(XML_INTDIR_A)\xmlregexp.obj\ - $(XML_INTDIR_A)\xmlmodule.obj\ - $(XML_INTDIR_A)\xmlsave.obj\ - $(XML_INTDIR_A)\xmlschemas.obj\ - $(XML_INTDIR_A)\xmlschemastypes.obj\ - $(XML_INTDIR_A)\xmlunicode.obj\ - $(XML_INTDIR_A)\xmlwriter.obj\ - $(XML_INTDIR_A)\xpath.obj\ - $(XML_INTDIR_A)\xpointer.obj\ - $(XML_INTDIR_A)\xmlstring.obj - -# Static libxml object files. -XML_OBJS_A_DLL = $(XML_INTDIR_A_DLL)\c14n.obj\ - $(XML_INTDIR_A_DLL)\catalog.obj\ - $(XML_INTDIR_A_DLL)\chvalid.obj\ - $(XML_INTDIR_A_DLL)\debugXML.obj\ - $(XML_INTDIR_A_DLL)\dict.obj\ - $(XML_INTDIR_A_DLL)\DOCBparser.obj\ - $(XML_INTDIR_A_DLL)\encoding.obj\ - $(XML_INTDIR_A_DLL)\entities.obj\ - $(XML_INTDIR_A_DLL)\error.obj\ - $(XML_INTDIR_A_DLL)\globals.obj\ - $(XML_INTDIR_A_DLL)\hash.obj\ - $(XML_INTDIR_A_DLL)\HTMLparser.obj\ - $(XML_INTDIR_A_DLL)\HTMLtree.obj\ - $(XML_INTDIR_A_DLL)\legacy.obj\ - $(XML_INTDIR_A_DLL)\list.obj\ - $(XML_INTDIR_A_DLL)\nanoftp.obj\ - $(XML_INTDIR_A_DLL)\nanohttp.obj\ - $(XML_INTDIR_A_DLL)\parser.obj\ - $(XML_INTDIR_A_DLL)\parserInternals.obj\ - $(XML_INTDIR_A_DLL)\pattern.obj\ - $(XML_INTDIR_A_DLL)\relaxng.obj\ - $(XML_INTDIR_A_DLL)\SAX2.obj\ - $(XML_INTDIR_A_DLL)\SAX.obj\ - $(XML_INTDIR_A_DLL)\schematron.obj\ - $(XML_INTDIR_A_DLL)\threads.obj\ - $(XML_INTDIR_A_DLL)\tree.obj\ - $(XML_INTDIR_A_DLL)\uri.obj\ - $(XML_INTDIR_A_DLL)\valid.obj\ - $(XML_INTDIR_A_DLL)\xinclude.obj\ - $(XML_INTDIR_A_DLL)\xlink.obj\ - $(XML_INTDIR_A_DLL)\xmlIO.obj\ - $(XML_INTDIR_A_DLL)\xmlmemory.obj\ - $(XML_INTDIR_A_DLL)\xmlreader.obj\ - $(XML_INTDIR_A_DLL)\xmlregexp.obj\ - $(XML_INTDIR_A_DLL)\xmlmodule.obj\ - $(XML_INTDIR_A_DLL)\xmlsave.obj\ - $(XML_INTDIR_A_DLL)\xmlschemas.obj\ - $(XML_INTDIR_A_DLL)\xmlschemastypes.obj\ - $(XML_INTDIR_A_DLL)\xmlunicode.obj\ - $(XML_INTDIR_A_DLL)\xmlwriter.obj\ - $(XML_INTDIR_A_DLL)\xpath.obj\ - $(XML_INTDIR_A_DLL)\xpointer.obj\ - $(XML_INTDIR_A_DLL)\xmlstring.obj - -# Xmllint and friends executables. -UTILS = $(BINDIR)\xmllint.exe\ - $(BINDIR)\xmlcatalog.exe\ - $(BINDIR)\testAutomata.exe\ - $(BINDIR)\testC14N.exe\ - $(BINDIR)\testDocbook.exe\ - $(BINDIR)\testHTML.exe\ - $(BINDIR)\testReader.exe\ - $(BINDIR)\testRelax.exe\ - $(BINDIR)\testRegexp.exe\ - $(BINDIR)\testModule.exe\ - $(BINDIR)\testSAX.exe\ - $(BINDIR)\testSchemas.exe\ - $(BINDIR)\testURI.exe\ - $(BINDIR)\testXPath.exe\ - $(BINDIR)\runtest.exe\ - $(BINDIR)\runsuite.exe\ - $(BINDIR)\testapi.exe - -!if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls" || "$(WITH_THREADS)" == "native" -UTILS = $(UTILS) $(BINDIR)\testThreadsWin32.exe -!else if "$(WITH_THREADS)" == "posix" -UTILS = $(UTILS) $(BINDIR)\testThreads.exe -!endif - -!if "$(VCMANIFEST)" == "1" -_VC_MANIFEST_EMBED_EXE= if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 -_VC_MANIFEST_EMBED_DLL= if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2 -!else -_VC_MANIFEST_EMBED_EXE= -_VC_MANIFEST_EMBED_DLL= -!endif - -all : libxml libxmla libxmladll utils - -libxml : $(BINDIR)\$(XML_SO) - -libxmla : $(BINDIR)\$(XML_A) - -libxmladll : $(BINDIR)\$(XML_A_DLL) - -utils : $(UTILS) - -clean : - if exist $(XML_INTDIR) rmdir /S /Q $(XML_INTDIR) - if exist $(XML_INTDIR_A) rmdir /S /Q $(XML_INTDIR_A) - if exist $(XML_INTDIR_A_DLL) rmdir /S /Q $(XML_INTDIR_A_DLL) - if exist $(UTILS_INTDIR) rmdir /S /Q $(UTILS_INTDIR) - if exist $(BINDIR) rmdir /S /Q $(BINDIR) - -distclean : clean - if exist config.* del config.* - if exist Makefile del Makefile - -rebuild : clean all - -install-libs : all - if not exist $(INCPREFIX)\libxml mkdir $(INCPREFIX)\libxml - if not exist $(BINPREFIX) mkdir $(BINPREFIX) - if not exist $(LIBPREFIX) mkdir $(LIBPREFIX) - if not exist $(SOPREFIX) mkdir $(SOPREFIX) - copy $(XML_SRCDIR)\include\libxml\*.h $(INCPREFIX)\libxml - copy $(BINDIR)\$(XML_SO) $(SOPREFIX) - copy $(BINDIR)\$(XML_A) $(LIBPREFIX) - copy $(BINDIR)\$(XML_A_DLL) $(LIBPREFIX) - copy $(BINDIR)\$(XML_IMP) $(LIBPREFIX) - -install : install-libs - copy $(BINDIR)\*.exe $(BINPREFIX) - -copy $(BINDIR)\*.pdb $(BINPREFIX) - -install-dist : install-libs - copy $(BINDIR)\xml*.exe $(BINPREFIX) - -copy $(BINDIR)\xml*.pdb $(BINPREFIX) - -# This is a target for me, to make a binary distribution. Not for the public use, -# keep your hands off :-) -BDVERSION = $(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION).$(LIBXML_MICRO_VERSION) -BDPREFIX = $(XML_BASENAME)-$(BDVERSION).win32 -bindist : all - $(MAKE) /nologo PREFIX=$(BDPREFIX) SOPREFIX=$(BDPREFIX)\bin install-dist - cscript //NoLogo configure.js genreadme $(XML_BASENAME) $(BDVERSION) $(BDPREFIX)\readme.txt - - -# Makes the output directory. -$(BINDIR) : - if not exist $(BINDIR) mkdir $(BINDIR) - - -# Makes the libxml intermediate directory. -$(XML_INTDIR) : - if not exist $(XML_INTDIR) mkdir $(XML_INTDIR) - -# Makes the static libxml intermediate directory. -$(XML_INTDIR_A) : - if not exist $(XML_INTDIR_A) mkdir $(XML_INTDIR_A) - -# Makes the static for dll libxml intermediate directory. -$(XML_INTDIR_A_DLL) : - if not exist $(XML_INTDIR_A_DLL) mkdir $(XML_INTDIR_A_DLL) - -# An implicit rule for libxml compilation. -{$(XML_SRCDIR)}.c{$(XML_INTDIR)}.obj:: - $(CC) $(CFLAGS) /Fo$(XML_INTDIR)\ /c $< - -# An implicit rule for static libxml compilation. -{$(XML_SRCDIR)}.c{$(XML_INTDIR_A)}.obj:: - $(CC) $(CFLAGS) /D "LIBXML_STATIC" /Fo$(XML_INTDIR_A)\ /c $< - -# An implicit rule for static for dll libxml compilation. -{$(XML_SRCDIR)}.c{$(XML_INTDIR_A_DLL)}.obj:: - $(CC) $(CFLAGS) /D "LIBXML_STATIC" /D "LIBXML_STATIC_FOR_DLL" /Fo$(XML_INTDIR_A_DLL)\ /c $< - -# Compiles libxml source. Uses the implicit rule for commands. -$(XML_OBJS) : $(XML_INTDIR) - -# Compiles static libxml source. Uses the implicit rule for commands. -$(XML_OBJS_A) : $(XML_INTDIR_A) - -# Compiles static for dll libxml source. Uses the implicit rule for commands. -$(XML_OBJS_A_DLL) : $(XML_INTDIR_A_DLL) - -# Creates the export definition file (DEF) for libxml. -$(XML_INTDIR)\$(XML_DEF) : $(XML_INTDIR) $(XML_DEF).src - $(CPP) $(CPPFLAGS) $(XML_DEF).src > $(XML_INTDIR)\$(XML_DEF) - -# Creates the libxml shared object. -$(BINDIR)\$(XML_SO) : $(BINDIR) $(XML_OBJS) $(XML_INTDIR)\$(XML_DEF) - $(LD) $(LDFLAGS) /DLL \ - /IMPLIB:$(BINDIR)\$(XML_IMP) /OUT:$(BINDIR)\$(XML_SO) $(XML_OBJS) $(LIBS) - @$(_VC_MANIFEST_EMBED_DLL) - -#$(BINDIR)\$(XML_SO) : $(BINDIR) $(XML_OBJS) $(XML_INTDIR)\$(XML_DEF) -# $(LD) $(LDFLAGS) /DLL /DEF:$(XML_INTDIR)\$(XML_DEF) \ -# /IMPLIB:$(BINDIR)\$(XML_IMP) /OUT:$(BINDIR)\$(XML_SO) $(XML_OBJS) $(LIBS) - -# Creates the libxml archive. -$(BINDIR)\$(XML_A) : $(BINDIR) $(XML_OBJS_A) - $(AR) $(ARFLAGS) /OUT:$(BINDIR)\$(XML_A) $(XML_OBJS_A) - -# Creates the libxml static for dll archive. -$(BINDIR)\$(XML_A_DLL) : $(BINDIR) $(XML_OBJS_A_DLL) - $(AR) $(ARFLAGS) /OUT:$(BINDIR)\$(XML_A_DLL) $(XML_OBJS_A_DLL) - -# Makes the utils intermediate directory. -$(UTILS_INTDIR) : - if not exist $(UTILS_INTDIR) mkdir $(UTILS_INTDIR) - -# An implicit rule for xmllint and friends. -!if "$(STATIC)" == "1" -{$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe: - $(CC) /D "LIBXML_STATIC" $(CFLAGS) /Fo$(UTILS_INTDIR)\ /c $< - $(LD) $(LDFLAGS) /OUT:$@ $(XML_A) $(LIBS) $(UTILS_INTDIR)\$( .memdump - @echo ## XPath regression tests - @-$(BINDIR)\testXPath.exe | find /C "support not compiled in" 1>nul - @if %ERRORLEVEL% NEQ 0 @( \ - echo Skipping debug not compiled in\ - @exit 0 \ - ) - @for %%I in ($(XML_SRCDIR)\test\XPath\expr\*.*) do @( \ - @IF NOT EXIST $(XML_SRCDIR)\result\XPath\expr\%%~nxI ( \ - @echo New test %%~nxI &&\ - @echo %%~nxI &&\ - $(BINDIR)\testXPath.exe -f --expr %%I > $(XML_SRCDIR)/result/XPath/expr/%%~nxI &&\ - findstr /C:"MEMORY ALLOCATED : 0" \ - ) ELSE ( \ - $(BINDIR)\testXPath.exe -f --expr %%I 2>&1 > result.%%~nxI &&\ - fc $(XML_SRCDIR)\result\XPath\expr\%%~nxI result.%%~nxI >nul &\ - iF ERRORLEVEL 1 exit 1 & \ - findstr "MEMORY ALLOCATED" .memdump | findstr /C:"MEMORY ALLOCATED : 0" >nul &&\ - del result.%%~nxI \ - ) \ - ) - @for %%I in ($(XML_SRCDIR)\test\XPath\docs\*.*) do @( \ - for %%J in ($(XML_SRCDIR)\test\XPath\tests\%%~nxI*.*) do @( \ - if not exist $(XML_SRCDIR)\result\XPath\tests\%%~nxJ ( \ - $(BINDIR)\testXPath.exe -f -i %%I %%J > $(XML_SRCDIR)\result\XPath\tests\%%~nxJ &&\ - findstr /C:"MEMORY ALLOCATED" .memdump | findstr /C:"MEMORY ALLOCATED : 0" > nul \ - ) ELSE ( \ - $(BINDIR)\testXPAth.exe -f -i %%I %%J 2>&1 > result.%%~nxJ &&\ - findstr /C:"MEMORY ALLOCATED" .memdump | findstr /C:"MEMORY ALLOCATED : 0">null &&\ - fc $(XML_SRCDIR)\result\XPath\tests\%%~nxJ result.%%~nxJ >null & \ - IF ERRORLEVEL 1 (echo Error: %%I %%J & exit 1) & \ - del result.%%~nxJ \ - )\ - )\ - ) - -XMLtests : $(BINDIR)\xmllint.exe - @echo. 2> .memdump - @echo ## XML regression tests - -@for %%I in ($(XML_SRCDIR)\test\*) do @( \ - if not exist $(XML_SRCDIR)\result\%%~nxI ( \ - echo New test file %%~nxI &\ - $(BINDIR)\xmllint.exe %%I > $(XML_SRCDIR)\result\%%~nxI && \ - findstr /C:"MEMORY ALLOCATED" .memdump | findstr /C:"MEMORY ALLOCATED : 0" > null \ - ) ELSE ( \ - $(BINDIR)\xmllint.exe %%I 2>&1 > result.%%~nxI && \ - findstr /C:"MEMORY ALLOC" .memdump | findstr /C:"MEMORY ALLOCATED : 0" > null && \ - fc $(XML_SRCDIR)\result\%%~nxI result.%%~nxI > null && \ - $(BINDIR)\xmllint.exe result.%%~nxI 2>&1 > result2.%%~nxI | findstr /V /C:"failed to load external entity" && \ - fc result.%%~nxI result2.%%~nxI & \ - del result.%%~nxI result2.%%~nxI\ - ) \ - ) - - - - - - diff --git a/win32/libxml2.def.src b/win32/libxml2.def.src index 995b790..ce3f24a 100644 --- a/win32/libxml2.def.src +++ b/win32/libxml2.def.src @@ -161,6 +161,7 @@ xmlStringComment DATA xmlStringText DATA xmlStringTextNoenc DATA xmlStructuredError DATA +xmlStructuredErrorContext DATA #ifdef LIBXML_THREAD_ENABLED __xmlSubstituteEntitiesDefaultValue #else @@ -2630,6 +2631,9 @@ xmlXIncludeProcessTree xmlXIncludeProcessTreeFlags #endif #ifdef LIBXML_XINCLUDE_ENABLED +xmlXIncludeProcessTreeFlagsData +#endif +#ifdef LIBXML_XINCLUDE_ENABLED xmlXIncludeSetFlags #endif #ifdef LIBXML_XPATH_ENABLED diff --git a/xinclude.c b/xinclude.c index ae449f8..674db9c 100644 --- a/xinclude.c +++ b/xinclude.c @@ -438,9 +438,9 @@ xmlXIncludeParseFile(xmlXIncludeCtxtPtr ctxt, const char *URL) { * try to ensure that new documents included are actually * built with the same dictionary as the including document. */ - if ((ctxt->doc != NULL) && (ctxt->doc->dict != NULL) && - (pctxt->dict != NULL)) { - xmlDictFree(pctxt->dict); + if ((ctxt->doc != NULL) && (ctxt->doc->dict != NULL)) { + if (pctxt->dict != NULL) + xmlDictFree(pctxt->dict); pctxt->dict = ctxt->doc->dict; xmlDictReference(pctxt->dict); } @@ -798,6 +798,10 @@ xmlXIncludeAddTxt(xmlXIncludeCtxtPtr ctxt, xmlNodePtr txt, const xmlURL url) { * * ************************************************************************/ +static xmlNodePtr +xmlXIncludeCopyNodeList(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target, + xmlDocPtr source, xmlNodePtr elem); + /** * xmlXIncludeCopyNode: * @ctxt: the XInclude context @@ -818,7 +822,10 @@ xmlXIncludeCopyNode(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target, return(NULL); if (elem->type == XML_DTD_NODE) return(NULL); - result = xmlDocCopyNode(elem, target, 1); + if (elem->type == XML_DOCUMENT_NODE) + result = xmlXIncludeCopyNodeList(ctxt, target, source, elem->children); + else + result = xmlDocCopyNode(elem, target, 1); return(result); } @@ -967,7 +974,6 @@ xmlXIncludeCopyRange(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target, if ((cur == start) && (index1 > 1)) { content += (index1 - 1); len -= (index1 - 1); - index1 = 0; } else { len = index2; } @@ -2423,7 +2429,42 @@ xmlXIncludeSetFlags(xmlXIncludeCtxtPtr ctxt, int flags) { ctxt->parseFlags = flags; return(0); } - + +/** + * xmlXIncludeProcessTreeFlagsData: + * @tree: an XML node + * @flags: a set of xmlParserOption used for parsing XML includes + * @data: application data that will be passed to the parser context + * in the _private field of the parser context(s) + * + * Implement the XInclude substitution on the XML node @tree + * + * Returns 0 if no substitution were done, -1 if some processing failed + * or the number of substitutions done. + */ + +int +xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree, int flags, void *data) { + xmlXIncludeCtxtPtr ctxt; + int ret = 0; + + if ((tree == NULL) || (tree->doc == NULL)) + return(-1); + + ctxt = xmlXIncludeNewContext(tree->doc); + if (ctxt == NULL) + return(-1); + ctxt->_private = data; + ctxt->base = xmlStrdup((xmlChar *)tree->doc->URL); + xmlXIncludeSetFlags(ctxt, flags); + ret = xmlXIncludeDoProcess(ctxt, tree->doc, tree); + if ((ret >= 0) && (ctxt->nbErrors > 0)) + ret = -1; + + xmlXIncludeFreeContext(ctxt); + return(ret); +} + /** * xmlXIncludeProcessFlagsData: * @doc: an XML document @@ -2440,25 +2481,13 @@ int xmlXIncludeProcessFlagsData(xmlDocPtr doc, int flags, void *data) { xmlXIncludeCtxtPtr ctxt; xmlNodePtr tree; - int ret = 0; if (doc == NULL) return(-1); tree = xmlDocGetRootElement(doc); if (tree == NULL) return(-1); - ctxt = xmlXIncludeNewContext(doc); - if (ctxt == NULL) - return(-1); - ctxt->_private = data; - ctxt->base = xmlStrdup((xmlChar *)doc->URL); - xmlXIncludeSetFlags(ctxt, flags); - ret = xmlXIncludeDoProcess(ctxt, doc, tree); - if ((ret >= 0) && (ctxt->nbErrors > 0)) - ret = -1; - - xmlXIncludeFreeContext(ctxt); - return(ret); + return(xmlXIncludeProcessTreeFlagsData(tree, flags, data)); } /** diff --git a/xmlIO.c b/xmlIO.c index d4dc364..c03ac43 100644 --- a/xmlIO.c +++ b/xmlIO.c @@ -142,7 +142,7 @@ xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder); /************************************************************************ * * - * Tree memory error handler * + * Tree memory error handler * * * ************************************************************************/ @@ -425,7 +425,7 @@ __xmlIOErr(int domain, int code, const char *extra) idx = 0; if (code >= XML_IO_UNKNOWN) idx = code - XML_IO_UNKNOWN; if (idx >= (sizeof(IOerr) / sizeof(IOerr[0]))) idx = 0; - + __xmlSimpleError(domain, code, NULL, IOerr[idx], extra); } @@ -477,12 +477,12 @@ __xmlLoaderErr(void *ctx, const char *msg, const char *filename) XML_IO_LOAD_ERROR, level, NULL, 0, filename, NULL, NULL, 0, 0, msg, filename); - + } /************************************************************************ * * - * Tree memory error handler * + * Tree memory error handler * * * ************************************************************************/ /** @@ -504,7 +504,7 @@ xmlNormalizeWindowsPath(const xmlChar *path) * xmlCleanupInputCallbacks: * * clears the entire input callback table. this includes the - * compiled-in I/O. + * compiled-in I/O. */ void xmlCleanupInputCallbacks(void) @@ -529,7 +529,7 @@ xmlCleanupInputCallbacks(void) * xmlPopInputCallbacks: * * Clear the top input callback from the input stack. this includes the - * compiled-in I/O. + * compiled-in I/O. * * Returns the number of input callback registered or -1 in case of error. */ @@ -541,7 +541,7 @@ xmlPopInputCallbacks(void) if (xmlInputCallbackNr <= 0) return(-1); - + xmlInputCallbackNr--; xmlInputCallbackTable[xmlInputCallbackNr].matchcallback = NULL; xmlInputCallbackTable[xmlInputCallbackNr].opencallback = NULL; @@ -556,7 +556,7 @@ xmlPopInputCallbacks(void) * xmlCleanupOutputCallbacks: * * clears the entire output callback table. this includes the - * compiled-in I/O callbacks. + * compiled-in I/O callbacks. */ void xmlCleanupOutputCallbacks(void) @@ -613,6 +613,34 @@ xmlWrapOpenUtf8(const char *path,int mode) return fd; } +#ifdef HAVE_ZLIB_H +static gzFile +xmlWrapGzOpenUtf8(const char *path, const char *mode) +{ + gzFile fd; + wchar_t *wPath; + + fd = gzopen (path, mode); + if (fd) + return fd; + + wPath = __xmlIOWin32UTF8ToWChar(path); + if(wPath) + { + int d, m = (strstr(mode, "r") ? O_RDONLY : O_RDWR); +#ifdef _O_BINARY + m |= (strstr(mode, "b") ? _O_BINARY : 0); +#endif + d = _wopen(wPath, m); + if (d >= 0) + fd = gzdopen(d, mode); + xmlFree(wPath); + } + + return fd; +} +#endif + /** * xmlWrapStatUtf8: * @path: the path in utf-8 encoding @@ -679,7 +707,10 @@ typedef int (* xmlWrapStatFunc) (const char *f, struct stat *s); static xmlWrapStatFunc xmlWrapStat = xmlWrapStatNative; typedef FILE* (* xmlWrapOpenFunc)(const char *f,int mode); static xmlWrapOpenFunc xmlWrapOpen = xmlWrapOpenNative; - +#ifdef HAVE_ZLIB_H +typedef gzFile (* xmlWrapGzOpenFunc) (const char *f, const char *mode); +static xmlWrapGzOpenFunc xmlWrapGzOpen = gzopen; +#endif /** * xmlInitPlatformSpecificIo: * @@ -699,9 +730,15 @@ xmlInitPlatformSpecificIo(void) if(GetVersionEx(&osvi) && (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)) { xmlWrapStat = xmlWrapStatUtf8; xmlWrapOpen = xmlWrapOpenUtf8; +#ifdef HAVE_ZLIB_H + xmlWrapGzOpen = xmlWrapGzOpenUtf8; +#endif } else { xmlWrapStat = xmlWrapStatNative; xmlWrapOpen = xmlWrapOpenNative; +#ifdef HAVE_ZLIB_H + xmlWrapGzOpen = gzopen; +#endif } xmlPlatformIoInitialized = 1; @@ -866,7 +903,7 @@ xmlFileOpen_real (const char *filename) { #else path = &filename[5]; #endif - } else + } else path = filename; if (path == NULL) @@ -941,7 +978,7 @@ xmlFileOpenW (const char *filename) { #else path = &filename[7]; #endif - } else + } else path = filename; if (path == NULL) @@ -950,7 +987,7 @@ xmlFileOpenW (const char *filename) { #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__) fd = xmlWrapOpen(path, 1); #else - fd = fopen(path, "wb"); + fd = fopen(path, "wb"); #endif /* WIN32 */ if (fd == NULL) xmlIOErr(0, path); @@ -971,7 +1008,7 @@ xmlFileOpenW (const char *filename) { int xmlFileRead (void * context, char * buffer, int len) { int ret; - if ((context == NULL) || (buffer == NULL)) + if ((context == NULL) || (buffer == NULL)) return(-1); ret = fread(&buffer[0], 1, len, (FILE *) context); if (ret < 0) xmlIOErr(0, "fread()"); @@ -993,7 +1030,7 @@ static int xmlFileWrite (void * context, const char * buffer, int len) { int items; - if ((context == NULL) || (buffer == NULL)) + if ((context == NULL) || (buffer == NULL)) return(-1); items = fwrite(&buffer[0], len, 1, (FILE *) context); if ((items == 0) && (ferror((FILE *) context))) { @@ -1124,7 +1161,7 @@ xmlGzfileOpen_real (const char *filename) { #else path = &filename[7]; #endif - } else + } else path = filename; if (path == NULL) @@ -1132,7 +1169,11 @@ xmlGzfileOpen_real (const char *filename) { if (!xmlCheckFilename(path)) return(NULL); +#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__) + fd = xmlWrapGzOpen(path, "rb"); +#else fd = gzopen(path, "rb"); +#endif return((void *) fd); } @@ -1194,13 +1235,17 @@ xmlGzfileOpenW (const char *filename, int compression) { #else path = &filename[7]; #endif - } else + } else path = filename; if (path == NULL) return(NULL); +#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__) + fd = xmlWrapGzOpen(path, mode); +#else fd = gzopen(path, mode); +#endif return((void *) fd); } #endif /* LIBXML_OUTPUT_ENABLED */ @@ -1322,7 +1367,7 @@ append_reverse_ulong( xmlZMemBuff * buff, unsigned long data ) { /* ** This is plagiarized from putLong in gzio.c (zlib source) where - ** the number "4" is hardcoded. If zlib is ever patched to + ** the number "4" is hardcoded. If zlib is ever patched to ** support 64 bit file sizes, this code would need to be patched ** as well. */ @@ -1374,7 +1419,7 @@ xmlFreeZMemBuff( xmlZMemBuffPtr buff ) { * * Create a memory buffer to hold the compressed XML document. The * compressed document in memory will end up being identical to what - * would be created if gzopen/gzwrite/gzclose were being used to + * would be created if gzopen/gzwrite/gzclose were being used to * write the document to disk. The code for the header/trailer data to * the compression is plagiarized from the zlib source files. */ @@ -1423,7 +1468,7 @@ xmlCreateZMemBuff( int compression ) { buff->crc = crc32( 0L, NULL, 0 ); hdr_lgth = snprintf( (char *)buff->zbuff, buff->size, "%c%c%c%c%c%c%c%c%c%c", - GZ_MAGIC1, GZ_MAGIC2, Z_DEFLATED, + GZ_MAGIC1, GZ_MAGIC2, Z_DEFLATED, 0, 0, 0, 0, 0, 0, LXML_ZLIB_OS_CODE ); buff->zctrl.next_out = buff->zbuff + hdr_lgth; buff->zctrl.avail_out = buff->size - hdr_lgth; @@ -1461,11 +1506,11 @@ xmlZMemBuffExtend( xmlZMemBuffPtr buff, size_t ext_amt ) { new_size = buff->size + ext_amt; #ifdef DEBUG_HTTP - if ( cur_used > new_size ) + if ( cur_used > new_size ) xmlGenericError( xmlGenericErrorContext, "xmlZMemBuffExtend: %s\n%s %d bytes.\n", "Buffer overwrite detected during compressed memory", - "buffer extension. Overflowed by", + "buffer extension. Overflowed by", (cur_used - new_size ) ); #endif @@ -1603,7 +1648,7 @@ xmlZMemBuffGetContent( xmlZMemBuffPtr buff, char ** data_ref ) { "Error flushing zlib buffers. Error code", z_err ); xmlIOErr(XML_IO_WRITE, (const char *) msg); } - + return ( zlgth ); } #endif /* LIBXML_OUTPUT_ENABLED */ @@ -1762,7 +1807,7 @@ xmlIOHTTPDfltOpenW( const char * post_uri ) { * * Returns the number of bytes written */ -int +int xmlIOHTTPRead(void * context, char * buffer, int len) { if ((buffer == NULL) || (len < 0)) return(-1); return(xmlNanoHTTPRead(context, &buffer[0], len)); @@ -1782,7 +1827,7 @@ xmlIOHTTPRead(void * context, char * buffer, int len) { */ static int -xmlIOHTTPWrite( void * context, const char * buffer, int len ) { +xmlIOHTTPWrite( void * context, const char * buffer, int len ) { xmlIOHTTPWriteCtxtPtr ctxt = context; @@ -1794,7 +1839,7 @@ xmlIOHTTPWrite( void * context, const char * buffer, int len ) { /* Use gzwrite or fwrite as previously setup in the open call */ #ifdef HAVE_ZLIB_H - if ( ctxt->compression > 0 ) + if ( ctxt->compression > 0 ) len = xmlZMemBuffAppend( ctxt->doc_buff, buffer, len ); else @@ -1885,7 +1930,7 @@ xmlIOHTTPCloseWrite( void * context, const char * http_mthd ) { else { http_ctxt = xmlNanoHTTPMethod( ctxt->uri, http_mthd, http_content, - &content_type, content_encoding, + &content_type, content_encoding, content_lgth ); if ( http_ctxt != NULL ) { @@ -1904,7 +1949,7 @@ xmlIOHTTPCloseWrite( void * context, const char * http_mthd ) { /* ** Since either content or reply may be gzipped, - ** dump them to separate files instead of the + ** dump them to separate files instead of the ** standard error context. */ @@ -2041,7 +2086,7 @@ xmlIOFTPOpen (const char *filename) { * * Returns the number of bytes written */ -int +int xmlIOFTPRead(void * context, char * buffer, int len) { if ((buffer == NULL) || (len < 0)) return(-1); return(xmlNanoFTPRead(context, &buffer[0], len)); @@ -2104,7 +2149,7 @@ int xmlRegisterOutputCallbacks(xmlOutputMatchCallback matchFunc, xmlOutputOpenCallback openFunc, xmlOutputWriteCallback writeFunc, xmlOutputCloseCallback closeFunc) { - if (xmlOutputCallbackNr >= MAX_INPUT_CALLBACK) { + if (xmlOutputCallbackNr >= MAX_OUTPUT_CALLBACK) { return(-1); } xmlOutputCallbackTable[xmlOutputCallbackNr].matchcallback = matchFunc; @@ -2278,6 +2323,10 @@ xmlAllocOutputBuffer(xmlCharEncodingHandlerPtr encoder) { return(NULL); } + /* try to avoid a performance problem with Windows realloc() */ + if (ret->buffer->alloc == XML_BUFFER_ALLOC_EXACT) + ret->buffer->alloc = XML_BUFFER_ALLOC_DOUBLEIT; + ret->encoder = encoder; if (encoder != NULL) { ret->conv = xmlBufferCreateSize(4000); @@ -2289,7 +2338,7 @@ xmlAllocOutputBuffer(xmlCharEncodingHandlerPtr encoder) { /* * This call is designed to initiate the encoder state */ - xmlCharEncOutFunc(encoder, ret->conv, NULL); + xmlCharEncOutFunc(encoder, ret->conv, NULL); } else ret->conv = NULL; ret->writecallback = NULL; @@ -2344,7 +2393,7 @@ xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder) { /* * This call is designed to initiate the encoder state */ - xmlCharEncOutFunc(encoder, ret->conv, NULL); + xmlCharEncOutFunc(encoder, ret->conv, NULL); } else ret->conv = NULL; ret->writecallback = NULL; @@ -2662,7 +2711,7 @@ xmlOutputBufferCreateFilename(const char *URI, /** * xmlParserInputBufferCreateFile: - * @file: a FILE* + * @file: a FILE* * @enc: the charset encoding if known * * Create a buffered parser input for the progressive parsing of a FILE * @@ -2692,7 +2741,7 @@ xmlParserInputBufferCreateFile(FILE *file, xmlCharEncoding enc) { #ifdef LIBXML_OUTPUT_ENABLED /** * xmlOutputBufferCreateFile: - * @file: a FILE* + * @file: a FILE* * @encoder: the encoding converter or NULL * * Create a buffered output for the progressive saving to a FILE * @@ -2856,7 +2905,7 @@ xmlParserInputBufferCreateStatic(const char *mem, int size, * @fd: a file descriptor number * @encoder: the encoding converter or NULL * - * Create a buffered output for the progressive saving + * Create a buffered output for the progressive saving * to a file descriptor * * Returns the new parser output or NULL @@ -3138,7 +3187,7 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) { in->rawconsumed += (use - in->raw->use); } else { nbchars = len; - in->buffer->use += nbchars; + in->buffer->use += nbchars; buffer[nbchars] = 0; } #ifdef DEBUG_INPUT @@ -3248,12 +3297,12 @@ xmlOutputBufferWrite(xmlOutputBufferPtr out, int len, const char *buf) { * second write the stuff to the I/O channel */ if (out->encoder != NULL) { - ret = out->writecallback(out->context, + ret = out->writecallback(out->context, (const char *)out->conv->content, nbchars); if (ret >= 0) xmlBufferShrink(out->conv, ret); } else { - ret = out->writecallback(out->context, + ret = out->writecallback(out->context, (const char *)out->buffer->content, nbchars); if (ret >= 0) xmlBufferShrink(out->buffer, ret); @@ -3298,9 +3347,9 @@ xmlEscapeContent(unsigned char* out, int *outlen, const unsigned char* inend; inend = in + (*inlen); - + while ((in < inend) && (out < outend)) { - if (*in == '<') { + if (*in == '<') { if (outend - out < 4) break; *out++ = '&'; *out++ = 'l'; @@ -3330,7 +3379,7 @@ xmlEscapeContent(unsigned char* out, int *outlen, *out++ = (unsigned char) *in; } ++in; - } + } *outlen = out - outstart; *inlen = in - base; return(0); @@ -3440,12 +3489,12 @@ xmlOutputBufferWriteEscape(xmlOutputBufferPtr out, const xmlChar *str, * second write the stuff to the I/O channel */ if (out->encoder != NULL) { - ret = out->writecallback(out->context, + ret = out->writecallback(out->context, (const char *)out->conv->content, nbchars); if (ret >= 0) xmlBufferShrink(out->conv, ret); } else { - ret = out->writecallback(out->context, + ret = out->writecallback(out->context, (const char *)out->buffer->content, nbchars); if (ret >= 0) xmlBufferShrink(out->buffer, ret); @@ -3486,7 +3535,7 @@ done: int xmlOutputBufferWriteString(xmlOutputBufferPtr out, const char *str) { int len; - + if ((out == NULL) || (out->error)) return(-1); if (str == NULL) return(-1); @@ -3703,9 +3752,9 @@ static int xmlNoNetExists(const char *URL) { #else path = &URL[7]; #endif - } else + } else path = URL; - + return xmlCheckFilename(path); } @@ -3893,9 +3942,9 @@ xmlLoadExternalEntity(const char *URL, const char *ID, } /************************************************************************ - * * - * Disabling Network access * - * * + * * + * Disabling Network access * + * * ************************************************************************/ /** diff --git a/xmlcatalog.c b/xmlcatalog.c index 6f193b1..489509f 100644 --- a/xmlcatalog.c +++ b/xmlcatalog.c @@ -124,7 +124,6 @@ static void usershell(void) { free(cmdline); continue; } - nbargs++; /* * Parse the argument string @@ -138,8 +137,6 @@ static void usershell(void) { arg[i++] = *cur++; } arg[i] = 0; - if (i != 0) - nbargs++; /* * Parse the arguments diff --git a/xmllint.c b/xmllint.c index 77c1e62..25c6fb9 100644 --- a/xmllint.c +++ b/xmllint.c @@ -184,6 +184,7 @@ static int nocatalogs = 0; #endif #ifdef LIBXML_C14N_ENABLED static int canonical = 0; +static int canonical_11 = 0; static int exc_canonical = 0; #endif #ifdef LIBXML_READER_ENABLED @@ -247,7 +248,7 @@ void parsePath(const xmlChar *path) { static xmlExternalEntityLoader defaultEntityLoader = NULL; -static xmlParserInputPtr +static xmlParserInputPtr xmllintExternalEntityLoader(const char *URL, const char *ID, xmlParserCtxtPtr ctxt) { xmlParserInputPtr ret; @@ -305,10 +306,10 @@ xmllintExternalEntityLoader(const char *URL, const char *ID, ctxt->sax->error = err; if (load_trace) { fprintf \ - (stderr, - "Loaded URL=\"%s\" ID=\"%s\"\n", + (stderr, + "Loaded URL=\"%s\" ID=\"%s\"\n", newURL, - ID ? ID : "(null)"); + ID ? ID : "(null)"); } xmlFree(newURL); return(ret); @@ -328,9 +329,9 @@ xmllintExternalEntityLoader(const char *URL, const char *ID, return(NULL); } /************************************************************************ - * * + * * * Memory allocation consumption debugging * - * * + * * ************************************************************************/ static void @@ -391,13 +392,13 @@ myStrdupFunc(const char *str) return (ret); } /************************************************************************ - * * + * * * Internal timing routines to remove the necessity to have * * unix-specific function calls. * - * * + * * ************************************************************************/ -#ifndef HAVE_GETTIMEOFDAY +#ifndef HAVE_GETTIMEOFDAY #ifdef HAVE_SYS_TIMEB_H #ifdef HAVE_SYS_TIME_H #ifdef HAVE_FTIME @@ -523,9 +524,9 @@ endTimer(char *format, ...) } #endif /************************************************************************ - * * - * HTML ouput * - * * + * * + * HTML ouput * + * * ************************************************************************/ static char buffer[50000]; @@ -544,7 +545,7 @@ xmlHTMLEncodeSend(void) { /** * xmlHTMLPrintFileInfo: * @input: an xmlParserInputPtr input - * + * * Displays the associated file and line informations for the current input */ @@ -568,7 +569,7 @@ xmlHTMLPrintFileInfo(xmlParserInputPtr input) { /** * xmlHTMLPrintFileContext: * @input: an xmlParserInputPtr input - * + * * Displays current context within the input content for error tracking */ @@ -593,7 +594,7 @@ xmlHTMLPrintFileContext(xmlParserInputPtr input) { n = 0; while ((*cur != 0) && (*cur != '\n') && (*cur != '\r') && (n < 79)) { len = strlen(buffer); - snprintf(&buffer[len], sizeof(buffer) - len, "%c", + snprintf(&buffer[len], sizeof(buffer) - len, "%c", (unsigned char) *cur++); n++; } @@ -619,7 +620,7 @@ xmlHTMLPrintFileContext(xmlParserInputPtr input) { * @ctx: an XML parser context * @msg: the message to display/transmit * @...: extra parameters for the message display - * + * * Display and format an error messages, gives file, line, position and * extra parameters. */ @@ -636,7 +637,7 @@ xmlHTMLError(void *ctx, const char *msg, ...) if ((input != NULL) && (input->filename == NULL) && (ctxt->inputNr > 1)) { input = ctxt->inputTab[ctxt->inputNr - 2]; } - + xmlHTMLPrintFileInfo(input); xmlGenericError(xmlGenericErrorContext, "error: "); @@ -656,7 +657,7 @@ xmlHTMLError(void *ctx, const char *msg, ...) * @ctx: an XML parser context * @msg: the message to display/transmit * @...: extra parameters for the message display - * + * * Display and format a warning messages, gives file, line, position and * extra parameters. */ @@ -673,13 +674,13 @@ xmlHTMLWarning(void *ctx, const char *msg, ...) if ((input != NULL) && (input->filename == NULL) && (ctxt->inputNr > 1)) { input = ctxt->inputTab[ctxt->inputNr - 2]; } - + xmlHTMLPrintFileInfo(input); - + xmlGenericError(xmlGenericErrorContext, "warning: "); va_start(args, msg); - len = strlen(buffer); + len = strlen(buffer); vsnprintf(&buffer[len], sizeof(buffer) - len, msg, args); va_end(args); xmlHTMLEncodeSend(); @@ -694,7 +695,7 @@ xmlHTMLWarning(void *ctx, const char *msg, ...) * @ctx: an XML parser context * @msg: the message to display/transmit * @...: extra parameters for the message display - * + * * Display and format an validity error messages, gives file, * line, position and extra parameters. */ @@ -710,7 +711,7 @@ xmlHTMLValidityError(void *ctx, const char *msg, ...) input = ctxt->input; if ((input->filename == NULL) && (ctxt->inputNr > 1)) input = ctxt->inputTab[ctxt->inputNr - 2]; - + xmlHTMLPrintFileInfo(input); xmlGenericError(xmlGenericErrorContext, "validity error: "); @@ -731,7 +732,7 @@ xmlHTMLValidityError(void *ctx, const char *msg, ...) * @ctx: an XML parser context * @msg: the message to display/transmit * @...: extra parameters for the message display - * + * * Display and format a validity warning messages, gives file, line, * position and extra parameters. */ @@ -749,10 +750,10 @@ xmlHTMLValidityWarning(void *ctx, const char *msg, ...) input = ctxt->inputTab[ctxt->inputNr - 2]; xmlHTMLPrintFileInfo(input); - + xmlGenericError(xmlGenericErrorContext, "validity warning: "); va_start(args, msg); - len = strlen(buffer); + len = strlen(buffer); vsnprintf(&buffer[len], sizeof(buffer) - len, msg, args); va_end(args); xmlHTMLEncodeSend(); @@ -763,9 +764,9 @@ xmlHTMLValidityWarning(void *ctx, const char *msg, ...) } /************************************************************************ - * * - * Shell Interface * - * * + * * + * Shell Interface * + * * ************************************************************************/ #ifdef LIBXML_DEBUG_ENABLED #ifdef LIBXML_XPATH_ENABLED @@ -774,7 +775,7 @@ xmlHTMLValidityWarning(void *ctx, const char *msg, ...) * @prompt: the prompt value * * Read a string - * + * * Returns a pointer to it or NULL on EOF the caller is expected to * free the returned string. */ @@ -813,9 +814,9 @@ xmlShellReadline(char *prompt) { #endif /* LIBXML_DEBUG_ENABLED */ /************************************************************************ - * * - * I/O Interfaces * - * * + * * + * I/O Interfaces * + * * ************************************************************************/ static int myRead(FILE *f, char * buf, int len) { @@ -829,7 +830,7 @@ static void myClose(FILE *f) { /************************************************************************ * * - * SAX based tests * + * SAX based tests * * * ************************************************************************/ @@ -999,7 +1000,7 @@ resolveEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *publicId, const xm return(NULL); /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */ - + fprintf(stdout, "SAX.resolveEntity("); if (publicId != NULL) fprintf(stdout, "%s", (char *)publicId); @@ -1054,8 +1055,8 @@ getParameterEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name) /** * entityDeclDebug: * @ctxt: An XML parser context - * @name: the entity name - * @type: the entity type + * @name: the entity name + * @type: the entity type * @publicId: The public ID of the entity * @systemId: The system ID of the entity * @content: the entity value (without processing). @@ -1084,8 +1085,8 @@ const xmlChar *nullstr = BAD_CAST "(null)"; /** * attributeDeclDebug: * @ctxt: An XML parser context - * @name: the attribute name - * @type: the attribute type + * @name: the attribute name + * @type: the attribute type * * An attribute definition has been parsed */ @@ -1109,8 +1110,8 @@ attributeDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar * elem, /** * elementDeclDebug: * @ctxt: An XML parser context - * @name: the element name - * @type: the element type + * @name: the element name + * @type: the element type * @content: the element value (without processing). * * An element definition has been parsed @@ -1296,7 +1297,7 @@ charactersDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len) * @ctxt: An XML parser context * @name: The entity name * - * called when an entity reference is detected. + * called when an entity reference is detected. */ static void referenceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name) @@ -1532,7 +1533,7 @@ startElementNsDebug(void *ctx ATTRIBUTE_UNUSED, else fprintf(stdout, ", '%s'", (char *) URI); fprintf(stdout, ", %d", nb_namespaces); - + if (namespaces != NULL) { for (i = 0;i < nb_namespaces * 2;i++) { fprintf(stdout, ", xmlns"); @@ -1695,7 +1696,7 @@ testSAX(const char *filename) { goto error; } inputPush(ctxt, inputStream); - + /* do the parsing */ xmlParseDocument(ctxt); @@ -1714,9 +1715,9 @@ error: } /************************************************************************ - * * - * Stream Test processing * - * * + * * + * Stream Test processing * + * * ************************************************************************/ #ifdef LIBXML_READER_ENABLED static void processNode(xmlTextReaderPtr reader) { @@ -1733,8 +1734,8 @@ static void processNode(xmlTextReaderPtr reader) { value = xmlTextReaderConstValue(reader); - - printf("%d %d %s %d %d", + + printf("%d %d %s %d %d", xmlTextReaderDepth(reader), type, name, @@ -1750,14 +1751,19 @@ static void processNode(xmlTextReaderPtr reader) { if (patternc) { xmlChar *path = NULL; int match = -1; - + if (type == XML_READER_TYPE_ELEMENT) { /* do the check only on element start */ match = xmlPatternMatch(patternc, xmlTextReaderCurrentNode(reader)); if (match) { +#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) path = xmlGetNodePath(xmlTextReaderCurrentNode(reader)); printf("Node %s matches pattern %s\n", path, pattern); +#else + printf("Node %s matches pattern %s\n", + xmlTextReaderConstName(reader), pattern); +#endif } } if (patstream != NULL) { @@ -1772,19 +1778,23 @@ static void processNode(xmlTextReaderPtr reader) { xmlFreeStreamCtxt(patstream); patstream = NULL; } else if (ret != match) { +#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) if (path == NULL) { path = xmlGetNodePath( xmlTextReaderCurrentNode(reader)); } +#endif fprintf(stderr, "xmlPatternMatch and xmlStreamPush disagree\n"); - fprintf(stderr, - " pattern %s node %s\n", - pattern, path); + if (path != NULL) + fprintf(stderr, " pattern %s node %s\n", + pattern, path); + else + fprintf(stderr, " pattern %s node %s\n", + pattern, xmlTextReaderConstName(reader)); } - - } + } if ((type == XML_READER_TYPE_END_ELEMENT) || ((type == XML_READER_TYPE_ELEMENT) && (empty))) { ret = xmlStreamPop(patstream); @@ -1811,7 +1821,7 @@ static void streamFile(char *filename) { xmlParserInputBufferPtr input = NULL; if (memory) { - if (stat(filename, &info) < 0) + if (stat(filename, &info) < 0) return; if ((fd = open(filename, O_RDONLY)) < 0) return; @@ -1980,7 +1990,7 @@ static void walkDoc(xmlDocPtr doc) { namespaces[i++] = ns->prefix; } namespaces[i++] = NULL; - namespaces[i++] = NULL; + namespaces[i] = NULL; if (pattern != NULL) { patternc = xmlPatterncompile((const xmlChar *) pattern, doc->dict, @@ -2041,9 +2051,9 @@ static void walkDoc(xmlDocPtr doc) { #endif /* LIBXML_READER_ENABLED */ /************************************************************************ - * * - * Tree Test processing * - * * + * * + * Tree Test processing * + * * ************************************************************************/ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { xmlDocPtr doc = NULL; @@ -2053,7 +2063,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { if ((timing) && (!repeat)) startTimer(); - + #ifdef LIBXML_TREE_ENABLED if (filename == NULL) { @@ -2104,7 +2114,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { int fd; struct stat info; const char *base; - if (stat(filename, &info) < 0) + if (stat(filename, &info) < 0) return; if ((fd = open(filename, O_RDONLY)) < 0) return; @@ -2114,7 +2124,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { doc = htmlReadMemory((char *) base, info.st_size, filename, NULL, options); - + munmap((char *) base, info.st_size); close(fd); } @@ -2199,7 +2209,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { ctxt = xmlNewParserCtxt(); else ctxt = rectxt; - if (ctxt == NULL) { + if (ctxt == NULL) { doc = NULL; } else { ctxt->sax->error = xmlHTMLError; @@ -2217,7 +2227,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { int fd; struct stat info; const char *base; - if (stat(filename, &info) < 0) + if (stat(filename, &info) < 0) return; if ((fd = open(filename, O_RDONLY)) < 0) return; @@ -2231,7 +2241,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { else doc = xmlCtxtReadMemory(rectxt, (char *) base, info.st_size, filename, NULL, options); - + munmap((char *) base, info.st_size); close(fd); #endif @@ -2243,7 +2253,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { ctxt = xmlNewParserCtxt(); else ctxt = rectxt; - if (ctxt == NULL) { + if (ctxt == NULL) { doc = NULL; } else { doc = xmlCtxtReadFile(ctxt, filename, NULL, options); @@ -2364,7 +2374,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { } } } - } + } }else #endif /* LIBXML_VALID_ENABLED */ #ifdef LIBXML_READER_ENABLED @@ -2429,7 +2439,19 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { xmlChar *result = NULL; int size; - size = xmlC14NDocDumpMemory(doc, NULL, 0, NULL, 1, &result); + size = xmlC14NDocDumpMemory(doc, NULL, XML_C14N_1_0, NULL, 1, &result); + if (size >= 0) { + write(1, result, size); + xmlFree(result); + } else { + fprintf(stderr, "Failed to canonicalize\n"); + progresult = XMLLINT_ERR_OUT; + } + } else if (canonical) { + xmlChar *result = NULL; + int size; + + size = xmlC14NDocDumpMemory(doc, NULL, XML_C14N_1_1, NULL, 1, &result); if (size >= 0) { write(1, result, size); xmlFree(result); @@ -2442,7 +2464,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { xmlChar *result = NULL; int size; - size = xmlC14NDocDumpMemory(doc, NULL, 1, NULL, 1, &result); + size = xmlC14NDocDumpMemory(doc, NULL, XML_C14N_EXCLUSIVE_1_0, NULL, 1, &result); if (size >= 0) { write(1, result, size); xmlFree(result); @@ -2460,7 +2482,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { if (encoding != NULL) { if ( format ) { xmlDocDumpFormatMemoryEnc(doc, &result, &len, encoding, 1); - } else { + } else { xmlDocDumpMemoryEnc(doc, &result, &len, encoding); } } else { @@ -2527,6 +2549,8 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { if (format) saveOpts |= XML_SAVE_FORMAT; + if (xmlout) + saveOpts |= XML_SAVE_AS_XML; if (output == NULL) ctxt = xmlSaveToFd(1, encoding, saveOpts); @@ -2580,9 +2604,9 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { startTimer(); } if (dtdvalid != NULL) - dtd = xmlParseDTD(NULL, (const xmlChar *)dtdvalid); + dtd = xmlParseDTD(NULL, (const xmlChar *)dtdvalid); else - dtd = xmlParseDTD((const xmlChar *)dtdvalidfpi, NULL); + dtd = xmlParseDTD((const xmlChar *)dtdvalidfpi, NULL); if ((timing) && (!repeat)) { endTimer("Parsing DTD"); } @@ -2772,9 +2796,9 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { } /************************************************************************ - * * - * Usage and Main * - * * + * * + * Usage and Main * + * * ************************************************************************/ static void showVersion(const char *name) { @@ -2788,28 +2812,28 @@ static void showVersion(const char *name) { if (xmlHasFeature(XML_WITH_PATTERN)) fprintf(stderr, "Patterns "); if (xmlHasFeature(XML_WITH_WRITER)) fprintf(stderr, "Writer "); if (xmlHasFeature(XML_WITH_SAX1)) fprintf(stderr, "SAXv1 "); - if (xmlHasFeature(XML_WITH_FTP)) fprintf(stderr, "FTP "); - if (xmlHasFeature(XML_WITH_HTTP)) fprintf(stderr, "HTTP "); + if (xmlHasFeature(XML_WITH_FTP)) fprintf(stderr, "FTP "); + if (xmlHasFeature(XML_WITH_HTTP)) fprintf(stderr, "HTTP "); if (xmlHasFeature(XML_WITH_VALID)) fprintf(stderr, "DTDValid "); - if (xmlHasFeature(XML_WITH_HTML)) fprintf(stderr, "HTML "); - if (xmlHasFeature(XML_WITH_LEGACY)) fprintf(stderr, "Legacy "); - if (xmlHasFeature(XML_WITH_C14N)) fprintf(stderr, "C14N "); - if (xmlHasFeature(XML_WITH_CATALOG)) fprintf(stderr, "Catalog "); - if (xmlHasFeature(XML_WITH_XPATH)) fprintf(stderr, "XPath "); - if (xmlHasFeature(XML_WITH_XPTR)) fprintf(stderr, "XPointer "); - if (xmlHasFeature(XML_WITH_XINCLUDE)) fprintf(stderr, "XInclude "); - if (xmlHasFeature(XML_WITH_ICONV)) fprintf(stderr, "Iconv "); - if (xmlHasFeature(XML_WITH_ISO8859X)) fprintf(stderr, "ISO8859X "); - if (xmlHasFeature(XML_WITH_UNICODE)) fprintf(stderr, "Unicode "); - if (xmlHasFeature(XML_WITH_REGEXP)) fprintf(stderr, "Regexps "); - if (xmlHasFeature(XML_WITH_AUTOMATA)) fprintf(stderr, "Automata "); - if (xmlHasFeature(XML_WITH_EXPR)) fprintf(stderr, "Expr "); - if (xmlHasFeature(XML_WITH_SCHEMAS)) fprintf(stderr, "Schemas "); - if (xmlHasFeature(XML_WITH_SCHEMATRON)) fprintf(stderr, "Schematron "); - if (xmlHasFeature(XML_WITH_MODULES)) fprintf(stderr, "Modules "); - if (xmlHasFeature(XML_WITH_DEBUG)) fprintf(stderr, "Debug "); - if (xmlHasFeature(XML_WITH_DEBUG_MEM)) fprintf(stderr, "MemDebug "); - if (xmlHasFeature(XML_WITH_DEBUG_RUN)) fprintf(stderr, "RunDebug "); + if (xmlHasFeature(XML_WITH_HTML)) fprintf(stderr, "HTML "); + if (xmlHasFeature(XML_WITH_LEGACY)) fprintf(stderr, "Legacy "); + if (xmlHasFeature(XML_WITH_C14N)) fprintf(stderr, "C14N "); + if (xmlHasFeature(XML_WITH_CATALOG)) fprintf(stderr, "Catalog "); + if (xmlHasFeature(XML_WITH_XPATH)) fprintf(stderr, "XPath "); + if (xmlHasFeature(XML_WITH_XPTR)) fprintf(stderr, "XPointer "); + if (xmlHasFeature(XML_WITH_XINCLUDE)) fprintf(stderr, "XInclude "); + if (xmlHasFeature(XML_WITH_ICONV)) fprintf(stderr, "Iconv "); + if (xmlHasFeature(XML_WITH_ISO8859X)) fprintf(stderr, "ISO8859X "); + if (xmlHasFeature(XML_WITH_UNICODE)) fprintf(stderr, "Unicode "); + if (xmlHasFeature(XML_WITH_REGEXP)) fprintf(stderr, "Regexps "); + if (xmlHasFeature(XML_WITH_AUTOMATA)) fprintf(stderr, "Automata "); + if (xmlHasFeature(XML_WITH_EXPR)) fprintf(stderr, "Expr "); + if (xmlHasFeature(XML_WITH_SCHEMAS)) fprintf(stderr, "Schemas "); + if (xmlHasFeature(XML_WITH_SCHEMATRON)) fprintf(stderr, "Schematron "); + if (xmlHasFeature(XML_WITH_MODULES)) fprintf(stderr, "Modules "); + if (xmlHasFeature(XML_WITH_DEBUG)) fprintf(stderr, "Debug "); + if (xmlHasFeature(XML_WITH_DEBUG_MEM)) fprintf(stderr, "MemDebug "); + if (xmlHasFeature(XML_WITH_DEBUG_RUN)) fprintf(stderr, "RunDebug "); if (xmlHasFeature(XML_WITH_ZLIB)) fprintf(stderr, "Zlib "); fprintf(stderr, "\n"); } @@ -2878,7 +2902,8 @@ static void usage(const char *name) { printf("\t--encode encoding : output in the given encoding\n"); printf("\t--dropdtd : remove the DOCTYPE of the input docs\n"); #endif /* LIBXML_OUTPUT_ENABLED */ - printf("\t--c14n : save in W3C canonical format (with comments)\n"); + printf("\t--c14n : save in W3C canonical format v1.0 (with comments)\n"); + printf("\t--c14n11 : save in W3C canonical format v1.1 (with comments)\n"); printf("\t--exc-c14n : save in W3C exclusive canonical format (with comments)\n"); #ifdef LIBXML_C14N_ENABLED #endif /* LIBXML_C14N_ENABLED */ @@ -2944,7 +2969,7 @@ main(int argc, char **argv) { int files = 0; int version = 0; const char* indent; - + if (argc <= 1) { usage(argv[0]); return(1); @@ -2964,7 +2989,7 @@ main(int argc, char **argv) { (!strcmp(argv[i], "--shell"))) { shell++; noout = 1; - } else + } else #endif #ifdef LIBXML_TREE_ENABLED if ((!strcmp(argv[i], "-copy")) || (!strcmp(argv[i], "--copy"))) @@ -3133,19 +3158,24 @@ main(int argc, char **argv) { (!strcmp(argv[i], "--debugent"))) { debugent++; xmlParserDebugEntities = 1; - } + } #endif #ifdef LIBXML_C14N_ENABLED else if ((!strcmp(argv[i], "-c14n")) || (!strcmp(argv[i], "--c14n"))) { canonical++; options |= XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_DTDLOAD; - } + } + else if ((!strcmp(argv[i], "-c14n11")) || + (!strcmp(argv[i], "--c14n11"))) { + canonical_11++; + options |= XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_DTDLOAD; + } else if ((!strcmp(argv[i], "-exc-c14n")) || (!strcmp(argv[i], "--exc-c14n"))) { exc_canonical++; options |= XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_DTDLOAD; - } + } #endif #ifdef LIBXML_CATALOG_ENABLED else if ((!strcmp(argv[i], "-catalogs")) || @@ -3154,7 +3184,7 @@ main(int argc, char **argv) { } else if ((!strcmp(argv[i], "-nocatalogs")) || (!strcmp(argv[i], "--nocatalogs"))) { nocatalogs++; - } + } #endif else if ((!strcmp(argv[i], "-encode")) || (!strcmp(argv[i], "--encode"))) { @@ -3202,16 +3232,17 @@ main(int argc, char **argv) { #ifdef LIBXML_SAX1_ENABLED else if ((!strcmp(argv[i], "-sax1")) || (!strcmp(argv[i], "--sax1"))) { - sax1++; + sax1++; + options |= XML_PARSE_SAX1; } #endif /* LIBXML_SAX1_ENABLED */ else if ((!strcmp(argv[i], "-sax")) || (!strcmp(argv[i], "--sax"))) { - sax++; + sax++; } else if ((!strcmp(argv[i], "-chkregister")) || (!strcmp(argv[i], "--chkregister"))) { - chkregister++; + chkregister++; #ifdef LIBXML_SCHEMAS_ENABLED } else if ((!strcmp(argv[i], "-relaxng")) || (!strcmp(argv[i], "--relaxng"))) { @@ -3289,12 +3320,12 @@ main(int argc, char **argv) { xmlRegisterNodeDefault(registerNode); xmlDeregisterNodeDefault(deregisterNode); } - + indent = getenv("XMLLINT_INDENT"); if(indent != NULL) { xmlTreeIndentString = indent; } - + defaultEntityLoader = xmlGetExternalEntityLoader(); xmlSetExternalEntityLoader(xmllintExternalEntityLoader); @@ -3316,7 +3347,7 @@ main(int argc, char **argv) { xmlGenericError(xmlGenericErrorContext, "%s output\n", argv[0]); - xmlGenericError(xmlGenericErrorContext, + xmlGenericError(xmlGenericErrorContext, "

                                                                                      %s output

                                                                                      \n", argv[0]); } @@ -3330,7 +3361,7 @@ main(int argc, char **argv) { xmlSchematronParserCtxtPtr ctxt; /* forces loading the DTDs */ - xmlLoadExtDtdDefaultValue |= 1; + xmlLoadExtDtdDefaultValue |= 1; options |= XML_PARSE_DTDLOAD; if (timing) { startTimer(); @@ -3364,7 +3395,7 @@ main(int argc, char **argv) { xmlRelaxNGParserCtxtPtr ctxt; /* forces loading the DTDs */ - xmlLoadExtDtdDefaultValue |= 1; + xmlLoadExtDtdDefaultValue |= 1; options |= XML_PARSE_DTDLOAD; if (timing) { startTimer(); @@ -3444,7 +3475,7 @@ main(int argc, char **argv) { (!strcmp(argv[i], "--dtdvalid"))) { i++; continue; - } + } if ((!strcmp(argv[i], "-path")) || (!strcmp(argv[i], "--path"))) { i++; @@ -3534,7 +3565,7 @@ main(int argc, char **argv) { } } } - if (generate) + if (generate) parseAndPrintFile(NULL, NULL); if ((htmlout) && (!nowrap)) { xmlGenericError(xmlGenericErrorContext, "\n"); diff --git a/xmlreader.c b/xmlreader.c index d42b1a0..c2afac7 100644 --- a/xmlreader.c +++ b/xmlreader.c @@ -1,7 +1,7 @@ /* * xmlreader.c: implements the xmlTextReader streaming node API * - * NOTE: + * NOTE: * XmlTextReader.Normalization Property won't be supported, since * it makes the parser non compliant to the XML recommendation * @@ -73,7 +73,7 @@ * * macro to flag unimplemented blocks */ -#define TODO \ +#define TODO \ xmlGenericError(xmlGenericErrorContext, \ "Unimplemented block at %s:%d\n", \ __FILE__, __LINE__); @@ -128,8 +128,8 @@ struct _xmlTextReader { endElementNsSAX2Func endElementNs; /* idem */ charactersSAXFunc characters; cdataBlockSAXFunc cdataBlock; - unsigned int base; /* base of the segment in the input */ - unsigned int cur; /* current position in the input */ + unsigned int base; /* base of the segment in the input */ + unsigned int cur; /* current position in the input */ xmlNodePtr node; /* current node */ xmlNodePtr curnode;/* current attribute node */ int depth; /* depth of the current node */ @@ -207,7 +207,7 @@ static int xmlTextReaderNextTree(xmlTextReaderPtr reader); * current scope */ #define DICT_FREE(str) \ - if ((str) && ((!dict) || \ + if ((str) && ((!dict) || \ (xmlDictOwns(dict, (const xmlChar *)(str)) == 0))) \ xmlFree((char *)(str)); @@ -252,7 +252,7 @@ xmlTextReaderRemoveID(xmlDocPtr doc, xmlAttrPtr attr) { if (doc == NULL) return(-1); if (attr == NULL) return(-1); table = (xmlIDTablePtr) doc->ids; - if (table == NULL) + if (table == NULL) return(-1); ID = xmlNodeListGetString(doc, attr->children, 1); @@ -842,7 +842,7 @@ xmlTextReaderPushData(xmlTextReaderPtr reader) { break; } - } else + } else break; } /* @@ -891,7 +891,7 @@ xmlTextReaderPushData(xmlTextReaderPtr reader) { if (reader->state != XML_TEXTREADER_DONE) { s = inbuf->use - reader->cur; val = xmlParseChunk(reader->ctxt, - (const char *) &inbuf->content[reader->cur], + (const char *) &inbuf->content[reader->cur], s, 1); reader->cur = inbuf->use; reader->state = XML_TEXTREADER_DONE; @@ -1031,7 +1031,7 @@ xmlTextReaderValidatePop(xmlTextReaderPtr reader) { int ret; if (reader->rngFullNode != NULL) { - if (node == reader->rngFullNode) + if (node == reader->rngFullNode) reader->rngFullNode = NULL; return; } @@ -1066,7 +1066,7 @@ xmlTextReaderValidateEntity(xmlTextReaderPtr reader) { */ if ((node->children == NULL) && (ctxt->sax != NULL) && (ctxt->sax->getEntity != NULL)) { - node->children = (xmlNodePtr) + node->children = (xmlNodePtr) ctxt->sax->getEntity(ctxt, node->name); } @@ -1256,7 +1256,7 @@ xmlTextReaderRead(xmlTextReaderPtr reader) { xmlTextReaderState oldstate = XML_TEXTREADER_START; xmlNodePtr oldnode = NULL; - + if (reader == NULL) return(-1); reader->curnode = NULL; @@ -1436,7 +1436,7 @@ get_next_node: /* * Cleanup of the old node */ - if ((reader->preserves == 0) && + if ((oldnode != NULL) && (reader->preserves == 0) && #ifdef LIBXML_XINCLUDE_ENABLED (reader->in_xinclude == 0) && #endif @@ -1489,7 +1489,7 @@ node_found: (xmlStrEqual(reader->node->ns->href, XINCLUDE_OLD_NS)))) { if (reader->xincctxt == NULL) { reader->xincctxt = xmlXIncludeNewContext(reader->ctxt->myDoc); - xmlXIncludeSetFlags(reader->xincctxt, + xmlXIncludeSetFlags(reader->xincctxt, reader->parserFlags & (~XML_PARSE_NOXINCNODE)); } /* @@ -1502,7 +1502,7 @@ node_found: if ((reader->node != NULL) && (reader->node->type == XML_XINCLUDE_START)) { reader->in_xinclude++; goto get_next_node; - } + } if ((reader->node != NULL) && (reader->node->type == XML_XINCLUDE_END)) { reader->in_xinclude--; goto get_next_node; @@ -1520,7 +1520,7 @@ node_found: */ if ((reader->node->children == NULL) && (reader->ctxt->sax != NULL) && (reader->ctxt->sax->getEntity != NULL)) { - reader->node->children = (xmlNodePtr) + reader->node->children = (xmlNodePtr) reader->ctxt->sax->getEntity(reader->ctxt, reader->node->name); } @@ -1548,7 +1548,7 @@ node_found: if ((reader->validate) && (reader->node != NULL)) { xmlNodePtr node = reader->node; - if ((node->type == XML_ELEMENT_NODE) && + if ((node->type == XML_ELEMENT_NODE) && ((reader->state != XML_TEXTREADER_END) && (reader->state != XML_TEXTREADER_BACKTRACK))) { xmlTextReaderValidatePush(reader); @@ -1573,7 +1573,7 @@ node_found: #endif /* LIBXML_PATTERN_ENABLED */ #ifdef LIBXML_SCHEMAS_ENABLED if ((reader->validate == XML_TEXTREADER_VALIDATE_XSD) && - (reader->xsdValidErrors == 0) && + (reader->xsdValidErrors == 0) && (reader->xsdValidCtxt != NULL)) { reader->xsdValidErrors = !xmlSchemaIsValid(reader->xsdValidCtxt); } @@ -1664,7 +1664,7 @@ xmlTextReaderNext(xmlTextReaderPtr reader) { * Reads the contents of the current node, including child nodes and markup. * * Returns a string containing the XML content, or NULL if the current node - * is neither an element nor attribute, or has no child nodes. The + * is neither an element nor attribute, or has no child nodes. The * string must be deallocated by the caller. */ xmlChar * @@ -1710,7 +1710,7 @@ xmlTextReaderReadInnerXml(xmlTextReaderPtr reader ATTRIBUTE_UNUSED) * Reads the contents of the current node, including child nodes and markup. * * Returns a string containing the XML content, or NULL if the current node - * is neither an element nor attribute, or has no child nodes. The + * is neither an element nor attribute, or has no child nodes. The * string must be deallocated by the caller. */ xmlChar * @@ -2106,7 +2106,7 @@ xmlNewTextReader(xmlParserInputBufferPtr input, const char *URI) { ret->base = 0; ret->cur = 0; } - + if (ret->ctxt == NULL) { xmlGenericError(xmlGenericErrorContext, "xmlNewTextReader : malloc failed\n"); @@ -2214,6 +2214,9 @@ xmlFreeTextReader(xmlTextReaderPtr reader) { xmlFree(reader->patternTab); } #endif + if (reader->faketext != NULL) { + xmlFreeNode(reader->faketext); + } if (reader->ctxt != NULL) { if (reader->dict == reader->ctxt->dict) reader->dict = NULL; @@ -2235,9 +2238,6 @@ xmlFreeTextReader(xmlTextReaderPtr reader) { xmlFree(reader->sax); if ((reader->input != NULL) && (reader->allocs & XML_TEXTREADER_INPUT)) xmlFreeParserInputBuffer(reader->input); - if (reader->faketext != NULL) { - xmlFreeNode(reader->faketext); - } if (reader->buffer != NULL) xmlBufferFree(reader->buffer); if (reader->entTab != NULL) @@ -2308,7 +2308,7 @@ xmlTextReaderGetAttributeNo(xmlTextReaderPtr reader, int no) { if (reader->curnode != NULL) return(NULL); /* TODO: handle the xmlDecl */ - if (reader->node->type != XML_ELEMENT_NODE) + if (reader->node->type != XML_ELEMENT_NODE) return(NULL); ns = reader->node->nsDef; @@ -2438,7 +2438,7 @@ xmlTextReaderGetAttributeNs(xmlTextReaderPtr reader, const xmlChar *localName, } ns = reader->node->nsDef; while (ns != NULL) { - if ((prefix == NULL && ns->prefix == NULL) || + if ((prefix == NULL && ns->prefix == NULL) || ((ns->prefix != NULL) && (xmlStrEqual(ns->prefix, localName)))) { return xmlStrdup(ns->href); } @@ -2550,7 +2550,7 @@ xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader, int no) { if (reader->node == NULL) return(-1); /* TODO: handle the xmlDecl */ - if (reader->node->type != XML_ELEMENT_NODE) + if (reader->node->type != XML_ELEMENT_NODE) return(-1); reader->curnode = NULL; @@ -2637,7 +2637,7 @@ xmlTextReaderMoveToAttribute(xmlTextReaderPtr reader, const xmlChar *name) { } return(0); } - + /* * Namespace default decl */ @@ -2714,7 +2714,7 @@ xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader, } ns = reader->node->nsDef; while (ns != NULL) { - if ((prefix == NULL && ns->prefix == NULL) || + if ((prefix == NULL && ns->prefix == NULL) || ((ns->prefix != NULL) && (xmlStrEqual(ns->prefix, localName)))) { reader->curnode = (xmlNodePtr) ns; return(1); @@ -2860,7 +2860,7 @@ xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader) { xmlNsPtr ns = (xmlNsPtr) reader->curnode; if (reader->faketext == NULL) { - reader->faketext = xmlNewDocText(reader->node->doc, + reader->faketext = xmlNewDocText(reader->node->doc, ns->href); } else { if ((reader->faketext->content != NULL) && @@ -2898,7 +2898,7 @@ xmlTextReaderConstEncoding(xmlTextReaderPtr reader) { doc = reader->ctxt->myDoc; if (doc == NULL) return(NULL); - + if (doc->encoding == NULL) return(NULL); else @@ -2930,7 +2930,7 @@ xmlTextReaderAttributeCount(xmlTextReaderPtr reader) { return(-1); if (reader->node == NULL) return(0); - + if (reader->curnode != NULL) node = reader->curnode; else @@ -2968,7 +2968,7 @@ xmlTextReaderAttributeCount(xmlTextReaderPtr reader) { int xmlTextReaderNodeType(xmlTextReaderPtr reader) { xmlNodePtr node; - + if (reader == NULL) return(-1); if (reader->node == NULL) @@ -3064,7 +3064,8 @@ xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader) { * * The local name of the node. * - * Returns the local name or NULL if not available + * Returns the local name or NULL if not available, + * if non NULL it need to be freed by the caller. */ xmlChar * xmlTextReaderLocalName(xmlTextReaderPtr reader) { @@ -3125,7 +3126,8 @@ xmlTextReaderConstLocalName(xmlTextReaderPtr reader) { * * The qualified name of the node, equal to Prefix :LocalName. * - * Returns the local name or NULL if not available + * Returns the local name or NULL if not available, + * if non NULL it need to be freed by the caller. */ xmlChar * xmlTextReaderName(xmlTextReaderPtr reader) { @@ -3144,7 +3146,7 @@ xmlTextReaderName(xmlTextReaderPtr reader) { if ((node->ns == NULL) || (node->ns->prefix == NULL)) return(xmlStrdup(node->name)); - + ret = xmlStrdup(node->ns->prefix); ret = xmlStrcat(ret, BAD_CAST ":"); ret = xmlStrcat(ret, node->name); @@ -3268,7 +3270,8 @@ xmlTextReaderConstName(xmlTextReaderPtr reader) { * * A shorthand reference to the namespace associated with the node. * - * Returns the prefix or NULL if not available + * Returns the prefix or NULL if not available, + * if non NULL it need to be freed by the caller. */ xmlChar * xmlTextReaderPrefix(xmlTextReaderPtr reader) { @@ -3331,7 +3334,8 @@ xmlTextReaderConstPrefix(xmlTextReaderPtr reader) { * * The URI defining the namespace associated with the node. * - * Returns the namespace URI or NULL if not available + * Returns the namespace URI or NULL if not available, + * if non NULL it need to be freed by the caller. */ xmlChar * xmlTextReaderNamespaceUri(xmlTextReaderPtr reader) { @@ -3386,7 +3390,8 @@ xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader) { * * The base URI of the node. * - * Returns the base URI or NULL if not available + * Returns the base URI or NULL if not available, + * if non NULL it need to be freed by the caller. */ xmlChar * xmlTextReaderBaseUri(xmlTextReaderPtr reader) { @@ -3644,7 +3649,8 @@ xmlTextReaderQuoteChar(xmlTextReaderPtr reader) { * * The xml:lang scope within which the node resides. * - * Returns the xml:lang value or NULL if none exists. + * Returns the xml:lang value or NULL if none exists., + * if non NULL it need to be freed by the caller. */ xmlChar * xmlTextReaderXmlLang(xmlTextReaderPtr reader) { @@ -3869,7 +3875,7 @@ xmlNodePtr xmlTextReaderCurrentNode(xmlTextReaderPtr reader) { if (reader == NULL) return(NULL); - + if (reader->curnode != NULL) return(reader->curnode); return(reader->node); @@ -3891,7 +3897,7 @@ xmlTextReaderPreserve(xmlTextReaderPtr reader) { if (reader == NULL) return(NULL); - + if (reader->curnode != NULL) cur = reader->curnode; else @@ -3904,7 +3910,7 @@ xmlTextReaderPreserve(xmlTextReaderPtr reader) { cur->extra |= NODE_IS_SPRESERVED; } reader->preserves++; - + parent = cur->parent;; while (parent != NULL) { if (parent->type == XML_ELEMENT_NODE) @@ -3920,7 +3926,7 @@ xmlTextReaderPreserve(xmlTextReaderPtr reader) { * @reader: the xmlTextReaderPtr used * @pattern: an XPath subset pattern * @namespaces: the prefix definitions, array of [URI, prefix] or NULL - * + * * This tells the XML Reader to preserve all nodes matched by the * pattern. The caller must also use xmlTextReaderCurrentDoc() to * keep an handle on the resulting document once parsing has finished @@ -3935,7 +3941,7 @@ xmlTextReaderPreservePattern(xmlTextReaderPtr reader, const xmlChar *pattern, if ((reader == NULL) || (pattern == NULL)) return(-1); - + comp = xmlPatterncompile(pattern, reader->dict, 0, namespaces); if (comp == NULL) return(-1); @@ -3972,7 +3978,7 @@ xmlTextReaderPreservePattern(xmlTextReaderPtr reader, const xmlChar *pattern, * @reader: the xmlTextReaderPtr used * * Hacking interface allowing to get the xmlDocPtr correponding to the - * current document being accessed by the xmlTextReader. + * current document being accessed by the xmlTextReader. * NOTE: as a result of this call, the reader will not destroy the * associated XML document and calling xmlFreeDoc() on the result * is needed once the reader parsing has finished. @@ -3987,72 +3993,80 @@ xmlTextReaderCurrentDoc(xmlTextReaderPtr reader) { return(reader->doc); if ((reader->ctxt == NULL) || (reader->ctxt->myDoc == NULL)) return(NULL); - + reader->preserve = 1; return(reader->ctxt->myDoc); } #ifdef LIBXML_SCHEMAS_ENABLED +static char *xmlTextReaderBuildMessage(const char *msg, va_list ap); -static char * -xmlTextReaderBuildMessage(const char *msg, va_list ap); - -static void XMLCDECL +static void XMLCDECL xmlTextReaderValidityError(void *ctxt, const char *msg, ...); -static void XMLCDECL +static void XMLCDECL xmlTextReaderValidityWarning(void *ctxt, const char *msg, ...); -static void XMLCDECL xmlTextReaderValidityErrorRelay(void *ctx, const char *msg, ...) +static void XMLCDECL +xmlTextReaderValidityErrorRelay(void *ctx, const char *msg, ...) { - xmlTextReaderPtr reader = (xmlTextReaderPtr) ctx; - char * str; - va_list ap; - - va_start(ap,msg); - str = xmlTextReaderBuildMessage(msg,ap); - if (!reader->errorFunc) { - xmlTextReaderValidityError(ctx, "%s", str); - } else { - reader->errorFunc(reader->errorFuncArg, str, XML_PARSER_SEVERITY_VALIDITY_ERROR, NULL /* locator */); - } - if (str != NULL) - xmlFree(str); - va_end(ap); + xmlTextReaderPtr reader = (xmlTextReaderPtr) ctx; + + char *str; + + va_list ap; + + va_start(ap, msg); + str = xmlTextReaderBuildMessage(msg, ap); + if (!reader->errorFunc) { + xmlTextReaderValidityError(ctx, "%s", str); + } else { + reader->errorFunc(reader->errorFuncArg, str, + XML_PARSER_SEVERITY_VALIDITY_ERROR, + NULL /* locator */ ); + } + if (str != NULL) + xmlFree(str); + va_end(ap); } -static void XMLCDECL xmlTextReaderValidityWarningRelay(void *ctx, const char *msg, ...) +static void XMLCDECL +xmlTextReaderValidityWarningRelay(void *ctx, const char *msg, ...) { - xmlTextReaderPtr reader = (xmlTextReaderPtr) ctx; - char * str; - va_list ap; - - va_start(ap,msg); - str = xmlTextReaderBuildMessage(msg,ap); - if (!reader->errorFunc) { - xmlTextReaderValidityWarning(ctx, "%s", str); - } else { - reader->errorFunc(reader->errorFuncArg, str, XML_PARSER_SEVERITY_VALIDITY_WARNING, NULL /* locator */); - } - if (str != NULL) - xmlFree(str); - va_end(ap); + xmlTextReaderPtr reader = (xmlTextReaderPtr) ctx; + + char *str; + + va_list ap; + + va_start(ap, msg); + str = xmlTextReaderBuildMessage(msg, ap); + if (!reader->errorFunc) { + xmlTextReaderValidityWarning(ctx, "%s", str); + } else { + reader->errorFunc(reader->errorFuncArg, str, + XML_PARSER_SEVERITY_VALIDITY_WARNING, + NULL /* locator */ ); + } + if (str != NULL) + xmlFree(str); + va_end(ap); } -static void -xmlTextReaderStructuredError(void *ctxt, xmlErrorPtr error); +static void + xmlTextReaderStructuredError(void *ctxt, xmlErrorPtr error); -static void xmlTextReaderValidityStructuredRelay(void * userData, xmlErrorPtr error) +static void +xmlTextReaderValidityStructuredRelay(void *userData, xmlErrorPtr error) { - xmlTextReaderPtr reader = (xmlTextReaderPtr) userData; + xmlTextReaderPtr reader = (xmlTextReaderPtr) userData; - if (reader->sErrorFunc) { - reader->sErrorFunc(reader->errorFuncArg, error); - } else { - xmlTextReaderStructuredError(reader, error); - } + if (reader->sErrorFunc) { + reader->sErrorFunc(reader->errorFuncArg, error); + } else { + xmlTextReaderStructuredError(reader, error); + } } - /** * xmlTextReaderRelaxNGSetSchema: * @reader: the xmlTextReaderPtr used @@ -4102,7 +4116,7 @@ xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader, xmlRelaxNGPtr schema) { reader); } if (reader->sErrorFunc != NULL) { - xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, + xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, xmlTextReaderValidityStructuredRelay, reader); } @@ -4138,15 +4152,15 @@ xmlTextReaderSetSchema(xmlTextReaderPtr reader, xmlSchemaPtr schema) { if (reader->xsdValidCtxt != NULL) { if (! reader->xsdPreserveCtxt) xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); - reader->xsdValidCtxt = NULL; + reader->xsdValidCtxt = NULL; } reader->xsdPreserveCtxt = 0; if (reader->xsdSchemas != NULL) { xmlSchemaFree(reader->xsdSchemas); reader->xsdSchemas = NULL; - } + } return(0); - } + } if (reader->mode != XML_TEXTREADER_MODE_INITIAL) return(-1); if (reader->xsdPlug != NULL) { @@ -4155,7 +4169,7 @@ xmlTextReaderSetSchema(xmlTextReaderPtr reader, xmlSchemaPtr schema) { } if (reader->xsdValidCtxt != NULL) { if (! reader->xsdPreserveCtxt) - xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); + xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); reader->xsdValidCtxt = NULL; } reader->xsdPreserveCtxt = 0; @@ -4213,7 +4227,7 @@ xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader, const char *rng) { if (reader == NULL) return(-1); - + if (rng == NULL) { if (reader->rngValidCtxt != NULL) { xmlRelaxNGFreeValidCtxt(reader->rngValidCtxt); @@ -4243,7 +4257,7 @@ xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader, const char *rng) { reader); } if (reader->sErrorFunc != NULL) { - xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, + xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, xmlTextReaderValidityStructuredRelay, reader); } @@ -4264,7 +4278,7 @@ xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader, const char *rng) { reader); } if (reader->sErrorFunc != NULL) { - xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, + xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, xmlTextReaderValidityStructuredRelay, reader); } @@ -4293,7 +4307,7 @@ xmlTextReaderSchemaValidateInternal(xmlTextReaderPtr reader, const char *xsd, xmlSchemaValidCtxtPtr ctxt, int options ATTRIBUTE_UNUSED) -{ +{ if (reader == NULL) return(-1); @@ -4304,7 +4318,7 @@ xmlTextReaderSchemaValidateInternal(xmlTextReaderPtr reader, ((reader->mode != XML_TEXTREADER_MODE_INITIAL) || (reader->ctxt == NULL))) return(-1); - + /* Cleanup previous validation stuff. */ if (reader->xsdPlug != NULL) { xmlSchemaSAXUnplug(reader->xsdPlug); @@ -4312,20 +4326,20 @@ xmlTextReaderSchemaValidateInternal(xmlTextReaderPtr reader, } if (reader->xsdValidCtxt != NULL) { if (! reader->xsdPreserveCtxt) - xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); + xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); reader->xsdValidCtxt = NULL; } reader->xsdPreserveCtxt = 0; if (reader->xsdSchemas != NULL) { xmlSchemaFree(reader->xsdSchemas); reader->xsdSchemas = NULL; - } + } if ((xsd == NULL) && (ctxt == NULL)) { /* We just want to deactivate the validation, so get out. */ return(0); - } - + } + if (xsd != NULL) { xmlSchemaParserCtxtPtr pctxt; /* Parse the schema and create validation environment. */ @@ -4357,13 +4371,13 @@ xmlTextReaderSchemaValidateInternal(xmlTextReaderPtr reader, return(-1); } } else { - /* Use the given validation context. */ + /* Use the given validation context. */ reader->xsdValidCtxt = ctxt; reader->xsdPreserveCtxt = 1; reader->xsdPlug = xmlSchemaSAXPlug(reader->xsdValidCtxt, &(reader->ctxt->sax), &(reader->ctxt->userData)); - if (reader->xsdPlug == NULL) { + if (reader->xsdPlug == NULL) { reader->xsdValidCtxt = NULL; reader->xsdPreserveCtxt = 0; return(-1); @@ -4382,7 +4396,7 @@ xmlTextReaderSchemaValidateInternal(xmlTextReaderPtr reader, reader); } if (reader->sErrorFunc != NULL) { - xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt, + xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt, xmlTextReaderValidityStructuredRelay, reader); } @@ -4453,7 +4467,7 @@ xmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader) { node = reader->curnode; else node = reader->node; - + if (XML_NAMESPACE_DECL == node->type) return(1); else @@ -4477,10 +4491,10 @@ xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader) { if (reader->doc != NULL) doc = reader->doc; else if (reader->ctxt != NULL) - doc = reader->ctxt->myDoc; + doc = reader->ctxt->myDoc; if (doc == NULL) return(NULL); - + if (doc->version == NULL) return(NULL); else @@ -4533,20 +4547,20 @@ xmlTextReaderBuildMessage(const char *msg, va_list ap) { va_end(aq); if (chars < 0) { xmlGenericError(xmlGenericErrorContext, "vsnprintf failed !\n"); - if (str) - xmlFree(str); - return NULL; + if (str) + xmlFree(str); + return NULL; } if ((chars < size) || (size == MAX_ERR_MSG_SIZE)) break; if (chars < MAX_ERR_MSG_SIZE) - size = chars + 1; + size = chars + 1; else size = MAX_ERR_MSG_SIZE; if ((larger = (char *) xmlRealloc(str, size)) == NULL) { xmlGenericError(xmlGenericErrorContext, "xmlRealloc failed !\n"); if (str) - xmlFree(str); + xmlFree(str); return NULL; } str = larger; @@ -4582,7 +4596,7 @@ xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator) { input = ctx->inputTab[ctx->inputNr - 2]; if (input != NULL) { ret = input->line; - } + } else { ret = -1; } @@ -4597,7 +4611,8 @@ xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator) { * * Obtain the base URI for the given locator. * - * Returns the base URI or NULL in case of error. + * Returns the base URI or NULL in case of error, + * if non NULL it need to be freed by the caller. */ xmlChar * xmlTextReaderLocatorBaseURI(xmlTextReaderLocatorPtr locator) { @@ -4618,7 +4633,7 @@ xmlTextReaderLocatorBaseURI(xmlTextReaderLocatorPtr locator) { input = ctx->inputTab[ctx->inputNr - 2]; if (input != NULL) { ret = xmlStrdup(BAD_CAST input->filename); - } + } else { ret = NULL; } @@ -4628,87 +4643,95 @@ xmlTextReaderLocatorBaseURI(xmlTextReaderLocatorPtr locator) { } static void -xmlTextReaderGenericError(void *ctxt, xmlParserSeverities severity, char *str) { - xmlParserCtxtPtr ctx = (xmlParserCtxtPtr)ctxt; - xmlTextReaderPtr reader = (xmlTextReaderPtr)ctx->_private; +xmlTextReaderGenericError(void *ctxt, xmlParserSeverities severity, + char *str) +{ + xmlParserCtxtPtr ctx = (xmlParserCtxtPtr) ctxt; + + xmlTextReaderPtr reader = (xmlTextReaderPtr) ctx->_private; if (str != NULL) { - if (reader->errorFunc) - reader->errorFunc(reader->errorFuncArg, - str, - severity, - (xmlTextReaderLocatorPtr)ctx); - xmlFree(str); + if (reader->errorFunc) + reader->errorFunc(reader->errorFuncArg, str, severity, + (xmlTextReaderLocatorPtr) ctx); + xmlFree(str); } } -static void -xmlTextReaderStructuredError(void *ctxt, xmlErrorPtr error) { - xmlParserCtxtPtr ctx = (xmlParserCtxtPtr) ctxt; - xmlTextReaderPtr reader = (xmlTextReaderPtr) ctx->_private; +static void +xmlTextReaderStructuredError(void *ctxt, xmlErrorPtr error) +{ + xmlParserCtxtPtr ctx = (xmlParserCtxtPtr) ctxt; + + xmlTextReaderPtr reader = (xmlTextReaderPtr) ctx->_private; - if (error && reader->sErrorFunc) { - reader->sErrorFunc(reader->errorFuncArg, - (xmlErrorPtr) error); - } + if (error && reader->sErrorFunc) { + reader->sErrorFunc(reader->errorFuncArg, (xmlErrorPtr) error); + } } -static void XMLCDECL -xmlTextReaderError(void *ctxt, const char *msg, ...) { +static void XMLCDECL +xmlTextReaderError(void *ctxt, const char *msg, ...) +{ va_list ap; - va_start(ap,msg); + va_start(ap, msg); xmlTextReaderGenericError(ctxt, XML_PARSER_SEVERITY_ERROR, - xmlTextReaderBuildMessage(msg,ap)); + xmlTextReaderBuildMessage(msg, ap)); va_end(ap); } -static void XMLCDECL -xmlTextReaderWarning(void *ctxt, const char *msg, ...) { +static void XMLCDECL +xmlTextReaderWarning(void *ctxt, const char *msg, ...) +{ va_list ap; - va_start(ap,msg); + va_start(ap, msg); xmlTextReaderGenericError(ctxt, XML_PARSER_SEVERITY_WARNING, - xmlTextReaderBuildMessage(msg,ap)); + xmlTextReaderBuildMessage(msg, ap)); va_end(ap); } -static void XMLCDECL -xmlTextReaderValidityError(void *ctxt, const char *msg, ...) { +static void XMLCDECL +xmlTextReaderValidityError(void *ctxt, const char *msg, ...) +{ va_list ap; + int len = xmlStrlen((const xmlChar *) msg); if ((len > 1) && (msg[len - 2] != ':')) { - /* - * some callbacks only report locator information: - * skip them (mimicking behaviour in error.c) - */ - va_start(ap,msg); - xmlTextReaderGenericError(ctxt, - XML_PARSER_SEVERITY_VALIDITY_ERROR, - xmlTextReaderBuildMessage(msg,ap)); - va_end(ap); + /* + * some callbacks only report locator information: + * skip them (mimicking behaviour in error.c) + */ + va_start(ap, msg); + xmlTextReaderGenericError(ctxt, + XML_PARSER_SEVERITY_VALIDITY_ERROR, + xmlTextReaderBuildMessage(msg, ap)); + va_end(ap); } } -static void XMLCDECL -xmlTextReaderValidityWarning(void *ctxt, const char *msg, ...) { +static void XMLCDECL +xmlTextReaderValidityWarning(void *ctxt, const char *msg, ...) +{ va_list ap; + int len = xmlStrlen((const xmlChar *) msg); if ((len != 0) && (msg[len - 1] != ':')) { - /* - * some callbacks only report locator information: - * skip them (mimicking behaviour in error.c) - */ - va_start(ap,msg); - xmlTextReaderGenericError(ctxt, - XML_PARSER_SEVERITY_VALIDITY_WARNING, - xmlTextReaderBuildMessage(msg,ap)); - va_end(ap); + /* + * some callbacks only report locator information: + * skip them (mimicking behaviour in error.c) + */ + va_start(ap, msg); + xmlTextReaderGenericError(ctxt, + XML_PARSER_SEVERITY_VALIDITY_WARNING, + xmlTextReaderBuildMessage(msg, ap)); + va_end(ap); } } @@ -4723,53 +4746,58 @@ xmlTextReaderValidityWarning(void *ctxt, const char *msg, ...) { * If @f is NULL, the default error and warning handlers are restored. */ void -xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader, - xmlTextReaderErrorFunc f, - void *arg) { +xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader, + xmlTextReaderErrorFunc f, void *arg) +{ if (f != NULL) { - reader->ctxt->sax->error = xmlTextReaderError; - reader->ctxt->sax->serror = NULL; - reader->ctxt->vctxt.error = xmlTextReaderValidityError; - reader->ctxt->sax->warning = xmlTextReaderWarning; - reader->ctxt->vctxt.warning = xmlTextReaderValidityWarning; - reader->errorFunc = f; - reader->sErrorFunc = NULL; - reader->errorFuncArg = arg; + reader->ctxt->sax->error = xmlTextReaderError; + reader->ctxt->sax->serror = NULL; + reader->ctxt->vctxt.error = xmlTextReaderValidityError; + reader->ctxt->sax->warning = xmlTextReaderWarning; + reader->ctxt->vctxt.warning = xmlTextReaderValidityWarning; + reader->errorFunc = f; + reader->sErrorFunc = NULL; + reader->errorFuncArg = arg; #ifdef LIBXML_SCHEMAS_ENABLED - if (reader->rngValidCtxt) { - xmlRelaxNGSetValidErrors(reader->rngValidCtxt, - xmlTextReaderValidityErrorRelay, - xmlTextReaderValidityWarningRelay, - reader); - xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, NULL, reader); - } - if (reader->xsdValidCtxt) { - xmlSchemaSetValidErrors(reader->xsdValidCtxt, - xmlTextReaderValidityErrorRelay, - xmlTextReaderValidityWarningRelay, - reader); - xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt, NULL, reader); - } + if (reader->rngValidCtxt) { + xmlRelaxNGSetValidErrors(reader->rngValidCtxt, + xmlTextReaderValidityErrorRelay, + xmlTextReaderValidityWarningRelay, + reader); + xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, NULL, + reader); + } + if (reader->xsdValidCtxt) { + xmlSchemaSetValidErrors(reader->xsdValidCtxt, + xmlTextReaderValidityErrorRelay, + xmlTextReaderValidityWarningRelay, + reader); + xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt, NULL, + reader); + } #endif - } - else { - /* restore defaults */ - reader->ctxt->sax->error = xmlParserError; - reader->ctxt->vctxt.error = xmlParserValidityError; - reader->ctxt->sax->warning = xmlParserWarning; - reader->ctxt->vctxt.warning = xmlParserValidityWarning; - reader->errorFunc = NULL; - reader->sErrorFunc = NULL; - reader->errorFuncArg = NULL; + } else { + /* restore defaults */ + reader->ctxt->sax->error = xmlParserError; + reader->ctxt->vctxt.error = xmlParserValidityError; + reader->ctxt->sax->warning = xmlParserWarning; + reader->ctxt->vctxt.warning = xmlParserValidityWarning; + reader->errorFunc = NULL; + reader->sErrorFunc = NULL; + reader->errorFuncArg = NULL; #ifdef LIBXML_SCHEMAS_ENABLED - if (reader->rngValidCtxt) { - xmlRelaxNGSetValidErrors(reader->rngValidCtxt, NULL, NULL, reader); - xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, NULL, reader); - } - if (reader->xsdValidCtxt) { - xmlSchemaSetValidErrors(reader->xsdValidCtxt, NULL, NULL, reader); - xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt, NULL, reader); - } + if (reader->rngValidCtxt) { + xmlRelaxNGSetValidErrors(reader->rngValidCtxt, NULL, NULL, + reader); + xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, NULL, + reader); + } + if (reader->xsdValidCtxt) { + xmlSchemaSetValidErrors(reader->xsdValidCtxt, NULL, NULL, + reader); + xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt, NULL, + reader); + } #endif } } @@ -4785,54 +4813,59 @@ xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader, * If @f is NULL, the default error and warning handlers are restored. */ void -xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader, - xmlStructuredErrorFunc f, - void *arg) { - if (f != NULL) { - reader->ctxt->sax->error = NULL; - reader->ctxt->sax->serror = xmlTextReaderStructuredError; - reader->ctxt->vctxt.error = xmlTextReaderValidityError; - reader->ctxt->sax->warning = xmlTextReaderWarning; - reader->ctxt->vctxt.warning = xmlTextReaderValidityWarning; - reader->sErrorFunc = f; - reader->errorFunc = NULL; - reader->errorFuncArg = arg; +xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader, + xmlStructuredErrorFunc f, void *arg) +{ + if (f != NULL) { + reader->ctxt->sax->error = NULL; + reader->ctxt->sax->serror = xmlTextReaderStructuredError; + reader->ctxt->vctxt.error = xmlTextReaderValidityError; + reader->ctxt->sax->warning = xmlTextReaderWarning; + reader->ctxt->vctxt.warning = xmlTextReaderValidityWarning; + reader->sErrorFunc = f; + reader->errorFunc = NULL; + reader->errorFuncArg = arg; #ifdef LIBXML_SCHEMAS_ENABLED - if (reader->rngValidCtxt) { - xmlRelaxNGSetValidErrors(reader->rngValidCtxt, NULL, NULL, reader); - xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, - xmlTextReaderValidityStructuredRelay, - reader); - } - if (reader->xsdValidCtxt) { - xmlSchemaSetValidErrors(reader->xsdValidCtxt, NULL, NULL, reader); - xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt, - xmlTextReaderValidityStructuredRelay, - reader); - } + if (reader->rngValidCtxt) { + xmlRelaxNGSetValidErrors(reader->rngValidCtxt, NULL, NULL, + reader); + xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, + xmlTextReaderValidityStructuredRelay, + reader); + } + if (reader->xsdValidCtxt) { + xmlSchemaSetValidErrors(reader->xsdValidCtxt, NULL, NULL, + reader); + xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt, + xmlTextReaderValidityStructuredRelay, + reader); + } #endif - } - else { - /* restore defaults */ - reader->ctxt->sax->error = xmlParserError; - reader->ctxt->sax->serror = NULL; - reader->ctxt->vctxt.error = xmlParserValidityError; - reader->ctxt->sax->warning = xmlParserWarning; - reader->ctxt->vctxt.warning = xmlParserValidityWarning; - reader->errorFunc = NULL; - reader->sErrorFunc = NULL; - reader->errorFuncArg = NULL; + } else { + /* restore defaults */ + reader->ctxt->sax->error = xmlParserError; + reader->ctxt->sax->serror = NULL; + reader->ctxt->vctxt.error = xmlParserValidityError; + reader->ctxt->sax->warning = xmlParserWarning; + reader->ctxt->vctxt.warning = xmlParserValidityWarning; + reader->errorFunc = NULL; + reader->sErrorFunc = NULL; + reader->errorFuncArg = NULL; #ifdef LIBXML_SCHEMAS_ENABLED - if (reader->rngValidCtxt) { - xmlRelaxNGSetValidErrors(reader->rngValidCtxt, NULL, NULL, reader); - xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, NULL, reader); - } - if (reader->xsdValidCtxt) { - xmlSchemaSetValidErrors(reader->xsdValidCtxt, NULL, NULL, reader); - xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt, NULL, reader); - } + if (reader->rngValidCtxt) { + xmlRelaxNGSetValidErrors(reader->rngValidCtxt, NULL, NULL, + reader); + xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, NULL, + reader); + } + if (reader->xsdValidCtxt) { + xmlSchemaSetValidErrors(reader->xsdValidCtxt, NULL, NULL, + reader); + xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt, NULL, + reader); + } #endif - } + } } /** @@ -4844,17 +4877,19 @@ xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader, * Returns the flag value 1 if valid, 0 if no, and -1 in case of error */ int -xmlTextReaderIsValid(xmlTextReaderPtr reader) { - if (reader == NULL) return(-1); +xmlTextReaderIsValid(xmlTextReaderPtr reader) +{ + if (reader == NULL) + return (-1); #ifdef LIBXML_SCHEMAS_ENABLED if (reader->validate == XML_TEXTREADER_VALIDATE_RNG) - return(reader->rngValidErrors == 0); + return (reader->rngValidErrors == 0); if (reader->validate == XML_TEXTREADER_VALIDATE_XSD) - return(reader->xsdValidErrors == 0); + return (reader->xsdValidErrors == 0); #endif if ((reader->ctxt != NULL) && (reader->ctxt->validate == 1)) - return(reader->ctxt->valid); - return(0); + return (reader->ctxt->valid); + return (0); } /** @@ -4866,14 +4901,14 @@ xmlTextReaderIsValid(xmlTextReaderPtr reader) { * Retrieve the error callback function and user argument. */ void -xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader, - xmlTextReaderErrorFunc *f, - void **arg) { - if (f != NULL) *f = reader->errorFunc; - if (arg != NULL) *arg = reader->errorFuncArg; +xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader, + xmlTextReaderErrorFunc * f, void **arg) +{ + if (f != NULL) + *f = reader->errorFunc; + if (arg != NULL) + *arg = reader->errorFuncArg; } - - /************************************************************************ * * * New set (2.6.0) of simpler and more flexible APIs * @@ -4890,7 +4925,7 @@ xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader, * @options: a combination of xmlParserOption * * Setup an XML reader with new options - * + * * Returns 0 in case of success and -1 in case of error. */ int @@ -5003,8 +5038,8 @@ xmlTextReaderSetup(xmlTextReaderPtr reader, inputStream->buf = buf; inputStream->base = inputStream->buf->buffer->content; inputStream->cur = inputStream->buf->buffer->content; - inputStream->end = - &inputStream->buf->buffer->content[inputStream->buf->buffer->use]; + inputStream->end = + &inputStream->buf->buffer->content[inputStream->buf->buffer->use]; inputPush(reader->ctxt, inputStream); reader->cur = 0; @@ -5105,14 +5140,14 @@ xmlTextReaderByteConsumed(xmlTextReaderPtr reader) { return(-1); return(xmlByteConsumed(reader->ctxt)); } - + /** * xmlReaderWalker: * @doc: a preparsed document * * Create an xmltextReader for a preparsed document. - * + * * Returns the new reader or NULL in case of error. */ xmlTextReaderPtr @@ -5153,7 +5188,7 @@ xmlReaderWalker(xmlDocPtr doc) * * Create an xmltextReader for an XML in-memory document. * The parsing flags @options are a combination of xmlParserOption. - * + * * Returns the new reader or NULL in case of error. */ xmlTextReaderPtr @@ -5178,7 +5213,7 @@ xmlReaderForDoc(const xmlChar * cur, const char *URL, const char *encoding, * * parse an XML file from the filesystem or the network. * The parsing flags @options are a combination of xmlParserOption. - * + * * Returns the new reader or NULL in case of error. */ xmlTextReaderPtr @@ -5203,7 +5238,7 @@ xmlReaderForFile(const char *filename, const char *encoding, int options) * * Create an xmltextReader for an XML in-memory document. * The parsing flags @options are a combination of xmlParserOption. - * + * * Returns the new reader or NULL in case of error. */ xmlTextReaderPtr @@ -5239,7 +5274,7 @@ xmlReaderForMemory(const char *buffer, int size, const char *URL, * The parsing flags @options are a combination of xmlParserOption. * NOTE that the file descriptor will not be closed when the * reader is closed or reset. - * + * * Returns the new reader or NULL in case of error. */ xmlTextReaderPtr @@ -5276,7 +5311,7 @@ xmlReaderForFd(int fd, const char *URL, const char *encoding, int options) * * Create an xmltextReader for an XML document from I/O functions and source. * The parsing flags @options are a combination of xmlParserOption. - * + * * Returns the new reader or NULL in case of error. */ xmlTextReaderPtr @@ -5311,7 +5346,7 @@ xmlReaderForIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, * * Setup an xmltextReader to parse a preparsed XML document. * This reuses the existing @reader xmlTextReader. - * + * * Returns 0 in case of success and -1 in case of error */ int @@ -5359,7 +5394,7 @@ xmlReaderNewWalker(xmlTextReaderPtr reader, xmlDocPtr doc) * Setup an xmltextReader to parse an XML in-memory document. * The parsing flags @options are a combination of xmlParserOption. * This reuses the existing @reader xmlTextReader. - * + * * Returns 0 in case of success and -1 in case of error */ int @@ -5389,7 +5424,7 @@ xmlReaderNewDoc(xmlTextReaderPtr reader, const xmlChar * cur, * parse an XML file from the filesystem or the network. * The parsing flags @options are a combination of xmlParserOption. * This reuses the existing @reader xmlTextReader. - * + * * Returns 0 in case of success and -1 in case of error */ int @@ -5423,7 +5458,7 @@ xmlReaderNewFile(xmlTextReaderPtr reader, const char *filename, * Setup an xmltextReader to parse an XML in-memory document. * The parsing flags @options are a combination of xmlParserOption. * This reuses the existing @reader xmlTextReader. - * + * * Returns 0 in case of success and -1 in case of error */ int @@ -5458,7 +5493,7 @@ xmlReaderNewMemory(xmlTextReaderPtr reader, const char *buffer, int size, * reader is closed or reset. * The parsing flags @options are a combination of xmlParserOption. * This reuses the existing @reader xmlTextReader. - * + * * Returns 0 in case of success and -1 in case of error */ int @@ -5493,7 +5528,7 @@ xmlReaderNewFd(xmlTextReaderPtr reader, int fd, * and source. * The parsing flags @options are a combination of xmlParserOption. * This reuses the existing @reader xmlTextReader. - * + * * Returns 0 in case of success and -1 in case of error */ int @@ -5520,6 +5555,7 @@ xmlReaderNewIO(xmlTextReaderPtr reader, xmlInputReadCallback ioread, * * ************************************************************************/ #ifdef NOT_USED_YET + /** * xmlBase64Decode: * @in: the input buffer @@ -5535,22 +5571,34 @@ xmlReaderNewIO(xmlTextReaderPtr reader, xmlInputReadCallback ioread, */ static int xmlBase64Decode(const unsigned char *in, unsigned long *inlen, - unsigned char *to, unsigned long *tolen) { - unsigned long incur; /* current index in in[] */ - unsigned long inblk; /* last block index in in[] */ - unsigned long outcur; /* current index in out[] */ - unsigned long inmax; /* size of in[] */ - unsigned long outmax; /* size of out[] */ - unsigned char cur; /* the current value read from in[] */ - unsigned char intmp[4], outtmp[4]; /* temporary buffers for the convert */ - int nbintmp; /* number of byte in intmp[] */ - int is_ignore; /* cur should be ignored */ - int is_end = 0; /* the end of the base64 was found */ + unsigned char *to, unsigned long *tolen) +{ + unsigned long incur; /* current index in in[] */ + + unsigned long inblk; /* last block index in in[] */ + + unsigned long outcur; /* current index in out[] */ + + unsigned long inmax; /* size of in[] */ + + unsigned long outmax; /* size of out[] */ + + unsigned char cur; /* the current value read from in[] */ + + unsigned char intmp[4], outtmp[4]; /* temporary buffers for the convert */ + + int nbintmp; /* number of byte in intmp[] */ + + int is_ignore; /* cur should be ignored */ + + int is_end = 0; /* the end of the base64 was found */ + int retval = 1; + int i; if ((in == NULL) || (inlen == NULL) || (to == NULL) || (tolen == NULL)) - return(-1); + return (-1); incur = 0; inblk = 0; @@ -5576,16 +5624,17 @@ xmlBase64Decode(const unsigned char *in, unsigned long *inlen, cur = 63; else if (cur == '.') cur = 0; - else if (cur == '=') /*no op , end of the base64 stream */ + else if (cur == '=') /*no op , end of the base64 stream */ is_end = 1; else { is_ignore = 1; - if (nbintmp == 0) - inblk = incur; - } + if (nbintmp == 0) + inblk = incur; + } if (!is_ignore) { int nbouttmp = 3; + int is_break = 0; if (is_end) { @@ -5599,30 +5648,30 @@ xmlBase64Decode(const unsigned char *in, unsigned long *inlen, is_break = 1; } intmp[nbintmp++] = cur; - /* - * if intmp is full, push the 4byte sequence as a 3 byte - * sequence out - */ + /* + * if intmp is full, push the 4byte sequence as a 3 byte + * sequence out + */ if (nbintmp == 4) { nbintmp = 0; outtmp[0] = (intmp[0] << 2) | ((intmp[1] & 0x30) >> 4); outtmp[1] = ((intmp[1] & 0x0F) << 4) | ((intmp[2] & 0x3C) >> 2); outtmp[2] = ((intmp[2] & 0x03) << 6) | (intmp[3] & 0x3F); - if (outcur + 3 >= outmax) { - retval = 2; - break; - } + if (outcur + 3 >= outmax) { + retval = 2; + break; + } for (i = 0; i < nbouttmp; i++) - to[outcur++] = outtmp[i]; - inblk = incur; + to[outcur++] = outtmp[i]; + inblk = incur; } if (is_break) { - retval = 0; + retval = 0; break; - } + } } } @@ -5635,14 +5684,23 @@ xmlBase64Decode(const unsigned char *in, unsigned long *inlen, * Test routine for the xmlBase64Decode function */ #if 0 -int main(int argc, char **argv) { +int +main(int argc, char **argv) +{ char *input = " VW4 gcGV0 \n aXQgdGVzdCAuCg== "; + char output[100]; + char output2[100]; + char output3[100]; + unsigned long inlen = strlen(input); + unsigned long outlen = 100; + int ret; + unsigned long cons, tmp, tmp2, prod; /* @@ -5651,25 +5709,28 @@ int main(int argc, char **argv) { ret = xmlBase64Decode(input, &inlen, output, &outlen); output[outlen] = 0; - printf("ret: %d, inlen: %ld , outlen: %ld, output: '%s'\n", ret, inlen, outlen, output); - + printf("ret: %d, inlen: %ld , outlen: %ld, output: '%s'\n", ret, inlen, + outlen, output)indent: Standard input:179: Error:Unmatched #endif +; + /* * output chunking */ cons = 0; prod = 0; while (cons < inlen) { - tmp = 5; - tmp2 = inlen - cons; + tmp = 5; + tmp2 = inlen - cons; - printf("%ld %ld\n", cons, prod); - ret = xmlBase64Decode(&input[cons], &tmp2, &output2[prod], &tmp); - cons += tmp2; - prod += tmp; - printf("%ld %ld\n", cons, prod); + printf("%ld %ld\n", cons, prod); + ret = xmlBase64Decode(&input[cons], &tmp2, &output2[prod], &tmp); + cons += tmp2; + prod += tmp; + printf("%ld %ld\n", cons, prod); } output2[outlen] = 0; - printf("ret: %d, cons: %ld , prod: %ld, output: '%s'\n", ret, cons, prod, output2); + printf("ret: %d, cons: %ld , prod: %ld, output: '%s'\n", ret, cons, + prod, output2); /* * input chunking @@ -5677,20 +5738,21 @@ int main(int argc, char **argv) { cons = 0; prod = 0; while (cons < inlen) { - tmp = 100 - prod; - tmp2 = inlen - cons; - if (tmp2 > 5) - tmp2 = 5; + tmp = 100 - prod; + tmp2 = inlen - cons; + if (tmp2 > 5) + tmp2 = 5; - printf("%ld %ld\n", cons, prod); - ret = xmlBase64Decode(&input[cons], &tmp2, &output3[prod], &tmp); - cons += tmp2; - prod += tmp; - printf("%ld %ld\n", cons, prod); + printf("%ld %ld\n", cons, prod); + ret = xmlBase64Decode(&input[cons], &tmp2, &output3[prod], &tmp); + cons += tmp2; + prod += tmp; + printf("%ld %ld\n", cons, prod); } output3[outlen] = 0; - printf("ret: %d, cons: %ld , prod: %ld, output: '%s'\n", ret, cons, prod, output3); - return(0); + printf("ret: %d, cons: %ld , prod: %ld, output: '%s'\n", ret, cons, + prod, output3); + return (0); } #endif diff --git a/xmlregexp.c b/xmlregexp.c index 73598a5..a10bf6b 100644 --- a/xmlregexp.c +++ b/xmlregexp.c @@ -233,6 +233,8 @@ struct _xmlAutomataState { typedef struct _xmlAutomata xmlRegParserCtxt; typedef xmlRegParserCtxt *xmlRegParserCtxtPtr; +#define AM_AUTOMATA_RNG 1 + struct _xmlAutomata { xmlChar *string; xmlChar *cur; @@ -260,6 +262,7 @@ struct _xmlAutomata { int determinist; int negs; + int flags; }; struct _xmlRegexp { @@ -271,6 +274,7 @@ struct _xmlRegexp { int nbCounters; xmlRegCounter *counters; int determinist; + int flags; /* * That's the compact form for determinists automatas */ @@ -353,6 +357,8 @@ static int xmlRegCheckCharacter(xmlRegAtomPtr atom, int codepoint); static int xmlRegCheckCharacterRange(xmlRegAtomType type, int codepoint, int neg, int start, int end, const xmlChar *blockName); +void xmlAutomataSetFlags(xmlAutomataPtr am, int flags); + /************************************************************************ * * * Regexp memory error handler * @@ -434,6 +440,7 @@ xmlRegEpxFromParse(xmlRegParserCtxtPtr ctxt) { ret->nbCounters = ctxt->nbCounters; ret->counters = ctxt->counters; ret->determinist = ctxt->determinist; + ret->flags = ctxt->flags; if (ret->determinist == -1) { xmlRegexpIsDeterminist(ret); } @@ -1569,8 +1576,13 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from, * 1. set transition from atom start to new state * 2. set transition from atom end to this state. */ - xmlFAGenerateEpsilonTransition(ctxt, atom->start, 0); - xmlFAGenerateEpsilonTransition(ctxt, atom->stop, ctxt->state); + if (to == NULL) { + xmlFAGenerateEpsilonTransition(ctxt, atom->start, 0); + xmlFAGenerateEpsilonTransition(ctxt, atom->stop, + ctxt->state); + } else { + xmlFAGenerateEpsilonTransition(ctxt, atom->start, to); + } break; case XML_REGEXP_QUANT_MULT: atom->quant = XML_REGEXP_QUANT_ONCE; @@ -2215,7 +2227,7 @@ xmlFACompareRanges(xmlRegRangePtr range1, xmlRegRangePtr range2) { if (((range1->neg == 0) && (range2->neg != 0)) || ((range1->neg != 0) && (range2->neg == 0))) ret = !ret; - return(1); + return(ret); } /** @@ -2423,6 +2435,7 @@ xmlFACompareAtomTypes(xmlRegAtomType type1, xmlRegAtomType type2) { * xmlFAEqualAtoms: * @atom1: an atom * @atom2: an atom + * @deep: if not set only compare string pointers * * Compares two atoms to check whether they are the same exactly * this is used to remove equivalent transitions @@ -2430,7 +2443,7 @@ xmlFACompareAtomTypes(xmlRegAtomType type1, xmlRegAtomType type2) { * Returns 1 if same and 0 otherwise */ static int -xmlFAEqualAtoms(xmlRegAtomPtr atom1, xmlRegAtomPtr atom2) { +xmlFAEqualAtoms(xmlRegAtomPtr atom1, xmlRegAtomPtr atom2, int deep) { int ret = 0; if (atom1 == atom2) @@ -2445,8 +2458,11 @@ xmlFAEqualAtoms(xmlRegAtomPtr atom1, xmlRegAtomPtr atom2) { ret = 0; break; case XML_REGEXP_STRING: - ret = xmlStrEqual((xmlChar *)atom1->valuep, - (xmlChar *)atom2->valuep); + if (!deep) + ret = (atom1->valuep == atom2->valuep); + else + ret = xmlStrEqual((xmlChar *)atom1->valuep, + (xmlChar *)atom2->valuep); break; case XML_REGEXP_CHARVAL: ret = (atom1->codepoint == atom2->codepoint); @@ -2464,6 +2480,7 @@ xmlFAEqualAtoms(xmlRegAtomPtr atom1, xmlRegAtomPtr atom2) { * xmlFACompareAtoms: * @atom1: an atom * @atom2: an atom + * @deep: if not set only compare string pointers * * Compares two atoms to check whether they intersect in some ways, * this is used by xmlFAComputesDeterminism and xmlFARecurseDeterminism only @@ -2471,7 +2488,7 @@ xmlFAEqualAtoms(xmlRegAtomPtr atom1, xmlRegAtomPtr atom2) { * Returns 1 if yes and 0 otherwise */ static int -xmlFACompareAtoms(xmlRegAtomPtr atom1, xmlRegAtomPtr atom2) { +xmlFACompareAtoms(xmlRegAtomPtr atom1, xmlRegAtomPtr atom2, int deep) { int ret = 1; if (atom1 == atom2) @@ -2497,8 +2514,11 @@ xmlFACompareAtoms(xmlRegAtomPtr atom1, xmlRegAtomPtr atom2) { } switch (atom1->type) { case XML_REGEXP_STRING: - ret = xmlRegStrEqualWildcard((xmlChar *)atom1->valuep, - (xmlChar *)atom2->valuep); + if (!deep) + ret = (atom1->valuep != atom2->valuep); + else + ret = xmlRegStrEqualWildcard((xmlChar *)atom1->valuep, + (xmlChar *)atom2->valuep); break; case XML_REGEXP_EPSILON: goto not_determinist; @@ -2561,9 +2581,14 @@ xmlFARecurseDeterminism(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state, int res; int transnr, nbTrans; xmlRegTransPtr t1; + int deep = 1; if (state == NULL) return(ret); + + if (ctxt->flags & AM_AUTOMATA_RNG) + deep = 0; + /* * don't recurse on transitions potentially added in the course of * the elimination. @@ -2587,7 +2612,7 @@ xmlFARecurseDeterminism(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state, } if (t1->to != to) continue; - if (xmlFACompareAtoms(t1->atom, atom)) { + if (xmlFACompareAtoms(t1->atom, atom, deep)) { ret = 0; /* mark the transition as non-deterministic */ t1->nd = 1; @@ -2611,6 +2636,7 @@ xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) { xmlRegTransPtr t1, t2, last; int i; int ret = 1; + int deep = 1; #ifdef DEBUG_REGEXP_GRAPH printf("xmlFAComputesDeterminism\n"); @@ -2619,6 +2645,9 @@ xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) { if (ctxt->determinist != -1) return(ctxt->determinist); + if (ctxt->flags & AM_AUTOMATA_RNG) + deep = 0; + /* * First cleanup the automata removing cancelled transitions */ @@ -2646,7 +2675,13 @@ xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) { continue; if (t2->atom != NULL) { if (t1->to == t2->to) { - if (xmlFAEqualAtoms(t1->atom, t2->atom)) + /* + * Here we use deep because we want to keep the + * transitions which indicate a conflict + */ + if (xmlFAEqualAtoms(t1->atom, t2->atom, deep) && + (t1->counter == t2->counter) && + (t1->count == t2->count)) t2->to = -1; /* eliminated */ } } @@ -2681,8 +2716,11 @@ xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) { if (t2->to == -1) /* eliminated */ continue; if (t2->atom != NULL) { - /* not determinist ! */ - if (xmlFACompareAtoms(t1->atom, t2->atom)) { + /* + * But here we don't use deep because we want to + * find transitions which indicate a conflict + */ + if (xmlFACompareAtoms(t1->atom, t2->atom, 1)) { ret = 0; /* mark the transitions as non-deterministic ones */ t1->nd = 1; @@ -5470,10 +5508,12 @@ xmlRegexpIsDeterminist(xmlRegexpPtr comp) { am->nbStates = comp->nbStates; am->states = comp->states; am->determinist = -1; + am->flags = comp->flags; ret = xmlFAComputesDeterminism(am); am->atoms = NULL; am->states = NULL; xmlFreeAutomata(am); + comp->determinist = ret; return(ret); } @@ -5551,6 +5591,7 @@ xmlNewAutomata(void) { xmlFreeAutomata(ctxt); return(NULL); } + ctxt->flags = 0; return(ctxt); } @@ -5568,6 +5609,20 @@ xmlFreeAutomata(xmlAutomataPtr am) { xmlRegFreeParserCtxt(am); } +/** + * xmlAutomataSetFlags: + * @am: an automata + * @flags: a set of internal flags + * + * Set some flags on the automata + */ +void +xmlAutomataSetFlags(xmlAutomataPtr am, int flags) { + if (am == NULL) + return; + am->flags |= flags; +} + /** * xmlAutomataGetInitState: * @am: an automata @@ -6254,6 +6309,7 @@ struct _xmlExpCtxt { int size; int nbElems; int nb_nodes; + int maxNodes; const char *expr; const char *cur; int nb_cons; @@ -6283,6 +6339,7 @@ xmlExpNewCtxt(int maxNodes, xmlDictPtr dict) { memset(ret, 0, sizeof(xmlExpCtxt)); ret->size = size; ret->nbElems = 0; + ret->maxNodes = maxNodes; ret->table = xmlMalloc(size * sizeof(xmlExpNodePtr)); if (ret->table == NULL) { xmlFree(ret); @@ -6868,7 +6925,7 @@ tail: return(0); if (nb >= len) return(-2); - list[nb++] = exp->exp_str; + list[nb] = exp->exp_str; return(1); case XML_EXP_COUNT: exp = exp->exp_left; @@ -6923,7 +6980,7 @@ tail: return(0); if (nb >= len) return(-2); - list[nb++] = exp->exp_str; + list[nb] = exp->exp_str; return(1); case XML_EXP_COUNT: exp = exp->exp_left; diff --git a/xmlsave.c b/xmlsave.c index 53b23e6..aaa5da8 100644 --- a/xmlsave.c +++ b/xmlsave.c @@ -690,8 +690,8 @@ htmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { xmlInitParser(); - doc = cur->doc; { - if (doc != NULL) + doc = cur->doc; + if (doc != NULL) { oldenc = doc->encoding; if (ctxt->encoding != NULL) { doc->encoding = BAD_CAST ctxt->encoding; @@ -976,7 +976,6 @@ xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr cur) { cur->encoding = oldenc; return(-1); } - switched_encoding = 1; } if (ctxt->options & XML_SAVE_FORMAT) htmlDocContentDumpFormatOutput(buf, cur, diff --git a/xmlschemas.c b/xmlschemas.c index c90b171..56c65e3 100644 --- a/xmlschemas.c +++ b/xmlschemas.c @@ -4274,7 +4274,7 @@ xmlSchemaContentModelDump(xmlSchemaParticlePtr particle, FILE * output, int dept for (i = 0;((i < depth) && (i < 25));i++) shift[2 * i] = shift[2 * i + 1] = ' '; shift[2 * i] = shift[2 * i + 1] = 0; - fprintf(output, shift); + fprintf(output, "%s", shift); if (particle->children == NULL) { fprintf(output, "MISSING particle term\n"); return; @@ -6797,7 +6797,7 @@ xmlSchemaParseWildcardNs(xmlSchemaParserCtxtPtr ctxt, tmp->next = NULL; if (wildc->nsSet == NULL) wildc->nsSet = tmp; - else + else if (lastNs != NULL) lastNs->next = tmp; lastNs = tmp; } @@ -10343,27 +10343,39 @@ xmlSchemaAddSchemaDoc(xmlSchemaParserCtxtPtr pctxt, /* Did we already fetch the doc? */ if (bkt != NULL) { - /* TODO: The following nasty cases will produce an error. */ if ((WXS_IS_BUCKET_IMPMAIN(type)) && (! bkt->imported)) { - /* We included/redefined and then try to import a schema. */ + /* + * We included/redefined and then try to import a schema, + * but the new location provided for import was different. + */ if (schemaLocation == NULL) schemaLocation = BAD_CAST "in_memory_buffer"; - xmlSchemaCustomErr(ACTXT_CAST pctxt, err, - invokingNode, NULL, - "The schema document '%s' cannot be imported, since " - "it was already included or redefined", - schemaLocation, NULL); - goto exit; + if (!xmlStrEqual(schemaLocation, + bkt->schemaLocation)) { + xmlSchemaCustomErr(ACTXT_CAST pctxt, err, + invokingNode, NULL, + "The schema document '%s' cannot be imported, since " + "it was already included or redefined", + schemaLocation, NULL); + goto exit; + } } else if ((! WXS_IS_BUCKET_IMPMAIN(type)) && (bkt->imported)) { - /* We imported and then try to include/redefine a schema. */ + /* + * We imported and then try to include/redefine a schema, + * but the new location provided for the include/redefine + * was different. + */ if (schemaLocation == NULL) schemaLocation = BAD_CAST "in_memory_buffer"; - xmlSchemaCustomErr(ACTXT_CAST pctxt, err, - invokingNode, NULL, - "The schema document '%s' cannot be included or " - "redefined, since it was already imported", - schemaLocation, NULL); - goto exit; + if (!xmlStrEqual(schemaLocation, + bkt->schemaLocation)) { + xmlSchemaCustomErr(ACTXT_CAST pctxt, err, + invokingNode, NULL, + "The schema document '%s' cannot be included or " + "redefined, since it was already imported", + schemaLocation, NULL); + goto exit; + } } } @@ -11027,14 +11039,15 @@ xmlSchemaParseIncludeOrRedefine(xmlSchemaParserCtxtPtr pctxt, */ isChameleon = 1; if (bucket->parsed && - (bucket->targetNamespace != pctxt->targetNamespace)) { - /* - * This is a sanity check, I dunno yet if this can happen. - */ - PERROR_INT("xmlSchemaParseIncludeOrRedefine", - "trying to use an already parsed schema for a " - "different targetNamespace"); - return(-1); + bucket->origTargetNamespace != NULL) { + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_SRC_INCLUDE, + node, NULL, + "The target namespace of the included/redefined schema " + "'%s' has to be absent or the same as the " + "including/redefining schema's target namespace", + schemaLocation, NULL); + goto exit_error; } bucket->targetNamespace = pctxt->targetNamespace; } @@ -12512,7 +12525,12 @@ xmlSchemaFreeParserCtxt(xmlSchemaParserCtxtPtr ctxt) * * ************************************************************************/ -static void +/** + * xmlSchemaBuildContentModelForSubstGroup: + * + * Returns 1 if nillable, 0 otherwise + */ +static int xmlSchemaBuildContentModelForSubstGroup(xmlSchemaParserCtxtPtr pctxt, xmlSchemaParticlePtr particle, int counter, xmlAutomataStatePtr end) { @@ -12520,6 +12538,7 @@ xmlSchemaBuildContentModelForSubstGroup(xmlSchemaParserCtxtPtr pctxt, xmlSchemaElementPtr elemDecl, member; xmlSchemaSubstGroupPtr substGroup; int i; + int ret = 0; elemDecl = (xmlSchemaElementPtr) particle->children; /* @@ -12535,7 +12554,7 @@ xmlSchemaBuildContentModelForSubstGroup(xmlSchemaParserCtxtPtr pctxt, "Internal error: xmlSchemaBuildContentModelForSubstGroup, " "declaration is marked having a subst. group but none " "available.\n", elemDecl->name, NULL); - return; + return(0); } if (counter >= 0) { /* @@ -12615,21 +12634,31 @@ xmlSchemaBuildContentModelForSubstGroup(xmlSchemaParserCtxtPtr pctxt, xmlAutomataNewCountedTrans(pctxt->am, hop, start, counter); xmlAutomataNewCounterTrans(pctxt->am, hop, end, counter); } - if (particle->minOccurs == 0) + if (particle->minOccurs == 0) { xmlAutomataNewEpsilon(pctxt->am, start, end); + ret = 1; + } pctxt->state = end; + return(ret); } -static void +/** + * xmlSchemaBuildContentModelForElement: + * + * Returns 1 if nillable, 0 otherwise + */ +static int xmlSchemaBuildContentModelForElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaParticlePtr particle) { + int ret = 0; + if (((xmlSchemaElementPtr) particle->children)->flags & XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD) { /* * Substitution groups. */ - xmlSchemaBuildContentModelForSubstGroup(ctxt, particle, -1, NULL); + ret = xmlSchemaBuildContentModelForSubstGroup(ctxt, particle, -1, NULL); } else { xmlSchemaElementPtr elemDecl; xmlAutomataStatePtr start; @@ -12637,7 +12666,7 @@ xmlSchemaBuildContentModelForElement(xmlSchemaParserCtxtPtr ctxt, elemDecl = (xmlSchemaElementPtr) particle->children; if (elemDecl->flags & XML_SCHEMAS_ELEM_ABSTRACT) - return; + return(0); if (particle->maxOccurs == 1) { start = ctxt->state; ctxt->state = xmlAutomataNewTransition2(ctxt->am, start, NULL, @@ -12665,9 +12694,12 @@ xmlSchemaBuildContentModelForElement(xmlSchemaParserCtxtPtr ctxt, ctxt->state = xmlAutomataNewCounterTrans(ctxt->am, ctxt->state, NULL, counter); } - if (particle->minOccurs == 0) + if (particle->minOccurs == 0) { xmlAutomataNewEpsilon(ctxt->am, start, ctxt->state); + ret = 1; + } } + return(ret); } /** @@ -12678,21 +12710,24 @@ xmlSchemaBuildContentModelForElement(xmlSchemaParserCtxtPtr ctxt, * * Create the automaton for the {content type} of a complex type. * + * Returns 1 if the content is nillable, 0 otherwise */ -static void +static int xmlSchemaBuildAContentModel(xmlSchemaParserCtxtPtr pctxt, xmlSchemaParticlePtr particle) { + int ret = 0, tmp2; + if (particle == NULL) { PERROR_INT("xmlSchemaBuildAContentModel", "particle is NULL"); - return; + return(1); } if (particle->children == NULL) { /* * Just return in this case. A missing "term" of the particle * might arise due to an invalid "term" component. */ - return; + return(1); } switch (particle->children->type) { @@ -12744,7 +12779,8 @@ xmlSchemaBuildAContentModel(xmlSchemaParserCtxtPtr pctxt, int counter; xmlAutomataStatePtr hop; int maxOccurs = - particle->maxOccurs == UNBOUNDED ? UNBOUNDED : particle->maxOccurs - 1; + particle->maxOccurs == UNBOUNDED ? UNBOUNDED : + particle->maxOccurs - 1; int minOccurs = particle->minOccurs < 1 ? 0 : particle->minOccurs - 1; @@ -12779,243 +12815,273 @@ xmlSchemaBuildAContentModel(xmlSchemaParserCtxtPtr pctxt, } if (particle->minOccurs == 0) { xmlAutomataNewEpsilon(pctxt->am, start, end); + ret = 1; } pctxt->state = end; break; } case XML_SCHEMA_TYPE_ELEMENT: - xmlSchemaBuildContentModelForElement(pctxt, particle); + ret = xmlSchemaBuildContentModelForElement(pctxt, particle); break; case XML_SCHEMA_TYPE_SEQUENCE:{ - xmlSchemaTreeItemPtr sub; - - /* - * If max and min occurances are default (1) then - * simply iterate over the particles of the . - */ - if ((particle->minOccurs == 1) && (particle->maxOccurs == 1)) { - sub = particle->children->children; - while (sub != NULL) { - xmlSchemaBuildAContentModel(pctxt, - (xmlSchemaParticlePtr) sub); - sub = sub->next; - } - } else { - xmlAutomataStatePtr oldstate = pctxt->state; - - if (particle->maxOccurs >= UNBOUNDED) { - if (particle->minOccurs > 1) { - xmlAutomataStatePtr tmp; - int counter; + xmlSchemaTreeItemPtr sub; - pctxt->state = xmlAutomataNewEpsilon(pctxt->am, - oldstate, NULL); - oldstate = pctxt->state; + ret = 1; + /* + * If max and min occurances are default (1) then + * simply iterate over the particles of the . + */ + if ((particle->minOccurs == 1) && (particle->maxOccurs == 1)) { + sub = particle->children->children; - counter = xmlAutomataNewCounter(pctxt->am, - particle->minOccurs - 1, UNBOUNDED); + while (sub != NULL) { + tmp2 = xmlSchemaBuildAContentModel(pctxt, + (xmlSchemaParticlePtr) sub); + if (tmp2 != 1) ret = 0; + sub = sub->next; + } + } else { + xmlAutomataStatePtr oldstate = pctxt->state; - sub = particle->children->children; - while (sub != NULL) { - xmlSchemaBuildAContentModel(pctxt, - (xmlSchemaParticlePtr) sub); - sub = sub->next; - } - tmp = pctxt->state; - xmlAutomataNewCountedTrans(pctxt->am, tmp, - oldstate, counter); - pctxt->state = - xmlAutomataNewCounterTrans(pctxt->am, tmp, - NULL, counter); - - } else { - pctxt->state = xmlAutomataNewEpsilon(pctxt->am, - oldstate, NULL); - oldstate = pctxt->state; - - sub = particle->children->children; - while (sub != NULL) { - xmlSchemaBuildAContentModel(pctxt, - (xmlSchemaParticlePtr) sub); - sub = sub->next; - } - xmlAutomataNewEpsilon(pctxt->am, pctxt->state, - oldstate); - /* - * epsilon needed to block previous trans from - * being allowed to enter back from another - * construct - */ - pctxt->state = xmlAutomataNewEpsilon(pctxt->am, - pctxt->state, NULL); - if (particle->minOccurs == 0) { - xmlAutomataNewEpsilon(pctxt->am, - oldstate, pctxt->state); - } - } - } else if ((particle->maxOccurs > 1) - || (particle->minOccurs > 1)) { + if (particle->maxOccurs >= UNBOUNDED) { + if (particle->minOccurs > 1) { xmlAutomataStatePtr tmp; int counter; pctxt->state = xmlAutomataNewEpsilon(pctxt->am, - oldstate, NULL); + oldstate, NULL); oldstate = pctxt->state; counter = xmlAutomataNewCounter(pctxt->am, - particle->minOccurs - 1, - particle->maxOccurs - 1); + particle->minOccurs - 1, UNBOUNDED); sub = particle->children->children; while (sub != NULL) { - xmlSchemaBuildAContentModel(pctxt, - (xmlSchemaParticlePtr) sub); + tmp2 = xmlSchemaBuildAContentModel(pctxt, + (xmlSchemaParticlePtr) sub); + if (tmp2 != 1) ret = 0; sub = sub->next; } tmp = pctxt->state; - xmlAutomataNewCountedTrans(pctxt->am, - tmp, oldstate, counter); + xmlAutomataNewCountedTrans(pctxt->am, tmp, + oldstate, counter); pctxt->state = - xmlAutomataNewCounterTrans(pctxt->am, tmp, NULL, - counter); - if (particle->minOccurs == 0) { + xmlAutomataNewCounterTrans(pctxt->am, tmp, + NULL, counter); + if (ret == 1) xmlAutomataNewEpsilon(pctxt->am, - oldstate, pctxt->state); - } + oldstate, pctxt->state); + } else { + pctxt->state = xmlAutomataNewEpsilon(pctxt->am, + oldstate, NULL); + oldstate = pctxt->state; + sub = particle->children->children; while (sub != NULL) { - xmlSchemaBuildAContentModel(pctxt, - (xmlSchemaParticlePtr) sub); + tmp2 = xmlSchemaBuildAContentModel(pctxt, + (xmlSchemaParticlePtr) sub); + if (tmp2 != 1) ret = 0; sub = sub->next; } + xmlAutomataNewEpsilon(pctxt->am, pctxt->state, + oldstate); + /* + * epsilon needed to block previous trans from + * being allowed to enter back from another + * construct + */ + pctxt->state = xmlAutomataNewEpsilon(pctxt->am, + pctxt->state, NULL); if (particle->minOccurs == 0) { - xmlAutomataNewEpsilon(pctxt->am, oldstate, - pctxt->state); + xmlAutomataNewEpsilon(pctxt->am, + oldstate, pctxt->state); + ret = 1; } } - } - break; - } - case XML_SCHEMA_TYPE_CHOICE:{ - xmlSchemaTreeItemPtr sub; - xmlAutomataStatePtr start, end; + } else if ((particle->maxOccurs > 1) + || (particle->minOccurs > 1)) { + xmlAutomataStatePtr tmp; + int counter; - start = pctxt->state; - end = xmlAutomataNewState(pctxt->am); + pctxt->state = xmlAutomataNewEpsilon(pctxt->am, + oldstate, NULL); + oldstate = pctxt->state; - /* - * iterate over the subtypes and remerge the end with an - * epsilon transition - */ - if (particle->maxOccurs == 1) { - sub = particle->children->children; + counter = xmlAutomataNewCounter(pctxt->am, + particle->minOccurs - 1, + particle->maxOccurs - 1); + + sub = particle->children->children; while (sub != NULL) { - pctxt->state = start; - xmlSchemaBuildAContentModel(pctxt, - (xmlSchemaParticlePtr) sub); - xmlAutomataNewEpsilon(pctxt->am, pctxt->state, end); + tmp2 = xmlSchemaBuildAContentModel(pctxt, + (xmlSchemaParticlePtr) sub); + if (tmp2 != 1) ret = 0; sub = sub->next; } + tmp = pctxt->state; + xmlAutomataNewCountedTrans(pctxt->am, + tmp, oldstate, counter); + pctxt->state = + xmlAutomataNewCounterTrans(pctxt->am, tmp, NULL, + counter); + if ((particle->minOccurs == 0) || (ret == 1)) { + xmlAutomataNewEpsilon(pctxt->am, + oldstate, pctxt->state); + ret = 1; + } } else { - int counter; - xmlAutomataStatePtr hop, base; - int maxOccurs = particle->maxOccurs == UNBOUNDED ? - UNBOUNDED : particle->maxOccurs - 1; - int minOccurs = - particle->minOccurs < 1 ? 0 : particle->minOccurs - 1; - - /* - * use a counter to keep track of the number of transtions - * which went through the choice. - */ - counter = - xmlAutomataNewCounter(pctxt->am, minOccurs, maxOccurs); - hop = xmlAutomataNewState(pctxt->am); - base = xmlAutomataNewState(pctxt->am); - - sub = particle->children->children; + sub = particle->children->children; while (sub != NULL) { - pctxt->state = base; - xmlSchemaBuildAContentModel(pctxt, - (xmlSchemaParticlePtr) sub); - xmlAutomataNewEpsilon(pctxt->am, pctxt->state, hop); + tmp2 = xmlSchemaBuildAContentModel(pctxt, + (xmlSchemaParticlePtr) sub); + if (tmp2 != 1) ret = 0; sub = sub->next; } - xmlAutomataNewEpsilon(pctxt->am, start, base); - xmlAutomataNewCountedTrans(pctxt->am, hop, base, counter); - xmlAutomataNewCounterTrans(pctxt->am, hop, end, counter); - } - if (particle->minOccurs == 0) { - xmlAutomataNewEpsilon(pctxt->am, start, end); + if (particle->minOccurs == 0) { + xmlAutomataNewEpsilon(pctxt->am, oldstate, + pctxt->state); + ret = 1; + } } - pctxt->state = end; - break; } - case XML_SCHEMA_TYPE_ALL:{ - xmlAutomataStatePtr start; - xmlSchemaParticlePtr sub; - xmlSchemaElementPtr elemDecl; - int lax; - - sub = (xmlSchemaParticlePtr) particle->children->children; - if (sub == NULL) - break; - start = pctxt->state; + break; + } + case XML_SCHEMA_TYPE_CHOICE:{ + xmlSchemaTreeItemPtr sub; + xmlAutomataStatePtr start, end; + + ret = 0; + start = pctxt->state; + end = xmlAutomataNewState(pctxt->am); + + /* + * iterate over the subtypes and remerge the end with an + * epsilon transition + */ + if (particle->maxOccurs == 1) { + sub = particle->children->children; while (sub != NULL) { pctxt->state = start; + tmp2 = xmlSchemaBuildAContentModel(pctxt, + (xmlSchemaParticlePtr) sub); + if (tmp2 == 1) ret = 1; + xmlAutomataNewEpsilon(pctxt->am, pctxt->state, end); + sub = sub->next; + } + } else { + int counter; + xmlAutomataStatePtr hop, base; + int maxOccurs = particle->maxOccurs == UNBOUNDED ? + UNBOUNDED : particle->maxOccurs - 1; + int minOccurs = + particle->minOccurs < 1 ? 0 : particle->minOccurs - 1; - elemDecl = (xmlSchemaElementPtr) sub->children; - if (elemDecl == NULL) { - PERROR_INT("xmlSchemaBuildAContentModel", - " particle has no term"); - return; - }; - /* - * NOTE: The {max occurs} of all the particles in the - * {particles} of the group must be 0 or 1; this is - * already ensured during the parse of the content of - * . - */ - if (elemDecl->flags & XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD) { - int counter; - - /* - * This is an abstract group, we need to share - * the same counter for all the element transitions - * derived from the group - */ - counter = xmlAutomataNewCounter(pctxt->am, - sub->minOccurs, sub->maxOccurs); - xmlSchemaBuildContentModelForSubstGroup(pctxt, - sub, counter, pctxt->state); - } else { - if ((sub->minOccurs == 1) && - (sub->maxOccurs == 1)) { - xmlAutomataNewOnceTrans2(pctxt->am, pctxt->state, - pctxt->state, - elemDecl->name, - elemDecl->targetNamespace, - 1, 1, elemDecl); - } else if ((sub->minOccurs == 0) && - (sub->maxOccurs == 1)) { - - xmlAutomataNewCountTrans2(pctxt->am, pctxt->state, - pctxt->state, - elemDecl->name, - elemDecl->targetNamespace, - 0, - 1, - elemDecl); - } - } - sub = (xmlSchemaParticlePtr) sub->next; + /* + * use a counter to keep track of the number of transtions + * which went through the choice. + */ + counter = + xmlAutomataNewCounter(pctxt->am, minOccurs, maxOccurs); + hop = xmlAutomataNewState(pctxt->am); + base = xmlAutomataNewState(pctxt->am); + + sub = particle->children->children; + while (sub != NULL) { + pctxt->state = base; + tmp2 = xmlSchemaBuildAContentModel(pctxt, + (xmlSchemaParticlePtr) sub); + if (tmp2 == 1) ret = 1; + xmlAutomataNewEpsilon(pctxt->am, pctxt->state, hop); + sub = sub->next; } - lax = particle->minOccurs == 0; - pctxt->state = - xmlAutomataNewAllTrans(pctxt->am, pctxt->state, NULL, lax); + xmlAutomataNewEpsilon(pctxt->am, start, base); + xmlAutomataNewCountedTrans(pctxt->am, hop, base, counter); + xmlAutomataNewCounterTrans(pctxt->am, hop, end, counter); + if (ret == 1) + xmlAutomataNewEpsilon(pctxt->am, base, end); + } + if (particle->minOccurs == 0) { + xmlAutomataNewEpsilon(pctxt->am, start, end); + ret = 1; + } + pctxt->state = end; + break; + } + case XML_SCHEMA_TYPE_ALL:{ + xmlAutomataStatePtr start, tmp; + xmlSchemaParticlePtr sub; + xmlSchemaElementPtr elemDecl; + + ret = 1; + + sub = (xmlSchemaParticlePtr) particle->children->children; + if (sub == NULL) break; + + ret = 0; + + start = pctxt->state; + tmp = xmlAutomataNewState(pctxt->am); + xmlAutomataNewEpsilon(pctxt->am, pctxt->state, tmp); + pctxt->state = tmp; + while (sub != NULL) { + pctxt->state = tmp; + + elemDecl = (xmlSchemaElementPtr) sub->children; + if (elemDecl == NULL) { + PERROR_INT("xmlSchemaBuildAContentModel", + " particle has no term"); + return(ret); + }; + /* + * NOTE: The {max occurs} of all the particles in the + * {particles} of the group must be 0 or 1; this is + * already ensured during the parse of the content of + * . + */ + if (elemDecl->flags & XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD) { + int counter; + + /* + * This is an abstract group, we need to share + * the same counter for all the element transitions + * derived from the group + */ + counter = xmlAutomataNewCounter(pctxt->am, + sub->minOccurs, sub->maxOccurs); + xmlSchemaBuildContentModelForSubstGroup(pctxt, + sub, counter, pctxt->state); + } else { + if ((sub->minOccurs == 1) && + (sub->maxOccurs == 1)) { + xmlAutomataNewOnceTrans2(pctxt->am, pctxt->state, + pctxt->state, + elemDecl->name, + elemDecl->targetNamespace, + 1, 1, elemDecl); + } else if ((sub->minOccurs == 0) && + (sub->maxOccurs == 1)) { + + xmlAutomataNewCountTrans2(pctxt->am, pctxt->state, + pctxt->state, + elemDecl->name, + elemDecl->targetNamespace, + 0, + 1, + elemDecl); + } + } + sub = (xmlSchemaParticlePtr) sub->next; + } + pctxt->state = + xmlAutomataNewAllTrans(pctxt->am, pctxt->state, NULL, 0); + if (particle->minOccurs == 0) { + xmlAutomataNewEpsilon(pctxt->am, start, pctxt->state); + ret = 1; } + break; + } case XML_SCHEMA_TYPE_GROUP: /* * If we hit a model group definition, then this means that @@ -13024,14 +13090,16 @@ xmlSchemaBuildAContentModel(xmlSchemaParserCtxtPtr pctxt, * TODO: But the group should be substituted and not occur at * all in the content model at this point. Fix this. */ + ret = 1; break; default: xmlSchemaInternalErr2(ACTXT_CAST pctxt, "xmlSchemaBuildAContentModel", "found unexpected term of type '%s' in content model", WXS_ITEM_TYPE_NAME(particle->children), NULL); - return; + return(ret); } + return(ret); } /** @@ -15567,7 +15635,8 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, return (XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3); } member = member->next; - baseMember = baseMember->next; + if (baseMember != NULL) + baseMember = baseMember->next; } } } @@ -17289,7 +17358,7 @@ xmlSchemaDeriveAndValidateFacets(xmlSchemaParserCtxtPtr pctxt, flength = bflength; if (flength) { if (! fminlen) - flength = bflength; + fminlen = bfminlen; if (fminlen) { /* (1.1) length >= minLength */ res = xmlSchemaCompareValues(flength->val, fminlen->val); @@ -23653,12 +23722,14 @@ xmlSchemaBubbleIDCNodeTables(xmlSchemaValidCtxtPtr vctxt) parBind->dupls = bind->dupls; bind->dupls = NULL; } - if (*parTable == NULL) - *parTable = parBind; - else { - parBind->next = *parTable; - *parTable = parBind; - } + if (parTable != NULL) { + if (*parTable == NULL) + *parTable = parBind; + else { + parBind->next = *parTable; + *parTable = parBind; + } + } } next_binding: @@ -24461,10 +24532,10 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt, /* ws = xmlSchemaGetWhiteSpaceFacetValue(type); */ if (valNeeded) ret = xmlSchemaValPredefTypeNodeNoNorm(biType, - value, &val, NULL); + value, &val, node); else ret = xmlSchemaValPredefTypeNodeNoNorm(biType, - value, NULL, NULL); + value, NULL, node); break; } } else if (actxt->type == XML_SCHEMA_CTXT_PARSER) { @@ -25222,7 +25293,6 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) if (vctxt->nbAttrInfos == 0) return (0); - nbUses = vctxt->nbAttrInfos; /* * Validate against the wildcard. */ @@ -25313,16 +25383,18 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * whose {attribute declaration}'s {type definition} * is or is derived from ID." */ - for (j = 0; j < attrUseList->nbItems; j++) { - if (xmlSchemaIsDerivedFromBuiltInType( - WXS_ATTRUSE_TYPEDEF(attrUseList->items[j]), - XML_SCHEMAS_ID)) { - /* URGENT VAL TODO: implement */ - iattr->state = XML_SCHEMAS_ATTR_ERR_WILD_AND_USE_ID; - TODO - break; - } - } + if (attrUseList != NULL) { + for (j = 0; j < attrUseList->nbItems; j++) { + if (xmlSchemaIsDerivedFromBuiltInType( + WXS_ATTRUSE_TYPEDEF(attrUseList->items[j]), + XML_SCHEMAS_ID)) { + /* URGENT VAL TODO: implement */ + iattr->state = XML_SCHEMAS_ATTR_ERR_WILD_AND_USE_ID; + TODO + break; + } + } + } } } else if (type->attributeWildcard->processContents == XML_SCHEMAS_ANY_LAX) { diff --git a/xmlschemastypes.c b/xmlschemastypes.c index 0d967d0..1ce21e1 100644 --- a/xmlschemastypes.c +++ b/xmlschemastypes.c @@ -2899,12 +2899,23 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value, case XML_SCHEMAS_ANYURI:{ if (*value != 0) { xmlURIPtr uri; + xmlChar *tmpval, *cur; if (normOnTheFly) { norm = xmlSchemaCollapseString(value); if (norm != NULL) value = norm; } - uri = xmlParseURI((const char *) value); + tmpval = xmlStrdup(value); + for (cur = tmpval; *cur; ++cur) { + if (*cur < 32 || *cur >= 127 || *cur == ' ' || + *cur == '<' || *cur == '>' || *cur == '"' || + *cur == '{' || *cur == '}' || *cur == '|' || + *cur == '\\' || *cur == '^' || *cur == '`' || + *cur == '\'') + *cur = '_'; + } + uri = xmlParseURI((const char *) tmpval); + xmlFree(tmpval); if (uri == NULL) goto return1; xmlFreeURI(uri); diff --git a/xmlstring.c b/xmlstring.c index 4f3b373..910f244 100644 --- a/xmlstring.c +++ b/xmlstring.c @@ -366,7 +366,7 @@ xmlStrstr(const xmlChar *str, const xmlChar *val) { */ const xmlChar * -xmlStrcasestr(const xmlChar *str, xmlChar *val) { +xmlStrcasestr(const xmlChar *str, const xmlChar *val) { int n; if (str == NULL) return(NULL); diff --git a/xmlwriter.c b/xmlwriter.c index b88de3a..11b15e0 100644 --- a/xmlwriter.c +++ b/xmlwriter.c @@ -129,10 +129,10 @@ xmlWriterErrMsg(xmlTextWriterPtr ctxt, xmlParserErrors error, if (ctxt != NULL) { __xmlRaiseError(NULL, NULL, NULL, ctxt->ctxt, NULL, XML_FROM_WRITER, error, XML_ERR_FATAL, - NULL, 0, NULL, NULL, NULL, 0, 0, msg); + NULL, 0, NULL, NULL, NULL, 0, 0, "%s", msg); } else { __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error, - XML_ERR_FATAL, NULL, 0, NULL, NULL, NULL, 0, 0, msg); + XML_ERR_FATAL, NULL, 0, NULL, NULL, NULL, 0, 0, "%s", msg); } } @@ -242,8 +242,8 @@ xmlNewTextWriterFilename(const char *uri, int compression) out = xmlOutputBufferCreateFilename(uri, NULL, compression); if (out == NULL) { - xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY, - "xmlNewTextWriterFilename : out of memory!\n"); + xmlWriterErrMsg(NULL, XML_IO_EIO, + "xmlNewTextWriterFilename : cannot open uri\n"); return NULL; } @@ -370,7 +370,7 @@ xmlNewTextWriterDoc(xmlDocPtr * doc, int compression) ctxt = xmlCreatePushParserCtxt(&saxHandler, NULL, NULL, 0, NULL); if (ctxt == NULL) { xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR, - "xmlNewTextWriterDoc : error at xmlCreatePushParserCtxt!\n"); + "xmlNewTextWriterDoc : error at xmlCreatePushParserCtxt!\n"); return NULL; } /* @@ -389,8 +389,10 @@ xmlNewTextWriterDoc(xmlDocPtr * doc, int compression) ret = xmlNewTextWriterPushParser(ctxt, compression); if (ret == NULL) { + xmlFreeDoc(ctxt->myDoc); + xmlFreeParserCtxt(ctxt); xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR, - "xmlNewTextWriterDoc : error at xmlNewTextWriterPushParser!\n"); + "xmlNewTextWriterDoc : error at xmlNewTextWriterPushParser!\n"); return NULL; } @@ -898,8 +900,8 @@ xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer, } buf = xmlTextWriterVSprintf(format, argptr); - if (buf == 0) - return 0; + if (buf == NULL) + return -1; rc = xmlTextWriterWriteComment(writer, buf); @@ -1323,8 +1325,8 @@ xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer, const char *format, return -1; buf = xmlTextWriterVSprintf(format, argptr); - if (buf == 0) - return 0; + if (buf == NULL) + return -1; rc = xmlTextWriterWriteRaw(writer, buf); @@ -1452,8 +1454,8 @@ xmlTextWriterWriteVFormatString(xmlTextWriterPtr writer, return -1; buf = xmlTextWriterVSprintf(format, argptr); - if (buf == 0) - return 0; + if (buf == NULL) + return -1; rc = xmlTextWriterWriteString(writer, buf); @@ -1510,12 +1512,13 @@ xmlTextWriterWriteString(xmlTextWriterPtr writer, const xmlChar * content) if (buf != NULL) { count = xmlTextWriterWriteRaw(writer, buf); - if (count < 0) - return -1; - sum += count; if (buf != content) /* buf was allocated by us, so free it */ xmlFree(buf); + + if (count < 0) + return -1; + sum += count; } return sum; @@ -1997,8 +2000,8 @@ xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer, return -1; buf = xmlTextWriterVSprintf(format, argptr); - if (buf == 0) - return 0; + if (buf == NULL) + return -1; rc = xmlTextWriterWriteAttribute(writer, name, buf); @@ -2099,8 +2102,8 @@ xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer, return -1; buf = xmlTextWriterVSprintf(format, argptr); - if (buf == 0) - return 0; + if (buf == NULL) + return -1; rc = xmlTextWriterWriteAttributeNS(writer, prefix, name, namespaceURI, buf); @@ -2200,8 +2203,8 @@ xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer, return -1; buf = xmlTextWriterVSprintf(format, argptr); - if (buf == 0) - return 0; + if (buf == NULL) + return -1; rc = xmlTextWriterWriteElement(writer, name, buf); @@ -2302,8 +2305,8 @@ xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer, return -1; buf = xmlTextWriterVSprintf(format, argptr); - if (buf == 0) - return 0; + if (buf == NULL) + return -1; rc = xmlTextWriterWriteElementNS(writer, prefix, name, namespaceURI, buf); @@ -2551,8 +2554,8 @@ xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer, return -1; buf = xmlTextWriterVSprintf(format, argptr); - if (buf == 0) - return 0; + if (buf == NULL) + return -1; rc = xmlTextWriterWritePI(writer, target, buf); @@ -2764,8 +2767,8 @@ xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer, const char *format, return -1; buf = xmlTextWriterVSprintf(format, argptr); - if (buf == 0) - return 0; + if (buf == NULL) + return -1; rc = xmlTextWriterWriteCDATA(writer, buf); @@ -3082,8 +3085,8 @@ xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer, return -1; buf = xmlTextWriterVSprintf(format, argptr); - if (buf == 0) - return 0; + if (buf == NULL) + return -1; rc = xmlTextWriterWriteDTD(writer, name, pubid, sysid, buf); @@ -3320,8 +3323,8 @@ xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer, return -1; buf = xmlTextWriterVSprintf(format, argptr); - if (buf == 0) - return 0; + if (buf == NULL) + return -1; rc = xmlTextWriterWriteDTDElement(writer, name, buf); @@ -3557,8 +3560,8 @@ xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer, return -1; buf = xmlTextWriterVSprintf(format, argptr); - if (buf == 0) - return 0; + if (buf == NULL) + return -1; rc = xmlTextWriterWriteDTDAttlist(writer, name, buf); @@ -3819,8 +3822,8 @@ xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer, return -1; buf = xmlTextWriterVSprintf(format, argptr); - if (buf == 0) - return 0; + if (buf == NULL) + return -1; rc = xmlTextWriterWriteDTDInternalEntity(writer, pe, name, buf); diff --git a/xpath.c b/xpath.c index 57442e6..5b84d22 100644 --- a/xpath.c +++ b/xpath.c @@ -334,7 +334,7 @@ xmlXPathErr(xmlXPathParserContextPtr ctxt, int error) error + XML_XPATH_EXPRESSION_OK - XPATH_EXPRESSION_OK, XML_ERR_ERROR, NULL, 0, NULL, NULL, NULL, 0, 0, - xmlXPathErrorMessages[error]); + "%s", xmlXPathErrorMessages[error]); return; } ctxt->error = error; @@ -345,7 +345,7 @@ xmlXPathErr(xmlXPathParserContextPtr ctxt, int error) XML_ERR_ERROR, NULL, 0, (const char *) ctxt->base, NULL, NULL, ctxt->cur - ctxt->base, 0, - xmlXPathErrorMessages[error]); + "%s", xmlXPathErrorMessages[error]); return; } @@ -369,7 +369,7 @@ xmlXPathErr(xmlXPathParserContextPtr ctxt, int error) XML_ERR_ERROR, NULL, 0, (const char *) ctxt->base, NULL, NULL, ctxt->cur - ctxt->base, 0, - xmlXPathErrorMessages[error]); + "%s", xmlXPathErrorMessages[error]); } } @@ -879,7 +879,7 @@ xmlXPathDebugDumpNode(FILE *output, xmlNodePtr cur, int depth) { shift[2 * i] = shift[2 * i + 1] = ' '; shift[2 * i] = shift[2 * i + 1] = 0; if (cur == NULL) { - fprintf(output, shift); + fprintf(output, "%s", shift); fprintf(output, "Node is NULL !\n"); return; @@ -887,7 +887,7 @@ xmlXPathDebugDumpNode(FILE *output, xmlNodePtr cur, int depth) { if ((cur->type == XML_DOCUMENT_NODE) || (cur->type == XML_HTML_DOCUMENT_NODE)) { - fprintf(output, shift); + fprintf(output, "%s", shift); fprintf(output, " /\n"); } else if (cur->type == XML_ATTRIBUTE_NODE) xmlDebugDumpAttr(output, (xmlAttrPtr)cur, depth); @@ -904,7 +904,7 @@ xmlXPathDebugDumpNodeList(FILE *output, xmlNodePtr cur, int depth) { shift[2 * i] = shift[2 * i + 1] = ' '; shift[2 * i] = shift[2 * i + 1] = 0; if (cur == NULL) { - fprintf(output, shift); + fprintf(output, "%s", shift); fprintf(output, "Node is NULL !\n"); return; @@ -927,7 +927,7 @@ xmlXPathDebugDumpNodeSet(FILE *output, xmlNodeSetPtr cur, int depth) { shift[2 * i] = shift[2 * i + 1] = 0; if (cur == NULL) { - fprintf(output, shift); + fprintf(output, "%s", shift); fprintf(output, "NodeSet is NULL !\n"); return; @@ -936,7 +936,7 @@ xmlXPathDebugDumpNodeSet(FILE *output, xmlNodeSetPtr cur, int depth) { if (cur != NULL) { fprintf(output, "Set contains %d nodes:\n", cur->nodeNr); for (i = 0;i < cur->nodeNr;i++) { - fprintf(output, shift); + fprintf(output, "%s", shift); fprintf(output, "%d", i + 1); xmlXPathDebugDumpNode(output, cur->nodeTab[i], depth + 1); } @@ -953,13 +953,13 @@ xmlXPathDebugDumpValueTree(FILE *output, xmlNodeSetPtr cur, int depth) { shift[2 * i] = shift[2 * i + 1] = 0; if ((cur == NULL) || (cur->nodeNr == 0) || (cur->nodeTab[0] == NULL)) { - fprintf(output, shift); + fprintf(output, "%s", shift); fprintf(output, "Value Tree is NULL !\n"); return; } - fprintf(output, shift); + fprintf(output, "%s", shift); fprintf(output, "%d", i + 1); xmlXPathDebugDumpNodeList(output, cur->nodeTab[0]->children, depth + 1); } @@ -974,14 +974,14 @@ xmlXPathDebugDumpLocationSet(FILE *output, xmlLocationSetPtr cur, int depth) { shift[2 * i] = shift[2 * i + 1] = 0; if (cur == NULL) { - fprintf(output, shift); + fprintf(output, "%s", shift); fprintf(output, "LocationSet is NULL !\n"); return; } for (i = 0;i < cur->locNr;i++) { - fprintf(output, shift); + fprintf(output, "%s", shift); fprintf(output, "%d : ", i + 1); xmlXPathDebugDumpObject(output, cur->locTab[i], depth + 1); } @@ -1008,7 +1008,7 @@ xmlXPathDebugDumpObject(FILE *output, xmlXPathObjectPtr cur, int depth) { shift[2 * i] = shift[2 * i + 1] = 0; - fprintf(output, shift); + fprintf(output, "%s", shift); if (cur == NULL) { fprintf(output, "Object is empty (NULL)\n"); @@ -1063,7 +1063,7 @@ xmlXPathDebugDumpObject(FILE *output, xmlXPathObjectPtr cur, int depth) { if ((cur->user2 == NULL) || ((cur->user2 == cur->user) && (cur->index == cur->index2))) { fprintf(output, "Object is a collapsed range :\n"); - fprintf(output, shift); + fprintf(output, "%s", shift); if (cur->index >= 0) fprintf(output, "index %d in ", cur->index); fprintf(output, "node\n"); @@ -1071,14 +1071,14 @@ xmlXPathDebugDumpObject(FILE *output, xmlXPathObjectPtr cur, int depth) { depth + 1); } else { fprintf(output, "Object is a range :\n"); - fprintf(output, shift); + fprintf(output, "%s", shift); fprintf(output, "From "); if (cur->index >= 0) fprintf(output, "index %d in ", cur->index); fprintf(output, "node\n"); xmlXPathDebugDumpNode(output, (xmlNodePtr) cur->user, depth + 1); - fprintf(output, shift); + fprintf(output, "%s", shift); fprintf(output, "To "); if (cur->index2 >= 0) fprintf(output, "index %d in ", cur->index2); @@ -1111,7 +1111,7 @@ xmlXPathDebugDumpStepOp(FILE *output, xmlXPathCompExprPtr comp, shift[2 * i] = shift[2 * i + 1] = ' '; shift[2 * i] = shift[2 * i + 1] = 0; - fprintf(output, shift); + fprintf(output, "%s", shift); if (op == NULL) { fprintf(output, "Step is NULL\n"); return; @@ -1298,7 +1298,7 @@ xmlXPathDebugDumpCompExpr(FILE *output, xmlXPathCompExprPtr comp, shift[2 * i] = shift[2 * i + 1] = ' '; shift[2 * i] = shift[2 * i + 1] = 0; - fprintf(output, shift); + fprintf(output, "%s", shift); fprintf(output, "Compiled Expression : %d elements\n", comp->nbStep); @@ -5003,7 +5003,7 @@ xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt) { /** * xmlXPathRegisterNs: * @ctxt: the XPath context - * @prefix: the namespace prefix + * @prefix: the namespace prefix cannot be NULL or empty string * @ns_uri: the namespace name * * Register a new namespace. If @ns_uri is NULL it unregisters @@ -5018,6 +5018,8 @@ xmlXPathRegisterNs(xmlXPathContextPtr ctxt, const xmlChar *prefix, return(-1); if (prefix == NULL) return(-1); + if (prefix[0] == 0) + return(-1); if (ctxt->nsHash == NULL) ctxt->nsHash = xmlHashCreate(10); @@ -9020,7 +9022,7 @@ xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs) { * the index is NaN, the length is NaN, or both * arguments are infinity (relying on Inf + -Inf = NaN) */ - if (!xmlXPathIsNaN(in + le) && !xmlXPathIsInf(in)) { + if (!xmlXPathIsInf(in) && !xmlXPathIsNaN(in + le)) { /* * To meet the requirements of the spec, the arguments * must be converted to integer format before @@ -10866,7 +10868,6 @@ xmlXPathCompileExpr(xmlXPathParserContextPtr ctxt, int sort) { xmlXPathCompAndExpr(ctxt); CHECK_ERROR; PUSH_BINARY_EXPR(XPATH_OP_OR, op1, ctxt->comp->last, 0, 0); - op1 = ctxt->comp->nbStep; SKIP_BLANKS; } if ((sort) && (ctxt->comp->steps[ctxt->comp->last].op != XPATH_OP_VALUE)) { @@ -11979,7 +11980,6 @@ xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt, * avoid a duplicate-aware merge, if the axis to be traversed is e.g. * the descendant-or-self axis. */ - addNode = xmlXPathNodeSetAdd; mergeAndClear = xmlXPathNodeSetMergeAndClear; switch (axis) { case AXIS_ANCESTOR: @@ -14503,7 +14503,7 @@ xmlXPathTryStreamCompile(xmlXPathContextPtr ctxt, const xmlChar *str) { namespaces[i++] = ns->prefix; } namespaces[i++] = NULL; - namespaces[i++] = NULL; + namespaces[i] = NULL; } } diff --git a/xpointer.c b/xpointer.c index 5298fa5..7a42d02 100644 --- a/xpointer.c +++ b/xpointer.c @@ -1152,10 +1152,12 @@ xmlXPtrEvalFullXPtr(xmlXPathParserContextPtr ctxt, xmlChar *name) { if (name == NULL) XP_ERROR(XPATH_EXPR_ERROR); while (name != NULL) { + ctxt->error = XPATH_EXPRESSION_OK; xmlXPtrEvalXPtrPart(ctxt, name); /* in case of syntax error, break here */ - if (ctxt->error != XPATH_EXPRESSION_OK) + if ((ctxt->error != XPATH_EXPRESSION_OK) && + (ctxt->error != XML_XPTR_UNKNOWN_SCHEME)) return; /* @@ -1299,12 +1301,19 @@ xmlXPtrEvalXPointer(xmlXPathParserContextPtr ctxt) { * * ************************************************************************/ +static void xmlXPtrStringRangeFunction(xmlXPathParserContextPtr ctxt, int nargs); +static void xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs); +static void xmlXPtrEndPointFunction(xmlXPathParserContextPtr ctxt, int nargs); +static void xmlXPtrHereFunction(xmlXPathParserContextPtr ctxt, int nargs); +static void xmlXPtrOriginFunction(xmlXPathParserContextPtr ctxt, int nargs); +static void xmlXPtrRangeInsideFunction(xmlXPathParserContextPtr ctxt, int nargs); +static void xmlXPtrRangeFunction(xmlXPathParserContextPtr ctxt, int nargs); /** @@ -1732,7 +1741,7 @@ xmlXPtrNbLocChildren(xmlNodePtr node) { * Function implementing here() operation * as described in 5.4.3 */ -void +static void xmlXPtrHereFunction(xmlXPathParserContextPtr ctxt, int nargs) { CHECK_ARITY(0); @@ -1750,7 +1759,7 @@ xmlXPtrHereFunction(xmlXPathParserContextPtr ctxt, int nargs) { * Function implementing origin() operation * as described in 5.4.3 */ -void +static void xmlXPtrOriginFunction(xmlXPathParserContextPtr ctxt, int nargs) { CHECK_ARITY(0); @@ -1783,7 +1792,7 @@ xmlXPtrOriginFunction(xmlXPathParserContextPtr ctxt, int nargs) { * ---------------- * */ -void +static void xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs) { xmlXPathObjectPtr tmp, obj, point; xmlLocationSetPtr newset = NULL; @@ -1877,7 +1886,7 @@ xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs) { * syntax error. * ---------------------------- */ -void +static void xmlXPtrEndPointFunction(xmlXPathParserContextPtr ctxt, int nargs) { xmlXPathObjectPtr tmp, obj, point; xmlLocationSetPtr newset = NULL; @@ -2022,7 +2031,7 @@ xmlXPtrCoveringRange(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr loc) { * location-set, a range location representing the covering range of * x is added to the result location-set. */ -void +static void xmlXPtrRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) { int i; xmlXPathObjectPtr set; @@ -2168,7 +2177,7 @@ xmlXPtrInsideRange(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr loc) { * location children of x. * */ -void +static void xmlXPtrRangeInsideFunction(xmlXPathParserContextPtr ctxt, int nargs) { int i; xmlXPathObjectPtr set; @@ -2622,13 +2631,12 @@ xmlXPtrGetLastChar(xmlNodePtr *node, int *indx) { if (cur == NULL) return(-1); - + if ((cur->type == XML_ELEMENT_NODE) || (cur->type == XML_DOCUMENT_NODE) || (cur->type == XML_HTML_DOCUMENT_NODE)) { if (pos > 0) { cur = xmlXPtrGetNthChild(cur, pos); - pos = 0; } } while (cur != NULL) { @@ -2757,7 +2765,7 @@ xmlXPtrGetEndPoint(xmlXPathObjectPtr obj, xmlNodePtr *node, int *indx) { * all be character points. * ------------------------------ */ -void +static void xmlXPtrStringRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) { int i, startindex, endindex = 0, fendindex; xmlNodePtr start, end = 0, fend; diff --git a/xstc/Makefile.in b/xstc/Makefile.in index ea25f01..083f6eb 100644 --- a/xstc/Makefile.in +++ b/xstc/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @@ -15,8 +16,9 @@ @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -41,6 +43,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -60,10 +63,6 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@ @@ -72,14 +71,14 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOCB_OBJ = @DOCB_OBJ@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FTP_OBJ = @FTP_OBJ@ GREP = @GREP@ HAVE_ISINF = @HAVE_ISINF@ @@ -93,6 +92,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -104,6 +104,7 @@ LIBXML_VERSION = @LIBXML_VERSION@ LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@ LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@ LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ @@ -112,8 +113,12 @@ MODULE_EXTENSION = @MODULE_EXTENSION@ MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@ MV = @MV@ M_LIBS = @M_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -162,6 +167,7 @@ THREAD_CFLAGS = @THREAD_CFLAGS@ THREAD_LIBS = @THREAD_LIBS@ U = @U@ VERSION = @VERSION@ +VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@ WGET = @WGET@ WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@ WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@ @@ -212,8 +218,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -244,6 +249,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -257,6 +263,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @@ -289,14 +296,14 @@ $(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; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu xstc/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu xstc/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu xstc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu xstc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -314,6 +321,7 @@ $(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 +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -343,13 +351,17 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -378,6 +390,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -396,6 +409,8 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: @@ -404,18 +419,28 @@ install-data-am: install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -557,6 +582,7 @@ valgrind: -@(if [ -x $(PYTHON) ] ; then \ echo '## Running the regression tests under Valgrind' ; \ $(MAKE) CHECKER='valgrind -q' MAKEFLAGS+=--silent pytests ; fi); + # 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: -- cgit v1.2.3