diff options
author | Shimeng (Simon) Wang <swang@google.com> | 2010-04-21 17:19:24 -0700 |
---|---|---|
committer | Shimeng (Simon) Wang <swang@google.com> | 2010-04-21 17:19:24 -0700 |
commit | d9120218522dc5da663e78996d0f042c0a62bc5e (patch) | |
tree | ebe4eaa68fd292f82a879380ee8a7935a4195220 | |
parent | 7d1dabff1598661db0018d89d16cca02f7c31ae2 (diff) | |
download | android_external_libxslt-d9120218522dc5da663e78996d0f042c0a62bc5e.tar.gz android_external_libxslt-d9120218522dc5da663e78996d0f042c0a62bc5e.tar.bz2 android_external_libxslt-d9120218522dc5da663e78996d0f042c0a62bc5e.zip |
Add makefile and config changes to libxslt to make it work on Android.
xlocale is not supported in Android, so libxslt_locale_xlocale is disabled.
The WITH_MODULES is disabled since can't get through a link error,
will revisit later.
The config.h is generated in goobuntu using the full libxslt source tree,
and modified very little to work in Android.
Change-Id: I1da91176305ac31a66a9e10c918bf1dabc3804e9
-rw-r--r-- | Android.mk | 54 | ||||
-rw-r--r-- | libxslt/config.h | 206 | ||||
-rw-r--r-- | libxslt/xsltconfig.h | 6 |
3 files changed, 263 insertions, 3 deletions
diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..43d465e --- /dev/null +++ b/Android.mk @@ -0,0 +1,54 @@ +LOCAL_PATH:= $(call my-dir) + +# We need to build this for both the device (as a shared library) +# and the host (as a static library for tools to use). + +common_SRC_FILES := \ + libxslt/attrvt.c \ + libxslt/namespaces.c \ + libxslt/security.c \ + libxslt/xsltlocale.c \ + libxslt/extensions.c \ + libxslt/numbers.c \ + libxslt/extra.c \ + libxslt/keys.c \ + libxslt/attributes.c \ + libxslt/imports.c \ + libxslt/variables.c \ + libxslt/xsltutils.c \ + libxslt/xslt.c \ + libxslt/transform.c \ + libxslt/preproc.c \ + libxslt/templates.c \ + libxslt/documents.c \ + libxslt/functions.c \ + libxslt/pattern.c + +common_C_INCLUDES += \ + $(LOCAL_PATH)/libxslt + +LOCAL_STATIC_LIBRARIES := libxml2 +# For the device +# ===================================================== + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(common_SRC_FILES) +LOCAL_C_INCLUDES += $(common_C_INCLUDES) external/libxml2/include external/icu4c/common +LOCAL_SHARED_LIBRARIES += $(common_SHARED_LIBRARIES) +LOCAL_CFLAGS += -fvisibility=hidden + +LOCAL_MODULE:= libxslt + +include $(BUILD_STATIC_LIBRARY) + + +# For the host +# ======================================================== + +include $(CLEAR_VARS) +LOCAL_SRC_FILES := $(common_SRC_FILES) +LOCAL_C_INCLUDES += $(common_C_INCLUDES) external/libxml2/include external/icu4c/common +LOCAL_SHARED_LIBRARIES += $(common_SHARED_LIBRARIES) +LOCAL_MODULE:= libxslt +include $(BUILD_HOST_STATIC_LIBRARY) diff --git a/libxslt/config.h b/libxslt/config.h new file mode 100644 index 0000000..27cca0f --- /dev/null +++ b/libxslt/config.h @@ -0,0 +1,206 @@ +/* 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 if pthread library is there (-lpthread) */ +#define HAVE_LIBPTHREAD /**/ + +/* Define to 1 if you have the <locale.h> header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if you have the `localtime' function. */ +#define HAVE_LOCALTIME 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 if <pthread.h> is there */ +#define HAVE_PTHREAD_H /**/ + +/* 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 <xlocale.h> header file. */ +#define HAVE_XLOCALE_H 0 + +/* Define to 1 if you have the `_stat' function. */ +/* #undef HAVE__STAT */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* 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 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.1.26" + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* 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/libxslt/xsltconfig.h b/libxslt/xsltconfig.h index db20ebd..bb9d403 100644 --- a/libxslt/xsltconfig.h +++ b/libxslt/xsltconfig.h @@ -54,7 +54,7 @@ extern "C" { #define WITH_XSLT_DEBUG #endif -#if 1 +#if 0 /** * DEBUG_MEMORY: * @@ -116,7 +116,7 @@ extern "C" { * Whether module support is configured into libxslt * Note: no default module path for win32 platforms */ -#if 1 +#if 0 #ifndef WITH_MODULES #define WITH_MODULES #endif @@ -126,7 +126,7 @@ extern "C" { /** * Locale support */ -#if 1 +#if 0 #ifndef XSLT_LOCALE_XLOCALE #define XSLT_LOCALE_XLOCALE #endif |