summaryrefslogtreecommitdiffstats
path: root/third_party/libxslt
diff options
context:
space:
mode:
authormmoss@google.com <mmoss@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-06 23:45:11 +0000
committermmoss@google.com <mmoss@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-06 23:45:11 +0000
commit78b02d540d5d4ee753b319b4811842273be9d509 (patch)
tree4768a8478bc7183919ea98760846b60422d977ff /third_party/libxslt
parent68200ecadb9bf0cbacdf9ee9418be5b16f644b81 (diff)
downloadchromium_src-78b02d540d5d4ee753b319b4811842273be9d509.zip
chromium_src-78b02d540d5d4ee753b319b4811842273be9d509.tar.gz
chromium_src-78b02d540d5d4ee753b319b4811842273be9d509.tar.bz2
Allow third_party/libxslt to compile on Linux. Like libxml, this uses pre-generated configure headers in linux/.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@470 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/libxslt')
-rw-r--r--third_party/libxslt/README.google3
-rw-r--r--third_party/libxslt/SConscript76
-rw-r--r--third_party/libxslt/configure2
-rw-r--r--third_party/libxslt/linux/config.h161
-rw-r--r--third_party/libxslt/linux/libexslt/exsltconfig.h73
-rw-r--r--third_party/libxslt/linux/libxslt/xsltconfig.h159
-rw-r--r--third_party/libxslt/linux/libxslt/xsltwin32config.h105
-rw-r--r--third_party/libxslt/linux/xslt-config137
8 files changed, 686 insertions, 30 deletions
diff --git a/third_party/libxslt/README.google b/third_party/libxslt/README.google
index 33d568d..3a3ccfe 100644
--- a/third_party/libxslt/README.google
+++ b/third_party/libxslt/README.google
@@ -2,6 +2,7 @@ This directory contains a partial snapshot of the libxslt library from
http://xmlsoft.org/XSLT, with the following modification:
* Modified win32/configure.js to be able to clobber a read-only Makefile
* Modified libxslt/security.c to use GetFileAttributesA instead of GetFileAttributes.
+* Modified configure to not generate Makefiles.
Current version: 1.1.24
@@ -12,5 +13,7 @@ To import a new snapshot of libxslt:
- Copy the files into this directory, omitting files which have been omitted
here.
- Remove libxslt/xsltconfig.h and libexslt/exsltconfig.h.
+- 'cd linux && sh ../configure --with-libxml-src=../../libxml/linux/' to
+ re-generate configuration headers.
- Perform the modification above.
- Update this README to reflect the new version number.
diff --git a/third_party/libxslt/SConscript b/third_party/libxslt/SConscript
index b918583..dc44477 100644
--- a/third_party/libxslt/SConscript
+++ b/third_party/libxslt/SConscript
@@ -38,6 +38,7 @@ env.Prepend(
'$ICU38_DIR/public/common',
'$ICU38_DIR/public/18n',
'$ZLIB_DIR',
+ 'scons',
'.',
'../',
],
@@ -49,12 +50,16 @@ env.Append(
'LIBXML_STATIC',
'LIBXSLT_STATIC',
],
- CCFLAGS = [
- '/TC',
- '/wd4800',
- ],
)
+if env['PLATFORM'] == 'win32':
+ env.Append(
+ CCFLAGS = [
+ '/TC',
+ '/wd4800',
+ ],
+ )
+
input_files = [
'libxslt/attributes.c',
@@ -80,34 +85,47 @@ input_files = [
env.ChromeStaticLibrary('libxslt', input_files)
-config_files = [
- # The configure.js script must be first in this list; the
- # env.Command() call below executes the first list element.
+if env['PLATFORM'] == 'win32':
+ config_files = [
+ # The configure.js script must be first in this list; the
+ # env.Command() call below executes the first list element.
- 'win32/configure.js',
- 'win32/Makefile.msvc',
+ 'win32/configure.js',
+ 'win32/Makefile.msvc',
- 'config.h.in',
- 'configure.in',
- 'libexslt.pc.in',
- 'libxslt.pc.in',
- 'libxslt.spec.in',
- 'xslt-config.in',
- 'xsltConf.sh.in',
+ 'config.h.in',
+ 'configure.in',
+ 'libexslt.pc.in',
+ 'libxslt.pc.in',
+ 'libxslt.spec.in',
+ 'xslt-config.in',
+ 'xsltConf.sh.in',
- 'libexslt/exsltconfig.h.in',
+ 'libexslt/exsltconfig.h.in',
- 'libxslt/xsltconfig.h.in',
- 'libxslt/xsltwin32config.h.in',
- 'libxslt/win32config.h',
-]
+ 'libxslt/xsltconfig.h.in',
+ 'libxslt/xsltwin32config.h.in',
+ 'libxslt/win32config.h',
+ ]
+
+ copied_sources = []
+ for cf in config_files:
+ result = env.Command('scons/' + cf, cf, Copy('$TARGET', '$SOURCE'))
+ copied_sources.extend(result)
-copied_sources = []
-for cf in config_files:
- result = env.Command('scons/' + cf, cf, Copy('$TARGET', '$SOURCE'))
- copied_sources.extend(result)
+ env.Command(['scons/config.h'],
+ copied_sources,
+ 'cd ${SOURCE.dir} && $CSCRIPT ${SOURCE.file} $CONFIG_OPTIONS',
+ CONFIG_OPTIONS='compiler=msvc')
+elif env['PLATFORM'] == 'posix':
+ config_files = [
+ 'config.h',
+ 'xslt-config',
+ 'libexslt/exsltconfig.h',
+ 'libxslt/xsltconfig.h',
+ 'libxslt/xsltwin32config.h',
+ ]
+ for cf in config_files:
+ result = env.Command('scons/' + cf, 'linux/' + cf,
+ Copy('$TARGET', '$SOURCE'))
-env.Command(['scons/config.h'],
- copied_sources,
- 'cd ${SOURCE.dir} && $CSCRIPT ${SOURCE.file} $CONFIG_OPTIONS',
- CONFIG_OPTIONS='compiler=msvc')
diff --git a/third_party/libxslt/configure b/third_party/libxslt/configure
index 1fbb5d1..7a4cfb0 100644
--- a/third_party/libxslt/configure
+++ b/third_party/libxslt/configure
@@ -22731,7 +22731,7 @@ $LN_S Copyright COPYING
)
-ac_config_files="$ac_config_files Makefile libxslt.pc libexslt.pc libxslt/Makefile libxslt/xsltconfig.h libxslt/xsltwin32config.h libexslt/Makefile libexslt/exsltconfig.h xsltproc/Makefile python/Makefile python/tests/Makefile tests/Makefile tests/docs/Makefile tests/REC1/Makefile tests/REC2/Makefile tests/REC/Makefile tests/general/Makefile tests/reports/Makefile tests/extensions/Makefile tests/namespaces/Makefile tests/keys/Makefile tests/numbers/Makefile tests/documents/Makefile tests/xmlspec/Makefile tests/multiple/Makefile tests/xinclude/Makefile tests/XSLTMark/Makefile tests/docbook/Makefile tests/exslt/Makefile tests/exslt/common/Makefile tests/exslt/functions/Makefile tests/exslt/math/Makefile tests/exslt/sets/Makefile tests/exslt/strings/Makefile tests/exslt/date/Makefile tests/exslt/dynamic/Makefile tests/plugins/Makefile doc/Makefile xslt-config libxslt.spec"
+ac_config_files="$ac_config_files libxslt/xsltconfig.h libxslt/xsltwin32config.h libexslt/exsltconfig.h xslt-config"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
diff --git a/third_party/libxslt/linux/config.h b/third_party/libxslt/linux/config.h
new file mode 100644
index 0000000..7bb7be2
--- /dev/null
+++ b/third_party/libxslt/linux/config.h
@@ -0,0 +1,161 @@
+/* config.h. Generated from config.h.in by configure. */
+/* config.h.in. Generated from configure.in by autoheader. */
+/* #undef HAVE_ISINF */
+/* #undef HAVE_ISNAN */
+#define HAVE_POW 1
+#define HAVE_FLOOR 1
+#define HAVE_FABS 1
+#define WITH_DEBUGGER 1
+
+/* Define to 1 if you have the <ansidecl.h> header file. */
+/* #undef HAVE_ANSIDECL_H */
+
+/* Define to 1 if you have the `asctime' function. */
+#define HAVE_ASCTIME 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the <float.h> header file. */
+#define HAVE_FLOAT_H 1
+
+/* Define to 1 if you have the `fprintf' function. */
+#define HAVE_FPRINTF 1
+
+/* Define to 1 if you have the <fp_class.h> header file. */
+/* #undef HAVE_FP_CLASS_H */
+
+/* Define to 1 if you have the `ftime' function. */
+#define HAVE_FTIME 1
+
+/* Define if gcrypt library is available. */
+#define HAVE_GCRYPT 1
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#define HAVE_GETTIMEOFDAY 1
+
+/* Define to 1 if you have the `gmtime_r' function. */
+#define HAVE_GMTIME_R 1
+
+/* Define to 1 if you have the <ieeefp.h> header file. */
+/* #undef HAVE_IEEEFP_H */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `localtime' function. */
+#define HAVE_LOCALTIME 1
+
+/* Define to 1 if you have the `localtime_r' function. */
+#define HAVE_LOCALTIME_R 1
+
+/* Define to 1 if you have the <math.h> header file. */
+#define HAVE_MATH_H 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `mktime' function. */
+#define HAVE_MKTIME 1
+
+/* Define to 1 if you have the <nan.h> header file. */
+/* #undef HAVE_NAN_H */
+
+/* Define to 1 if you have the `printf' function. */
+#define HAVE_PRINTF 1
+
+/* Define to 1 if you have the `snprintf' function. */
+#define HAVE_SNPRINTF 1
+
+/* Define to 1 if you have the `sprintf' function. */
+#define HAVE_SPRINTF 1
+
+/* Define to 1 if you have the `sscanf' function. */
+#define HAVE_SSCANF 1
+
+/* Define to 1 if you have the `stat' function. */
+#define HAVE_STAT 1
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#define HAVE_STDARG_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#define HAVE_SYS_SELECT_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/timeb.h> header file. */
+#define HAVE_SYS_TIMEB_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the `time' function. */
+#define HAVE_TIME 1
+
+/* Define to 1 if you have the <time.h> header file. */
+#define HAVE_TIME_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the `vfprintf' function. */
+#define HAVE_VFPRINTF 1
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#define HAVE_VSNPRINTF 1
+
+/* Define to 1 if you have the `vsprintf' function. */
+#define HAVE_VSPRINTF 1
+
+/* Define to 1 if you have the `_stat' function. */
+/* #undef HAVE__STAT */
+
+/* Name of package */
+#define PACKAGE "libxslt"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+#define VERSION "1.1.24"
+
+/* Using the Win32 Socket implementation */
+/* #undef _WINSOCKAPI_ */
+
+/* Win32 Std C name mangling work-around */
+/* #undef snprintf */
+
+/* Win32 Std C name mangling work-around */
+/* #undef vsnprintf */
diff --git a/third_party/libxslt/linux/libexslt/exsltconfig.h b/third_party/libxslt/linux/libexslt/exsltconfig.h
new file mode 100644
index 0000000..5650387
--- /dev/null
+++ b/third_party/libxslt/linux/libexslt/exsltconfig.h
@@ -0,0 +1,73 @@
+/*
+ * exsltconfig.h: compile-time version informations for the EXSLT library
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#ifndef __XML_EXSLTCONFIG_H__
+#define __XML_EXSLTCONFIG_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * LIBEXSLT_DOTTED_VERSION:
+ *
+ * the version string like "1.2.3"
+ */
+#define LIBEXSLT_DOTTED_VERSION "1.1.24"
+
+/**
+ * LIBEXSLT_VERSION:
+ *
+ * the version number: 1.2.3 value is 10203
+ */
+#define LIBEXSLT_VERSION 813
+
+/**
+ * LIBEXSLT_VERSION_STRING:
+ *
+ * the version number string, 1.2.3 value is "10203"
+ */
+#define LIBEXSLT_VERSION_STRING "813"
+
+/**
+ * LIBEXSLT_VERSION_EXTRA:
+ *
+ * extra version information, used to show a CVS compilation
+ */
+#define LIBEXSLT_VERSION_EXTRA ""
+
+/**
+ * WITH_CRYPTO:
+ *
+ * Whether crypto support is configured into exslt
+ */
+#if 1
+#define EXSLT_CRYPTO_ENABLED
+#endif
+
+/**
+ * ATTRIBUTE_UNUSED:
+ *
+ * This macro is used to flag unused function parameters to GCC
+ */
+#ifdef __GNUC__
+#ifdef HAVE_ANSIDECL_H
+#include <ansidecl.h>
+#endif
+#ifndef ATTRIBUTE_UNUSED
+#define ATTRIBUTE_UNUSED __attribute__((unused))
+#endif
+#else
+#define ATTRIBUTE_UNUSED
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_EXSLTCONFIG_H__ */
diff --git a/third_party/libxslt/linux/libxslt/xsltconfig.h b/third_party/libxslt/linux/libxslt/xsltconfig.h
new file mode 100644
index 0000000..51ee561
--- /dev/null
+++ b/third_party/libxslt/linux/libxslt/xsltconfig.h
@@ -0,0 +1,159 @@
+/*
+ * Summary: compile-time version informations for the XSLT engine
+ * Description: compile-time version informations for the XSLT engine
+ * this module is autogenerated.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XSLTCONFIG_H__
+#define __XML_XSLTCONFIG_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * LIBXSLT_DOTTED_VERSION:
+ *
+ * the version string like "1.2.3"
+ */
+#define LIBXSLT_DOTTED_VERSION "1.1.24"
+
+/**
+ * LIBXSLT_VERSION:
+ *
+ * the version number: 1.2.3 value is 10203
+ */
+#define LIBXSLT_VERSION 10124
+
+/**
+ * LIBXSLT_VERSION_STRING:
+ *
+ * the version number string, 1.2.3 value is "10203"
+ */
+#define LIBXSLT_VERSION_STRING "10124"
+
+/**
+ * LIBXSLT_VERSION_EXTRA:
+ *
+ * extra version information, used to show a CVS compilation
+ */
+#define LIBXSLT_VERSION_EXTRA ""
+
+/**
+ * WITH_XSLT_DEBUG:
+ *
+ * Activate the compilation of the debug reporting. Speed penalty
+ * is insignifiant and being able to run xsltpoc -v is useful. On
+ * by default unless --without-debug is passed to configure
+ */
+#if 1
+#define WITH_XSLT_DEBUG
+#endif
+
+#if 0
+/**
+ * DEBUG_MEMORY:
+ *
+ * should be activated only when debugging libxslt. It replaces the
+ * allocator with a collect and debug shell to the libc allocator.
+ * Use configure --with-mem-debug to activate it on both library
+ */
+#define DEBUG_MEMORY
+
+/**
+ * DEBUG_MEMORY_LOCATION:
+ *
+ * should be activated only when debugging libxslt.
+ * DEBUG_MEMORY_LOCATION should be activated only when libxml has
+ * been configured with --with-debug-mem too
+ */
+#define DEBUG_MEMORY_LOCATION
+#endif
+
+/**
+ * XSLT_NEED_TRIO:
+ *
+ * should be activated if the existing libc library lacks some of the
+ * string formatting function, in that case reuse the Trio ones already
+ * compiled in the libxml2 library.
+ */
+
+#if 0
+#define XSLT_NEED_TRIO
+#endif
+#ifdef __VMS
+#define HAVE_MATH_H 1
+#define HAVE_SYS_STAT_H 1
+#ifndef XSLT_NEED_TRIO
+#define XSLT_NEED_TRIO
+#endif
+#endif
+
+#ifdef XSLT_NEED_TRIO
+#define TRIO_REPLACE_STDIO
+#endif
+
+/**
+ * WITH_XSLT_DEBUGGER:
+ *
+ * Activate the compilation of the debugger support. Speed penalty
+ * is insignifiant.
+ * On by default unless --without-debugger is passed to configure
+ */
+#if 1
+#ifndef WITH_DEBUGGER
+#define WITH_DEBUGGER
+#endif
+#endif
+
+/**
+ * WITH_MODULES:
+ *
+ * Whether module support is configured into libxslt
+ * Note: no default module path for win32 platforms
+ */
+#if 1
+#ifndef WITH_MODULES
+#define WITH_MODULES
+#endif
+#define LIBXSLT_DEFAULT_PLUGINS_PATH() "/usr/local/lib/libxslt-plugins"
+#endif
+
+/**
+ * ATTRIBUTE_UNUSED:
+ *
+ * This macro is used to flag unused function parameters to GCC
+ */
+#ifdef __GNUC__
+#ifdef HAVE_ANSIDECL_H
+#include <ansidecl.h>
+#endif
+#ifndef ATTRIBUTE_UNUSED
+#define ATTRIBUTE_UNUSED __attribute__((unused))
+#endif
+#else
+#define ATTRIBUTE_UNUSED
+#endif
+
+/**
+ * LIBXSLT_PUBLIC:
+ *
+ * This macro is used to declare PUBLIC variables for Cygwin and for MSC on Windows
+ */
+#if !defined LIBXSLT_PUBLIC
+#if (defined(__CYGWIN__) || defined _MSC_VER) && !defined IN_LIBXSLT && !defined LIBXSLT_STATIC
+#define LIBXSLT_PUBLIC __declspec(dllimport)
+#else
+#define LIBXSLT_PUBLIC
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLTCONFIG_H__ */
diff --git a/third_party/libxslt/linux/libxslt/xsltwin32config.h b/third_party/libxslt/linux/libxslt/xsltwin32config.h
new file mode 100644
index 0000000..c0c100f
--- /dev/null
+++ b/third_party/libxslt/linux/libxslt/xsltwin32config.h
@@ -0,0 +1,105 @@
+/*
+ * Summary: compile-time version informations for the XSLT engine
+ * when compiled on windows
+ * Description: compile-time version informations for the XSLT engine
+ * when compiled on windows. This file is generated.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XSLTWIN32CONFIG_H__
+#define __XML_XSLTWIN32CONFIG_H__
+
+#include "win32config.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * LIBXSLT_DOTTED_VERSION:
+ *
+ * the version string like "1.2.3"
+ */
+#define LIBXSLT_DOTTED_VERSION "1.1.24"
+
+/**
+ * LIBXSLT_VERSION:
+ *
+ * the version number: 1.2.3 value is 1002003
+ */
+#define LIBXSLT_VERSION 10124
+
+/**
+ * LIBXSLT_VERSION_STRING:
+ *
+ * the version number string, 1.2.3 value is "1002003"
+ */
+#define LIBXSLT_VERSION_STRING "10124"
+
+/**
+ * LIBXSLT_VERSION_EXTRA:
+ *
+ * extra version information, used to show a CVS compilation
+ */
+#define LIBXSLT_VERSION_EXTRA "-win32"
+
+/**
+ * WITH_XSLT_DEBUG:
+ *
+ * Activate the compilation of the debug reporting. Speed penalty
+ * is insignifiant and being able to run xsltpoc -v is useful. On
+ * by default
+ */
+#if 1
+#define WITH_XSLT_DEBUG
+#endif
+
+/**
+ * WITH_MODULES:
+ *
+ * Whether module support is configured into libxslt
+ */
+#if 1
+#ifndef WITH_MODULES
+#define WITH_MODULES
+#endif
+#define LIBXSLT_PLUGINS_PATH() getenv("LIBXSLT_PLUGINS_PATH")
+#endif
+
+#if 0
+/**
+ * DEBUG_MEMORY:
+ *
+ * should be activated only when debugging libxslt. It replaces the
+ * allocator with a collect and debug shell to the libc allocator.
+ * Use configure --with-mem-debug to activate it on both library
+ */
+#define DEBUG_MEMORY
+
+/**
+ * DEBUG_MEMORY_LOCATION:
+ *
+ * should be activated only when debugging libxslt.
+ * DEBUG_MEMORY_LOCATION should be activated only when libxml has
+ * been configured with --with-debug-mem too
+ */
+#define DEBUG_MEMORY_LOCATION
+#endif
+
+/**
+ * ATTRIBUTE_UNUSED:
+ *
+ * This macro is used to flag unused function parameters to GCC, useless here
+ */
+#ifndef ATTRIBUTE_UNUSED
+#define ATTRIBUTE_UNUSED
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLTWIN32CONFIG_H__ */
diff --git a/third_party/libxslt/linux/xslt-config b/third_party/libxslt/linux/xslt-config
new file mode 100644
index 0000000..238002a
--- /dev/null
+++ b/third_party/libxslt/linux/xslt-config
@@ -0,0 +1,137 @@
+#! /bin/sh
+
+prefix=/usr/local
+exec_prefix=${prefix}
+exec_prefix_set=no
+includedir=${prefix}/include
+libdir=${exec_prefix}/lib
+
+usage()
+{
+ cat <<EOF
+Usage: xslt-config [OPTION]...
+
+Known values for OPTION are:
+
+ --prefix=DIR change XSLT prefix [default $prefix]
+ --exec-prefix=DIR change XSLT executable prefix [default $exec_prefix]
+ --libs print library linking information
+ --cflags print pre-processor and compiler flags
+ --plugins print plugin directory
+ --help display this help and exit
+ --version output version information
+EOF
+
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1
+fi
+
+cflags=false
+libs=false
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case "$1" in
+ --prefix=*)
+ prefix=$optarg
+ if test $exec_prefix_set = no ; then
+ exec_prefix=$optarg
+ fi
+ ;;
+
+ --prefix)
+ echo $prefix
+ ;;
+
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ exec_prefix_set=yes
+ ;;
+
+ --exec-prefix)
+ echo $exec_prefix
+ ;;
+
+ --version)
+ echo 1.1.24
+ exit 0
+ ;;
+
+ --plugins)
+ echo /usr/local/lib/libxslt-plugins
+ exit 0
+ ;;
+
+ --help)
+ usage 0
+ ;;
+
+ --cflags)
+ cflags=true
+ ;;
+
+ --libs)
+ libs=true
+ ;;
+
+ *)
+ usage
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+the_libs="-L${libdir} -lxslt -L/home/mmoss/src/chrome/src/chrome/Hammer/third_party/libxml/scons -L/usr/local/lib -lxml2 -lz -lm -lm"
+if test "$includedir" != "/usr/include"; then
+ the_flags="$the_flags -I$includedir `/home/mmoss/src/chrome/src/chrome/Hammer/third_party/libxml/scons/xml2-config --cflags`"
+else
+ the_flags="$the_flags `/home/mmoss/src/chrome/src/chrome/Hammer/third_party/libxml/scons/xml2-config --cflags`"
+fi
+
+if $cflags; then
+ all_flags="$the_flags"
+fi
+
+if $libs; then
+ all_flags="$all_flags $services $the_libs"
+fi
+
+if test -z "$all_flags" || test "x$all_flags" = "x "; then
+ exit 1
+fi
+
+# Straight out any possible duplicates, but be careful to
+# get `-lfoo -lbar -lbaz' for `-lfoo -lbaz -lbar -lbaz'
+other_flags=
+rev_libs=
+for i in $all_flags; do
+ case "$i" in
+ # a library, save it for later, in reverse order
+ -l*) rev_libs="$i $rev_libs" ;;
+ *)
+ case " $other_flags " in
+ *\ $i\ *) ;; # already there
+ *) other_flags="$other_flags $i" ;; # add it to output
+ esac ;;
+ esac
+done
+
+ord_libs=
+for i in $rev_libs; do
+ case " $ord_libs " in
+ *\ $i\ *) ;; # already there
+ *) ord_libs="$i $ord_libs" ;; # add it to output in reverse order
+ esac
+done
+
+echo $other_flags $ord_libs
+
+exit 0