./000755 000000 000144 00000000000 06767252026 011134 5ustar00MARKVERMWAY000000 000000 ./icu/000777 000000 000144 00000000000 06765223720 011715 5ustar00MARKVERMWAY000000 000000 ./icu/source/000777 000000 000144 00000000000 06767720234 013221 5ustar00MARKVERMWAY000000 000000 ./icu/source/configure000777 000000 000144 00000206013 06760551477 015144 0ustar00MARKVERMWAY123000 000000 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Defaults: ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help --enable-extras build ICU extras [default=yes]" ac_help="$ac_help --enable-tests build ICU tests [default=yes]" ac_help="$ac_help --enable-samples build ICU samples [default=yes]" # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE cache_file=./config.cache exec_prefix=NONE host=NONE no_create= nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi case "$ac_option" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) ac_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir="$ac_optarg" ;; -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "enable_${ac_feature}='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he) # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat << EOF Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] --bindir=DIR user executables in DIR [EPREFIX/bin] --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] --libexecdir=DIR program executables in DIR [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share] --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com] --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/include] --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] --infodir=DIR info documentation in DIR [PREFIX/info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names EOF cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] --target=TARGET configure for TARGET [TARGET=HOST] Features and packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF if test -n "$ac_help"; then echo "--enable and --with options recognized:$ac_help" fi exit 0 ;; -host | --host | --hos | --ho) ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) host="$ac_optarg" ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir="$ac_optarg" ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir="$ac_optarg" ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir="$ac_optarg" ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir="$ac_optarg" ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir="$ac_optarg" ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir="$ac_optarg" ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir="$ac_optarg" ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix="$ac_optarg" ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir="$ac_optarg" ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir="$ac_optarg" ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site="$ac_optarg" ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir="$ac_optarg" ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir="$ac_optarg" ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers) echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes="$ac_optarg" ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi if test "x$nonopt" != xNONE; then { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } fi nonopt="$ac_option" ;; esac done if test -n "$ac_prev"; then { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } fi trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # 3 some systems may open it to /dev/tty # 4 used on the Kubota Titan # 6 checking for... messages and results # 5 compiler messages saved in config.log if test "$silent" = yes; then exec 6>/dev/null else exec 6>&1 fi exec 5>./config.log echo "\ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. " 1>&5 # Strip out --no-create and --no-recursion so they do not pile up. # Also quote any args containing shell metacharacters. ac_configure_args= for ac_arg do case "$ac_arg" in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! # Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. ac_unique_file=common/utypes.h # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then echo "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then echo "loading cache $cache_file" . $cache_file else echo "creating cache $cache_file" > $cache_file fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross ac_exeext= ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi PACKAGE="icu" VERSION="1.2.5" # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:540: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:570: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" break fi done IFS="$ac_save_ifs" if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift set dummy "$ac_dir/$ac_word" "$@" shift ac_cv_prog_CC="$@" fi fi fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then case "`uname -s`" in *win32* | *WIN32*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:621: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="cl" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi ;; esac fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:653: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF #line 664 "configure" #include "confdefs.h" main(){return(0);} EOF if { (eval echo configure:669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cc_cross=no else ac_cv_prog_cc_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cc_works=no fi rm -fr conftest* ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:695: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo "configure:700: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes else GCC= fi ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo "configure:728: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else ac_cv_prog_cc_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then CFLAGS="$ac_save_CFLAGS" elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:764: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CXX="$ac_prog" break fi done IFS="$ac_save_ifs" fi fi CXX="$ac_cv_prog_CXX" if test -n "$CXX"; then echo "$ac_t""$CXX" 1>&6 else echo "$ac_t""no" 1>&6 fi test -n "$CXX" && break done test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:796: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF #line 807 "configure" #include "confdefs.h" int main(){return(0);} EOF if { (eval echo configure:812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cxx_cross=no else ac_cv_prog_cxx_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cxx_works=no fi rm -fr conftest* ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:838: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 echo "configure:843: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.C <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no fi fi echo "$ac_t""$ac_cv_prog_gxx" 1>&6 if test $ac_cv_prog_gxx = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 echo "configure:871: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.cc if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then ac_cv_prog_cxx_g=yes else ac_cv_prog_cxx_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS="$ac_save_CXXFLAGS" elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break fi done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo "configure:933: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 fi fi done ;; esac done IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then INSTALL="$ac_cv_path_install" else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL="$ac_install_sh" fi fi echo "$ac_t""$INSTALL" 1>&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "autoconf", so it can be a program name with args. set dummy autoconf; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:988: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AUTOCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AUTOCONF"; then ac_cv_prog_AUTOCONF="$AUTOCONF" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_AUTOCONF="autoconf" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_prog_AUTOCONF" && ac_cv_prog_AUTOCONF="true" fi fi AUTOCONF="$ac_cv_prog_AUTOCONF" if test -n "$AUTOCONF"; then echo "$ac_t""$AUTOCONF" 1>&6 else echo "$ac_t""no" 1>&6 fi # Make sure we can run config.sub. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 echo "configure:1023: checking host system type" >&5 host_alias=$host case "$host_alias" in NONE) case $nonopt in NONE) if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } fi ;; *) host_alias=$nonopt ;; esac ;; esac host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking which Makefile fragment to use""... $ac_c" 1>&6 echo "configure:1045: checking which Makefile fragment to use" >&5 if eval "test \"`echo '$''{'icu_cv_host_frag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "${host}" in *-*-solaris*) if test "$ac_cv_prog_gcc" = yes; then icu_cv_host_frag=$srcdir/config/mh-solaris-gcc else icu_cv_host_frag=$srcdir/config/mh-solaris fi ;; *-*-linux*) icu_cv_host_frag=$srcdir/config/mh-linux ;; *-*-aix*) icu_cv_host_frag=$srcdir/config/mh-aix ;; *-*-hpux*) case "$CXX" in *aCC) icu_cv_host_frag=$srcdir/config/mh-hpux-acc ;; *CC) icu_cv_host_frag=$srcdir/config/mh-hpux-cc ;; esac;; *-*-os390*) icu_cv_host_frag=$srcdir/config/mh-os390 ;; *) icu_cv_host_frag=$srcdir/config/mh-unknown ;; esac fi echo "$ac_t""$icu_cv_host_frag" 1>&6 case "${host}" in *-*-hpux*) echo $ac_n "checking for floor in -lm""... $ac_c" 1>&6 echo "configure:1076: checking for floor in -lm" >&5 ac_lib_var=`echo m'_'floor | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIB_M="-lm" else echo "$ac_t""no" 1>&6 fi ;; *) echo $ac_n "checking for floor in -lm""... $ac_c" 1>&6 echo "configure:1116: checking for floor in -lm" >&5 ac_lib_var=`echo m'_'floor | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi LIB_M="" ;; esac echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 echo "configure:1167: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi if test $ac_cv_lib_pthread_pthread_create = no; then echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 echo "configure:1215: checking for pthread_create in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lpthreads $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi fi if test $ac_cv_lib_pthread_pthread_create = no; then echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 echo "configure:1264: checking for pthread_create in -lcma" >&5 ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lcma $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo cma | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo "configure:1313: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get # substituted into the Makefile and "${CC-cc}" will confuse make. CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi rm -f conftest* fi rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" else ac_cv_prog_CPP="$CPP" fi echo "$ac_t""$CPP" 1>&6 for ac_hdr in inttypes.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1396: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done if test $ac_cv_header_inttypes_h = no; then HAVE_INTTYPES_H=0 else HAVE_INTTYPES_H=1 fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 echo "configure:1440: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "memchr" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "free" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF if { (eval echo configure:1520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_header_stdc=no fi rm -fr conftest* fi fi fi echo "$ac_t""$ac_cv_header_stdc" 1>&6 if test $ac_cv_header_stdc = yes; then cat >> confdefs.h <<\EOF #define STDC_HEADERS 1 EOF fi echo $ac_n "checking for int8_t""... $ac_c" 1>&6 echo "configure:1544: checking for int8_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_int8_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])int8_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_int8_t=yes else rm -rf conftest* ac_cv_type_int8_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_int8_t" 1>&6 if test $ac_cv_type_int8_t = no; then cat >> confdefs.h <<\EOF #define int8_t signed char EOF fi echo $ac_n "checking for uint8_t""... $ac_c" 1>&6 echo "configure:1577: checking for uint8_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_uint8_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])uint8_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_uint8_t=yes else rm -rf conftest* ac_cv_type_uint8_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_uint8_t" 1>&6 if test $ac_cv_type_uint8_t = no; then cat >> confdefs.h <<\EOF #define uint8_t unsigned char EOF fi echo $ac_n "checking for int16_t""... $ac_c" 1>&6 echo "configure:1610: checking for int16_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_int16_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_int16_t=yes else rm -rf conftest* ac_cv_type_int16_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_int16_t" 1>&6 if test $ac_cv_type_int16_t = no; then cat >> confdefs.h <<\EOF #define int16_t signed short EOF fi echo $ac_n "checking for uint16_t""... $ac_c" 1>&6 echo "configure:1643: checking for uint16_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_uint16_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])uint16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_uint16_t=yes else rm -rf conftest* ac_cv_type_uint16_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_uint16_t" 1>&6 if test $ac_cv_type_uint16_t = no; then cat >> confdefs.h <<\EOF #define uint16_t unsigned short EOF fi echo $ac_n "checking for int32_t""... $ac_c" 1>&6 echo "configure:1676: checking for int32_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_int32_t=yes else rm -rf conftest* ac_cv_type_int32_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_int32_t" 1>&6 if test $ac_cv_type_int32_t = no; then cat >> confdefs.h <<\EOF #define int32_t signed long EOF fi echo $ac_n "checking for uint32_t""... $ac_c" 1>&6 echo "configure:1709: checking for uint32_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_uint32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])uint32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_uint32_t=yes else rm -rf conftest* ac_cv_type_uint32_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_uint32_t" 1>&6 if test $ac_cv_type_uint32_t = no; then cat >> confdefs.h <<\EOF #define uint32_t unsigned long EOF fi echo $ac_n "checking for bool_t""... $ac_c" 1>&6 echo "configure:1742: checking for bool_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_bool_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])bool_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_bool_t=yes else rm -rf conftest* ac_cv_type_bool_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_bool_t" 1>&6 if test $ac_cv_type_bool_t = no; then cat >> confdefs.h <<\EOF #define bool_t signed char EOF fi if test $ac_cv_type_int8_t = no; then HAVE_INT8_T=0 else HAVE_INT8_T=1 fi if test $ac_cv_type_uint8_t = no; then HAVE_UINT8_T=0 else HAVE_UINT8_T=1 fi if test $ac_cv_type_int16_t = no; then HAVE_INT16_T=0 else HAVE_INT16_T=1 fi if test $ac_cv_type_uint16_t = no; then HAVE_UINT16_T=0 else HAVE_UINT16_T=1 fi if test $ac_cv_type_int32_t = no; then HAVE_INT32_T=0 else HAVE_INT32_T=1 fi if test $ac_cv_type_uint32_t = no; then HAVE_UINT32_T=0 else HAVE_UINT32_T=1 fi if test $ac_cv_type_bool_t = no; then HAVE_BOOL_T=0 else HAVE_BOOL_T=1 fi # Check whether --enable-extras or --disable-extras was given. if test "${enable_extras+set}" = set; then enableval="$enable_extras" case "${enableval}" in yes) extras=true ;; no) extras=false ;; *) { echo "configure: error: bad value ${enableval} for --enable-extras" 1>&2; exit 1; } ;; esac else extras=true fi if test "$extras" = true; then EXTRAS_TRUE= EXTRAS_FALSE='#' else EXTRAS_TRUE='#' EXTRAS_FALSE= fi # Check whether --enable-tests or --disable-tests was given. if test "${enable_tests+set}" = set; then enableval="$enable_tests" case "${enableval}" in yes) tests=true ;; no) tests=false ;; *) { echo "configure: error: bad value ${enableval} for --enable-tests" 1>&2; exit 1; } ;; esac else tests=true fi if test "$tests" = true; then TESTS_TRUE= TESTS_FALSE='#' else TESTS_TRUE='#' TESTS_FALSE= fi # Check whether --enable-samples or --disable-samples was given. if test "${enable_samples+set}" = set; then enableval="$enable_samples" case "${enableval}" in yes) samples=true ;; no) samples=false ;; *) { echo "configure: error: bad value ${enableval} for --enable-samples" 1>&2; exit 1; } ;; esac else samples=true fi if test "$samples" = true; then SAMPLES_TRUE= SAMPLES_FALSE='#' else SAMPLES_TRUE='#' SAMPLES_FALSE= fi case "${host}" in *-*-solaris*) platform=SOLARIS ;; *-*-linux*) platform=LINUX ;; *-*-aix*) platform=AIX ;; *-*-hpux*) platform=HPUX ;; *-*-os390*) platform=OS390 ;; *) platform=UNKNOWN ;; esac host_frag=$icu_cv_host_frag case "${host}" in *-*-solaris*) ld_rpath_suf=":" ;; *-*-linux*) ld_rpath_suf=" " ;; *-*-aix*) ld_rpath_suf="" ;; *-*-hpux*) ld_rpath_suf=":" ;; *-*-os390*) ld_rpath_suf=" -I" ;; *) ld_rpath_suf="" ;; esac case "${host}" in *-*-hpux*) for file in tools/gencol/gencol samples/date/date \ samples/cal/cal test/cintltst/cintltst do if test -f $file.c; then mv $file.c $file.cpp fi done ;; esac trap '' 1 2 15 cat > confcache <<\EOF # 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. It is not useful on other systems. # If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure # the --cache-file=FILE option to use a different cache file; that is # what configure does when it calls configure scripts in # subdirectories, so they share the cache. # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). sed -n \ -e "s/'/'\\\\''/g" \ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Any assignment to VPATH causes Sun make to only execute # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 DEFS=-DHAVE_CONFIG_H # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} echo creating $CONFIG_STATUS rm -f $CONFIG_STATUS cat > $CONFIG_STATUS </dev/null | sed 1q`: # # $0 $ac_configure_args # # Compiler output produced by configure, useful for debugging # configure, is in ./config.log if it exists. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" for ac_option do case "\$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; *) echo "\$ac_cs_usage"; exit 1 ;; esac done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "Makefile \ common/Makefile common/platform.h i18n/Makefile \ extra/Makefile extra/ustdio/Makefile \ tools/Makefile tools/ctestfw/Makefile tools/makeconv/Makefile \ tools/genrb/Makefile tools/gencol/Makefile \ tools/rbdump/Makefile \ test/Makefile test/intltest/Makefile test/cintltst/Makefile \ test/ieeetest/Makefile \ samples/Makefile samples/date/Makefile samples/cal/Makefile \ samples/XMLConverter/Makefile common/icucfg.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g s%@bindir@%$bindir%g s%@sbindir@%$sbindir%g s%@libexecdir@%$libexecdir%g s%@datadir@%$datadir%g s%@sysconfdir@%$sysconfdir%g s%@sharedstatedir@%$sharedstatedir%g s%@localstatedir@%$localstatedir%g s%@libdir@%$libdir%g s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@PACKAGE@%$PACKAGE%g s%@VERSION@%$VERSION%g s%@CC@%$CC%g s%@CXX@%$CXX%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@AUTOCONF@%$AUTOCONF%g s%@host@%$host%g s%@host_alias@%$host_alias%g s%@host_cpu@%$host_cpu%g s%@host_vendor@%$host_vendor%g s%@host_os@%$host_os%g s%@LIB_M@%$LIB_M%g s%@CPP@%$CPP%g s%@HAVE_INTTYPES_H@%$HAVE_INTTYPES_H%g s%@HAVE_INT8_T@%$HAVE_INT8_T%g s%@HAVE_UINT8_T@%$HAVE_UINT8_T%g s%@HAVE_INT16_T@%$HAVE_INT16_T%g s%@HAVE_UINT16_T@%$HAVE_UINT16_T%g s%@HAVE_INT32_T@%$HAVE_INT32_T%g s%@HAVE_UINT32_T@%$HAVE_UINT32_T%g s%@HAVE_BOOL_T@%$HAVE_BOOL_T%g s%@EXTRAS_TRUE@%$EXTRAS_TRUE%g s%@EXTRAS_FALSE@%$EXTRAS_FALSE%g s%@TESTS_TRUE@%$TESTS_TRUE%g s%@TESTS_FALSE@%$TESTS_FALSE%g s%@SAMPLES_TRUE@%$SAMPLES_TRUE%g s%@SAMPLES_FALSE@%$SAMPLES_FALSE%g s%@platform@%$platform%g /@host_frag@/r $host_frag s%@host_frag@%%g s%@ld_rpath_suf@%$ld_rpath_suf%g CEOF EOF cat >> $CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi if test ! -s conftest.s$ac_file; then ac_more_lines=false rm -f conftest.s$ac_file else if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f conftest.s$ac_file" else ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" fi ac_file=`expr $ac_file + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dir_suffix= ac_dots= fi case "$ac_given_srcdir" in .) srcdir=. if test -z "$ac_dots"; then top_srcdir=. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; *) # Relative path. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" top_srcdir="$ac_dots$ac_given_srcdir" ;; esac case "$ac_given_INSTALL" in [/$]*) INSTALL="$ac_given_INSTALL" ;; *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in *Makefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ac_dC='\3' ac_dD='%g' # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' ac_uD='\4%g' # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' if test "${CONFIG_HEADERS+set}" != set; then EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac echo creating $ac_file rm -f conftest.frag conftest.in conftest.out ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` cat $ac_file_inputs > conftest.in EOF # Transform confdefs.h into a sed script conftest.vals that substitutes # the proper values into config.h.in to produce config.h. And first: # Protect against being on the right side of a sed subst in config.status. # Protect against being in an unquoted here document in config.status. rm -f conftest.vals cat > conftest.hdr <<\EOF s/[\\&%]/\\&/g s%[\\$`]%\\&%g s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp s%ac_d%ac_u%gp s%ac_u%ac_e%gp EOF sed -n -f conftest.hdr confdefs.h > conftest.vals rm -f conftest.hdr # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >> conftest.vals <<\EOF s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% EOF # Break up conftest.vals because some shells have a limit on # the size of here documents, and old seds have small limits too. rm -f conftest.tail while : do ac_lines=`grep -c . conftest.vals` # grep -c gives empty output for an empty file on some AIX systems. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi # Write a limited-size here document to conftest.frag. echo ' cat > conftest.frag <> $CONFIG_STATUS sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS echo 'CEOF sed -f conftest.frag conftest.in > conftest.out rm -f conftest.in mv conftest.out conftest.in ' >> $CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail rm -f conftest.vals mv conftest.tail conftest.vals done rm -f conftest.vals cat >> $CONFIG_STATUS <<\EOF rm -f conftest.frag conftest.h echo "/* $ac_file. Generated automatically by configure. */" > conftest.h cat conftest.in >> conftest.h rm -f conftest.in if cmp -s $ac_file conftest.h 2>/dev/null; then echo "$ac_file is unchanged" rm -f conftest.h else # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" fi rm -f $ac_file mv conftest.h $ac_file fi fi; done EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 ./icu/source/oget.sh000777 000000 000144 00000000751 06767732670 014536 0ustar00MARKVERMWAY123000 000000 #!/bin/sh # # #copy *.cnv into $TARGET.CONV # TARGET=$USERID FILEDIR=$ICUROOT/share/icu/1.2.5 cd $FILEDIR for file in $(ls *.cnv); do newFilePrefix=${file%-*} newFileSuffix=${file#*-} newFileSuffix=${newFileSuffix%.*} newFile=$newFilePrefix@$newFileSuffix tso -t oget \'$FILEDIR/$file\' \'$TARGET.CONV\($newFile\)\' BINARY done # #copy convrtrs.txt into $TARGET.CONV.TXT # cd $FILEDIR tso -t oget \'$FILEDIR/convrtrs.txt\' \'$TARGET.CONV.TXT\(convrtrs\)\' # ./icu/source/common/000777 000000 000144 00000000000 06765230345 014506 5ustar00MARKVERMWAY000000 000000 ./icu/source/common/putil.c000777 000000 000144 00000065532 06761032514 016025 0ustar00MARKVERMWAY123000 000000 /* ******************************************************************************* * * * COPYRIGHT: * * (C) Copyright Taligent, Inc., 1997 * * (C) Copyright International Business Machines Corporation, 1997-1998 * * Licensed Material - Program-Property of IBM - All Rights Reserved. * * US Government Users Restricted Rights - Use, duplication, or disclosure * * restricted by GSA ADP Schedule Contract with IBM Corp. * * * ******************************************************************************* * * FILE NAME : putil.c (previously putil.cpp and ptypes.cpp) * * Date Name Description * 04/14/97 aliu Creation. * 04/24/97 aliu Added getDefaultDataDirectory() and * getDefaultLocaleID(). * 04/28/97 aliu Rewritten to assume Unix and apply general methods * for assumed case. Non-UNIX platforms must be * special-cased. Rewrote numeric methods dealing * with NaN and Infinity to be platform independent * over all IEEE 754 platforms. * 05/13/97 aliu Restored sign of timezone * (semantics are hours West of GMT) * 06/16/98 erm Added IEEE_754 stuff, cleaned up isInfinite, isNan, * nextDouble.. * 07/22/98 stephen Added remainder, max, min, trunc * 08/13/98 stephen Added isNegativeInfinity, isPositiveInfinity * 08/24/98 stephen Added longBitsFromDouble * 09/08/98 stephen Minor changes for Mac Port * 03/02/99 stephen Removed openFile(). Added AS400 support. * Fixed EBCDIC tables * 04/15/99 stephen Converted to C. * 06/28/99 stephen Removed mutex locking in u_isBigEndian(). * 08/04/99 jeffrey R. Added OS/2 changes ******************************************************************************* */ #include #include #include #include #include #include #include "utypes.h" #include "umutex.h" #include "cmemory.h" #include "cstring.h" #ifdef AS400 #include #endif #ifdef XP_MAC #include "Files.h" #include "IntlResources.h" #include "Script.h" #endif #ifdef WIN32 #include "locmap.h" #include #include #endif /* We return QNAN rather than SNAN*/ #define NAN_TOP ((int16_t)0x7FF8) #define INF_TOP ((int16_t)0x7FF0) #define SIGN 0x80000000L static char DEFAULT_CONVERTER_NAME[60] = ""; static char tempString[10] = ""; /* statics */ static bool_t fgNaNInitialized = FALSE; static double fgNan; static bool_t fgInfInitialized = FALSE; static double fgInf; /* protos */ static char* u_topNBytesOfDouble(double* d, int n); static char* u_bottomNBytesOfDouble(double* d, int n); /*--------------------------------------------------------------------------- Platform utilities Our general strategy is to assume we're on a POSIX platform. Platforms which are non-POSIX must declare themselves so. The default POSIX implementation will sometimes work for non-POSIX platforms as well (e.g., the NaN-related functions). ---------------------------------------------------------------------------*/ /* Assume POSIX, and modify as necessary below*/ #define POSIX #if defined(_WIN32) || defined(XP_MAC) || defined(AS400) || defined(OS2) #undef POSIX #endif /*--------------------------------------------------------------------------- Universal Implementations These are designed to work on all platforms. Try these, and if they don't work on your platform, then special case your platform with new implementations. ---------------------------------------------------------------------------*/ /* Get UTC (GMT) time measured in seconds since 0:00 on 1/1/70.*/ int32_t icu_getUTCtime() { #ifdef XP_MAC time_t t, t1, t2; struct tm tmrec; memset( &tmrec, 0, sizeof(tmrec) ); tmrec.tm_year = 70; tmrec.tm_mon = 0; tmrec.tm_mday = 1; t1 = mktime(&tmrec); /* seconds of 1/1/1970*/ time(&t); memcpy( &tmrec, gmtime(&t), sizeof(tmrec) ); t2 = mktime(&tmrec); /* seconds of current GMT*/ return t2 - t1; /* GMT (or UTC) in seconds since 1970*/ #else time_t epochtime; time(&epochtime); return epochtime; #endif } bool_t icu_isBigEndian() { union { int16_t fShort; int8_t fChars[2]; } testPattern; testPattern.fShort = 0x1234; return (testPattern.fChars[0] == 0x12); } /*----------------------------------------------------------------------------- IEEE 754 These methods detect and return NaN and infinity values for doubles conforming to IEEE 754. Platforms which support this standard include X86, Mac 680x0, Mac PowerPC, AIX RS/6000, and most others. If this doesn't work on your platform, you have non-IEEE floating-point, and will need to code your own versions. A naive implementation is to return 0.0 for getNaN and getInfinity, and false for isNaN and isInfinite. ---------------------------------------------------------------------------*/ bool_t icu_isNaN(double number) { #ifdef IEEE_754 /* This should work in theory, but it doesn't, so we resort to the more*/ /* complicated method below.*/ /* return number != number;*/ /* You can't return number == getNaN() because, by definition, NaN != x for*/ /* all x, including NaN (that is, NaN != NaN). So instead, we compare*/ /* against the known bit pattern. We must be careful of endianism here.*/ /* The pattern we are looking for id:*/ /* 7FFy yyyy yyyy yyyy (some y non-zero)*/ /* There are two different kinds of NaN, but we ignore the distinction*/ /* here. Note that the y value must be non-zero; if it is zero, then we*/ /* have infinity.*/ uint32_t highBits = *(uint32_t*)u_topNBytesOfDouble(&number, sizeof(uint32_t)); uint32_t lowBits = *(uint32_t*)u_bottomNBytesOfDouble(&number, sizeof(uint32_t)); return ((highBits & 0x7FF00000L) == 0x7FF00000L) && (((highBits & 0x000FFFFFL) != 0) || (lowBits != 0)); #else /* If your platform doesn't support IEEE 754 but *does* have an NaN value,*/ /* you'll need to replace this default implementation with what's correct*/ /* for your platform.*/ return number != number; #endif } bool_t icu_isInfinite(double number) { #ifdef IEEE_754 /* We know the top bit is the sign bit, so we mask that off in a copy of */ /* the number and compare against infinity. [LIU]*/ /* The following approach doesn't work for some reason, so we go ahead and */ /* scrutinize the pattern itself. */ /* double a = number; */ /* *(int8_t*)u_topNBytesOfDouble(&a, 1) &= 0x7F;*/ /* return a == icu_getInfinity();*/ /* Instead, We want to see either:*/ /* 7FF0 0000 0000 0000*/ /* FFF0 0000 0000 0000*/ uint32_t highBits = *(uint32_t*)u_topNBytesOfDouble(&number, sizeof(uint32_t)); uint32_t lowBits = *(uint32_t*)u_bottomNBytesOfDouble(&number, sizeof(uint32_t)); return ((highBits & ~SIGN) == 0x7FF00000L) && (lowBits == 0x00000000L); #else /* If your platform doesn't support IEEE 754 but *does* have an infinity*/ /* value, you'll need to replace this default implementation with what's*/ /* correct for your platform.*/ return number == (2.0 * number); #endif } bool_t icu_isPositiveInfinity(double number) { #ifdef IEEE_754 return (number > 0 && icu_isInfinite(number)); #else return icu_isInfinite(number); #endif } bool_t icu_isNegativeInfinity(double number) { #ifdef IEEE_754 return (number < 0 && icu_isInfinite(number)); #else return icu_isInfinite(number); #endif } double icu_getNaN() { #ifdef IEEE_754 if( ! fgNaNInitialized) { umtx_lock(NULL); if( ! fgNaNInitialized) { int i; int8_t* p = (int8_t*)&fgNan; for(i = 0; i < sizeof(double); ++i) *p++ = 0; *(int16_t*)u_topNBytesOfDouble(&fgNan, sizeof(NAN_TOP)) = NAN_TOP; fgNaNInitialized = TRUE; } umtx_unlock(NULL); } return fgNan; #else /* If your platform doesn't support IEEE 754 but *does* have an NaN value,*/ /* you'll need to replace this default implementation with what's correct*/ /* for your platform.*/ return 0.0; #endif } double icu_getInfinity() { #ifdef IEEE_754 if (!fgInfInitialized) { int i; int8_t* p = (int8_t*)&fgInf; for(i = 0; i < sizeof(double); ++i) *p++ = 0; *(int16_t*)u_topNBytesOfDouble(&fgInf, sizeof(INF_TOP)) = INF_TOP; fgInfInitialized = TRUE; } return fgInf; #else /* If your platform doesn't support IEEE 754 but *does* have an infinity*/ /* value, you'll need to replace this default implementation with what's*/ /* correct for your platform.*/ return 0.0; #endif } double icu_floor(double x) { return floor(x); } double icu_ceil(double x) { return ceil(x); } double icu_fabs(double x) { return fabs(x); } double icu_modf(double x, double* y) { return modf(x, y); } double icu_fmod(double x, double y) { return fmod(x, y); } double icu_pow10(int32_t x) { #ifdef XP_MAC return pow(10.0, (double)x); #else return pow(10.0, x); #endif } double icu_IEEEremainder(double x, double p) { #ifdef IEEE_754 int32_t hx, hp; uint32_t sx, lx, lp; double p_half; hx = *(int32_t*)u_topNBytesOfDouble(&x, sizeof(int32_t)); lx = *(uint32_t*)u_bottomNBytesOfDouble(&x, sizeof(uint32_t)); hp = *(int32_t*)u_topNBytesOfDouble(&p, sizeof(int32_t)); lp = *(uint32_t*)u_bottomNBytesOfDouble(&p, sizeof(uint32_t)); sx = hx & SIGN; hp &= 0x7fffffff; hx &= 0x7fffffff; /* purge off exception values */ if((hp|lp) == 0) return (x*p) / (x*p); /* p = 0 */ if((hx >= 0x7ff00000)|| /* x not finite */ ((hp>=0x7ff00000) && /* p is NaN */ (((hp-0x7ff00000)|lp) != 0))) return (x*p) / (x*p); if(hp <= 0x7fdfffff) x = icu_fmod(x, p + p); /* now x < 2p */ if(((hx-hp)|(lx-lp)) == 0) return 0.0 * x; x = icu_fabs(x); p = icu_fabs(p); if (hp < 0x00200000) { if(x + x > p) { x -= p; if(x + x >= p) x -= p; } } else { p_half = 0.5 * p; if(x > p_half) { x -= p; if(x >= p_half) x -= p; } } *(int32_t*)u_topNBytesOfDouble(&x, sizeof(int32_t)) ^= sx; return x; #else /* {sfb} need to fix this*/ return icu_fmod(x, p); #endif } double icu_fmax(double x, double y) { #ifdef IEEE_754 int32_t lowBits; /* first handle NaN*/ if(icu_isNaN(x) || icu_isNaN(y)) return icu_getNaN(); /* check for -0 and 0*/ lowBits = *(uint32_t*) u_bottomNBytesOfDouble(&x, sizeof(uint32_t)); if(x == 0.0 && y == 0.0 && (lowBits & SIGN)) return y; return (x > y ? x : y); #else /* {sfb} fix this*/ return x; #endif } int32_t icu_max(int32_t x, int32_t y) { return (x > y ? x : y); } double icu_fmin(double x, double y) { #ifdef IEEE_754 int32_t lowBits; /* first handle NaN*/ if(icu_isNaN(x) || icu_isNaN(y)) return icu_getNaN(); /* check for -0 and 0*/ lowBits = *(uint32_t*) u_bottomNBytesOfDouble(&y, sizeof(uint32_t)); if(x == 0.0 && y == 0.0 && (lowBits & SIGN)) return y; return (x > y ? y : x); #else /* {sfb} fix this*/ return x; #endif } int32_t icu_min(int32_t x, int32_t y) { return (x > y ? y : x); } /** * Truncates the given double. * trunc(3.3) = 3.0, trunc (-3.3) = -3.0 * This is different than calling floor() or ceil(): * floor(3.3) = 3, floor(-3.3) = -4 * ceil(3.3) = 4, ceil(-3.3) = -3 */ double icu_trunc(double d) { #ifdef IEEE_754 int32_t lowBits; /* handle error cases*/ if(icu_isNaN(d)) return icu_getNaN(); if(icu_isInfinite(d)) return icu_getInfinity(); lowBits = *(uint32_t*) u_bottomNBytesOfDouble(&d, sizeof(uint32_t)); if( (d == 0.0 && (lowBits & SIGN)) || d < 0) return ceil(d); else return floor(d); #else return d >= 0 ? floor(d) : ceil(d); #endif } void icu_longBitsFromDouble(double d, int32_t *hi, uint32_t *lo) { *hi = *(int32_t*)u_topNBytesOfDouble(&d, sizeof(int32_t)); *lo = *(uint32_t*)u_bottomNBytesOfDouble(&d, sizeof(uint32_t)); } /** * Return the floor of the log base 10 of a given double. * This method compensates for inaccuracies which arise naturally when * computing logs, and always give the correct value. The parameter * must be positive and finite. * (Thanks to Alan Liu for supplying this function.) */ int16_t icu_log10(double d) { /* The reason this routine is needed is that simply taking the*/ /* log and dividing by log10 yields a result which may be off*/ /* by 1 due to rounding errors. For example, the naive log10*/ /* of 1.0e300 taken this way is 299, rather than 300.*/ double log10 = log(d) / log(10.0); int16_t ilog10 = (int16_t)floor(log10); /* Positive logs could be too small, e.g. 0.99 instead of 1.0*/ if (log10 > 0 && d >= pow(10.0, ilog10 + 1)) ++ilog10; /* Negative logs could be too big, e.g. -0.99 instead of -1.0*/ else if (log10 < 0 && d < pow(10.0, ilog10)) --ilog10; return ilog10; } int32_t icu_digitsAfterDecimal(double x) { char buffer[20]; int16_t numDigits; char *p; int16_t ptPos, exponent; /* negative numbers throw off the calculations*/ x = fabs(x); /* cheat and use the string-format routine to get a string representation*/ /* (it handles mathematical inaccuracy better than we can), then find out */ /* many characters are to the right of the decimal point */ sprintf(buffer, "%.9g", x); p = icu_strchr(buffer, '.'); if (p == 0) return 0; ptPos = p - buffer; numDigits = strlen(buffer) - ptPos - 1; /* if the number's string representation is in scientific notation, find */ /* the exponent and take it into account*/ exponent = 0; p = icu_strchr(buffer, 'e'); if (p != 0) { int16_t expPos = p - buffer; numDigits -= strlen(buffer) - expPos; exponent = atoi(p + 1); } /* the string representation may still have spurious decimal digits in it, */ /* so we cut off at the ninth digit to the right of the decimal, and have */ /* to search backward from there to the first non-zero digit*/ if (numDigits > 9) { numDigits = 9; while (numDigits > 0 && buffer[ptPos + numDigits] == '0') --numDigits; } numDigits -= exponent; return numDigits; } /*--------------------------------------------------------------------------- Platform-specific Implementations Try these, and if they don't work on your platform, then special case your platform with new implementations. ---------------------------------------------------------------------------*/ /* Time zone utilities */ void icu_tzset() { #ifdef POSIX tzset(); #endif #if defined(AS400) || defined(XP_MAC) /* no initialization*/ #endif #if defined(WIN32) || defined(OS2) _tzset(); #endif } int32_t icu_timezone() { #ifdef POSIX return timezone; #endif #if defined(AS400) || defined(XP_MAC) time_t t, t1, t2; struct tm tmrec; bool_t dst_checked; time(&t); memcpy( &tmrec, localtime(&t), sizeof(tmrec) ); dst_checked = (tmrec.tm_isdst != 0); /* daylight savings time is checked*/ t1 = mktime(&tmrec); /* local time in seconds*/ memcpy( &tmrec, gmtime(&t), sizeof(tmrec) ); t2 = mktime(&tmrec); /* GMT (or UTC) in seconds*/ int32_t tdiff = t2 - t1; /* imitate NT behaviour, which returns same timezone offset to GMT for winter and summer*/ if (dst_checked) tdiff += 3600; return tdiff; #endif #if defined(WIN32) || defined(OS2) return _timezone; #endif } char* icu_tzname(int index) { #ifdef POSIX return tzname[index]; #endif #if defined(AS400) || defined(XP_MAC) return ""; #endif #if defined(WIN32) || defined(OS2) return _tzname[index]; #endif } const char* icu_getDefaultDataDirectory() { #ifdef OS390BATCH return "DD:ICUDATA"; #else #ifdef POSIX static char *PATH = 0; if(PATH == 0) { umtx_lock(NULL); if(PATH == 0) { /* Normally, the locale and converter data will be installed in the same tree as the ICU libraries - typically /usr/local/lib for the libraries, /usr/local/include for the headers, and /usr/local/share for the binary data. However, the directory where the ICU looks for the binary data can be overridden by setting the environment variable ICU_DATA */ char *dir = getenv("ICU_DATA"); /* If the environment variable is set, use it */ if(dir != 0) { PATH = dir; } /* Otherwise, use the compiled in default */ else { PATH = ICU_DATA_DIR; } } umtx_unlock(NULL); } return PATH; #endif #endif #ifdef AS400 return "/icu/data/"; #endif #ifdef XP_MAC static char path[256]; char* mainDir; char* relPath = ":icu:data:"; Str255 volName; int16_t volNum; OSErr err = GetVol( volName, &volNum ); if (err != noErr) volName[0] = 0; mainDir = (char*) &(volName[1]); mainDir[volName[0]] = 0; int32_t lenMainDir = strlen( mainDir ); int32_t lenRelPath = strlen( relPath ); if (sizeof(path) < lenMainDir + lenRelPath + 2) { path[0] = 0; return path; } icu_strcpy( path, mainDir ); icu_strcat( path, relPath ); return path; #endif #ifdef WIN32 return "\\icu\\data\\"; #endif #ifdef OS2 char * dpath; dpath = getenv("ICUPATH"); if (!dpath || !*dpath) return "\\icu\\data\\"; return dpath; #endif } /* Macintosh-specific locale information */ #ifdef XP_MAC struct mac_lc_rec { int32_t script; int32_t region; int32_t lang; int32_t date_region; char* posixID; }; /* To do: This will be updated with a newer version from www.unicode.org web page when it's available.*/ #define MAC_LC_MAGIC_NUMBER -5 #define MAC_LC_INIT_NUMBER -9 mac_lc_rec mac_lc_recs[] = { MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 0, "en_US", /* United States*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 1, "fr_FR", /* France*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 2, "en_GB", /* Great Britain*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 3, "de_DE", /* Germany*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 4, "it_IT", /* Italy*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 5, "nl_NL", /* Metherlands*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 6, "fr_BE", /* French for Belgium or Lxembourg*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 7, "sv_SE", /* Sweden*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 9, "da_DK", /* Denmark*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 10, "pt_PT", /* Portugal*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 11, "fr_CA", /* French Canada*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 13, "is_IS", /* Israel*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 14, "ja_JP", /* Japan*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 15, "en_AU", /* Australia*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 16, "ar_AE", /* the Arabic world (?)*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 17, "fi_FI", /* Finland*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 18, "fr_CH", /* French for Switzerland*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 19, "de_CH", /* German for Switzerland*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 20, "EL_GR", /* Greece*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 21, "is_IS", /* Iceland ===*/ /*MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 22, "", // Malta ===*/ /*MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 23, "", // Cyprus ===*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 24, "tr_TR", /* Turkey ===*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 25, "sh_YU", /* Croatian system for Yugoslavia*/ /*MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 33, "", // Hindi system for India*/ /*MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 34, "", // Pakistan*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 41, "lt_LT", /* Lithuania*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 42, "pl_PL", /* Poland*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 43, "hu_HU", /* Hungary*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 44, "et_EE", /* Estonia*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 45, "lv_LV", /* Latvia*/ /*MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 46, "", // Lapland [Ask Rich for the data. HS]*/ /*MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 47, "", // Faeroe Islands*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 48, "fa_IR", /* Iran*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 49, "ru_RU", /* Russia*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 50, "en_IE", /* Ireland*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 51, "ko_KR", /* Korea*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 52, "zh_CN", /* People's Republic of China*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 53, "zh_TW", /* Taiwan*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, 54, "th_TH", /* Thailand*/ /* fallback is en_US*/ MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, MAC_LC_MAGIC_NUMBER, "en_US" }; #endif const char* icu_getDefaultLocaleID() { #ifdef POSIX char* posixID = getenv("LC_ALL"); if (posixID == 0) posixID = getenv("LANG"); if (posixID == 0) posixID = setlocale(LC_ALL, NULL); if (icu_strcmp("C", posixID) == 0) posixID = "en_US"; return posixID; #endif #ifdef AS400 /* TBD */ return ""; #endif #ifdef XP_MAC int32_t script = MAC_LC_INIT_NUMBER; /* = IntlScript(); or GetScriptManagerVariable(smSysScript);*/ int32_t region = MAC_LC_INIT_NUMBER; /* = GetScriptManagerVariable(smRegionCode);*/ int32_t lang = MAC_LC_INIT_NUMBER; /* = GetScriptManagerVariable(smScriptLang);*/ int32_t date_region = MAC_LC_INIT_NUMBER; char* posixID = 0; Intl1Hndl ih; ih = (Intl1Hndl) GetIntlResource(1); if (ih) date_region = ((uint16_t)(*ih)->intl1Vers) >> 8; int32_t count = sizeof(mac_lc_recs) / sizeof(mac_lc_rec); for (int32_t i = 0; i < count; i++) { if ( ((mac_lc_recs[i].script == MAC_LC_MAGIC_NUMBER) || (mac_lc_recs[i].script == script)) && ((mac_lc_recs[i].region == MAC_LC_MAGIC_NUMBER) || (mac_lc_recs[i].region == region)) && ((mac_lc_recs[i].lang == MAC_LC_MAGIC_NUMBER) || (mac_lc_recs[i].lang == lang)) && ((mac_lc_recs[i].date_region == MAC_LC_MAGIC_NUMBER) || (mac_lc_recs[i].date_region == date_region)) ) { posixID = mac_lc_recs[i].posixID; break; } } return posixID; #endif #ifdef WIN32 LCID id = GetThreadLocale(); return T_convertToPosix(id); #endif #ifdef OS2 char * locID; locID = getenv("LC_ALL"); if (!locID || !*locID) locID = getenv("LANG"); if (!locID || !*locID) { locID = "C"; } if (!stricmp(locID, "c") || !stricmp(locID, "posix") || !stricmp(locID, "univ")) locID = "en_US"; return locID; #endif } /* end of platform-specific implementation */ double icu_nextDouble(double d, bool_t next) { #ifdef IEEE_754 int32_t highBits; uint32_t lowBits; int32_t highMagnitude; uint32_t lowMagnitude; double result; uint32_t *highResult, *lowResult; uint32_t signBit; /* filter out NaN's */ if (icu_isNaN(d)) { return d; } /* zero's are also a special case */ if (d == 0.0) { double smallestPositiveDouble = 0.0; uint32_t *lowBits = (uint32_t *)u_bottomNBytesOfDouble(&smallestPositiveDouble, sizeof(uint32_t)); *lowBits = 1; if (next) { return smallestPositiveDouble; } else { return -smallestPositiveDouble; } } /* if we get here, d is a nonzero value */ /* hold all bits for later use */ highBits = *(int32_t*)u_topNBytesOfDouble(&d, sizeof(uint32_t)); lowBits = *(uint32_t*)u_bottomNBytesOfDouble(&d, sizeof(uint32_t)); /* strip off the sign bit */ highMagnitude = highBits & ~SIGN; lowMagnitude = lowBits; /* if next double away from zero, increase magnitude */ if ((highBits >= 0) == next) { if (highMagnitude != 0x7FF00000L || lowMagnitude != 0x00000000L) { lowMagnitude += 1; if (lowMagnitude == 0) { highMagnitude += 1; } } } /* else decrease magnitude */ else { lowMagnitude -= 1; if (lowMagnitude > lowBits) { highMagnitude -= 1; } } /* construct result and return */ signBit = highBits & SIGN; highResult = (uint32_t *)u_topNBytesOfDouble(&result, sizeof(uint32_t)); lowResult = (uint32_t *)u_bottomNBytesOfDouble(&result, sizeof(uint32_t)); *highResult = signBit | highMagnitude; *lowResult = lowMagnitude; return result; #else /* This is the portable implementation...*/ /* a small coefficient within the precision of the mantissa*/ static const double smallValue = 1e-10; double epsilon = ((d<0)?-d:d) * smallValue; /* first approximation*/ if (epsilon == 0) epsilon = smallValue; /* for very small d's*/ if (!next) epsilon = -epsilon; double last_eps = epsilon * 2.0; /* avoid higher precision possibly used for temporay values*/ double sum = d + epsilon; while ((sum != d) && (epsilon != last_eps)) { last_eps = epsilon; epsilon /= 2.0; sum = d + epsilon; } return d + last_eps; #endif } static char* u_topNBytesOfDouble(double* d, int n) { return icu_isBigEndian() ? (char*)d : (char*)(d + 1) - n; } static char* u_bottomNBytesOfDouble(double* d, int n) { return icu_isBigEndian() ? (char*)(d + 1) - n : (char*)d; } const char* icu_getDefaultCodepage() { /*Lazy evaluates DEFAULT_CONVERTER_NAME*/ if (DEFAULT_CONVERTER_NAME[0]) return DEFAULT_CONVERTER_NAME; #if defined(AS400) /* Currently TBD in the future should use thread specific CP */ #elif defined(OS390) icu_strcpy(DEFAULT_CONVERTER_NAME, "ibm-1047"); #elif defined(XP_MAC) /* TBD */ #elif defined(WIN32) icu_strcpy(DEFAULT_CONVERTER_NAME, "cp"); icu_strcat(DEFAULT_CONVERTER_NAME, _itoa(GetACP(), tempString, 10)); #elif defined(POSIX) icu_strcpy(DEFAULT_CONVERTER_NAME, "LATIN_1"); #else icu_strcpy(DEFAULT_CONVERTER_NAME, "LATIN_1"); #endif return DEFAULT_CONVERTER_NAME; } ./icu/source/common/ucnv_io.c000777 000000 000144 00000017403 06765215373 016336 0ustar00MARKVERMWAY123000 000000 /* ******************************************************************************** * * * COPYRIGHT: * * (C) Copyright International Business Machines Corporation, 1998 * * Licensed Material - Program-Property of IBM - All Rights Reserved. * * US Government Users Restricted Rights - Use, duplication, or disclosure * * restricted by GSA ADP Schedule Contract with IBM Corp. * * * ******************************************************************************** * * * uconv_io.c: * initializes global variables and defines functions pertaining to file access, * and name resolution aspect of the library. ******************************************************************************** */ #include "utypes.h" #include "umutex.h" #include "filestrm.h" #include "cstring.h" #include "cmemory.h" #include "uhash.h" #include "ucmp8.h" #include "ucmp16.h" #include "ucnv_bld.h" #include "ucnv_io.h" #include "uloc.h" static void doSetupAliasTableAndAvailableConverters (FileStream * converterFile, UErrorCode * err); static char *_convertDataDirectory = NULL; /*Initializes Global Variables */ static UHashtable *ALIASNAMES_HASHTABLE = NULL; char **AVAILABLE_CONVERTERS_NAMES = NULL; int32_t AVAILABLE_CONVERTERS = 0; /* Remove all characters followed by '#' */ char * removeComments (char *line) { char *pound = icu_strchr (line, '#'); if (pound != NULL) *pound = '\0'; return line; } /*Returns uppercased string */ char * strtoupper (char *name) { int32_t i = 0; while (name[i] = icu_toupper (name[i])) i++; return name; } /* Returns true in c is a in set 'setOfChars', false otherwise */ bool_t isInSet (char c, const char *setOfChars) { uint8_t i = 0; while (setOfChars[i] != '\0') { if (c == setOfChars[i++]) return TRUE; } return FALSE; } /* Returns pointer to the next non-whitespace (or non-separator) */ int32_t nextTokenOffset (const char *line, const char *separators) { int32_t i = 0; while (line[i] && isInSet (line[i], separators)) i++; return i; } /* Returns pointer to the next token based on the set of separators */ char * getToken (char *token, char *line, const char *separators) { int32_t i = nextTokenOffset (line, separators); int8_t j = 0; while (line[i] && (!isInSet (line[i], separators))) token[j++] = line[i++]; token[j] = '\0'; return line + i; } /* this function is called only if ((ALIASNAMES_HASHTABLE == NULL) || * (AVAILABLE_CONVERTERS_NAMES == NULL)) it builds a hashtable containing * all the "real" table names (filenames), keyed-off of the aliases and * the real-names themselves. * Also builds an array of char **, that point to the allocated memory * for each actual names in the Hashtable. * That array is used in T_UnicodeConverter_getAvailableNames. */ void setupAliasTableAndAvailableConverters (UErrorCode * err) { char fullFileName[MAX_FULL_FILE_NAME_LENGTH]; FileStream *converterFile = NULL; if (FAILURE (*err)) return; #ifndef OS390BATCH icu_strcpy (fullFileName, uloc_getDataDirectory ()); #endif icu_strcat (fullFileName, CONVERTER_FILE_NAME); converterFile = T_FileStream_open (fullFileName, "r"); if (converterFile == NULL) { *err = FILE_ACCESS_ERROR; } else { doSetupAliasTableAndAvailableConverters (converterFile, err); T_FileStream_close (converterFile); } return; } /* this function is only to be called by setupAliasTableAndAvailableConverters */ void doSetupAliasTableAndAvailableConverters (FileStream * converterFile, UErrorCode * err) { Mutex *convertrsFileOpenMutex = NULL; char myLine[MAX_LINE_TEXT]; char *line = myLine; char actualNameToken[MAX_CONVERTER_NAME_LENGTH]; char aliasNameToken[MAX_CONVERTER_NAME_LENGTH]; char *toBeHashed = NULL; UHashtable *myALIASNAMES_HASHTABLE = NULL; char **myAVAILABLE_CONVERTERS_NAMES = NULL; int32_t myAVAILABLE_CONVERTERS = 0; /*We need to do the initial work of setting everything */ myALIASNAMES_HASHTABLE = uhash_open ((UHashFunction)uhash_hashIString, err); if (FAILURE (*err)) return; if (myALIASNAMES_HASHTABLE == NULL) return; while (T_FileStream_readLine (converterFile, line, MAX_LINE_TEXT)) { removeComments (line); if (line[nextTokenOffset (line, SPACE_SEPARATORS)] != '\0') /*Skips Blank lines */ { line = getToken (actualNameToken, line, SPACE_SEPARATORS); toBeHashed = (char *) icu_malloc ((icu_strlen (actualNameToken) + 1) * sizeof (char)); if (toBeHashed == NULL) { *err = MEMORY_ALLOCATION_ERROR; return; } icu_strcpy (toBeHashed, actualNameToken); myAVAILABLE_CONVERTERS_NAMES = (char **) icu_realloc (myAVAILABLE_CONVERTERS_NAMES, (myAVAILABLE_CONVERTERS + 1) * sizeof (char *)); if (myAVAILABLE_CONVERTERS_NAMES == NULL) { *err = MEMORY_ALLOCATION_ERROR; return; } myAVAILABLE_CONVERTERS_NAMES[myAVAILABLE_CONVERTERS++] = toBeHashed; uhash_put (myALIASNAMES_HASHTABLE, toBeHashed, err); while (line[nextTokenOffset (line, SPACE_SEPARATORS)] != '\0') { line = getToken (aliasNameToken, line, SPACE_SEPARATORS); uhash_putKey (myALIASNAMES_HASHTABLE, uhash_hashIString (aliasNameToken), toBeHashed, err); } if (FAILURE (*err)) return; } } /*If another thread has already created the hashtable and array, we need to free */ if ((ALIASNAMES_HASHTABLE != NULL) || (AVAILABLE_CONVERTERS_NAMES != NULL)) { while (myAVAILABLE_CONVERTERS > 0) { icu_free (myAVAILABLE_CONVERTERS_NAMES[--myAVAILABLE_CONVERTERS]); } icu_free (myAVAILABLE_CONVERTERS_NAMES); uhash_close (myALIASNAMES_HASHTABLE); } else { umtx_lock (NULL); ALIASNAMES_HASHTABLE = myALIASNAMES_HASHTABLE; AVAILABLE_CONVERTERS_NAMES = myAVAILABLE_CONVERTERS_NAMES; AVAILABLE_CONVERTERS = myAVAILABLE_CONVERTERS; umtx_unlock (NULL); } return; } /* resolveName takes a table alias name and fills in the actual name used internally. * it returns a TRUE if the name was found (table supported) returns FALSE otherwise */ bool_t resolveName (char *realName, const char *alias) { int32_t i = 0; bool_t found = FALSE; char *actualName = NULL; UErrorCode err = ZERO_ERROR; /*Lazy evaluates the Alias hashtable */ if (ALIASNAMES_HASHTABLE == NULL) setupAliasTableAndAvailableConverters (&err); if (FAILURE (err)) return FALSE; actualName = (char *) uhash_get (ALIASNAMES_HASHTABLE, uhash_hashIString (alias)); if (actualName != NULL) { #ifdef OS390BATCH char *c; icu_strcpy (realName, "("); icu_strcat (realName, actualName); c = strchr(realName, '-'); if (c != NULL) *c = '@'; icu_strcat (realName, ")"); #else icu_strcpy (realName, actualName); #endif found = TRUE; } return found; } /*Higher level function, takes in an alias name *and returns a file pointer of the table file *Will return NULL if the file isn't found for *any given reason (file not there, name not in *"convrtrs.txt" */ FileStream * openConverterFile (const char *name) { char actualFullFilenameName[MAX_FULL_FILE_NAME_LENGTH]; FileStream *tableFile = NULL; icu_strcpy (actualFullFilenameName, uloc_getDataDirectory ()); if (resolveName (actualFullFilenameName + icu_strlen (actualFullFilenameName), name)) { #ifndef OS390BATCH icu_strcat (actualFullFilenameName, CONVERTER_FILE_EXTENSION); #endif tableFile = T_FileStream_open (actualFullFilenameName, "rb"); } return tableFile; } ./icu/source/common/ucnv_io.h000777 000000 000144 00000005356 06765215503 016342 0ustar00MARKVERMWAY123000 000000 /* ******************************************************************************** * * * COPYRIGHT: * * (C) Copyright International Business Machines Corporation, 1999 * * Licensed Material - Program-Property of IBM - All Rights Reserved. * * US Government Users Restricted Rights - Use, duplication, or disclosure * * restricted by GSA ADP Schedule Contract with IBM Corp. * * * ******************************************************************************** * * * uconv_io.h: * defines variables and functions pertaining to file access, and name resolution * aspect of the library */ #ifndef UCNV_IO_H #define UCNV_IO_H #include "utypes.h" #include "filestrm.h" /*filename containing aliasing information on the converter names */ #ifdef OS390BATCH static const char CONVERTER_BINARY_FILE_DDNAME[11] = "DD:ICUDATA"; static const char CONVERTER_FILE_NAME[21] = "DD:ICUTEXT(CONVRTRS)"; #else static const char CONVERTER_FILE_NAME[13] = "convrtrs.txt"; #endif static const char CONVERTER_FILE_EXTENSION[5] = ".cnv"; static const char SPACE_SEPARATORS[4] = {'\n', '\t', ' ', 0x00}; extern char **AVAILABLE_CONVERTERS_NAMES; extern int32_t AVAILABLE_CONVERTERS; /*Checks if c is in the NULL terminated setOfChars */ bool_t isInSet (char c, const char *setOfChars); /*Remove all characters followed by '#' */ CAPI char * U_EXPORT2 removeComments (char *line); /*Returns pointer to the next non-whitespace (or non-separators) */ CAPI int32_t U_EXPORT2 nextTokenOffset (const char *line, const char *separators); /*Copies the next string in token and returns an updated pointer to the next token */ CAPI char * U_EXPORT2 getToken (char *token, char *line, const char *separators); /*Takes an alias name and returns a FileStream pointer of the requested converter table or NULL, if not found */ FileStream * U_EXPORT2 openConverterFile (const char *name); /*Fills in the Actual name of a converter based on the convrtrs.txt file returns TRUE if the name was resolved FALSE otherwise */ bool_t resolveName (char *realName, const char *alias); /*called through lazy evaluation. Sets up a hashtable containg all the aliases and an array with pointers to the values inside the hashtable for quick indexing */ void setupAliasTableAndAvailableConverters (UErrorCode * err); /*Uppercases a null-terminate string */ CAPI char * U_EXPORT2 strtoupper (char *); /*case insensitive hash key*/ CAPI int32_t U_EXPORT2 uhash_hashIString(const void* name); #endif /* _UCNV_IO */ ./icu/source/common/Makefile.in000755 000000 000144 00000011045 06767253535 016571 0ustar00MARKVERMWAY123000 000000 ## Makefile.in for ICU - icu.so ## Stephen F. Booth ################################################################### # IMPORTANT NOTE # ################################################################### # If you are going to do the OS390BATCH build, make sure you have # # the OS390BATCH environment variable set. # # # # export OS390BATCH=1 # # # # Also, # # # # export LOADMOD=USERID.LOAD # # # # to build the ICUUC dll into your LOADMOD dataset. # # The definition sidedeck, ICUUC will be created in USERID.EXP # # Make sure you have at least UPDATE access to the datasets # ################################################################### ## Shell to use SHELL = @SHELL@ ## OS390 PLATFORM = @platform@ ## Install directory information srcdir = @srcdir@ top_srcdir = @top_srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ datadir = @datadir@ libdir = @libdir@ includedir = @includedir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ ## Install program information mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ ## Compiler/tools information CC = @CC@ CXX = @CXX@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ ## Platform-specific setup @host_frag@ ## Build directory information top_builddir = .. subdir = common ## Extra files to remove for 'make clean' CLEANFILES = *~ ## Target information ## OS390 ifeq (${PLATFORM},OS390) OS390_EXP = libicu-uc.$(OS390SIDEDECK) ## OS390BATCH ifeq (${OS390BATCH},1) BATCH_TARGET= "//'${LOADMOD}(ICUUC)'" endif endif TARGET = libicu-uc.$(SO) DEFS = @DEFS@ CPPFLAGS = @CPPFLAGS@ -DICU_DATA_DIR=\"$(pkgdatadir)/$(VERSION)/\" CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ OBJECTS = chariter.o umutex.o compdata.o compitr.o convert.o \ cpputils.o cstring.o dcmpdata.o digitlst.o filestrm.o locid.o locmap.o \ mutex.o normlzr.o putil.o rbcache.o resbund.o schriter.o scsu.o \ uchar.o uchriter.o ucmp8.o ucmp16.o ucmp32.o ucnv.o ucnv_bld.o \ ucnv_cnv.o ucnv_err.o ucnv_io.o uhash.o uloc.o unicode.o unistr.o \ ures.o ustring.o rbread.o rbdata.o DEPS = $(OBJECTS:.o=.d) ## Header files to install HEADERS= utypes.h uloc.h ures.h ustring.h uchar.h chariter.h \ uchriter.h locid.h resbund.h unicode.h putil.h platform.h unistr.h \ schriter.h normlzr.h ucnv_err.h ucnv.h ucnv_bld.h convert.h ## List of phony targets .PHONY : all all-local install install-local clean clean-local \ distclean distclean-local install-library install-headers dist \ dist-local check check-local ## Clear suffix list .SUFFIXES : ## List of standard targets all: all-local install: install-local clean: clean-local distclean : distclean-local dist: dist-local check: check-local ## OS390BATCH ifeq (${OS390BATCH},1) all-local: $(TARGET) $(BATCH_TARGET) else all-local: $(TARGET) endif install-local: install-headers install-library install-library: all-local $(mkinstalldirs) $(libdir) $(INSTALL) $(TARGET) $(libdir)/$(TARGET) ifeq (${PLATFORM},OS390) $(INSTALL) $(OS390_EXP) $(libdir)/$(OS390_EXP) endif install-headers: $(mkinstalldirs) $(includedir) @list='$(HEADERS)'; for file in $$list; do \ echo " $(INSTALL_DATA) $$file $(includedir)/$$file"; \ $(INSTALL_DATA) $$file $(includedir)/$$file; \ done dist-local: clean-local: test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) rm -f $(OBJECTS) $(TARGET) distclean-local: clean-local rm -f Makefile $(DEPS) check-local: Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status platform.h: $(srcdir)/platform.h.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES= CONFIG_HEADERS=$(subdir)/$@ $(SHELL) ./config.status $(TARGET) : $(OBJECTS) $(SHLIB.cc) -o $@ $^ $(LIBS) $(BATCH_TARGET) : $(OBJECTS) $(SHLIB.cc) -o $@ $^ $(LIBS) ifneq ($(MAKECMDGOALS),distclean) -include $(DEPS) endif ./icu/source/config/000777 000000 000144 00000000000 06765227510 014463 5ustar00MARKVERMWAY000000 000000 ./icu/source/config/mh-os390000777 000000 000144 00000007206 06765552360 015707 0ustar00MARKVERMWAY123000 000000 ## -*-makefile-*- ## 390-specific setup ################################################################### # IMPORTANT NOTE # ################################################################### # Before you try to run the Makefile, make sure you have the # # environment variable set. # # # # export ICUROOT= # # # # If you are going to do the OS390BATCH build, make sure you have # # the OS390BATCH environment variable set. # # # # export OS390BATCH=1 # # # # Also, search for the LOADMOD variable and set it to your # # LOADMOD dataset. Make sure you have at least UPDATE access to # # the dataset. # # # # To enable DEBUG mode, just type # # export DEBUG=1 # # on your shell (bash assumed) before building. # # To cancel DEBUG mode, type # # unset DEBUG # # on your shell command line. # ################################################################### ifeq (${DEBUG}, 1) ICU_BUILD_OPTIONS = -g else ICU_BUILD_OPTIONS = -2 endif CFLAGS390= -W0,"langlvl(extended)" $(ICU_BUILD_OPTIONS) -Wc,dll,expo ## OS390BATCH ifeq (${OS390BATCH},1) DEFS390= -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -DOS390BATCH else DEFS390= -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED endif ARFLAGS= -cr ## Commands to generate dependency files GEN_DEPS.c= makedep GEN_DEPS.cc= makedep ## Commands to compile COMPILE.c= _CXX_CXXSUFFIX="cpp" _CXX_STEPS="-1" $(CXX) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(CFLAGS390) $(DEFS390) -c COMPILE.cc= _CXX_CXXSUFFIX="cpp" _CXX_STEPS="-1" $(CXX) $(DEFS) $(CPPFLAGS) $(CPPFLAGS) $(CFLAGS390) $(DEFS390) -c ## Commands to link LINK.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) LINK.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) ## Commands for shared library (dll) SHLIB.c= $(LINK.c) -Wl,dll SHLIB.cc= $(LINK.cc) -Wl,dll ## Compiler switch to embed a runtime search path LD_RPATH= -I ## Shared object suffix (switch to dll for shared library build) SO= dll OS390SIDEDECK= x ## Link commands to link to ICU libs LIBICU-UC= $(top_builddir)/common/libicu-uc.x LIBICU-I18N= $(top_builddir)/i18n/libicu-i18n.x LIBCTESTFW= $(top_builddir)/tools/ctestfw/libctestfw.x ## Special 390 rules ## Build archive from object %.a : $(OBJECTS) $(AR) $(ARFLAGS) $@ $(OBJECTS) ## Compilation rules %.o :$(srcdir)/%.c $(COMPILE.c) -o $@ $< %.o :$(srcdir)/%.cpp $(COMPILE.cc) -o $@ $< ## Dependency rules %.d : %.u @$(SHELL) -ec 'cat $< \ | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ [ -s $@ ] || rm -f $@ ; rm -f $<' %.u : $(srcdir)/%.c @echo "Generating dependency information for $<" @$(SHELL) -ec 'touch $*.u > /dev/null 2>&1' @$(SHELL) -ec '$(GEN_DEPS.c) -f $*.u $< > /dev/null 2>&1' %.u : $(srcdir)/%.cpp @echo "Generating dependency information for $<" @$(SHELL) -ec 'touch $*.u > /dev/null 2>&1' @$(SHELL) -ec '$(GEN_DEPS.cc) -f $*.u $< > /dev/null 2>&1' ## End 390-specific setup ./icu/source/i18n/000777 000000 000144 00000000000 06765453016 013777 5ustar00MARKVERMWAY000000 000000 ./icu/source/i18n/Makefile.in000777 000000 000144 00000006200 06765455023 016053 0ustar00MARKVERMWAY123000 000000 ## Makefile.in for ICU - icu-i18n.so ## Stephen F. Booth ## Shell to use SHELL = @SHELL@ ## OS390 PLATFORM = @platform@ ## Install directory information srcdir = @srcdir@ top_srcdir = @top_srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ datadir = @datadir@ libdir = @libdir@ includedir = @includedir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ ## Install program information mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ ## Compiler/tools information CC = @CC@ CXX = @CXX@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ ## Platform-specific setup @host_frag@ ## Build directory information top_builddir = .. subdir = i18n ## Extra files to remove for 'make clean' CLEANFILES = *~ ## Target information TARGET = libicu-i18n.$(SO) ifeq (${PLATFORM},OS390) OS390_EXP = libicu-i18n.$(OS390SIDEDECK) endif DEFS = @DEFS@ CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ $(LD_RPATH)$(LD_RPATH_PRE)$(libdir) LIBS = $(LIBICU-UC) @LIBS@ OBJECTS = brkiter.o calendar.o chbkdat.o choicfmt.o colcache.o \ coleitr.o coll.o colrules.o datefmt.o dcfmtsym.o decimfmt.o dtfmtsym.o \ fmtable.o format.o gregocal.o lnbkdat.o mergecol.o msgfmt.o numfmt.o \ ptnentry.o simpletz.o simtxbd.o smpdtfmt.o snbkdat.o sortkey.o \ tables.o tblcoll.o tcoldata.o timezone.o txtbdat.o txtbdry.o ubrk.o \ ucal.o ucol.o udat.o umsg.o unicdcm.o unum.o wdbkdat.o wdbktbl.o DEPS = $(OBJECTS:.o=.d) ## Header files to install HEADERS= ucal.h unum.h udat.h umsg.h calendar.h choicfmt.h datefmt.h \ dcfmtsym.h decimfmt.h dtfmtsym.h fieldpos.h fmtable.h format.h \ gregocal.h msgfmt.h numfmt.h parsepos.h simpletz.h smpdtfmt.h \ timezone.h ucol.h coll.h tblcoll.h sortkey.h coleitr.h ubrk.h \ brkiter.h ## List of phony targets .PHONY : all all-local install install-local clean clean-local \ distclean distclean-local install-library install-headers dist \ dist-local check check-local ## Clear suffix list .SUFFIXES : ## List of standard targets all: all-local install: install-local clean: clean-local distclean : distclean-local dist: dist-local check: check-local all-local: $(TARGET) install-local: install-headers install-library install-library: all-local $(mkinstalldirs) $(libdir) $(INSTALL) $(TARGET) $(libdir)/$(TARGET) ifeq (${PLATFORM},OS390) $(INSTALL) $(OS390_EXP) $(libdir)/$(OS390_EXP) endif install-headers: $(mkinstalldirs) $(includedir) @list='$(HEADERS)'; for file in $$list; do \ echo " $(INSTALL_DATA) $$file $(includedir)/$$file"; \ $(INSTALL_DATA) $$file $(includedir)/$$file; \ done dist-local: clean-local: test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) rm -f $(OBJECTS) $(TARGET) distclean-local: clean-local rm -f Makefile $(DEPS) check-local: Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status $(TARGET) : $(OBJECTS) $(SHLIB.cc) -o $@ $^ $(LIBS) ifneq ($(MAKECMDGOALS),distclean) -include $(DEPS) endif ./icu/source/test/000777 000000 000144 00000000000 06765227163 014201 5ustar00MARKVERMWAY000000 000000 ./icu/source/test/intltest/000777 000000 000144 00000000000 06765227206 016045 5ustar00MARKVERMWAY000000 000000 ./icu/source/test/intltest/cppcnvt.cpp000777 000000 000144 00000051435 06760552614 020246 0ustar00MARKVERMWAY123000 000000 /*Bertrand A. DAMIBA -> damiba@us.ibm.com*/ #include #include #include #include #include "locid.h" #include "unistr.h" #include "convert.h" #include "ucnv_err.h" #include #include "cppcnvt.h" #define NUM_CODEPAGE 1 #define MAX_FILE_LEN 1024*20 #define UCS_FILE_NAME_SIZE 100 /*writes and entire UnicodeString along with a BOM to a file*/ void WriteToFile(const UnicodeString *a, FILE *myfile); /*Case insensitive compare*/ int32_t strCaseIcmp(const char* a1,const char * a2); /*returns an action other than the one provided*/ UCNV_FromUCallBack otherUnicodeAction(UCNV_FromUCallBack MIA); UCNV_ToUCallBack otherCharAction(UCNV_ToUCallBack MIA); /*Asciifies the UErrorCodes*/ const char* errorString(UErrorCode err); const char* myErrorName(UErrorCode err); void ConvertTest::runIndexedTest( int32_t index, bool_t exec, char* &name, char* par ) { if (exec) logln("TestSuite ConvertTest: "); switch (index) { case 0: name = "TestConvert"; if (exec) TestConvert(); break; default: name = ""; break; //needed to end loop } } void ConvertTest::TestConvert() { char subchar [4] = {(char)0xBE, (char)0xEF}; char myptr[4]; char save[4]; int32_t testLong1; int16_t rest = 0; FILE* f = NULL; FILE* f2 = NULL; int32_t uniLen = 0; int32_t len = 0; int32_t x = 0; FILE* ucs_file_in = NULL; UChar BOM = 0x0000; UChar myUChar = 0x0000; char myChar = 0x00; char mytarget[MAX_FILE_LEN]; char* mytarget_1 = mytarget; char* mytarget_use = mytarget; UChar* consumedUni = NULL; char* consumedChar = NULL; char* consumed = NULL; char output_cp_buffer [MAX_FILE_LEN]; UChar ucs_file_buffer [MAX_FILE_LEN]; UChar* ucs_file_buffer_use = ucs_file_buffer; UChar my_ucs_file_buffer [MAX_FILE_LEN]; UChar* my_ucs_file_buffer_1 = my_ucs_file_buffer; int32_t i = 0; int8_t ii = 0; uint16_t ij = 0; int32_t j = 0; int32_t k = 0; uint16_t codepage_index = 0; int32_t cp = 0; UErrorCode err = ZERO_ERROR; const char* const* available_conv = NULL; char ucs_file_name[UCS_FILE_NAME_SIZE]; UCNV_FromUCallBack MIA1; UCNV_ToUCallBack MIA2; UChar myUnitarget[MAX_FILE_LEN]; UChar *myUnitarget_1 = myUnitarget; UnicodeConverterCPP* someConverters[5]; /****************************************************************** Checking Unicode -> ksc ******************************************************************/ const char* CodePagesToTest[NUM_CODEPAGE] = { "IBM-949" }; const uint16_t CodePageNumberToTest[NUM_CODEPAGE] = { 949 }; const int32_t CodePagesAsciiControls[NUM_CODEPAGE] = { 0xFFFFFFFF }; const int32_t CodePagesOtherControls[NUM_CODEPAGE] = { 0x00000005 }; const int8_t CodePagesMinChars[NUM_CODEPAGE] = { 1 }; const int8_t CodePagesMaxChars[NUM_CODEPAGE] = { 2 }; const int16_t CodePagesSubstitutionChars[NUM_CODEPAGE] = { (int16_t)0xAFFE }; const char* CodePagesTestFiles[NUM_CODEPAGE] = { "uni-text.txt" }; const UCNV_PLATFORM CodePagesPlatform[NUM_CODEPAGE] = { IBM }; const UCNV_ToUCallBack CodePagesMissingCharAction[NUM_CODEPAGE] = { #ifdef OS390 (UCNV_ToUCallBack)MissingCharAction_SUBSTITUTE #else MissingCharAction_SUBSTITUTE #endif }; const UCNV_FromUCallBack CodePagesMissingUnicodeAction[NUM_CODEPAGE] = { #ifdef OS390 (UCNV_FromUCallBack)MissingUnicodeAction_SUBSTITUTE #else MissingUnicodeAction_SUBSTITUTE #endif }; const Locale CodePagesLocale[NUM_CODEPAGE] = { Locale::KOREAN }; UChar CodePagesFlakySequence[NUM_CODEPAGE][20] = { {(UChar)0xAC10,(UChar)0xAC11, (UChar)0xAC12, (UChar)0xAC13 , (UChar)0xAC14, (UChar)0xAC15, (UChar)0xAC16, (UChar)0xAC17, (UChar)0xd7a4 /*Offensive Codepoint*/, (UChar)0xAC14, (UChar)0xAC15} }; char CodePagesFlakyCharSequence[NUM_CODEPAGE][20] = { { (char)0xB0, (char)0xA8, (char)0xB0, (char)0xA9, (char)0xB0, (char)0xAA, (char)0xB0, (char)0xAB, (char)0xb0, (char)0xff,/*Offensive Codepoint*/ (char)0xB0, (char)0xAC, (char)0xB0, (char)0xAD } }; /*Calling all the UnicodeConverterCPP API and checking functionality*/ /*Tests UnicodeConverterCPP::getAvailableNames*/ logln("\n---Testing UnicodeConverterCPP::getAvailableNames..."); available_conv = UnicodeConverterCPP::getAvailableNames(testLong1, err); if (FAILURE(err)) { errln("Error getting Available names!"); exit(0); } logln("Number of available Codepages:\t" + testLong1); while (testLong1--) logln((UnicodeString)"\t\t[" + available_conv[testLong1] + (UnicodeString)"]"); someConverters[0] = new UnicodeConverterCPP("ibm-949",err); if (FAILURE(err)) errln ((UnicodeString)"FAILURE! " + myErrorName(err)); someConverters[1] = new UnicodeConverterCPP("ibm-949",err); if (FAILURE(err)) errln ((UnicodeString)"FAILURE! " + myErrorName(err)); someConverters[2] = new UnicodeConverterCPP("ibm-949",err); if (FAILURE(err)) errln ((UnicodeString)"FAILURE! " + myErrorName(err)); someConverters[3] = new UnicodeConverterCPP("ibm-834", err); if (FAILURE(err)) errln ((UnicodeString)"FAILURE! " + myErrorName(err)); someConverters[4] = new UnicodeConverterCPP("ibm-943", err); if (FAILURE(err)) errln ((UnicodeString)"FAILURE! " + myErrorName(err)); logln("\n---Testing UnicodeConverterCPP::flushCache..."); if (UnicodeConverterCPP::flushCache()==0) logln("Flush cache ok"); else errln("Flush Cache failed"); delete someConverters[0]; delete someConverters[1]; delete someConverters[2]; delete someConverters[3]; if (j=UnicodeConverterCPP::flushCache()==2) logln("Flush cache ok"); else errln("Flush Cache failed"); delete someConverters[4]; if (UnicodeConverterCPP::flushCache()==1) logln("Flush cache ok"); else errln("Flush Cache failed"); logln("\n---Testing UnicodeConverterCPP::UnicodeConverterCPP()..."); someConverters[0] = new UnicodeConverterCPP; someConverters[1] = new UnicodeConverterCPP; someConverters[2] = new UnicodeConverterCPP("utf8", err); if (FAILURE(err)) errln ((UnicodeString)"FAILURE! " + err); #ifdef WIN32 if ((strcmp(someConverters[1]->getName(err),"IBM-1252")==0)&& (strcmp(someConverters[0]->getName(err),"IBM-1252")==0)) logln("getName ok"); else errln("getName failed"); logln(someConverters[1]->getName(err)); #else if ((strcmp(someConverters[1]->getName(err),"LATIN_1")==0)&& (strcmp(someConverters[0]->getName(err),"LATIN_1")==0)) logln("getName ok"); else errln("getName failed"); logln(someConverters[1]->getName(err)); #endif logln("\n---Testing UnicodeConverterCPP::operator==..."); if (((*someConverters[1] == *someConverters[0])==TRUE)&& (*someConverters[1] == *someConverters[2])==FALSE) logln("Equality test ok"); else errln("Equality test failed"); logln("\n---Testing UnicodeConverterCPP::operator!=..."); if (((*someConverters[1] != *someConverters[0])==FALSE)&& (*someConverters[1] != *someConverters[2])==TRUE) logln("Not Equal test ok"); else errln("Not Equal test failed"); logln("\n---Testing UnicodeConverterCPP::operator=..."); someConverters[3] = new UnicodeConverterCPP; *someConverters[3] = *someConverters[2]; if ((*someConverters[2] == *someConverters[3])) logln("Equality test ok"); else errln("Equality test failed"); delete someConverters[0]; delete someConverters[1]; delete someConverters[2]; delete someConverters[3]; for (codepage_index=0; codepage_index < NUM_CODEPAGE; codepage_index++) { i = 0; strcpy(ucs_file_name, IntlTest::getTestDirectory()); strcat(ucs_file_name, CodePagesTestFiles[codepage_index]); ucs_file_in = fopen(ucs_file_name, "rb"); if (!ucs_file_in) { errln("Couldn't open the Unicode file..."); exit(0); } /*Creates a converter*/ UnicodeConverterCPP* myConverter = new UnicodeConverterCPP(CodePageNumberToTest[codepage_index],IBM, err); if (!myConverter) { errln("Error Creating the converter from " + (UnicodeString)CodePagesToTest[codepage_index] + " codepage.\nMake sure you have ran the uconvdef tool to create " + (UnicodeString)CodePagesToTest[codepage_index] + ".cnv in the locales directory"); exit(0); } /*Tests getMaxBytesPerChar and getMinBytesPerChar*/ logln("\n---Testing UnicodeConverterCPP::getMaxBytesPerChar..."); if (myConverter->getMaxBytesPerChar()==CodePagesMaxChars[codepage_index]) logln("Max byte per character OK"); else errln("Max byte per character failed"); logln("\n---Testing UnicodeConverterCPP::getMinBytesPerChar..."); if (myConverter->getMinBytesPerChar()==CodePagesMinChars[codepage_index]) logln("Min byte per character OK"); else errln("Min byte per character failed"); /*getSubstitutions char*/ logln("\n---Testing UnicodeConverterCPP::getSubstitutionChars..."); ii=4; myConverter->getSubstitutionChars(myptr,ii,err); for(x=0;xsetSubstitutionChars(myptr, ii, err); if (FAILURE(err)) errln ("FAILURE! " + (UnicodeString)myErrorName(err)); myConverter->getSubstitutionChars(save, ii, err); if (FAILURE(err)) errln ("FAILURE! " + (UnicodeString)myErrorName(err)); if (strncmp(save, myptr, ii)) errln("Saved substitution character failed"); else logln("Saved substitution character ok"); /*resetState*/ logln("\n---Testing UnicodeConverterCPP::resetState..."); myConverter->resetState(); /*getName*/ UnicodeString* testUnistr = new UnicodeString(); logln("\n---Testing UnicodeConverterCPP::getName..."); if (strCaseIcmp(myConverter->getName(err), CodePagesToTest[codepage_index])) errln("getName failed"); else logln("getName ok"); /*getDisplayName*/ testUnistr->remove(); logln("\n---Testing UnicodeConverterCPP::getDisplayName..."); myConverter->getDisplayName(CodePagesLocale[codepage_index],*testUnistr); /*printUChar(T_UnicodeString_getUChars(testUnistr)); logln("\nAbove is DisplayName!!");*/ /*getMissingUnicodeAction*/ /* logln("\n---Testing UnicodeConverterCPP::getMissingUnicodeAction..."); if ((MIA1 = myConverter->getMissingUnicodeAction()) != CodePagesMissingUnicodeAction[codepage_index]) errln("Missing action failed"); else logln("Missing action ok");*/ /*getMissingCharAction*/ /* logln("\n---Testing UnicodeConverterCPP::getMissingCharAction..."); if ((MIA2 = myConverter->getMissingCharAction()) != CodePagesMissingCharAction[codepage_index]) errln("Missing action failed"); else logln("Missing action ok");*/ MIA1 = myConverter->getMissingUnicodeAction(); MIA2 = myConverter->getMissingCharAction(); /*setMissingUnicodeAction*/ logln("\n---Testing UnicodeConverterCPP::setMissingUnicodeAction..."); myConverter->setMissingUnicodeAction(otherUnicodeAction(MIA1),err); if (FAILURE(err)) errln ("FAILURE! " + (UnicodeString)myErrorName(err)); if (myConverter->getMissingUnicodeAction() != otherUnicodeAction(MIA1)) logln("Missing action failed"); else logln("Missing action ok"); logln("\n---Testing UnicodeConverterCPP::setMissingUnicodeAction Roundtrip..."); myConverter->setMissingUnicodeAction(MIA1, err); if (FAILURE(err)) errln ("FAILURE! " + (UnicodeString)myErrorName(err)); if (myConverter->getMissingUnicodeAction() != MIA1) errln("Missing action failed"); else logln("Missing action ok"); /*setMissingCharAction*/ logln("\n---Testing UnicodeConverterCPP::setMissingCharAction..."); myConverter->setMissingCharAction(otherCharAction(MIA2),err); if (FAILURE(err)) errln ("FAILURE! " + (UnicodeString)myErrorName(err)); if (myConverter->getMissingCharAction() != otherCharAction(MIA2)) errln("Missing action failed"); else logln("Missing action ok"); logln("\n---Testing UnicodeConverterCPP::setMissingCharAction Roundtrip..."); myConverter->setMissingCharAction(MIA2, err); if (FAILURE(err)) errln ("FAILURE! " + (UnicodeString)myErrorName(err)); if (myConverter->getMissingCharAction() != MIA2) errln("Missing action failed"); else logln("Missing action ok"); /*getCodepage*/ logln("\n---Testing UnicodeConverterCPP::getCodepage..."); cp = myConverter->getCodepage(err); if (FAILURE(err)) errln ("FAILURE! " + (UnicodeString)myErrorName(err)); if (cp != CodePageNumberToTest[codepage_index]) errln("Codepage number test failed"); else logln("Codepage number test OK"); /*getCodepagePlatform*/ logln("\n---Testing UnicodeConverterCPP::getCodepagePlatform ..."); if (CodePagesPlatform[codepage_index]!=myConverter->getCodepagePlatform(err)) errln("Platform codepage test failed"); else logln("Platform codepage test ok"); if (FAILURE(err)) errln ("FAILURE! " + (UnicodeString)myErrorName(err)); /*Reads the BOM*/ fread(&BOM, sizeof(UChar), 1, ucs_file_in); if (BOM!=0xFEFF && BOM!=0xFFFE) { errln("File Missing BOM...Bailing!"); exit(0); } /*Reads in the file*/ while(!feof(ucs_file_in)&&(i+=fread(ucs_file_buffer+i, sizeof(UChar), 1, ucs_file_in))) { myUChar = ucs_file_buffer[i-1]; ucs_file_buffer[i-1] = (BOM==0xFEFF)?myUChar:((myUChar >> 8) | (myUChar << 8)); /*adjust if BIG_ENDIAN*/ } myUChar = ucs_file_buffer[i-1]; ucs_file_buffer[i-1] = (BOM==0xFEFF)?myUChar:((myUChar >> 8) | (myUChar << 8)); /*adjust if BIG_ENDIAN Corner Case*/ UnicodeString* uniString = new UnicodeString(ucs_file_buffer,i); UnicodeString* uniString3 = new UnicodeString(ucs_file_buffer,i); UnicodeString* uniString2 = new UnicodeString(); /*Calls the Conversion Routine*/ testLong1 = MAX_FILE_LEN; logln("\n---Testing UnicodeConverterCPP::fromUnicodeString"); myConverter->fromUnicodeString(output_cp_buffer, testLong1, *uniString, err); if (FAILURE(err)) logln("\nFAILURE..."); /****************************************************************** Checking ksc -> Unicode ******************************************************************/ /*Clean up re-usable vars*/ j=0; /*Calls the Conversion Routine*/ /*Uni1 ----ToUnicodeString----> Cp1 ----FromUnicodeString---->Uni2*/ logln("\n---Testing UnicodeConverterCPP::toUnicodeString"); myConverter->toUnicodeString(*uniString2 , output_cp_buffer, testLong1, err); if (FAILURE(err)) logln ("FAILURE! " + (UnicodeString)myErrorName(err)); logln("\n---Testing UnicodeString RoundTrip ..."); /*check if Uni1 == Uni2*/ if (uniString->compare(*uniString2)) errln("Equality check test failed"); else logln("Equality check test ok"); /*AIX Compiler hacks*/ const UChar* tmp_ucs_buf = ucs_file_buffer_use; const UChar* tmp_consumedUni = NULL; myConverter->fromUnicode(mytarget_1, mytarget + MAX_FILE_LEN, tmp_ucs_buf, ucs_file_buffer_use+i, NULL, TRUE, err); // consumedUni = (UChar*)tmp_consumedUni; if (FAILURE(err)) errln ("FAILURE! " + (UnicodeString)myErrorName(err)); /*Uni1 ----ToUnicode----> Cp2 ----FromUnicode---->Uni3*/ /*AIX Compiler hacks*/ const char* tmp_mytarget_use = mytarget_use; const char* tmp_consumed = consumed; myConverter->toUnicode(my_ucs_file_buffer_1, my_ucs_file_buffer + MAX_FILE_LEN, tmp_mytarget_use, mytarget_use+strlen((char*)mytarget_use), NULL, FALSE, err); consumed = (char*)tmp_consumed; if (FAILURE(err)) errln ("FAILURE! " + (UnicodeString)myErrorName(err)); logln("\n---Testing UChar* RoundTrip ..."); // uniString3->remove(); uniString3->replace(0, uniString3->size(), my_ucs_file_buffer, i); //uniString3 = new UnicodeString(my_ucs_file_buffer,i); /*checks if Uni1 == Uni3*/ if (uniString->compare(*uniString3)) errln("Equality test failed"); else logln("Equality test ok"); /*checks if Uni2 == Uni3 This is a sanity check for the consistency of the UnicodeString and Unicode Convters*/ logln("\n---Testing Consistency between UChar* and UnicodeString Conversion..."); if (uniString2->compare(*uniString3)) errln("Equality test failed"); else logln("Equality test ok"); logln("\n---Testing Regression 1100057 ..."); char mySJIS[12] = {(char)0xFA, (char)0X51, (char)0XB8, (char)0XDB, (char)0XBD, (char)0XCB, (char)0XDB, (char)0XCC, (char)0XDE, (char)0XD0 , (char)0XFA, (char)0X50}; UnicodeConverterCPP SJIS(943, IBM, err); UnicodeString myString; SJIS.toUnicodeString(myString, mySJIS, 12, err); if (FAILURE(err)||(myString.size()!=10)) errln("toUnicodeString test failed"); else logln("toUnicodeString test ok"); fclose(ucs_file_in); delete myConverter; #ifndef WIN32 delete uniString; delete uniString2; delete uniString3; delete testUnistr; #endif } } void WriteToFile(const UnicodeString *a, FILE *myfile) { uint32_t size = a->size(); uint16_t i = 0; UChar b = 0xFEFF; /*Writes the BOM*/ fwrite(&b, sizeof(UChar), 1, myfile); for (i=0; i< size; i++) { b = (*a)[i]; fwrite(&b, sizeof(UChar), 1, myfile); } return; } int32_t strCaseIcmp(const char* a1, const char * a2) { int32_t i=0, ret=0; while(a1[i]&&a2[i]) { ret += tolower(a1[i])-tolower(a2[i]); i++; } return ret; } UCNV_FromUCallBack otherUnicodeAction(UCNV_FromUCallBack MIA) { return (MIA==(UCNV_FromUCallBack)MissingUnicodeAction_STOP)?(UCNV_FromUCallBack)MissingUnicodeAction_SUBSTITUTE:(UCNV_FromUCallBack)MissingUnicodeAction_STOP; } UCNV_ToUCallBack otherCharAction(UCNV_ToUCallBack MIA) { return (MIA==(UCNV_ToUCallBack)MissingCharAction_STOP)?(UCNV_ToUCallBack)MissingCharAction_SUBSTITUTE:(UCNV_ToUCallBack)MissingCharAction_STOP; } const char* myErrorName(UErrorCode err) { switch (err) { case ZERO_ERROR: return "ZERO_ERROR"; case ILLEGAL_ARGUMENT_ERROR: return "ILLEGAL_ARGUMENT_ERROR"; case MISSING_RESOURCE_ERROR: return "MISSING_RESOURCE_ERROR"; case INVALID_FORMAT_ERROR: return "INVALID_FORMAT_ERROR"; case FILE_ACCESS_ERROR: return "FILE_ACCESS_ERROR"; case INTERNAL_PROGRAM_ERROR: return "INTERNAL_PROGRAM_ERROR"; case MESSAGE_PARSE_ERROR: return "MESSAGE_PARSE_ERROR"; case MEMORY_ALLOCATION_ERROR: return "MEMORY_ALLOCATION_ERROR"; case USING_FALLBACK_ERROR: return "USING_FALLBACK_ERROR"; case USING_DEFAULT_ERROR: return "USING_DEFAULT_ERROR"; case INDEX_OUTOFBOUNDS_ERROR: return "INDEX_OUTOFBOUNDS_ERROR"; case PARSE_ERROR: return "PARSE_ERROR"; default: return "[BOGUS UErrorCode]"; } } ./xml4csrc2_3_1/000777 000000 000144 00000000000 06765261324 013422 5ustar00MARKVERMWAY000000 000000 ./xml4csrc2_3_1/obj/000777 000000 000144 00000000000 06765224410 014167 5ustar00MARKVERMWAY000000 000000 ./xml4csrc2_3_1/obj/Makefile.in000777 000000 000144 00000010515 06765770431 016260 0ustar00MARKVERMWAY123000 000000 # # (C) Copyright IBM Corp. 1998. 1999 All rights reserved. # # US Government Users Restricted Rights Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # The program is provided "as is" without any warranty express or # implied, including the warranty of non-infringement and the implied # warranties of merchantibility and fitness for a particular purpose. # IBM will not be liable for any damages suffered by you as a result # of using the Program. In no event will IBM be liable for any # special, indirect or consequential damages or lost profits even if # IBM has been advised of the possibility of their occurrence. IBM # will not be liable for any third party claims against you. # # @version Revision: 24 1.11 obj/Makefile.in, xml4c2Build, xml4c2, xml4c2_3_1 # ################################################################### # IMPORTANT NOTE # ################################################################### # If you are going to do the OS390BATCH build, make sure you have # # the OS390BATCH environment variable set. # # # # export OS390BATCH=1 # # # ################################################################### PLATFORM = @platform@ COMPILER = @compiler@ PREFIX = @prefix@ include ../src/Makefile.incl LIB=${XML4CROOT}/lib ## OS390BATCH ifeq (${OS390BATCH},1) BATCH_TARGET = "//'${LOADMOD}(XML4C23)'" endif LIBNAME=libIXXML4C THISLIB=${LIB}/${LIBNAME} VER=2_3 ALL_OBJECTS_DIR=${XML4CROOT}/obj ALL_OBJECTS=$(wildcard $(ALL_OBJECTS_DIR)/*.o) ####################################################### # HP-UX with CC compiler is awkward since it does # # not instantiate templates automatically. To do so # # you need to invoke the linker. So, just for this # # compiler, we try to create a dummy executable # # before we create the shared library. This will # # force all templates to be instantiated and the # # shared library is created with all template # # instantiations in place. # ####################################################### ifeq (${PLATFORM},HPUX) ifeq (${COMPILER},CC) ###### Start HP-UX CC compiler specific stuff ####### DUMMYEXE=$(XML_LIB_DIR)/dummyExe TEMPLATESOBJS=$(wildcard $(TEMPLATESREPOSITORY)/*.o) all: $(DUMMYEXE) ${THISLIB}${VER}${SHLIBSUFFIX} \rm -f $(DUMMYEXE) $(DUMMYEXE): $(ALL_OBJECTS) ${MAKE_SHARED} -o ${@} $(PLATFORM_LIBRARIES) $^ $(ALLLIBS) ###### End HP-UX CC compiler specific stuff ####### else all: ${THISLIB}${VER}${SHLIBSUFFIX} endif else ## OS390BATCH ifeq (${OS390BATCH},1) all: ${BATCH_TARGET} else all: ${THISLIB}${VER}${SHLIBSUFFIX} endif endif ######################################################## # # # OS/390 works pretty much the same way as Windows NT # # as far as linking goes. The runtime library is # # called .dll, and the link-time libraries have a .x # # extension. You need the .x files to link # # your application at build time and need the .dll # # file to run it. So, we need to copy over the .x # # file to the lib directory as well, so that you can # # link your application. # ######################################################## ${THISLIB}${VER}${SHLIBSUFFIX}: $(ALL_OBJECTS) @echo Building ${THISLIB}${VER}${SHLIBSUFFIX} ${MAKE_SHARED} -o ${@} $(PLATFORM_LIBRARIES) $(EXTRA_LINK_OPTIONS) $^ $(TEMPLATESOBJS) $(ALLLIBS) ## OS390 ifeq (${PLATFORM},OS390) ## OS390BATCH ifeq (${OS390BATCH},1) ${BATCH_TARGET}: $(ALL_OBJECTS) @echo Building ${BATCH_TARGET} ${MAKE_SHARED} -o ${@} $(PLATFORM_LIBRARIES) $(EXTRA_LINK_OPTIONS) $^ $(TEMPLATESOBJS) $(ALLLIBS) else $(CP) ${LIBNAME}${VER}${OS390SIDEDECK} ${LIB} endif endif clean: @echo "Making clean in obj ..." -rm -f $(ALL_OBJECTS) ${THISLIB}${VER}${SHLIBSUFFIX} distclean: clean rm -f Makefile install: ifeq (${OS390BATCH},1) @echo "Nothing to do for OS390BATCH ..." else -mkdir -p ${PREFIX}/lib $(CP) ${THISLIB}${VER}${SHLIBSUFFIX} $(PREFIX)/lib ifeq (${PLATFORM},OS390) $(CP) ${LIBNAME}${VER}${OS390SIDEDECK} $(PREFIX)/lib endif endif ./xml4csrc2_3_1/samples/000777 000000 000144 00000000000 06767457551 015101 5ustar00MARKVERMWAY000000 000000 ./xml4csrc2_3_1/samples/configure000777 000000 000144 00000142565 06760531336 017016 0ustar00MARKVERMWAY123000 000000 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Defaults: ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE cache_file=./config.cache exec_prefix=NONE host=NONE no_create= nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi case "$ac_option" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) ac_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir="$ac_optarg" ;; -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "enable_${ac_feature}='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he) # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat << EOF Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] --bindir=DIR user executables in DIR [EPREFIX/bin] --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] --libexecdir=DIR program executables in DIR [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share] --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com] --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/include] --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] --infodir=DIR info documentation in DIR [PREFIX/info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names EOF cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] --target=TARGET configure for TARGET [TARGET=HOST] Features and packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF if test -n "$ac_help"; then echo "--enable and --with options recognized:$ac_help" fi exit 0 ;; -host | --host | --hos | --ho) ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) host="$ac_optarg" ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir="$ac_optarg" ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir="$ac_optarg" ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir="$ac_optarg" ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir="$ac_optarg" ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir="$ac_optarg" ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir="$ac_optarg" ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir="$ac_optarg" ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix="$ac_optarg" ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir="$ac_optarg" ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir="$ac_optarg" ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site="$ac_optarg" ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir="$ac_optarg" ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir="$ac_optarg" ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers) echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes="$ac_optarg" ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi if test "x$nonopt" != xNONE; then { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } fi nonopt="$ac_option" ;; esac done if test -n "$ac_prev"; then { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } fi trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # 3 some systems may open it to /dev/tty # 4 used on the Kubota Titan # 6 checking for... messages and results # 5 compiler messages saved in config.log if test "$silent" = yes; then exec 6>/dev/null else exec 6>&1 fi exec 5>./config.log echo "\ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. " 1>&5 # Strip out --no-create and --no-recursion so they do not pile up. # Also quote any args containing shell metacharacters. ac_configure_args= for ac_arg do case "$ac_arg" in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! # Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. ac_unique_file=SAXCount/SAXCount.hpp # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then echo "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then echo "loading cache $cache_file" . $cache_file else echo "creating cache $cache_file" > $cache_file fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross ac_exeext= ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:529: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:559: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" break fi done IFS="$ac_save_ifs" if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift set dummy "$ac_dir/$ac_word" "$@" shift ac_cv_prog_CC="$@" fi fi fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then case "`uname -s`" in *win32* | *WIN32*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:610: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="cl" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi ;; esac fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:642: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF #line 653 "configure" #include "confdefs.h" main(){return(0);} EOF if { (eval echo configure:658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cc_cross=no else ac_cv_prog_cc_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cc_works=no fi rm -fr conftest* ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:684: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo "configure:689: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes else GCC= fi ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo "configure:717: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else ac_cv_prog_cc_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then CFLAGS="$ac_save_CFLAGS" elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:753: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CXX="$ac_prog" break fi done IFS="$ac_save_ifs" fi fi CXX="$ac_cv_prog_CXX" if test -n "$CXX"; then echo "$ac_t""$CXX" 1>&6 else echo "$ac_t""no" 1>&6 fi test -n "$CXX" && break done test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:785: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF #line 796 "configure" #include "confdefs.h" int main(){return(0);} EOF if { (eval echo configure:801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cxx_cross=no else ac_cv_prog_cxx_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cxx_works=no fi rm -fr conftest* ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:827: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 echo "configure:832: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.C <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no fi fi echo "$ac_t""$ac_cv_prog_gxx" 1>&6 if test $ac_cv_prog_gxx = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 echo "configure:860: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.cc if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then ac_cv_prog_cxx_g=yes else ac_cv_prog_cxx_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS="$ac_save_CXXFLAGS" elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break fi done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo "configure:922: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 fi fi done ;; esac done IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then INSTALL="$ac_cv_path_install" else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL="$ac_install_sh" fi fi echo "$ac_t""$INSTALL" 1>&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "autoconf", so it can be a program name with args. set dummy autoconf; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:977: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AUTOCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AUTOCONF"; then ac_cv_prog_AUTOCONF="$AUTOCONF" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_AUTOCONF="autoconf" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_prog_AUTOCONF" && ac_cv_prog_AUTOCONF="true" fi fi AUTOCONF="$ac_cv_prog_AUTOCONF" if test -n "$AUTOCONF"; then echo "$ac_t""$AUTOCONF" 1>&6 else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for floor in -lm""... $ac_c" 1>&6 echo "configure:1006: checking for floor in -lm" >&5 ac_lib_var=`echo m'_'floor | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 echo "configure:1054: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi if test $ac_cv_lib_pthread_pthread_create = no; then echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 echo "configure:1102: checking for pthread_create in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lpthreads $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo "configure:1151: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get # substituted into the Makefile and "${CC-cc}" will confuse make. CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi rm -f conftest* fi rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" else ac_cv_prog_CPP="$CPP" fi echo "$ac_t""$CPP" 1>&6 for ac_hdr in inttypes.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1234: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done if test $ac_cv_header_inttypes_h = no; then HAVE_INTTYPES_H=0 else HAVE_INTTYPES_H=1 fi # Make sure we can run config.sub. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 echo "configure:1284: checking host system type" >&5 host_alias=$host case "$host_alias" in NONE) case $nonopt in NONE) if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } fi ;; *) host_alias=$nonopt ;; esac ;; esac host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 case "${host}" in *-*-solaris*) platform=SOLARIS ;; *-*-linux*) platform=LINUX ;; *-*-aix*) platform=AIX ;; *-*-hp*) platform=HPUX ;; *-*-mvs*) platform=OS390 ;; *) platform=UNKNOWN ;; esac compiler=${CXX} trap '' 1 2 15 cat > confcache <<\EOF # 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. It is not useful on other systems. # If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure # the --cache-file=FILE option to use a different cache file; that is # what configure does when it calls configure scripts in # subdirectories, so they share the cache. # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). sed -n \ -e "s/'/'\\\\''/g" \ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Any assignment to VPATH causes Sun make to only execute # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 if test "$platform" != "OS390"; then # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. cat > conftest.defs <<\EOF s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g s%\[%\\&%g s%\]%\\&%g s%\$%$$%g EOF DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` #else DEFS='' fi rm -f conftest.defs # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} echo creating $CONFIG_STATUS rm -f $CONFIG_STATUS cat > $CONFIG_STATUS </dev/null | sed 1q`: # # $0 $ac_configure_args # # Compiler output produced by configure, useful for debugging # configure, is in ./config.log if it exists. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" for ac_option do case "\$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; *) echo "\$ac_cs_usage"; exit 1 ;; esac done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "Makefile \ SAXCount/Makefile \ DOMCount/Makefile \ SAXPrint/Makefile \ DOMPrint/Makefile \ MemParse/Makefile \ Redirect/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g s%@bindir@%$bindir%g s%@sbindir@%$sbindir%g s%@libexecdir@%$libexecdir%g s%@datadir@%$datadir%g s%@sysconfdir@%$sysconfdir%g s%@sharedstatedir@%$sharedstatedir%g s%@localstatedir@%$localstatedir%g s%@libdir@%$libdir%g s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@CC@%$CC%g s%@CXX@%$CXX%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@AUTOCONF@%$AUTOCONF%g s%@CPP@%$CPP%g s%@HAVE_INTTYPES_H@%$HAVE_INTTYPES_H%g s%@host@%$host%g s%@host_alias@%$host_alias%g s%@host_cpu@%$host_cpu%g s%@host_vendor@%$host_vendor%g s%@host_os@%$host_os%g s%@platform@%$platform%g s%@compiler@%$compiler%g CEOF EOF cat >> $CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi if test ! -s conftest.s$ac_file; then ac_more_lines=false rm -f conftest.s$ac_file else if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f conftest.s$ac_file" else ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" fi ac_file=`expr $ac_file + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dir_suffix= ac_dots= fi case "$ac_given_srcdir" in .) srcdir=. if test -z "$ac_dots"; then top_srcdir=. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; *) # Relative path. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" top_srcdir="$ac_dots$ac_given_srcdir" ;; esac case "$ac_given_INSTALL" in [/$]*) INSTALL="$ac_given_INSTALL" ;; *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in *Makefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done rm -f conftest.s* EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 ./xml4csrc2_3_1/samples/Makefile.incl000755 000000 000144 00000013042 06767253614 017464 0ustar00MARKVERMWAY123000 000000 # # (C) Copyright IBM Corp. 1998. 1999 All rights reserved. # # US Government Users Restricted Rights Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # The program is provided "as is" without any warranty express or # implied, including the warranty of non-infringement and the implied # warranties of merchantibility and fitness for a particular purpose. # IBM will not be liable for any damages suffered by you as a result # of using the Program. In no event will IBM be liable for any # special, indirect or consequential damages or lost profits even if # IBM has been advised of the possibility of their occurrence. IBM # will not be liable for any third party claims against you. # # @version Revision: 46 1.14 samples/Makefile.incl, xml4c2Build, xml4c2, xml4c2_3_1 # ###################### DEBUG MODE OPTION ########################## # To enable DEBUG mode, just type # export DEBUG=1 # on your shell (bash assumed) before building. # To cancel DEBUG mode, type # unset DEBUG # on your shell command line. ################################################################## ifeq (${DEBUG},1) COMPILESWITCH=-g else COMPILESWITCH=-w -O endif ################## LIBRARY NAMES AND DIRECTORIES ################## INCLUDES= -I. -I${XML4CROOT}/include LIB_DIR=${XML4CROOT}/lib LIBNAME=IXXML4C THISLIB=${LIB_DIR}/${LIBNAME} VER=2_3 ICU_LIB_DIR=${ICUROOT}/lib ICU_LIBNAME=icu-uc LIBRARY_NAMES=-l${ICU_LIBNAME} -l${LIBNAME}${VER} LIBRARY_SEARCH_PATHS=-L${ICU_LIB_DIR} -L${LIB_DIR} ####################### PLATFORM DEPENDENCIES ##################### #=============== SOLARIS SPECIFIC OPTIONS ========================= ifeq (${PLATFORM}, SOLARIS) CMP= -c ${COMPILESWITCH} CC= CC -c -DSOLARIS LINK = CC -DSOLARIS PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib EXTRA_LINK_OPTIONS=-lC -lc -lgen SHLIBSUFFIX=.so endif #================= AIX SPECIFIC OPTIONS =========================== ifeq (${PLATFORM}, AIX) CMP= -c ${COMPILESWITCH} CC=xlC_r -DAIX LINK = ${CC} PLATFORM_LIB_LINK_OPTIONS=-L/usr/lpp/xlC/lib EXTRA_LINK_OPTIONS=-lC SHLIBSUFFIX=.a endif #=============== LINUX SPECIFIC OPTIONS ========================= ifeq (${PLATFORM}, LINUX) CMP= -c ${COMPILESWITCH} CC= g++ -c -D${PLATFORM} -D_REENTRANT -fpic -instances=static LINK = g++ -D${PLATFORM} -fpic PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib EXTRA_LINK_OPTIONS=-lc SHLIBSUFFIX=.so endif #================= HP SPECIFIC OPTIONS =========================== ifeq (${PLATFORM}, HPUX) ifeq (${COMPILER}, aCC) CMP = -c $(COMPILESWITCH) -D_HP_UX -DHPaCC +DAportable -w +z CC = aCC LINK = ${CC} -Wl,+s PLATFORM_LIB_LINK_OPTIONS=-L/opt/aCC/lib -L/usr/ccs/lib SHLIBSUFFIX=.sl else ifneq (${DEBUG}, 1) COMPILESWITCH = -w +O1 endif APPL_NAME = $(notdir $(shell pwd)) TEMPLATESDIR = $(XML4CROOT)/bin/obj/$(APPL_NAME)/ptrepository COMMON_CMP = $(COMPILESWITCH) -D_HP_UX -DHPCC +DAportable -w +eh +z -z \ -ptr$(TEMPLATESDIR) CMP = -c $(COMMON_CMP) CC = CC LINK = ${CC} $(COMMON_CMP) -Wl,+s PLATFORM_LIB_LINK_OPTIONS=-L/opt/CC/lib -L/usr/lib SHLIBSUFFIX=.sl endif endif #================= OS390 SPECIFIC OPTIONS =========================== ################################################################### # IMPORTANT NOTE # ################################################################### # Before you try to run the Makefile, make sure you have two # # environment variables set. # # # # export XML4CROOT= # # export ICUROOT= # # # # Also, to enable debugging, you must type: # # export DEBUG=1 # # To disable debugging, you must type: # # unset DEBUG # # # # If you are going to do the OS390BATCH build, make sure you have # # the OS390BATCH environment variable set. # # # # export OS390BATCH=1 # # # # Also, # # # # export LOADMOD=USERID.LOAD # # export LOADEXP=USERID.EXP # # # # to specify your LOADMOD and the definition sidedeck dataset. # ################################################################### ifeq (${PLATFORM}, OS390) CMP= -c -DOS390 ${COMPILESWITCH} ## OS390BATCH ifeq (${OS390BATCH},1) CC = _CXX_CXXSUFFIX="cpp" _CXX_STEPS="-1" c++ -W0,"langlvl(extended)" -DOS390 -DOPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -DOS390BATCH else CC = _CXX_CXXSUFFIX="cpp" _CXX_STEPS="-1" c++ -W0,"langlvl(extended)" -DOS390 -DOPEN_THREADS -D_XOPEN_SOURCE_EXTENDED endif LINK = ${CC} PLATFORM_LIB_LINK_OPTIONS= EXTRA_LINK_OPTIONS = SHLIBSUFFIX=.dll OS390SIDEDECK=.x ifneq (${DEBUG}, 1) COMPILESWITCH = -2 endif ## OS390BATCH ifeq (${OS390BATCH},1) LIBRARY_NAMES="//'${LOADEXP}(XML4C23)'" else LIBRARY_NAMES=${LIB_DIR}/lib${LIBNAME}${VER}${OS390SIDEDECK} endif LIBRARY_SEARCH_PATHS= endif ./xml4csrc2_3_1/samples/DOMCount/000777 000000 000144 00000000000 06765261416 016520 5ustar00MARKVERMWAY000000 000000 ./xml4csrc2_3_1/samples/DOMCount/Makefile.in000777 000000 000144 00000004420 06765555044 020601 0ustar00MARKVERMWAY123000 000000 # # (C) Copyright IBM Corp. 1998. 1999 All rights reserved. # # US Government Users Restricted Rights Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # The program is provided "as is" without any warranty express or # implied, including the warranty of non-infringement and the implied # warranties of merchantibility and fitness for a particular purpose. # IBM will not be liable for any damages suffered by you as a result # of using the Program. In no event will IBM be liable for any # special, indirect or consequential damages or lost profits even if # IBM has been advised of the possibility of their occurrence. IBM # will not be liable for any third party claims against you. # # @version Revision: 25 1.9 samples/DOMCount/Makefile.in, xml4c2Build, xml4c2, xml4c2_3_1 # ################################################################### # IMPORTANT NOTE # ################################################################### # If you are going to do the OS390BATCH build, make sure you have # # the OS390BATCH environment variable set. # # # # export OS390BATCH=1 # # # ################################################################### PLATFORM = @platform@ COMPILER = @compiler@ include ../Makefile.incl APP_NAME=DOMCount OUTDIR= ${XML4CROOT}/bin/obj/${APP_NAME} EXEC= ${XML4CROOT}/bin OBJS= ${OUTDIR}/DOMCount.o SRC= ${XML4CROOT}/samples/${APP_NAME} ## OS390BATCH ifeq (${OS390BATCH},1) BATCH_TARGET= "//'${LOADMOD}(${APP_NAME})'" all: makedir ${BATCH_TARGET} else all: makedir ${EXEC}/${APP_NAME} endif makedir: -mkdir -p $(OUTDIR) ${EXEC}/${APP_NAME}: ${OBJS} ${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${EXTRA_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${BATCH_TARGET}: ${OBJS} ${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${EXTRA_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} $(OUTDIR)/DOMCount.o: ${SRC}/DOMCount.cpp ${CC} ${CMP} $(INCLUDES) -o $(OUTDIR)/DOMCount.o ${SRC}/DOMCount.cpp clean: rm -f ${OBJS} ${EXEC}/${APP_NAME} distclean: clean rm -f Makefile ./xml4csrc2_3_1/samples/DOMPrint/000777 000000 000144 00000000000 06765262247 016527 5ustar00MARKVERMWAY000000 000000 ./xml4csrc2_3_1/samples/DOMPrint/DOMPrint.cpp000777 000000 000144 00000033732 06756255402 020703 0ustar00MARKVERMWAY123000 000000 /* * (C) Copyright IBM Corp. 1999 All rights reserved. * * US Government Users Restricted Rights Use, duplication or * disclosure restricted by GSA ADP Schedule Contract with IBM Corp. * * The program is provided "as is" without any warranty express or * implied, including the warranty of non-infringement and the implied * warranties of merchantibility and fitness for a particular purpose. * IBM will not be liable for any damages suffered by you as a result * of using the Program. In no event will IBM be liable for any * special, indirect or consequential damages or lost profits even if * IBM has been advised of the possibility of their occurrence. IBM * will not be liable for any third party claims against you. */ /** * @version Revision: 25 1.21 samples/DOMPrint/DOMPrint.cpp, xml4c2Samples, xml4c2, xml4c2_3_0Rev2 */ // --------------------------------------------------------------------------- // This sample program which invokes the DOMParser to build a DOM tree for // the specified input file. It then walks the tree, and prints out the data // as an XML file. // // The parameters are: // // [-?] - Show usage and exit // [-v] - Use validating parser, instead. // [-NoEscape] - Don't escape characters like '<' or '&'. // filename - The path to the XML file to parse // // These are non-case sensitive // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- // Includes // --------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include "DOMTreeErrorReporter.hpp" // --------------------------------------------------------------------------- // Global data // // outStrm // errStrm // These are simple stream classes provided by the XML package for demo // and debug purposes only. They are not supported for production code. // They provide simple services for writing portable sample apps, but are // not for general use. // --------------------------------------------------------------------------- XMLStdOut outStrm; XMLStdErr errStrm; // --------------------------------------------------------------------------- // Local data // // xmlFile // The path to the file to parser. Set via command line. // // useVDOMParser // Indicates whether the validating or non-validating parser should be // used. Defaults to non-validating, -v overrides. // // doEscapes // Indicates whether special chars should be escaped in the output. // Defaults to doing escapes, -NoEscape overrides. // --------------------------------------------------------------------------- static char* xmlFile = 0; static bool useVDOMParser = false; static bool doEscapes = true; // --------------------------------------------------------------------------- // Forward references // --------------------------------------------------------------------------- void indent(int); void printString(const DOMString &s); void printCDATAString(TextOutputStream& target, const DOMString &s); void putXMLCh(TextOutputStream& target, const XMLCh toWrite); void usage(); TextOutputStream& operator<<(TextOutputStream& target, const DOMString& toWrite); TextOutputStream& operator<<(TextOutputStream& target, DOM_Node& toWrite); int main(int argC, char* argV[]) { // Initialize the XML4C2 system try { XMLPlatformUtils::Initialize(); } catch(const XMLException& toCatch) { errStrm << "Error during XML4C2 Initialization.\n" " Exception message is \"%s\"\n" << toCatch.getMessage() << EndLn; return 1; } // Check command line and extract arguments. if (argC < 2) { usage(); return 1; } // Watch for special case help request if (strcmp(argV[1], "-?") == 0) { usage(); return 0; } // See if non validating dom parser configuration is requested. unsigned int parmInd; for (parmInd = 1; parmInd < (unsigned int)argC; parmInd++) { // Break out on first parm not starting with a dash if (argV[parmInd][0] != '-') break; if (!strcmp(argV[parmInd], "-v") || !strcmp(argV[parmInd], "-V")) { useVDOMParser = true; } else if (!strcmp(argV[parmInd], "-NoEscape")) { doEscapes = false; } else { usage(); return 1; } } // // And now we have to have only one parameter left and it must be // the file name. // if (parmInd + 1 != (unsigned int)argC) { usage(); return 1; } xmlFile = argV[parmInd]; // // Instantiate the appropriate DOM parser. The Validating DOMParser // class inherits from NonValidatingDOMParser, so we use the common // base class to store the pointer. // NonValidatingDOMParser* parser = 0; if (useVDOMParser == true) parser = new ValidatingDOMParser; else parser = new NonValidatingDOMParser; // // Attach an error handler to the parser. The parser will call back to // methods of the ErrorHandler if it discovers errors during the course // of parsing the XML document. // ErrorHandler *errReporter = new DOMTreeErrorReporter(); parser->setErrorHandler(errReporter); // // Parse the XML file, catching any XML exceptions that might propogate // out of it. // bool errorsOccured = false; try { parser->parse(xmlFile); } catch (const XMLException& e) { errStrm << "An error occured during parsing\n Message: " << e.getMessage() << EndLn; errorsOccured = true; } // If the parse was successful, output the document data from the DOM tree if (!errorsOccured) { DOM_Node doc = parser->getDocument(); outStrm << doc << EndLn; } // Cleanup delete parser; delete errReporter; // // The DOM document and its contents are reference counted, and need // no explicit deletion. // return 0; } // // Quicky global operators to allow DOM strings and nodes to be dumped to the // simple XML standard out stream. // TextOutputStream& operator<<(TextOutputStream& target, const DOMString& toWrite) { const unsigned int length = toWrite.length(); const XMLCh* chars = toWrite.rawBuffer(); for (unsigned int index = 0; index < length; index++) { // Only do escapes if we are asked to if (doEscapes) { switch (chars[index]) { case chAmpersand : target << "&"; break; case chOpenAngle : target << "<"; break; case chCloseAngle: target << ">"; break; case chDoubleQuote : target << """; break; default: // If it is none of the special characters, print it as such #ifdef OS390 target << chars[index]; #else putXMLCh(target, chars[index]); #endif break; } } else { #ifdef OS390 target << chars[index]; #else putXMLCh(target, chars[index]); #endif } } return target; } TextOutputStream& operator<<(TextOutputStream& target, DOM_Node& toWrite) { // Get the name and value out for convenience DOMString nodeName = toWrite.getNodeName(); DOMString nodeValue = toWrite.getNodeValue(); switch (toWrite.getNodeType()) { case DOM_Node::TEXT_NODE: { target << nodeValue; break; } case DOM_Node::PROCESSING_INSTRUCTION_NODE : { target << ""; break; } case DOM_Node::DOCUMENT_NODE : { #ifdef OS390 target << "\n"; #else target << "\n"; #endif DOM_Node child = toWrite.getFirstChild(); while( child != 0) { target << child << EndLn; child = child.getNextSibling(); } break; } case DOM_Node::ELEMENT_NODE : { // Output the element start tag. target << '<' << nodeName; // Output any attributes on this element DOM_NamedNodeMap attributes = toWrite.getAttributes(); int attrCount = attributes.getLength(); for (int i = 0; i < attrCount; i++) { DOM_Node attribute = attributes.item(i); target << ' ' << attribute.getNodeName() << "=\"" << attribute.getNodeValue() << '"'; } // // Test for the presence of children, which includes both // text content and nested elements. // DOM_Node child = toWrite.getFirstChild(); if (child != 0) { // There are children. Close tart-tag, and output children. target << ">"; while( child != 0) { target << child; child = child.getNextSibling(); } // Done with children. Output the end tag. target << ""; } else { // // There were no children. Output the short form close of the // element start tag, making it an empty-element tag. // target << "/>"; } break; } case DOM_Node::ENTITY_REFERENCE_NODE: { DOM_Node child; for (child = toWrite.getFirstChild(); child != 0; child = child.getNextSibling()) target << child; break; } case DOM_Node::CDATA_SECTION_NODE: { target << ""; break; } case DOM_Node::COMMENT_NODE: { target << ""; break; } default: errStrm << "Unrecognized node type = " << (long)toWrite.getNodeType() << EndLn; } return target; } // // Print a string with no escaping of mark-up characters. // void printCDATAString(TextOutputStream& target, const DOMString &s) { int length = s.length(); XMLCh *chars = s.rawBuffer(); int i; for (i=0; i>= 6; case 5:*--outCh = (tmpSrc | 0x80) & 0xbf; tmpSrc >>= 6; case 4:*--outCh = (tmpSrc | 0x80) & 0xbf; tmpSrc >>= 6; case 3:*--outCh = (tmpSrc | 0x80) & 0xbf; tmpSrc >>= 6; case 2:*--outCh = (tmpSrc | 0x80) & 0xbf; tmpSrc >>= 6; case 1:*--outCh = tmpSrc | firstByteMark[bytesToWrite]; }; target << outCh; }; void usage() { outStrm << "\nUsage: DOMPrint [options] file\n" " This program invokes the XML4C DOM parser and builds the DOM tree.\n" " It then traverses the DOM tree and prints the contents of the tree\n" " Options are case insensitive\n\n" " Options:\n" " -v Invoke the Validating DOM Parser\n" " -NoEscape Don't escape special characters in output\n" " -? Show this help (must be the only parameter)\n" << EndLn; } ./xml4csrc2_3_1/samples/DOMPrint/Makefile.in000777 000000 000144 00000005037 06765555160 020611 0ustar00MARKVERMWAY123000 000000 # # (C) Copyright IBM Corp. 1998. 1999 All rights reserved. # # US Government Users Restricted Rights Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # The program is provided "as is" without any warranty express or # implied, including the warranty of non-infringement and the implied # warranties of merchantibility and fitness for a particular purpose. # IBM will not be liable for any damages suffered by you as a result # of using the Program. In no event will IBM be liable for any # special, indirect or consequential damages or lost profits even if # IBM has been advised of the possibility of their occurrence. IBM # will not be liable for any third party claims against you. # # @version Revision: 26 1.9 samples/DOMPrint/Makefile.in, xml4c2Build, xml4c2, xml4c2_3_1 # ################################################################### # IMPORTANT NOTE # ################################################################### # If you are going to do the OS390BATCH build, make sure you have # # the OS390BATCH environment variable set. # # # # export OS390BATCH=1 # # # ################################################################### PLATFORM = @platform@ COMPILER = @compiler@ include ../Makefile.incl APP_NAME=DOMPrint OUTDIR= ${XML4CROOT}/bin/obj/${APP_NAME} EXEC= ${XML4CROOT}/bin OBJS= ${OUTDIR}/DOMPrint.o ${OUTDIR}/DOMTreeErrorReporter.o SRC= ${XML4CROOT}/samples/${APP_NAME} HEADER_FILES=${SRC}/DOMTreeErrorReporter.hpp ## OS390BATCH ifeq (${OS390BATCH},1) BATCH_TARGET= "//'${LOADMOD}(${APP_NAME})'" all: makedir ${BATCH_TARGET} else all: makedir ${EXEC}/${APP_NAME} endif makedir: -mkdir -p $(OUTDIR) ${EXEC}/${APP_NAME}: ${OBJS} ${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${EXTRA_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${BATCH_TARGET}: ${OBJS} ${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${EXTRA_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} $(OUTDIR)/DOMPrint.o: ${SRC}/DOMPrint.cpp ${HEADER_FILES} ${CC} ${CMP} $(INCLUDES) -o $(OUTDIR)/DOMPrint.o ${SRC}/DOMPrint.cpp $(OUTDIR)/DOMTreeErrorReporter.o: ${SRC}/DOMTreeErrorReporter.cpp ${HEADER_FILES} ${CC} ${CMP} $(INCLUDES) -o $(OUTDIR)/DOMTreeErrorReporter.o ${SRC}/DOMTreeErrorReporter.cpp clean: rm -f ${OBJS} ${EXEC}/${APP_NAME} distclean: clean rm -f Makefile ./xml4csrc2_3_1/samples/MemParse/000777 000000 000144 00000000000 06765262460 016601 5ustar00MARKVERMWAY000000 000000 ./xml4csrc2_3_1/samples/MemParse/Makefile.in000777 000000 000144 00000005034 06765555230 020661 0ustar00MARKVERMWAY123000 000000 # # (C) Copyright IBM Corp. 1998. 1999 All rights reserved. # # US Government Users Restricted Rights Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # The program is provided "as is" without any warranty express or # implied, including the warranty of non-infringement and the implied # warranties of merchantibility and fitness for a particular purpose. # IBM will not be liable for any damages suffered by you as a result # of using the Program. In no event will IBM be liable for any # special, indirect or consequential damages or lost profits even if # IBM has been advised of the possibility of their occurrence. IBM # will not be liable for any third party claims against you. # # @version Revision: 27 1.9 samples/MemParse/Makefile.in, xml4c2Build, xml4c2, xml4c2_3_1 # ################################################################### # IMPORTANT NOTE # ################################################################### # If you are going to do the OS390BATCH build, make sure you have # # the OS390BATCH environment variable set. # # # # export OS390BATCH=1 # # # ################################################################### PLATFORM = @platform@ COMPILER = @compiler@ include ../Makefile.incl APP_NAME=MemParse OUTDIR= ${XML4CROOT}/bin/obj/${APP_NAME} EXEC= ${XML4CROOT}/bin OBJS= ${OUTDIR}/MemParse.o ${OUTDIR}/MemParseHandlers.o SRC= ${XML4CROOT}/samples/${APP_NAME} HEADER_FILES= ${SRC}/MemParse.hpp ${SRC}/MemParseHandlers.hpp ## OS390BATCH ifeq (${OS390BATCH},1) BATCH_TARGET= "//'${LOADMOD}(${APP_NAME})'" all: makedir ${BATCH_TARGET} else all: makedir ${EXEC}/${APP_NAME} endif makedir: -mkdir -p $(OUTDIR) ${EXEC}/${APP_NAME}: ${OBJS} ${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${EXTRA_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${BATCH_TARGET}: ${OBJS} ${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${EXTRA_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} $(OUTDIR)/MemParse.o: ${SRC}/MemParse.cpp ${HEADER_FILES} ${CC} ${CMP} $(INCLUDES) -o $(OUTDIR)/MemParse.o ${SRC}/MemParse.cpp $(OUTDIR)/MemParseHandlers.o: ${SRC}/MemParseHandlers.cpp ${HEADER_FILES} ${CC} ${CMP} $(INCLUDES) -o $(OUTDIR)/MemParseHandlers.o ${SRC}/MemParseHandlers.cpp clean: rm -f ${OBJS} ${EXEC}/${APP_NAME} distclean: clean rm -f Makefile ./xml4csrc2_3_1/samples/MemParse/MemParse.cpp000777 000000 000144 00000015565 06757017624 021044 0ustar00MARKVERMWAY123000 000000 /* * (C) Copyright IBM Corp. 1999 All rights reserved. * * US Government Users Restricted Rights Use, duplication or * disclosure restricted by GSA ADP Schedule Contract with IBM Corp. * * The program is provided "as is" without any warranty express or * implied, including the warranty of non-infringement and the implied * warranties of merchantibility and fitness for a particular purpose. * IBM will not be liable for any damages suffered by you as a result * of using the Program. In no event will IBM be liable for any * special, indirect or consequential damages or lost profits even if * IBM has been advised of the possibility of their occurrence. IBM * will not be liable for any third party claims against you. */ /** * This sample program illustrates how one can use a memory buffer as the * input to parser. The memory buffer contains raw bytes representing XML * statements. * * Look at the API documentation for 'MemBufInputSource' for more information * on parameters to the constructor. * * @version Revision: 23 1.3 samples/MemParse/MemParse.cpp, xml4c2Samples, xml4c2, xml4c2_3_0Rev2 */ // --------------------------------------------------------------------------- // Includes // --------------------------------------------------------------------------- #include #include #include "MemParse.hpp" #include #include // --------------------------------------------------------------------------- // Global data // // errStrm // outStrm // The text output stream we use to output text data. These are simple // portable classes used for samples and for debug purposes, but they // are not supported for production code! // --------------------------------------------------------------------------- XMLStdOut outStrm; XMLStdErr errStrm; /* * Define the memory buffer contents here which parsed by the XML parser. */ #ifdef OS390 static const char *gXmlInMemBuf = "\ \n\ \n\ \n\ \n\ \n\ \n\ ]>\n\n\n\ \n\ XML4C\n\ XML Parsing Tools\n\ \n\ IBM Center for Java Technology, Silicon Valley, Cupertino, CA\n\ \n\ \ "; #else static const char *gXmlInMemBuf = "\ \n\ \n\ \n\ \n\ \n\ \n\ ]>\n\n\n\ \n\ XML4C\n\ XML Parsing Tools\n\ \n\ IBM Center for Java Technology, Silicon Valley, Cupertino, CA\n\ \n\ \ "; #endif static const char *gMemBufId = "prodInfo"; // --------------------------------------------------------------------------- // Local helper methods // --------------------------------------------------------------------------- void usage() { outStrm << "\nUsage:\n" << " MemParse [-nv]\n" << "This program uses the Validating SAX Parser to parse a \n" << "memory buffer containing XML statements, and reports the \n" << "number of elements and attributes found.\n" << "\nOptions:\n" << " -nv Invoke the NonValidating SAX Parser instead.\n\n" << EndLn; } // --------------------------------------------------------------------------- // Program entry point // --------------------------------------------------------------------------- int main(int argc, char* args[]) { // Initialize the XML4C2 system try { XMLPlatformUtils::Initialize(); } catch (const XMLException& toCatch) { errStrm << "Error during initialization! Message:\n" << toCatch.getMessage() << EndLn; return 1; } const char* options = args[1]; bool useNVSAXParser = false; if (argc > 1) { // Check for some special cases values of the parameter if (!strncmp(options, "-?", 2)) { usage(); return 0; } else if (!strncmp(options, "-nv", 3)) { useNVSAXParser = true; } else if (options[0] == '-') { usage(); return -1; } } // Seems to be basically ok, so create the parser and the handler object // and set the handler as the parser's handler for document and error // events. // NonValidatingSAXParser* parser; if (useNVSAXParser == true) parser = new NonValidatingSAXParser; else parser = new ValidatingSAXParser; MemParseHandlers* handler = new MemParseHandlers(); parser->setDocumentHandler(handler); parser->setErrorHandler(handler); // // Create MemBufferInputSource from the buffer containing the XML // statements. // MemBufInputSource * memBufIS = new MemBufInputSource((const XMLByte *) gXmlInMemBuf, strlen(gXmlInMemBuf), gMemBufId, false); // // Get the starting time and kick off the parse of the indicated // file. Catch any exceptions that might propogate out of it. // unsigned long duration; try { const unsigned long startMillis = XMLPlatformUtils::getCurrentMillis(); parser->parse(*memBufIS); const unsigned long endMillis = XMLPlatformUtils::getCurrentMillis(); duration = endMillis - startMillis; } catch (const XMLException& e) { errStrm << "\nError during parsing memory stream:\n" << "Exception message is: \n" << e.getMessage() << "\n" << EndLn; return -1; } // Print out the stats that we collected and time taken. outStrm << "\nFinished parsing the memory buffer containing the following " << "XML statements:\n\n" << gXmlInMemBuf << "\n\n\n" << "Parsing took " << duration << " ms (" << handler->getElementCount() << " elements, " << handler->getAttrCount() << " attributes, " << handler->getSpaceCount() << " spaces, " << handler->getCharacterCount() << " characters).\n" << EndLn; if (useNVSAXParser == false) outStrm << "You can also invoke it with '-nv' parameter to turn " << "of validation.\n"; // Clean up the parser and handler. delete parser; delete handler; return 0; } ./xml4csrc2_3_1/samples/Redirect/000777 000000 000144 00000000000 06765473420 016631 5ustar00MARKVERMWAY000000 000000 ./xml4csrc2_3_1/samples/Redirect/Makefile.in000777 000000 000144 00000005033 06765774113 020713 0ustar00MARKVERMWAY123000 000000 # # (C) Copyright IBM Corp. 1998. 1999 All rights reserved. # # US Government Users Restricted Rights Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # The program is provided "as is" without any warranty express or # implied, including the warranty of non-infringement and the implied # warranties of merchantibility and fitness for a particular purpose. # IBM will not be liable for any damages suffered by you as a result # of using the Program. In no event will IBM be liable for any # special, indirect or consequential damages or lost profits even if # IBM has been advised of the possibility of their occurrence. IBM # will not be liable for any third party claims against you. # # @version Revision: 28 1.9 samples/Redirect/Makefile.in, xml4c2Build, xml4c2, xml4c2_3_1 # ################################################################### # IMPORTANT NOTE # ################################################################### # If you are going to do the OS390BATCH build, make sure you have # # the OS390BATCH environment variable set. # # # # export OS390BATCH=1 # # # ################################################################### PLATFORM = @platform@ COMPILER = @compiler@ include ../Makefile.incl APP_NAME=Redirect OUTDIR= ${XML4CROOT}/bin/obj/${APP_NAME} EXEC= ${XML4CROOT}/bin OBJS= ${OUTDIR}/Redirect.o ${OUTDIR}/RedirectHandlers.o SRC= ${XML4CROOT}/samples/${APP_NAME} HEADER_FILES=${SRC}/Redirect.hpp ${SRC}/RedirectHandlers.hpp ## OS390BATCH ifeq (${OS390BATCH},1) BATCH_TARGET= "//'${LOADMOD}(${APP_NAME})'" all: makedir ${BATCH_TARGET} else all: makedir ${EXEC}/${APP_NAME} endif makedir: -mkdir -p $(OUTDIR) ${EXEC}/${APP_NAME}: ${OBJS} ${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${EXTRA_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${BATCH_TARGET}: ${OBJS} ${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${EXTRA_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} $(OUTDIR)/Redirect.o: ${SRC}/Redirect.cpp ${HEADER_FILES} ${CC} ${CMP} $(INCLUDES) -o $(OUTDIR)/Redirect.o ${SRC}/Redirect.cpp $(OUTDIR)/RedirectHandlers.o: ${SRC}/RedirectHandlers.cpp ${HEADER_FILES} ${CC} ${CMP} $(INCLUDES) -o $(OUTDIR)/RedirectHandlers.o ${SRC}/RedirectHandlers.cpp clean: rm -f ${OBJS} ${EXEC}/${APP_NAME} distclean: clean rm -f Makefile ./xml4csrc2_3_1/samples/SAXCount/000777 000000 000144 00000000000 06765262727 016542 5ustar00MARKVERMWAY000000 000000 ./xml4csrc2_3_1/samples/SAXCount/Makefile.in000777 000000 000144 00000005033 06765555345 020622 0ustar00MARKVERMWAY123000 000000 # # (C) Copyright IBM Corp. 1998. 1999 All rights reserved. # # US Government Users Restricted Rights Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # The program is provided "as is" without any warranty express or # implied, including the warranty of non-infringement and the implied # warranties of merchantibility and fitness for a particular purpose. # IBM will not be liable for any damages suffered by you as a result # of using the Program. In no event will IBM be liable for any # special, indirect or consequential damages or lost profits even if # IBM has been advised of the possibility of their occurrence. IBM # will not be liable for any third party claims against you. # # @version Revision: 29 1.9 samples/SAXCount/Makefile.in, xml4c2Build, xml4c2, xml4c2_3_1 # ################################################################### # IMPORTANT NOTE # ################################################################### # If you are going to do the OS390BATCH build, make sure you have # # the OS390BATCH environment variable set. # # # # export OS390BATCH=1 # # # ################################################################### PLATFORM = @platform@ COMPILER = @compiler@ include ../Makefile.incl APP_NAME=SAXCount OUTDIR= ${XML4CROOT}/bin/obj/${APP_NAME} EXEC= ${XML4CROOT}/bin OBJS= ${OUTDIR}/SAXCount.o ${OUTDIR}/SAXCountHandlers.o SRC= ${XML4CROOT}/samples/${APP_NAME} HEADER_FILES=${SRC}/SAXCount.hpp ${SRC}/SAXCountHandlers.hpp ## OS390BATCH ifeq (${OS390BATCH},1) BATCH_TARGET= "//'${LOADMOD}(${APP_NAME})'" all: makedir ${BATCH_TARGET} else all: makedir ${EXEC}/${APP_NAME} endif makedir: -mkdir -p $(OUTDIR) ${EXEC}/${APP_NAME}: ${OBJS} ${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${EXTRA_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${BATCH_TARGET}: ${OBJS} ${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${EXTRA_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} $(OUTDIR)/SAXCount.o: ${SRC}/SAXCount.cpp ${HEADER_FILES} ${CC} ${CMP} $(INCLUDES) -o $(OUTDIR)/SAXCount.o ${SRC}/SAXCount.cpp $(OUTDIR)/SAXCountHandlers.o: ${SRC}/SAXCountHandlers.cpp ${HEADER_FILES} ${CC} ${CMP} $(INCLUDES) -o $(OUTDIR)/SAXCountHandlers.o ${SRC}/SAXCountHandlers.cpp clean: rm -f ${OBJS} ${EXEC}/${APP_NAME} distclean: clean rm -f Makefile ./xml4csrc2_3_1/samples/SAXPrint/000777 000000 000144 00000000000 06765263126 016540 5ustar00MARKVERMWAY000000 000000 ./xml4csrc2_3_1/samples/SAXPrint/Makefile.in000777 000000 000144 00000005033 06765555407 020625 0ustar00MARKVERMWAY123000 000000 # # (C) Copyright IBM Corp. 1998. 1999 All rights reserved. # # US Government Users Restricted Rights Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # The program is provided "as is" without any warranty express or # implied, including the warranty of non-infringement and the implied # warranties of merchantibility and fitness for a particular purpose. # IBM will not be liable for any damages suffered by you as a result # of using the Program. In no event will IBM be liable for any # special, indirect or consequential damages or lost profits even if # IBM has been advised of the possibility of their occurrence. IBM # will not be liable for any third party claims against you. # # @version Revision: 30 1.9 samples/SAXPrint/Makefile.in, xml4c2Build, xml4c2, xml4c2_3_1 # ################################################################### # IMPORTANT NOTE # ################################################################### # If you are going to do the OS390BATCH build, make sure you have # # the OS390BATCH environment variable set. # # # # export OS390BATCH=1 # # # ################################################################### PLATFORM = @platform@ COMPILER = @compiler@ include ../Makefile.incl APP_NAME=SAXPrint OUTDIR= ${XML4CROOT}/bin/obj/${APP_NAME} EXEC= ${XML4CROOT}/bin OBJS= ${OUTDIR}/SAXPrint.o ${OUTDIR}/SAXPrintHandlers.o SRC= ${XML4CROOT}/samples/${APP_NAME} HEADER_FILES=${SRC}/SAXPrint.hpp ${SRC}/SAXPrintHandlers.hpp ## OS390BATCH ifeq (${OS390BATCH},1) BATCH_TARGET= "//'${LOADMOD}(${APP_NAME})'" all: makedir ${BATCH_TARGET} else all: makedir ${EXEC}/${APP_NAME} endif makedir: -mkdir -p $(OUTDIR) ${EXEC}/${APP_NAME}: ${OBJS} ${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${EXTRA_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${BATCH_TARGET}: ${OBJS} ${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${EXTRA_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} $(OUTDIR)/SAXPrint.o: ${SRC}/SAXPrint.cpp ${HEADER_FILES} ${CC} ${CMP} $(INCLUDES) -o $(OUTDIR)/SAXPrint.o ${SRC}/SAXPrint.cpp $(OUTDIR)/SAXPrintHandlers.o: ${SRC}/SAXPrintHandlers.cpp ${HEADER_FILES} ${CC} ${CMP} $(INCLUDES) -o $(OUTDIR)/SAXPrintHandlers.o ${SRC}/SAXPrintHandlers.cpp clean: rm -f ${OBJS} ${EXEC}/${APP_NAME} distclean: clean rm -f Makefile ./xml4csrc2_3_1/src/000777 000000 000144 00000000000 06765261324 014211 5ustar00MARKVERMWAY000000 000000 ./xml4csrc2_3_1/src/configure000777 000000 000144 00000151313 06760531237 016130 0ustar00MARKVERMWAY123000 000000 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Defaults: ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE cache_file=./config.cache exec_prefix=NONE host=NONE no_create= nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi case "$ac_option" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) ac_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir="$ac_optarg" ;; -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "enable_${ac_feature}='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he) # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat << EOF Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] --bindir=DIR user executables in DIR [EPREFIX/bin] --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] --libexecdir=DIR program executables in DIR [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share] --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com] --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/include] --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] --infodir=DIR info documentation in DIR [PREFIX/info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names EOF cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] --target=TARGET configure for TARGET [TARGET=HOST] Features and packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF if test -n "$ac_help"; then echo "--enable and --with options recognized:$ac_help" fi exit 0 ;; -host | --host | --hos | --ho) ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) host="$ac_optarg" ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir="$ac_optarg" ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir="$ac_optarg" ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir="$ac_optarg" ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir="$ac_optarg" ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir="$ac_optarg" ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir="$ac_optarg" ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir="$ac_optarg" ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix="$ac_optarg" ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir="$ac_optarg" ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir="$ac_optarg" ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site="$ac_optarg" ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir="$ac_optarg" ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir="$ac_optarg" ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers) echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes="$ac_optarg" ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi if test "x$nonopt" != xNONE; then { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } fi nonopt="$ac_option" ;; esac done if test -n "$ac_prev"; then { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } fi trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # 3 some systems may open it to /dev/tty # 4 used on the Kubota Titan # 6 checking for... messages and results # 5 compiler messages saved in config.log if test "$silent" = yes; then exec 6>/dev/null else exec 6>&1 fi exec 5>./config.log echo "\ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. " 1>&5 # Strip out --no-create and --no-recursion so they do not pile up. # Also quote any args containing shell metacharacters. ac_configure_args= for ac_arg do case "$ac_arg" in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! # Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. ac_unique_file=com/ibm/xml/util/XML4CDefs.hpp # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then echo "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then echo "loading cache $cache_file" . $cache_file else echo "creating cache $cache_file" > $cache_file fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross ac_exeext= ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:529: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:559: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" break fi done IFS="$ac_save_ifs" if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift set dummy "$ac_dir/$ac_word" "$@" shift ac_cv_prog_CC="$@" fi fi fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then case "`uname -s`" in *win32* | *WIN32*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:610: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="cl" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi ;; esac fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:642: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF #line 653 "configure" #include "confdefs.h" main(){return(0);} EOF if { (eval echo configure:658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cc_cross=no else ac_cv_prog_cc_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cc_works=no fi rm -fr conftest* ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:684: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo "configure:689: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes else GCC= fi ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo "configure:717: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else ac_cv_prog_cc_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then CFLAGS="$ac_save_CFLAGS" elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:753: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CXX="$ac_prog" break fi done IFS="$ac_save_ifs" fi fi CXX="$ac_cv_prog_CXX" if test -n "$CXX"; then echo "$ac_t""$CXX" 1>&6 else echo "$ac_t""no" 1>&6 fi test -n "$CXX" && break done test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:785: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF #line 796 "configure" #include "confdefs.h" int main(){return(0);} EOF if { (eval echo configure:801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cxx_cross=no else ac_cv_prog_cxx_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cxx_works=no fi rm -fr conftest* ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:827: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 echo "configure:832: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.C <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no fi fi echo "$ac_t""$ac_cv_prog_gxx" 1>&6 if test $ac_cv_prog_gxx = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 echo "configure:860: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.cc if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then ac_cv_prog_cxx_g=yes else ac_cv_prog_cxx_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS="$ac_save_CXXFLAGS" elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break fi done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo "configure:922: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 fi fi done ;; esac done IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then INSTALL="$ac_cv_path_install" else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL="$ac_install_sh" fi fi echo "$ac_t""$INSTALL" 1>&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "autoconf", so it can be a program name with args. set dummy autoconf; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:977: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AUTOCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AUTOCONF"; then ac_cv_prog_AUTOCONF="$AUTOCONF" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_AUTOCONF="autoconf" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_prog_AUTOCONF" && ac_cv_prog_AUTOCONF="true" fi fi AUTOCONF="$ac_cv_prog_AUTOCONF" if test -n "$AUTOCONF"; then echo "$ac_t""$AUTOCONF" 1>&6 else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for floor in -lm""... $ac_c" 1>&6 echo "configure:1006: checking for floor in -lm" >&5 ac_lib_var=`echo m'_'floor | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 echo "configure:1054: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi if test $ac_cv_lib_pthread_pthread_create = no; then echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 echo "configure:1102: checking for pthread_create in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lpthreads $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo "configure:1151: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get # substituted into the Makefile and "${CC-cc}" will confuse make. CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi rm -f conftest* fi rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" else ac_cv_prog_CPP="$CPP" fi echo "$ac_t""$CPP" 1>&6 for ac_hdr in inttypes.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1234: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done if test $ac_cv_header_inttypes_h = no; then HAVE_INTTYPES_H=0 else HAVE_INTTYPES_H=1 fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 echo "configure:1278: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "memchr" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "free" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF if { (eval echo configure:1358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_header_stdc=no fi rm -fr conftest* fi fi fi echo "$ac_t""$ac_cv_header_stdc" 1>&6 if test $ac_cv_header_stdc = yes; then cat >> confdefs.h <<\EOF #define STDC_HEADERS 1 EOF fi echo $ac_n "checking for XMLByte""... $ac_c" 1>&6 echo "configure:1382: checking for XMLByte" >&5 if eval "test \"`echo '$''{'ac_cv_type_XMLByte'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])XMLByte[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_XMLByte=yes else rm -rf conftest* ac_cv_type_XMLByte=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_XMLByte" 1>&6 if test $ac_cv_type_XMLByte = no; then cat >> confdefs.h <<\EOF #define XMLByte unsigned char EOF fi # Make sure we can run config.sub. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 echo "configure:1422: checking host system type" >&5 host_alias=$host case "$host_alias" in NONE) case $nonopt in NONE) if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } fi ;; *) host_alias=$nonopt ;; esac ;; esac host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 case "${host}" in *-*-solaris*) platform=SOLARIS ;; *-*-linux*) platform=LINUX ;; *-*-aix*) platform=AIX ;; *-*-hp*) platform=HPUX ;; *-*-mvs*) platform=OS390 ;; *) platform=UNKNOWN ;; esac compiler=${CXX} prefix=${prefix} trap '' 1 2 15 cat > confcache <<\EOF # 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. It is not useful on other systems. # If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure # the --cache-file=FILE option to use a different cache file; that is # what configure does when it calls configure scripts in # subdirectories, so they share the cache. # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). sed -n \ -e "s/'/'\\\\''/g" \ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Any assignment to VPATH causes Sun make to only execute # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 if test "$platform" != "OS390"; then # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. cat > conftest.defs <<\EOF s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g s%\[%\\&%g s%\]%\\&%g s%\$%$$%g EOF DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` #else DEFS='' fi rm -f conftest.defs # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} echo creating $CONFIG_STATUS rm -f $CONFIG_STATUS cat > $CONFIG_STATUS </dev/null | sed 1q`: # # $0 $ac_configure_args # # Compiler output produced by configure, useful for debugging # configure, is in ./config.log if it exists. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" for ac_option do case "\$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; *) echo "\$ac_cs_usage"; exit 1 ;; esac done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "Makefile \ sax/Makefile \ com/ibm/xml/util/Makefile \ com/ibm/xml/internal/Makefile \ com/ibm/xml/parsers/Makefile \ com/ibm/xml/framework/Makefile \ com/ibm/xml/dom/Makefile \ ../obj/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g s%@bindir@%$bindir%g s%@sbindir@%$sbindir%g s%@libexecdir@%$libexecdir%g s%@datadir@%$datadir%g s%@sysconfdir@%$sysconfdir%g s%@sharedstatedir@%$sharedstatedir%g s%@localstatedir@%$localstatedir%g s%@libdir@%$libdir%g s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@CC@%$CC%g s%@CXX@%$CXX%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@AUTOCONF@%$AUTOCONF%g s%@CPP@%$CPP%g s%@HAVE_INTTYPES_H@%$HAVE_INTTYPES_H%g s%@host@%$host%g s%@host_alias@%$host_alias%g s%@host_cpu@%$host_cpu%g s%@host_vendor@%$host_vendor%g s%@host_os@%$host_os%g s%@platform@%$platform%g s%@compiler@%$compiler%g CEOF EOF cat >> $CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi if test ! -s conftest.s$ac_file; then ac_more_lines=false rm -f conftest.s$ac_file else if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f conftest.s$ac_file" else ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" fi ac_file=`expr $ac_file + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dir_suffix= ac_dots= fi case "$ac_given_srcdir" in .) srcdir=. if test -z "$ac_dots"; then top_srcdir=. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; *) # Relative path. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" top_srcdir="$ac_dots$ac_given_srcdir" ;; esac case "$ac_given_INSTALL" in [/$]*) INSTALL="$ac_given_INSTALL" ;; *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in *Makefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done rm -f conftest.s* EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 ./xml4csrc2_3_1/src/Makefile.incl000755 000000 000144 00000020370 06767253644 016614 0ustar00MARKVERMWAY123000 000000 # # (C) Copyright IBM Corp. 1998. 1999 All rights reserved. # # US Government Users Restricted Rights Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # The program is provided "as is" without any warranty express or # implied, including the warranty of non-infringement and the implied # warranties of merchantibility and fitness for a particular purpose. # IBM will not be liable for any damages suffered by you as a result # of using the Program. In no event will IBM be liable for any # special, indirect or consequential damages or lost profits even if # IBM has been advised of the possibility of their occurrence. IBM # will not be liable for any third party claims against you. # # @version Revision: 38 1.17 src/Makefile.incl, xml4c2Build, xml4c2, xml4c2_3_1 # ################################################################### # IMPORTANT NOTE # ################################################################### # Before you try to run the Makefile, make sure you have two # # environment variables set. # # # # export XML4CROOT= # # export ICUROOT= # # # # Also, to enable debugging, you must type: # # export DEBUG=1 # # To disable debugging, you must type: # # unset DEBUG # # # # If you are going to do the OS390BATCH build, make sure you have # # the OS390BATCH environment variable set. # # # # export OS390BATCH=1 # # # # Also, # # # # export LOADMOD=USERID.LOAD # # export LOADEXP=USERID.EXP # # # # to specify your LOADMOD and the definition sidedeck dataset. # ################################################################### ALL: all ALL_OBJECTS_DIR = ${XML4CROOT}/obj ###################### DEBUG MODE OPTION ########################## # To enable DEBUG mode, just type # export DEBUG=1 # on your shell (bash assumed) before building. # To cancel DEBUG mode, type # unset DEBUG # on your shell command line. ################################################################## ifeq (${DEBUG}, 1) XML_BUILD_OPTIONS = -g else XML_BUILD_OPTIONS = -w -O endif ####################### PLATFORM DEPENDENCIES ##################### #=============== SOLARIS SPECIFIC OPTIONS ========================= ifeq (${PLATFORM}, SOLARIS) PLATFORM_CPP_COMPILER = CC PLATFORM_C_COMPILER = cc PLATFORM_LIBRARIES=-L/usr/local/SUNWspro/lib -L/usr/ccs/lib PLATFORM_COMPILE_OPTIONS = -KPIC -mt -xs -instances=static -features=rtti -D${PLATFORM} -D_REENTRANT MAKE_SHARED = ${PLATFORM_CPP_COMPILER} -D${PLATFORM} -G MAKE_SHARED_C = ${PLATFORM_C_COMPILER} -D${PLATFORM} -G EXTRA_LINK_OPTIONS = -lm -lw -lC -lc -lgen SHLIBSUFFIX=.so endif #================= AIX SPECIFIC OPTIONS =========================== ifeq (${PLATFORM}, AIX) PLATFORM_CPP_COMPILER = xlC_r PLATFORM_C_COMPILER = xlc_r PLATFORM_LIBRARIES=-L/usr/lpp/xlC/lib -L${ICUROOT}/source/common PLATFORM_COMPILE_OPTIONS = -qnotempinc -D_THREAD_SAFE MAKE_SHARED = makeC++SharedLib_r -p 5000 MAKE_SHARED_C = makeC++SharedLib_r -p 5000 EXTRA_LINK_OPTIONS = -licu-uc -lbsd SHLIBSUFFIX=.a endif #=============== LINUX SPECIFIC OPTIONS ========================= ifeq (${PLATFORM}, LINUX) PLATFORM_CPP_COMPILER = g++ PLATFORM_C_COMPILER = gcc PLATFORM_LIBRARIES=-L/usr/lib -L/usr/local/lib -L/usr/ccs/lib PLATFORM_COMPILE_OPTIONS = -c -fpic -instances=static -D${PLATFORM} -D_REENTRANT MAKE_SHARED = ${PLATFORM_CPP_COMPILER} -D${PLATFORM} -shared -fpic MAKE_SHARED_C = ${PLATFORM_C_COMPILER} -D${PLATFORM} -shared -fpic EXTRA_LINK_OPTIONS = -lc SHLIBSUFFIX=.so endif #=============== OS2 SPECIFIC OPTIONS ========================= ifeq (${PLATFORM}, OS/2) PLATFORM_CPP_COMPILER = icc PLATFORM_C_COMPILER = icc PLATFORM_LIBRARIES= CPPOM30.LIB os2386.lib mmpm2.lib PLATFORM_COMPILE_OPTIONS = /C+ /Gd- /Ge- /Gm+ /Gs- /Re /J+ /Ms /Sm /Sn /Ss+ MAKE_SHARED = ilink /nofree MAKE_SHARED_C = ilink /nofree EXTRA_LINK_OPTIONS = /map /nod /noe /noi /packcode /packdata /exepack /align:4 SHLIBSUFFIX= .dll ifneq (${DEBUG}, 1) XML_BUILD_OPTIONS = -2 endif endif #================= HP SPECIFIC OPTIONS =========================== ifeq (${PLATFORM}, HPUX) ifeq (${COMPILER}, aCC) PLATFORM_CPP_COMPILER = aCC PLATFORM_C_COMPILER = aCC PLATFORM_LIBRARIES=-L/opt/aCC/lib -L/usr/ccs/lib PLATFORM_COMPILE_OPTIONS = $(COMPILESWITCH) -D_HP_UX -DHPaCC -D_PTHREADS_DRAFT4 \ +DAportable -w +z +inst_compiletime MAKE_SHARED = ${PLATFORM_CPP_COMPILER} -D${PLATFORM} -b MAKE_SHARED_C = ${PLATFORM_C_COMPILER} -D${PLATFORM} -b EXTRA_LINK_OPTIONS = -lcma -lCsup -lstream SHLIBSUFFIX=.sl else ifneq (${DEBUG}, 1) XML_BUILD_OPTIONS = -w +O1 endif PLATFORM_CPP_COMPILER = CC PLATFORM_C_COMPILER = cc PLATFORM_LIBRARIES= -L${ICUROOT}/lib -L/opt/CC/lib -L/usr/lib TEMPLATESREPOSITORY = ${ALL_OBJECTS_DIR}/ptrepository COMMON_COMPILE_OPTIONS = $(COMPILESWITCH) -D_HP_UX -DXML4C2_TMPLSINC \ -D_PTHREADS_DRAFT4 +DAportable -w +eh +z -z +a1 ifeq ($(MODULE), dom) PLATFORM_COMPILE_OPTIONS = -DDOM_PROJ $(COMMON_COMPILE_OPTIONS) else PLATFORM_COMPILE_OPTIONS = $(COMMON_COMPILE_OPTIONS) -ptr${TEMPLATESREPOSITORY} endif ALLINCLUDES=-I$(XML4CROOT)/src/com/ibm/xml -I$(XML4CROOT)/src -I$(ICUROOT)/include MAKE_SHARED = $(PLATFORM_CPP_COMPILER) $(PLATFORM_COMPILE_OPTIONS) $(ALLINCLUDES) MAKE_SHARED_C = $(PLATFORM_C_COMPILER) $(PLATFORM_COMPILE_OPTIONS) $(ALLINCLUDES) ALLLIBS = -licu-uc -lcma -lm EXTRA_LINK_OPTIONS = -b -Wl,+s -Wl,-a,shared SHLIBSUFFIX=.sl endif endif #================ OS/390 SPECIFIC OPTIONS ========================= ifeq (${PLATFORM}, OS390) PLATFORM_CPP_COMPILER = _CXX_CXXSUFFIX="cpp" _CXX_STEPS="-1" c++ PLATFORM_C_COMPILER = _CXX_CXXSUFFIX="cpp" _CXX_STEPS="-1" cc PLATFORM_LIBRARIES= ## OS390BATCH ifeq (${OS390BATCH},1) PLATFORM_COMPILE_OPTIONS =-Wc,dll,expo -W0,"langlvl(extended)" -D${PLATFORM} -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -DOS390BATCH else PLATFORM_COMPILE_OPTIONS =-Wc,dll,expo -W0,"langlvl(extended)" -D${PLATFORM} -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED endif MAKE_SHARED = ${PLATFORM_CPP_COMPILER} -D${PLATFORM} -W l,dll MAKE_SHARED_C = ${PLATFORM_C_COMPILER} -D${PLATFORM} -W l,dll ## OS390BATCH ifeq (${OS390BATCH},1) ALLLIBS = "//'${LOADEXP}(ICUUC)'" else ALLLIBS = ${ICUROOT}/lib/libicu-uc.x endif EXTRA_LINK_OPTIONS = SHLIBSUFFIX=.dll OS390SIDEDECK=.x ifneq (${DEBUG}, 1) XML_BUILD_OPTIONS = -2 endif endif ###################### STANDARD TOOLS ############################# CP = -cp -fp RM = -rm -f CAT = cat AR = ar -cqv CD = cd CC1 = ${PLATFORM_CPP_COMPILER} ${PLATFORM_COMPILE_OPTIONS} JUST_CC = ${PLATFORM_C_COMPILER} -D${PLATFORM} ECHO = echo CREATE_DEPENDS_FILE = echo "" > depends MAKE_DEPEND = ${CC1} -E -xM ########################## DIRECTORIES ############################ XML_LIB_DIR = $(XML4CROOT)/lib XML_INC_DIR = $(XML4CROOT)/include INTL_INC_DIR1 = $(ICUROOT)/include # INTL_INC_DIR2 = $(ICUROOT)/source/common # not used any more #################### COMPILE/LINK FLAGS ########################### XML_INCL = -I. -I$(XML_INC_DIR) -I$(INTL_INC_DIR1) ##################### HELPER MACROS ############################### DEPFILE = depends LINKLIB = $(XML_LIB_DIR) ######################### SUFFIX RULES ############################ .SUFFIXES: .SUFFIXES: .cpp .c .o .cpp.o: $(CC1) -c $(XML_BUILD_OPTIONS) $(XML_DEF) $(XML_INCL) $(EXTRA_COMPILE_OPTIONS) -o $(@) $(<) .c.o: $(JUST_CC) -c $(XML_BUILD_OPTIONS) $(XML_DEF) $(XML_INCL) $(EXTRA_COMPILE_OPTIONS) -o $(@) $(<) ./xml4csrc2_3_1/src/com/000777 000000 000144 00000000000 06765223766 014777 5ustar00MARKVERMWAY000000 000000 ./xml4csrc2_3_1/src/com/ibm/000777 000000 000144 00000000000 06765223775 015546 5ustar00MARKVERMWAY000000 000000 ./xml4csrc2_3_1/src/com/ibm/xml/000777 000000 000144 00000000000 06765224001 016325 5ustar00MARKVERMWAY000000 000000 ./xml4csrc2_3_1/src/com/ibm/xml/util/000777 000000 000144 00000000000 06765224040 017305 5ustar00MARKVERMWAY000000 000000 ./xml4csrc2_3_1/src/com/ibm/xml/util/OS390PlatformUtils.cpp000777 000000 000144 00000033045 06762775545 023354 0ustar00MARKVERMWAY123000 000000 /* * (C) Copyright IBM Corp. 1999 All rights reserved. * * US Government Users Restricted Rights Use, duplication or * disclosure restricted by GSA ADP Schedule Contract with IBM Corp. * * The program is provided "as is" without any warranty express or * implied, including the warranty of non-infringement and the implied * warranties of merchantibility and fitness for a particular purpose. * IBM will not be liable for any damages suffered by you as a result * of using the Program. In no event will IBM be liable for any * special, indirect or consequential damages or lost profits even if * IBM has been advised of the possibility of their occurrence. IBM * will not be liable for any third party claims against you. */ /** * @version Revision: 56 1.4 src/com/ibm/xml/util/OS390PlatformUtils.cpp, xml4c2Utils, xml4c2, xml4c2_3_1 */ // --------------------------------------------------------------------------- // Includes // --------------------------------------------------------------------------- #ifndef APP_NO_THREADS #include #endif #include #include #include #include #include #include #include #include #include #include #ifdef OS390BATCH static const char CONVERTER_BINARY_FILE_DDNAME[11] = "DD:ICUDATA"; #endif // --------------------------------------------------------------------------- // Local Methods // --------------------------------------------------------------------------- static void WriteCharStr( FILE* stream, const char* const toWrite) { if (!fputs(toWrite, stream)) { throw XMLPlatformUtilsException("Could not write to standard out/err"); } } static void WriteUStrStdErr( const XMLCh* const toWrite) { char* tmpVal = XMLString::transcode(toWrite); ArrayJanitor janText(tmpVal); if (!fputs(tmpVal, stderr)) { throw XMLPlatformUtilsException("Could not write to standard error file"); } } static void WriteUStrStdOut( const XMLCh* const toWrite) { char* tmpVal = XMLString::transcode(toWrite); ArrayJanitor janText(tmpVal); if (!fputs(tmpVal, stdout)) { throw XMLPlatformUtilsException("Could not write to standard out file"); } } // --------------------------------------------------------------------------- // XMLPlatformUtils: Platform init method // --------------------------------------------------------------------------- void XMLPlatformUtils::platformInit() { } void XMLPlatformUtils::setupIntlPath() { // // We need to figure out the path to the Intl classes. They will be // in the .\Intl subdirectory under this DLL. // #ifdef OS390BATCH // Unless POSIX(ON) is specified and OS/390 USS is configured,there is // no environment variable support in an OS/390 Batch environment. // We will define a DD name - ICUDATA for accessing the Intl classes static const char * BatchIntlDir = CONVERTER_BINARY_FILE_DDNAME; unsigned int pathLen = strlen(BatchIntlDir); fgIntlPath = new char[pathLen + 2]; strcpy((char *) fgIntlPath, BatchIntlDir); return; #else static const char * xml4cIntlDirEnvVar = "ICU_DATA"; static const char * sharedLibEnvVar = "LIBPATH"; char* envVal = getenv(xml4cIntlDirEnvVar); //check if environment variable is set if (envVal != NULL) { // Store this string in the static member unsigned int pathLen = strlen(envVal); fgIntlPath = new char[pathLen + 2]; strcpy((char *) fgIntlPath, envVal); if (envVal[pathLen - 1] != '/') { strcat((char *) fgIntlPath, "/"); } return; } // // If we did not find the environment var, so lets try to go the auto // search route. // char libName[256]; strcpy(libName, XML4C2_DLLName); // -- NOT USED BY MVS -- //strcat(libName, gXML4C2VersionStr); //strcat(libName, ".a"); // --------------------- char* libEnvVar = getenv(sharedLibEnvVar); char* libPath = NULL; if (libEnvVar == NULL) { fprintf(stderr, "Error: Could not locate i18n converter files.\n"); fprintf(stderr, "Environment variable '%s' is not defined.\n", sharedLibEnvVar); fprintf(stderr, "Environment variable 'ICU_DATA' is also not defined.\n"); exit(-1); } // // Its necessary to create a copy because strtok() modifies the // string as it returns tokens. We don't want to modify the string // returned to by getenv(). // libPath = new char[strlen(libEnvVar) + 1]; strcpy(libPath, libEnvVar); //First do the searching process for the first directory listing // char* allPaths = libPath; char* libPathName; while ((libPathName = strtok(allPaths, ":")) != NULL) { FILE* dummyFptr = 0; allPaths = 0; char* libfile = new char[strlen(libPathName) + strlen(libName) + 2]; strcpy(libfile, libPathName); strcat(libfile, "/"); strcat(libfile, libName); dummyFptr = (FILE *) fopen(libfile, "rb"); delete [] libfile; if (dummyFptr != NULL) { fclose(dummyFptr); fgIntlPath = new char[strlen(libPathName)+ strlen("/icu/data/")+1]; strcpy((char *) fgIntlPath, libPathName); strcat((char *) fgIntlPath, "/icu/data/"); break; } } // while delete libPath; if (fgIntlPath == NULL) { fprintf(stderr, "Could not find %s in %s for auto locating the converter files.\n", libName, sharedLibEnvVar); fprintf(stderr, "And the environment variable 'ICU_DATA' not defined.\n"); exit(-1); } #endif } // --------------------------------------------------------------------------- // XMLPlatformUtils: File Methods // --------------------------------------------------------------------------- unsigned int XMLPlatformUtils::curFilePos(FileHandle theFile) { // Get the current position int curPos = ftell( (FILE*)theFile); if (curPos == -1) throw XMLPlatformUtilsException("XMLPlatformUtils::curFilePos - Could not get current pos"); return (unsigned int)curPos; } void XMLPlatformUtils::closeFile(FileHandle theFile) { if (fclose((FILE*)theFile)) throw XMLPlatformUtilsException("XMLPlatformUtils::closeFile - Could not close the file handle"); } unsigned int XMLPlatformUtils::fileSize(FileHandle theFile) { // Get the current position long int curPos = ftell((FILE*)theFile); if (curPos == -1) throw XMLPlatformUtilsException("XMLPlatformUtils::fileSize - Could not get current pos"); // Seek to the end and save that value for return if (fseek( (FILE*)theFile, 0, SEEK_END) ) throw XMLPlatformUtilsException("XMLPlatformUtils::fileSize - Could not seek to end"); long int retVal = ftell( (FILE*)theFile); if (retVal == -1) throw XMLPlatformUtilsException("XMLPlatformUtils::fileSize - Could not get the file size"); // And put the pointer back if (fseek( (FILE*)theFile, curPos, SEEK_SET) ) throw XMLPlatformUtilsException("XMLPlatformUtils::fileSize - Could not seek back to original pos"); return (unsigned int)retVal; } FileHandle XMLPlatformUtils::openFile(const unsigned short* const fileName) { const char* tmpFileName = XMLString::transcode(fileName); ArrayJanitor janText((char*)tmpFileName); FileHandle retVal = (FILE*)fopen( tmpFileName , "rb" ); if (retVal == NULL) return 0; return retVal; } unsigned int XMLPlatformUtils::readFileBuffer( FileHandle theFile , const unsigned int toRead , XMLByte* const toFill) { size_t noOfItemsRead = fread( (void*) toFill, 1, toRead, (FILE*)theFile); if(ferror((FILE*)theFile)) { throw XMLPlatformUtilsException("XMLPlatformUtils::readFileBuffer - Read failed"); } return (unsigned int)noOfItemsRead; } void XMLPlatformUtils::resetFile(FileHandle theFile) { // Seek to the start of the file if (fseek((FILE*)theFile, 0, SEEK_SET) ) throw XMLPlatformUtilsException("XMLPlatformUtils::resetFile - Could not seek to beginning"); } // --------------------------------------------------------------------------- // XMLPlatformUtils: Timing Methods // --------------------------------------------------------------------------- unsigned long XMLPlatformUtils::getCurrentMillis() { timeb aTime; ftime(&aTime); return (unsigned long)(aTime.time*1000 + aTime.millitm); } XMLCh* XMLPlatformUtils::getBasePath(const XMLCh* const srcPath) { // // NOTE: THe path provided has always already been opened successfully, // so we know that its not some pathological freaky path. It comes in // in native format, and goes out as Unicode always // char* newSrc = XMLString::transcode(srcPath); ArrayJanitor janText(newSrc); // Use a local buffer that is big enough for the largest legal path char* tmpPath = dirname((char*)newSrc); if (!tmpPath) { throw XMLPlatformUtilsException("XMLPlatformUtils::resetFile - Could not get the base path name"); } char* newXMLString = new char [strlen(tmpPath) +2]; ArrayJanitor newJanitor(newXMLString); #ifdef OS390BATCH // Set it to NULL if the "DD:" convention is used if (strncmp(newSrc, "DD:", 3)) { strcpy(newXMLString, tmpPath); strcat(newXMLString , "/"); } else strcpy(newXMLString, ""); #else strcpy(newXMLString, tmpPath); strcat(newXMLString , "/"); #endif // Return a copy of the path, in Unicode format return XMLString::transcode(newXMLString); } bool XMLPlatformUtils::isRelative(const XMLCh* const toCheck) { // Check for pathological case of empty path if (!toCheck[0]) return false; // // If it starts with a slash, then it cannot be relative. This covers // both something like "\Test\File.xml" and an NT Lan type remote path // that starts with a node like "\\MyNode\Test\File.xml". // if (toCheck[0] == XMLCh('/')) return false; // Else assume its a relative path return true; } // ----------------------------------------------------------------------- // Standard out/error support // ----------------------------------------------------------------------- void XMLPlatformUtils::writeToStdErr(const char* const toWrite) { WriteCharStr(stderr, toWrite); } void XMLPlatformUtils::writeToStdErr(const XMLCh* const toWrite) { WriteUStrStdErr(toWrite); } void XMLPlatformUtils::writeToStdOut(const XMLCh* const toWrite) { WriteUStrStdOut(toWrite); } void XMLPlatformUtils::writeToStdOut(const char* const toWrite) { WriteCharStr(stdout, toWrite); } // ----------------------------------------------------------------------- // Mutex methods // ----------------------------------------------------------------------- #ifndef APP_NO_THREADS void XMLPlatformUtils::closeMutex(void* const mtxHandle) { if (mtxHandle == NULL) return; if (pthread_mutex_destroy( (pthread_mutex_t*)mtxHandle)) { throw XMLPlatformUtilsException("Could not destroy a mutex"); } if ( (pthread_mutex_t*)mtxHandle) delete mtxHandle; } void XMLPlatformUtils::lockMutex(void* const mtxHandle) { if (mtxHandle == NULL) return; if (pthread_mutex_lock( (pthread_mutex_t*)mtxHandle)) { throw XMLPlatformUtilsException("Could not lock a mutex"); } } void* XMLPlatformUtils::makeMutex() { pthread_mutex_t* mutex = new pthread_mutex_t; if (mutex == NULL) { throw XMLPlatformUtilsException("Could not initialize a mutex"); } if (pthread_mutex_init(mutex, NULL)) { throw XMLPlatformUtilsException("Could not create a mutex"); } return (void*)(mutex); } void XMLPlatformUtils::unlockMutex(void* const mtxHandle) { if (mtxHandle == NULL) return; if (pthread_mutex_unlock( (pthread_mutex_t*)mtxHandle)) { throw XMLPlatformUtilsException("Could not unlock a mutex"); } } #else // #ifndef APP_NO_THREADS void XMLPlatformUtils::closeMutex(void* const mtxHandle) { } void XMLPlatformUtils::lockMutex(void* const mtxHandle) { } void* XMLPlatformUtils::makeMutex() { return 0; } void XMLPlatformUtils::unlockMutex(void* const mtxHandle) { } #endif // APP_NO_THREADS // ----------------------------------------------------------------------- // Miscellaneous synchronization methods // ----------------------------------------------------------------------- void* XMLPlatformUtils::compareAndSwap ( void** toFill , const void* const newValue , const void* const toCompare) { int boolVar = cs( (cs_t*) &toCompare, (cs_t*) toFill, (cs_t) newValue ); return (void*) toCompare; } int XMLPlatformUtils::atomicIncrement(int &location) { int newVal, oldVal = location; do { newVal = oldVal + 1; oldVal = (int) compareAndSwap( (void**) &location, (void*) newVal, (void*) oldVal ); } while( newVal != oldVal + 1 ); return newVal; } int XMLPlatformUtils::atomicDecrement(int &location) { int newVal, oldVal = location; do { newVal = oldVal - 1; oldVal = (int) compareAndSwap( (void**) &location, (void*) newVal, (void*) oldVal ); } while( newVal != oldVal - 1 ); return newVal; } FileHandle XMLPlatformUtils::openStdInHandle() { return (FileHandle)fdopen(dup(0), "rb"); }