You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2002/07/05 18:21:34 UTC

cvs commit: xml-xerces/c/samples/StdInParse Makefile.in

tng         2002/07/05 09:21:33

  Modified:    c/samples Makefile.in Makefile.incl configure configure.in
                        runConfigure
               c/samples/CreateDOMDocument Makefile.in
               c/samples/DOMCount Makefile.in
               c/samples/DOMPrint Makefile.in
               c/samples/EnumVal Makefile.in
               c/samples/MemParse Makefile.in
               c/samples/PParse Makefile.in
               c/samples/Redirect Makefile.in
               c/samples/SAX2Count Makefile.in
               c/samples/SAX2Print Makefile.in
               c/samples/SAXCount Makefile.in
               c/samples/SAXPrint Makefile.in
               c/samples/SEnumVal Makefile.in
               c/samples/StdInParse Makefile.in
  Log:
  [Bug 10252] Modify FreeBSD build environment for the samples.   Patch from Max Gotlib.
  
  Revision  Changes    Path
  1.17      +3 -1      xml-xerces/c/samples/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/Makefile.in,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Makefile.in	21 May 2002 19:13:17 -0000	1.16
  +++ Makefile.in	5 Jul 2002 16:21:32 -0000	1.17
  @@ -78,6 +78,8 @@
   CXXFLAGS = @cxxflags@
   CFLAGS = @cflags@
   PREFIX = @prefix@
  +THREADS = @threads@
  +EXTRA_LIBS = @extra_libs@
   BITSTOBUILD = @bitstobuild@
   
   all::	saxprint sax2print saxcount sax2count domprint domcount redirect memparse pparse stdinparse enumval senumval createdomdocument
  
  
  
  1.44      +16 -16    xml-xerces/c/samples/Makefile.incl
  
  Index: Makefile.incl
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/Makefile.incl,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- Makefile.incl	3 Jul 2002 22:24:16 -0000	1.43
  +++ Makefile.incl	5 Jul 2002 16:21:32 -0000	1.44
  @@ -84,13 +84,13 @@
   	CC= g++ -c -D${PLATFORM} -D_REENTRANT -fpic
   	LINK = g++ -D${PLATFORM} -fpic ${LDFLAGS}
   	PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
  -	EXTRA_LINK_OPTIONS=-lc
  +	EXTRA_LINK_OPTIONS=-lc ${EXTRA_LIBS}
     else
   	CMP= -c ${CXXFLAGS}
   	CC= CC -c -D${PLATFORM} -LANG:pch -LANG:std -O2 -D_REENTRANT -I/usr/local/include
   	LINK =  CC -D${PLATFORM} ${LDFLAGS}
   	PLATFORM_LIB_LINK_OPTIONS=
  -	EXTRA_LINK_OPTIONS=
  +	EXTRA_LINK_OPTIONS=${EXTRA_LIBS}
     endif
     SHLIBSUFFIX=.so
   endif
  @@ -102,13 +102,13 @@
   	CC= g++ -c -D${PLATFORM} -D_REENTRANT -fpic
    LINK = g++ -D${PLATFORM} -fpic ${LDFLAGS}
   	PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
  -	EXTRA_LINK_OPTIONS=-lc
  +	EXTRA_LINK_OPTIONS=-lc ${EXTRA_LIBS}
     else
   	CMP= -c ${CXXFLAGS}
   	CC= CC -c -D${PLATFORM} -D_REENTRANT -pic
    LINK =  CC -D${PLATFORM} ${LDFLAGS}
   	PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib
  -	EXTRA_LINK_OPTIONS=-lc -lgen
  +	EXTRA_LINK_OPTIONS=-lc -lgen ${EXTRA_LIBS}
     endif
     SHLIBSUFFIX=.so
   endif
  @@ -118,7 +118,7 @@
     CC=${COMPILER} -D${PLATFORM} -fPIC
     CMP=-c ${CXXFLAGS}
     LINK=${CC} ${LDFLAGS}
  -  EXTRA_LINK_OPTIONS=-lc -lsocket
  +  EXTRA_LINK_OPTIONS=-lc -lsocket ${EXTRA_LIBS}
     PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
     SHLIBSUFFIX=.so
   endif
  @@ -128,7 +128,7 @@
     CMP= -O2 -c ${CXXFLAGS} -pthread
     CC= g++ -O2 -c -D${PLATFORM} -D_REENTRANT -fpic -pthread
     LINK = g++ -D${PLATFORM} -fpic -pthread ${LDFLAGS}
  -  EXTRA_LINK_OPTIONS=-lc -lsocket
  +  EXTRA_LINK_OPTIONS=-lc -lsocket ${EXTRA_LIBS}
     PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
     SHLIBSUFFIX=.so
   endif
  @@ -146,7 +146,7 @@
   MAKE_SHARED = ${PLATFORM_CPP_COMPILER} -DPTX -G
   MAKE_SHARED_C = ${PLATFORM_C_COMPILER} -DPTX  -G
   PLATFORM_LIB_LINK_OPTIONS=-L/usr/local/lib -L${XMLINSTALL}/lib
  -EXTRA_LINK_OPTIONS=-lm -lgen
  +EXTRA_LINK_OPTIONS=-lm -lgen ${EXTRA_LIBS}
   SHLIBSUFFIX=.so
   endif
   
  @@ -157,7 +157,7 @@
   LINK =  ${COMPILER} -brtl ${LDFLAGS}
   # the compiler knows about this two
   # PLATFORM_LIB_LINK_OPTIONS=-L/usr/lpp/xlC/lib
  -# EXTRA_LINK_OPTIONS=-lC
  +# EXTRA_LINK_OPTIONS=-lC ${EXTRA_LIBS}
   SHLIBSUFFIX=.a
   endif
   
  @@ -175,7 +175,7 @@
   CC = $(MYCC)
   #INCLUDES    += -I${ICUROOT}/include
   SHLIBSUFFIX=.a
  -EXTRA_LINK_OPTIONS=-q OPTION='*DUPPROC *DUPVAR'
  +EXTRA_LINK_OPTIONS=-q OPTION='*DUPPROC *DUPVAR' ${EXTRA_LIBS}
   endif
   
   #=============== LINUX SPECIFIC OPTIONS =========================
  @@ -184,7 +184,7 @@
   CC= ${COMPILER} -c -D${PLATFORM} -D_REENTRANT -fpic
   LINK =  ${COMPILER} -D${PLATFORM} -fpic ${LDFLAGS}
   PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
  -EXTRA_LINK_OPTIONS=-lc
  +EXTRA_LINK_OPTIONS=-lc ${EXTRA_LIBS}
   SHLIBSUFFIX=.so
   endif
   
  @@ -193,12 +193,12 @@
     CMP= -c ${CXXFLAGS}
     CC= g++ -c -D${PLATFORM} -fPIC
     LINK = g++ -D${PLATFORM} -fPIC ${LDFLAGS}
  +  PLATFORM_LIB_LINK_OPTIONS=-Wl,-rpath,${XERCESCROOT}/lib
     ifdef ICUROOT
  -    PLATFORM_LIB_LINK_OPTIONS=-L$(ICUROOT)
  -    EXTRA_LINK_OPTIONS=-licudata -lstdc++ -pthread
  +    PLATFORM_LIB_LINK_OPTIONS+=-L${ICUROOT} -Wl,-rpath,${ICUROOT}
  +    EXTRA_LINK_OPTIONS=-licudata -lstdc++ ${EXTRA_LIBS}
     else
  -    PLATFORM_LIB_LINK_OPTIONS=
  -    EXTRA_LINK_OPTIONS=-lstdc++ -pthread
  +    EXTRA_LINK_OPTIONS=${EXTRA_LIBS} -lstdc++
     endif
     SHLIBSUFFIX=.so
   endif
  @@ -260,7 +260,7 @@
   endif
   LINK =  ${CC} ${LDFLAGS}
   PLATFORM_LIB_LINK_OPTIONS=
  -EXTRA_LINK_OPTIONS =
  +EXTRA_LINK_OPTIONS=${EXTRA_LIBS}
   SHLIBSUFFIX=.dll
   OS390SIDEDECK=.x
   ## OS390BATCH
  
  
  
  1.21      +75 -19    xml-xerces/c/samples/configure
  
  Index: configure
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/configure,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- configure	21 May 2002 19:13:17 -0000	1.20
  +++ configure	5 Jul 2002 16:21:32 -0000	1.21
  @@ -1001,8 +1001,56 @@
   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 <<EOF
  +#line 1014 "configure"
  +#include "confdefs.h"
  +/* Override any gcc2 internal prototype to avoid an error.  */
  +/* We use char because int might match the return type of a gcc2
  +    builtin and then its argument prototype would still apply.  */
  +char floor();
  +
  +int main() {
  +floor()
  +; return 0; }
  +EOF
  +if { (eval echo configure:1025: \"$ac_link\") 1>&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 <<EOF
  +#define $ac_tr_lib 1
  +EOF
  +
  +  LIBS="-lm $LIBS"
  +
  +else
  +  echo "$ac_t""no" 1>&6
  +fi
  +
  +
   echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
  -echo "configure:1006: checking for pthread_create in -lpthread" >&5
  +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
  @@ -1010,7 +1058,7 @@
     ac_save_LIBS="$LIBS"
   LIBS="-lpthread  $LIBS"
   cat > conftest.$ac_ext <<EOF
  -#line 1014 "configure"
  +#line 1062 "configure"
   #include "confdefs.h"
   /* Override any gcc2 internal prototype to avoid an error.  */
   /* We use char because int might match the return type of a gcc2
  @@ -1021,7 +1069,7 @@
   pthread_create()
   ; return 0; }
   EOF
  -if { (eval echo configure:1025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  +if { (eval echo configure:1073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     rm -rf conftest*
     eval "ac_cv_lib_$ac_lib_var=yes"
   else
  @@ -1050,7 +1098,7 @@
   
   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:1054: checking for pthread_create in -lpthreads" >&5
  +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
  @@ -1058,7 +1106,7 @@
     ac_save_LIBS="$LIBS"
   LIBS="-lpthreads  $LIBS"
   cat > conftest.$ac_ext <<EOF
  -#line 1062 "configure"
  +#line 1110 "configure"
   #include "confdefs.h"
   /* Override any gcc2 internal prototype to avoid an error.  */
   /* We use char because int might match the return type of a gcc2
  @@ -1069,7 +1117,7 @@
   pthread_create()
   ; return 0; }
   EOF
  -if { (eval echo configure:1073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  +if { (eval echo configure:1121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     rm -rf conftest*
     eval "ac_cv_lib_$ac_lib_var=yes"
   else
  @@ -1099,7 +1147,7 @@
   fi
   
   echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  -echo "configure:1103: checking how to run the C preprocessor" >&5
  +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=
  @@ -1114,13 +1162,13 @@
     # On the NeXT, cc -E runs the code through the compiler's parser,
     # not just through cpp.
     cat > conftest.$ac_ext <<EOF
  -#line 1118 "configure"
  +#line 1166 "configure"
   #include "confdefs.h"
   #include <assert.h>
   Syntax Error
   EOF
   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  -{ (eval echo configure:1124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  +{ (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
     :
  @@ -1131,13 +1179,13 @@
     rm -rf conftest*
     CPP="${CC-cc} -E -traditional-cpp"
     cat > conftest.$ac_ext <<EOF
  -#line 1135 "configure"
  +#line 1183 "configure"
   #include "confdefs.h"
   #include <assert.h>
   Syntax Error
   EOF
   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  -{ (eval echo configure:1141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  +{ (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
     :
  @@ -1148,13 +1196,13 @@
     rm -rf conftest*
     CPP="${CC-cc} -nologo -E"
     cat > conftest.$ac_ext <<EOF
  -#line 1152 "configure"
  +#line 1200 "configure"
   #include "confdefs.h"
   #include <assert.h>
   Syntax Error
   EOF
   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  -{ (eval echo configure:1158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  +{ (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
     :
  @@ -1182,17 +1230,17 @@
   do
   ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
   echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  -echo "configure:1186: checking for $ac_hdr" >&5
  +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
  -#line 1191 "configure"
  +#line 1239 "configure"
   #include "confdefs.h"
   #include <$ac_hdr>
   EOF
   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  -{ (eval echo configure:1196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  +{ (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*
  @@ -1232,7 +1280,7 @@
   fi
   
   echo $ac_n "checking host system type""... $ac_c" 1>&6
  -echo "configure:1236: checking host system type" >&5
  +echo "configure:1284: checking host system type" >&5
   
   host_alias=$host
   case "$host_alias" in
  @@ -1293,9 +1341,16 @@
   
   ldflags=${LDFLAGS}
   
  +
  +threads=${THREADS}
  +
  +
   bitstobuild=${BITSTOBUILD}
   
   
  +extra_libs=${EXTRA_LIBS}
  +
  +
   trap '' 1 2 15
   cat > confcache <<\EOF
   # This file is a shell script that caches the results of configure
  @@ -1472,6 +1527,8 @@
   s%@cxxflags@%$cxxflags%g
   s%@cflags@%$cflags%g
   s%@ldflags@%$ldflags%g
  +s%@threads@%$threads%g
  +s%@extra_libs@%$extra_libs%g
   s%@bitstobuild@%$bitstobuild%g
   
   CEOF
  @@ -1600,5 +1657,4 @@
   
   
   echo
  -echo Having build problems?
  -echo   Read instructions at http://xml.apache.org/xerces-c/build.html
  +echo Having build problems? Read instructions at http://xml.apache.org/xerces-c/build.html
  
  
  
  1.19      +11 -2     xml-xerces/c/samples/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/configure.in,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- configure.in	21 May 2002 19:13:17 -0000	1.18
  +++ configure.in	5 Jul 2002 16:21:32 -0000	1.19
  @@ -7,6 +7,9 @@
   AC_PROG_INSTALL
   AC_CHECK_PROG(AUTOCONF, autoconf, autoconf, true)
   
  +dnl Checks for libraries
  +AC_CHECK_LIB(m, floor)
  +
   dnl special pthread handling (AIX uses pthreads instead of pthread)
   AC_CHECK_LIB(pthread, pthread_create)
   if test $ac_cv_lib_pthread_pthread_create = no; then
  @@ -67,9 +70,15 @@
   ldflags=${LDFLAGS}
   AC_SUBST(ldflags)
   
  +threads=${THREADS}
  +AC_SUBST(threads)
  +
   bitstobuild=${BITSTOBUILD}
   AC_SUBST(bitstobuild)
   
  +extra_libs=${EXTRA_LIBS}
  +AC_SUBST(extra_libs)
  +
   dnl output the Makefiles
   AC_OUTPUT([Makefile \
   SAXCount/Makefile \
  @@ -87,5 +96,5 @@
   CreateDOMDocument/Makefile])
   
   echo
  -echo Having build problems?
  -echo   Read instructions at http://xml.apache.org/xerces-c/build.html
  +echo Having build problems? Read instructions at http://xml.apache.org/xerces-c/build.html
  +
  
  
  
  1.31      +209 -44   xml-xerces/c/samples/runConfigure
  
  Index: runConfigure
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/runConfigure,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- runConfigure	3 Jul 2002 22:24:16 -0000	1.30
  +++ runConfigure	5 Jul 2002 16:21:32 -0000	1.31
  @@ -60,8 +60,22 @@
   #
   
   #
  -# runConfigure : This script will run the "configure" script for the appropriate platform
  -# Only supported platforms are recognized
  +# runConfigure:
  +#    This script will run the "configure" script for the appropriate
  +#    platform. Only supported platforms are recognized.
  +#
  +# The following variables are defined and exported at the end of this
  +# script.
  +#
  +# THREADS
  +# BITSTOBUILD
  +# CC
  +# CXX
  +# CXXFLAGS
  +# CFLAGS
  +# LDFLAGS
  +# EXTRA_LIBS
  +#
   
   usage()
   {
  @@ -69,11 +83,12 @@
       echo "Usage: runConfigure \"options\""
       echo "       where options may be any of the following:"
       echo "       -p <platform> (accepts 'aix', 'linux', 'freebsd', 'solaris',
  -            'hp-10', 'hp-11', 'openserver', 'unixware', 'os400', 'irix',
  -            'ptx', 'tru64', 'macosx')"
  -    echo "       -c <C compiler name> (e.g. gcc, xlc, icc or ecc)"
  -    echo "       -x <C++ compiler name> (e.g. g++, xlC, icc or ecc)"
  +                 'hp-10', 'hp-11', 'openserver', 'unixware', 'os400', 'irix',
  +                 'ptx', 'tru64', 'macosx')"
  +    echo "       -c <C compiler name> (e.g. gcc, cc, xlc_r, icc or ecc)"
  +    echo "       -x <C++ compiler name> (e.g. g++, CC, xlC_r, icc or ecc)"
       echo "       -d (specifies that you want to build debug version)"
  +    echo "       -r <thread option> can be 'pthread' or 'dce' (AIX, HP-11, and Solaris) or 'sproc' (IRIX) or 'none'"
       echo "       -b <bitsToBuild> (accepts '64', '32')"
       echo "       -l <extra linker options>"
       echo "       -z <extra compiler options>"
  @@ -104,9 +119,9 @@
   
   # Check the command line parameters
   if test -x /usr/bin/getopt; then
  -getoptErr=`getopt p:c:x:dm:n:t:r:l:b:z:h $*`
  +getoptErr=`getopt p:c:x:d:r:b:l:z:h $*`
   else
  -getoptErr=`getopts p:c:x:dm:n:t:r:l:b:z:h `$*``
  +getoptErr=`getopts p:c:x:d:r:b:l:z:h `$*``
   fi
   if [ $? != 0 ]
      then
  @@ -116,14 +131,15 @@
   
   # Now get the command line parameters
   if test -x /usr/bin/getopt; then
  -set -- `getopt p:c:x:dm:n:t:r:l:b:z:h $*`
  +set -- `getopt p:c:x:d:r:b:l:z:h $*`
   else
  -set --`getopts p:c:x:dm:n:t:r:l:b:z:h `$*``
  +set -- `getopts p:c:x:d:r:b:l:z:h `$*``
   fi
   
   # Set up the default values for each parameter
   debug=off                # by default debug is off
  -compileroptions=""
  +transcoder=native        # by default use native transcoder
  +thread=none              # by default no need to have threads
   bitsToBuild=32           # by default 32 bit build assumed
   while [ $# -gt 0 ]
      do
  @@ -140,6 +156,10 @@
      -d)
           debug=on; shift;;
   
  +   -r)
  +        thread=$2; shift 2;;
  +
  +
      -b)
           bitsToBuild=$2; shift 2;;
   
  @@ -163,17 +183,11 @@
      esac
   done
   
  -if test $platform = "aix"; then
  -      if test ! -n "$ccompiler" -o ! -n "$cppcompiler"; then
  -              ccompiler=xlc
  -              cppcompiler=xlC
  -      fi
  -fi
  -
   echo "Generating makefiles with the following options ..."
   echo "Platform: $platform"
   echo "C Compiler: $ccompiler"
   echo "C++ Compiler: $cppcompiler"
  +echo "Thread option: $thread"
   echo "bitsToBuild option: $bitsToBuild"
   echo "Extra compile options: $compileroptions"
   echo "Extra link options: $linkeroptions"
  @@ -210,22 +224,118 @@
   fi
   
   #
  -# Set the C compiler and C++ compiler environment variables
  +# Check for the threading option
   #
  -case $cppcompiler in
  -   xlC* | xlc* | g++ | c++ | cc | CC | aCC | icc | ICC | cxx | ecc)
  -      ;;
  -
  -   *)
  -      echo "I do not recognize the C++ compiler '$cppcompiler'. Continuing anyway ..."
  -      ;;
  -esac
  -
  -CC="$ccompiler"
  -export CC
  +if test $thread = "none"; then
  +    THREADS=none
  +    threadingDefines="-DAPP_NO_THREADS -DXML_USE_NO_THREADS"
  +    threadingLibs=""
  +else
  +    THREADS=pthread
  +    threadingDefines="-DXML_USE_PTHREADS"
  +    threadingLibs="-lpthread"
  +    if test $platform = "hp-11"; then
  +        if test $thread; then
  +        case $thread in
  +           pthread)
  +               ;;
  +           dce)
  +               THREADS=dce ;
  +               threadingLibs="-lcma" ;
  +               threadingDefines="-D_PTHREADS_DRAFT4 -D_THREAD_SAFE -DXML_USE_DCE" ;;
  +           *)
  +               echo "I do not recognize the thread option '$thread'. Please type '${0} -h' for help." ;
  +               exit ${ERROR_EXIT_CODE};;
  +        esac
  +        fi
  +    elif test $platform = "openserver"; then
  +        case $thread in
  +           pthread)
  +               if test $cppcompiler = "g++"; then
  +                  threadingLibs="-Wl,-B,static,-l,pthread,-B,dynamic"
  +               fi
  +               ;;
  +           *)
  +               echo "I do not recognize the thread option '$thread'."
  +               echo "Please type '${0} -h' for help."
  +               exit ${ERROR_EXIT_CODE}
  +               ;;
  +        esac
  +    elif test $platform = "freebsd"; then
  +        threadingLibs="-pthread -lc_r"
  +        threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS"
  +    elif test $platform = "aix"; then
  +        aix_version=`./config.guess`;
  +        echo Found host system to be $aix_version
  +        case $aix_version in
  +           *4.3*)
  +              ## Linkflags control the use of libpthreads on AIX
  +              threadingLibs="-lpthreads_compat";;
  +           *)
  +              threadingLibs="-lpthreads";;
  +        esac
  +        if test $thread; then
  +        case $thread in
  +           pthread)
  +               ;;
  +           dce)
  +               THREADS=dce ;
  +               threadingDefines="-DXML_USE_DCE"
  +               case $aix_version in
  +                  *4.3*)
  +                     ## Linkflags control the use of libpthreads on AIX
  +                     threadingLibs="-ldcelibc_r -ldcepthreads -lpthreads_compat";;
  +                  *)
  +                     threadingLibs="-lC_r -lC -ldcelibc_r -ldcepthreads";;
  +               esac
  +               ;;
  +           *)
  +               echo "I do not recognize the thread option '$thread'. Please type '${0} -h' for help." ;
  +               exit ${ERROR_EXIT_CODE};;
  +        esac
  +        fi
  +    elif test $platform = "ptx"; then
  +        threadingLibs=" "
  +        if test -z $XMLINSTALL; then
  +            XMLINSTALL=$ICUROOT         ## use either the -C or the -P option now.
  +        fi
  +    elif test $platform = "hp-10"; then
  +        THREADS=dce
  +        threadingLibs="-lcma"
  +        threadingDefines="-DXML_USE_DCE"
  +    elif test $platform = "unixware"; then
  +        threadingLibs=""         ## Linkflags control the use of threads on UnixWare
  +    elif test $platform = "solaris"; then
  +        if test $thread; then
  +        case $thread in
  +           pthread)
  +               ;;
  +           dce)
  +               THREADS=dce ;
  +               threadingLibs="-ldce";
  +               threadingDefines="-DXML_USE_DCE";;
  +           *)
  +               echo "I do not recognize the thread option '$thread'. Please type '${0} -h' for help." ;
  +               exit ${ERROR_EXIT_CODE};;
  +        esac
  +        fi
  +    elif test $platform = "irix"; then
  +        if test $thread; then
  +        case $thread in
  +        pthread)
  +            ;;
  +        sproc)
  +            threadingLibs=" ";
  +            threadingDefines="-DXML_USE_SPROC" ;;
  +        *)
  +            echo "I do not recognize the thread option '$thread'. Please type '${0} -h' for help." ;
  +            exit ${ERROR_EXIT_CODE};;
  +        esac
  +        fi
  +    fi
  +fi
   
  -CXX="$cppcompiler"
  -export CXX
  +export THREADS
   
   #
   # Check for the bitsToBuild option
  @@ -248,7 +358,7 @@
                 bitstobuildLink=" -q64 -qwarn64 " ;;
              hp-11)
                 bitstobuildDefines=" $bitstobuildDefines +DA2.0W "
  -              bitstobuildLink=" +DA2.0W" ;;
  +              bitstobuildLink=" +DA2.0W " ;;
              linux)
                 bitstobuildDefines=" $bitstobuildDefines " ;;
              *)
  @@ -270,15 +380,65 @@
   export BITSTOBUILD
   
   #
  +# Special test for libiconv necessity under FreeBSD
  +#
  +transcodingLibs=""       # by default don't suppose the libiconv is necessary
  +transcodingDefines=""
  +if test $platform = "freebsd"; then
  +    if test -n "${XERCESCROOT}"; then
  +       # try lookup the configuration results
  +       . "${XERCESCROOT}/version.incl"
  +       SOLIBNAME=libxerces-c.so.${SO_TARGET_VERSION}.${SO_TARGET_VERSION_MAJOR}
  +       if test -f "${XERCESCROOT}/src/xercesc/config.log" ; then
  +           if grep XML_USE_LIBICONV "${XERCESCROOT}/src/xercesc/config.log" \
  +              > /dev/null 2>&1 ; then
  +               transcodingLibs=" -L/usr/local/lib -liconv "
  +               transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include "
  +           fi
  +       elif test -f "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" ; then
  +           if nm "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" | \
  +              grep iconv_open > /dev/null 2>&1 ; then
  +               transcodingLibs=" -L/usr/local/lib -liconv "
  +               transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include "
  +           fi
  +       elif test -f "${XERCESCROOT}/lib/${SOLIBNAME}" ; then
  +           if nm "${XERCESCROOT}/lib/${SOLIBNAME}" | \
  +              grep iconv_open > /dev/null 2>&1 ; then
  +               transcodingLibs=" -L/usr/local/lib -liconv "
  +               transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include "
  +           fi
  +       fi
  +    fi
  +fi
  +
  +#
  +# Set the C compiler and C++ compiler environment variables
  +#
  +case $cppcompiler in
  +   xlC* | xlc* | g++ | c++ | cc | CC | aCC | icc | ICC | cxx | ecc)
  +      ;;
  +
  +   *)
  +      echo "I do not recognize the C++ compiler '$cppcompiler'. Continuing anyway ..."
  +      ;;
  +esac
  +
  +CC="$ccompiler"
  +export CC
  +
  +CXX="$cppcompiler"
  +export CXX
  +
  +#
   # Set the extra C and C++ compiler flags
   #
   # include the user defined CXXFLAGS/CFLAGS first in case they have
   # set an platform spefic flags
   #
  -CXXFLAGS="$CXXFLAGS $compileroptions $debugflag $bitstobuildDefines";
  +CXXFLAGS="$CXXFLAGS $compileroptions $debugflag $transcodingDefines $threadingDefines $bitstobuildDefines"
   export CXXFLAGS
   
  -CFLAGS="$CFLAGS $compileroptions $debugflag $bitstobuildDefines";
  +CFLAGS="$CFLAGS $compileroptions $debugflag $transcodingDefines $threadingDefines $bitstobuildDefines"
   export CFLAGS
   
   # gcc crashes if optimisation is turned on in a Tru64 environment
  @@ -288,7 +448,11 @@
       export CXXFLAGS CFLAGS
   fi
   
  -LDFLAGS="$LDFLAGS $linkeroptions $bitstobuildLink"; export LDFLAGS
  +LDFLAGS="$LDFLAGS $linkeroptions $bitstobuildLink"
  +export LDFLAGS
  +
  +EXTRA_LIBS="$transcodingLibs $threadingLibs"
  +export EXTRA_LIBS
   
   echo
   rm -f config.cache
  @@ -309,13 +473,14 @@
   echo
   echo In future, you may also directly type the following commands to create the Makefiles.
   echo
  -echo export CC=$CC
  -echo export CXX=$CXX
  -echo export CXXFLAGS=$CXXFLAGS
  -echo export CFLAGS=$CFLAGS
  -echo export LIBS=$LIBS
  -echo export BITSTOBUILD=$BITSTOBUILD
  -echo export LDFLAGS=$LDFLAGS
  +echo export THREADS=\"$THREADS\"
  +echo export BITSTOBUILD=\"$BITSTOBUILD\"
  +echo export CC=\"$CC\"
  +echo export CXX=\"$CXX\"
  +echo export CXXFLAGS=\"$CXXFLAGS\"
  +echo export CFLAGS=\"$CFLAGS\"
  +echo export LDFLAGS=\"$LDFLAGS\"
  +echo export EXTRA_LIBS=\"$EXTRA_LIBS\"
   echo configure
   
   echo
  
  
  
  1.9       +3 -1      xml-xerces/c/samples/CreateDOMDocument/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/CreateDOMDocument/Makefile.in,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Makefile.in	9 Nov 2000 01:37:11 -0000	1.8
  +++ Makefile.in	5 Jul 2002 16:21:32 -0000	1.9
  @@ -72,6 +72,8 @@
   CXXFLAGS = @cxxflags@
   CFLAGS = @cflags@
   LDFLAGS = @ldflags@
  +THREADS = @threads@
  +EXTRA_LIBS = @extra_libs@
   PREFIX = @prefix@
   
   include ../../version.incl
  
  
  
  1.10      +3 -1      xml-xerces/c/samples/DOMCount/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/DOMCount/Makefile.in,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Makefile.in	9 Nov 2000 01:37:15 -0000	1.9
  +++ Makefile.in	5 Jul 2002 16:21:32 -0000	1.10
  @@ -72,6 +72,8 @@
   CXXFLAGS = @cxxflags@
   CFLAGS = @cflags@
   LDFLAGS = @ldflags@
  +THREADS = @threads@
  +EXTRA_LIBS = @extra_libs@
   PREFIX = @prefix@
   
   include ../../version.incl
  
  
  
  1.12      +3 -1      xml-xerces/c/samples/DOMPrint/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/DOMPrint/Makefile.in,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Makefile.in	29 May 2002 21:19:50 -0000	1.11
  +++ Makefile.in	5 Jul 2002 16:21:33 -0000	1.12
  @@ -73,6 +73,8 @@
   CXXFLAGS = @cxxflags@
   CFLAGS = @cflags@
   LDFLAGS = @ldflags@
  +THREADS = @threads@
  +EXTRA_LIBS = @extra_libs@
   PREFIX = @prefix@
   
   include ../../version.incl
  
  
  
  1.12      +3 -1      xml-xerces/c/samples/EnumVal/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/EnumVal/Makefile.in,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Makefile.in	24 Jan 2001 17:06:07 -0000	1.11
  +++ Makefile.in	5 Jul 2002 16:21:33 -0000	1.12
  @@ -71,6 +71,8 @@
   CXXFLAGS = @cxxflags@
   CFLAGS = @cflags@
   LDFLAGS = @ldflags@
  +THREADS = @threads@
  +EXTRA_LIBS = @extra_libs@
   PREFIX = @prefix@
   
   include ../../version.incl
  
  
  
  1.10      +3 -1      xml-xerces/c/samples/MemParse/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/MemParse/Makefile.in,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Makefile.in	9 Nov 2000 01:37:22 -0000	1.9
  +++ Makefile.in	5 Jul 2002 16:21:33 -0000	1.10
  @@ -72,6 +72,8 @@
   CXXFLAGS = @cxxflags@
   CFLAGS = @cflags@
   LDFLAGS = @ldflags@
  +THREADS = @threads@
  +EXTRA_LIBS = @extra_libs@
   PREFIX = @prefix@
   
   include ../../version.incl
  
  
  
  1.10      +3 -1      xml-xerces/c/samples/PParse/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/PParse/Makefile.in,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Makefile.in	9 Nov 2000 01:37:24 -0000	1.9
  +++ Makefile.in	5 Jul 2002 16:21:33 -0000	1.10
  @@ -72,6 +72,8 @@
   CXXFLAGS = @cxxflags@
   CFLAGS = @cflags@
   LDFLAGS = @ldflags@
  +THREADS = @threads@
  +EXTRA_LIBS = @extra_libs@
   PREFIX = @prefix@
   
   include ../../version.incl
  
  
  
  1.10      +3 -1      xml-xerces/c/samples/Redirect/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/Redirect/Makefile.in,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Makefile.in	9 Nov 2000 01:37:27 -0000	1.9
  +++ Makefile.in	5 Jul 2002 16:21:33 -0000	1.10
  @@ -72,6 +72,8 @@
   CXXFLAGS = @cxxflags@
   CFLAGS = @cflags@
   LDFLAGS = @ldflags@
  +THREADS = @threads@
  +EXTRA_LIBS = @extra_libs@
   PREFIX = @prefix@
   
   include ../../version.incl
  
  
  
  1.4       +3 -1      xml-xerces/c/samples/SAX2Count/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/SAX2Count/Makefile.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.in	9 Nov 2000 01:37:29 -0000	1.3
  +++ Makefile.in	5 Jul 2002 16:21:33 -0000	1.4
  @@ -72,6 +72,8 @@
   CXXFLAGS = @cxxflags@
   CFLAGS = @cflags@
   LDFLAGS = @ldflags@
  +THREADS = @threads@
  +EXTRA_LIBS = @extra_libs@
   PREFIX = @prefix@
   
   include ../../version.incl
  
  
  
  1.4       +3 -1      xml-xerces/c/samples/SAX2Print/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/SAX2Print/Makefile.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.in	9 Nov 2000 01:37:31 -0000	1.3
  +++ Makefile.in	5 Jul 2002 16:21:33 -0000	1.4
  @@ -72,6 +72,8 @@
   CXXFLAGS = @cxxflags@
   CFLAGS = @cflags@
   LDFLAGS = @ldflags@
  +THREADS = @threads@
  +EXTRA_LIBS = @extra_libs@
   PREFIX = @prefix@
   
   include ../../version.incl
  
  
  
  1.10      +3 -1      xml-xerces/c/samples/SAXCount/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/SAXCount/Makefile.in,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Makefile.in	9 Nov 2000 01:37:34 -0000	1.9
  +++ Makefile.in	5 Jul 2002 16:21:33 -0000	1.10
  @@ -72,6 +72,8 @@
   CXXFLAGS = @cxxflags@
   CFLAGS = @cflags@
   LDFLAGS = @ldflags@
  +THREADS = @threads@
  +EXTRA_LIBS = @extra_libs@
   PREFIX = @prefix@
   
   include ../../version.incl
  
  
  
  1.10      +3 -1      xml-xerces/c/samples/SAXPrint/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/SAXPrint/Makefile.in,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Makefile.in	9 Nov 2000 01:37:36 -0000	1.9
  +++ Makefile.in	5 Jul 2002 16:21:33 -0000	1.10
  @@ -72,6 +72,8 @@
   CXXFLAGS = @cxxflags@
   CFLAGS = @cflags@
   LDFLAGS = @ldflags@
  +THREADS = @threads@
  +EXTRA_LIBS = @extra_libs@
   PREFIX = @prefix@
   
   include ../../version.incl
  
  
  
  1.4       +6 -1      xml-xerces/c/samples/SEnumVal/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/SEnumVal/Makefile.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.in	21 Nov 2001 22:09:49 -0000	1.3
  +++ Makefile.in	5 Jul 2002 16:21:33 -0000	1.4
  @@ -55,6 +55,9 @@
   # 
   # $Id$
   # $Log$
  +# Revision 1.4  2002/07/05 16:21:33  tng
  +# [Bug 10252] Modify FreeBSD build environment for the samples.   Patch from Max Gotlib.
  +#
   # Revision 1.3  2001/11/21 22:09:49  peiyongz
   # Copy Right date
   #
  @@ -78,6 +81,8 @@
   CXXFLAGS = @cxxflags@
   CFLAGS = @cflags@
   LDFLAGS = @ldflags@
  +THREADS = @threads@
  +EXTRA_LIBS = @extra_libs@
   PREFIX = @prefix@
   
   include ../../version.incl
  
  
  
  1.11      +3 -1      xml-xerces/c/samples/StdInParse/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/StdInParse/Makefile.in,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Makefile.in	9 Nov 2000 01:37:38 -0000	1.10
  +++ Makefile.in	5 Jul 2002 16:21:33 -0000	1.11
  @@ -72,6 +72,8 @@
   CXXFLAGS = @cxxflags@
   CFLAGS = @cflags@
   LDFLAGS = @ldflags@
  +THREADS = @threads@
  +EXTRA_LIBS = @extra_libs@
   PREFIX = @prefix@
   
   include ../../version.incl
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org