You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by pe...@apache.org on 2002/04/22 21:11:07 UTC
cvs commit: xml-xerces/c/samples runConfigure Makefile.in configure.in configure
peiyongz 02/04/22 12:11:07
Modified: c/samples runConfigure Makefile.in configure.in configure
Log:
Building 64 on UNIX platform
Revision Changes Path
1.27 +55 -8 xml-xerces/c/samples/runConfigure
Index: runConfigure
===================================================================
RCS file: /home/cvs/xml-xerces/c/samples/runConfigure,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- runConfigure 27 Feb 2002 22:37:55 -0000 1.26
+++ runConfigure 22 Apr 2002 19:11:07 -0000 1.27
@@ -56,7 +56,7 @@
#
#
-# $Id: runConfigure,v 1.26 2002/02/27 22:37:55 peiyongz Exp $
+# $Id: runConfigure,v 1.27 2002/04/22 19:11:07 peiyongz Exp $
#
#
@@ -74,6 +74,7 @@
echo " -c <C compiler name> (e.g. gcc, xlc or icc)"
echo " -x <C++ compiler name> (e.g. g++, xlC, or icc)"
echo " -d (specifies that you want to build debug version)"
+ echo " -b <bitsToBuild> (accepts '64', '32')"
echo " -l <extra linker options>"
echo " -z <extra compiler options>"
echo " -h (get help on the above commands)"
@@ -103,9 +104,9 @@
# Check the command line parameters
if test -x /usr/bin/getopt; then
-getoptErr=`getopt p:c:x:dm:n:t:r:l:z:h $*`
+getoptErr=`getopt p:c:x:dm:n:t:r:l:b:z:h $*`
else
-getoptErr=`getopts p:c:x:dm:n:t:r:l:z:h `$*``
+getoptErr=`getopts p:c:x:dm:n:t:r:l:b:z:h `$*``
fi
if [ $? != 0 ]
then
@@ -115,14 +116,15 @@
# Now get the command line parameters
if test -x /usr/bin/getopt; then
-set -- `getopt p:c:x:dm:n:t:r:l:z:h $*`
+set -- `getopt p:c:x:dm:n:t:r:l:b:z:h $*`
else
-set --`getopts p:c:x:dm:n:t:r:l:z:h `$*``
+set --`getopts p:c:x:dm:n:t:r:l:b:z:h `$*``
fi
# Set up the default values for each parameter
debug=off # by default debug is off
compileroptions=""
+bitsToBuild=32 # by default 32 bit build assumed
while [ $# -gt 0 ]
do
case $1 in
@@ -137,6 +139,9 @@
-d)
debug=on; shift;;
+
+ -b)
+ bitsToBuild=$2; shift 2;;
-z)
compileroptions="$compileroptions $2"; shift 2;;
@@ -169,6 +174,7 @@
echo "Platform: $platform"
echo "C Compiler: $ccompiler"
echo "C++ Compiler: $cppcompiler"
+echo "bitsToBuild option: $bitsToBuild"
echo "Extra compile options: $compileroptions"
echo "Extra link options: $linkeroptions"
@@ -222,13 +228,53 @@
export CXX
#
+# Check for the bitsToBuild option
+#
+
+#
+# aix | linux | hp-11 | solaris |
+# hp-10 | freebsd | irix | openserver | unixware | os400 | ptx | tru64 | macosx
+#
+if test $bitsToBuild = 64; then
+ bitstobuildDefines=" -DXML_BITSTOBUILD_64 "
+ if test $platform; then
+ case $platform in
+ solaris)
+ bitstobuildDefines=" $bitstobuildDefines -xarch=v9 " ;;
+ aix)
+ bitstobuildDefines=" $bitstobuildDefines -q64 -qwarn64 " ;;
+ hp-11)
+ bitstobuildDefines=" $bitstobuildDefines +DD64 " ;;
+ linux)
+ bitstobuildDefines=" $bitstobuildDefines " ;;
+ *)
+ ;;
+ esac
+ fi
+elif test $bitsToBuild = 32; then
+ bitstobuildDefines=" "
+else
+ echo "I do not recognize the bitsToBuild '$bitsToBuild'. Please type '${0} -h' for help."
+ exit ${ERROR_EXIT_CODE};
+fi
+
+#
+# to export in case it is needed in Makefile.in/Makefine.incl
+#
+BITSTOBUILD=$bitsToBuild
+export BITSTOBUILD
+
+#
# 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"; export CXXFLAGS
-CFLAGS="$CFLAGS $compileroptions $debugflag"; export CFLAGS
+CXXFLAGS="$CXXFLAGS $compileroptions $debugflag $bitstobuildDefines";
+export CXXFLAGS
+
+CFLAGS="$CFLAGS $compileroptions $debugflag $bitstobuildDefines";
+export CFLAGS
# gcc crashes if optimisation is turned on in a Tru64 environment
if [ $platform = "tru64" -a $CXX = "g++" ]; then
@@ -237,7 +283,7 @@
export CXXFLAGS CFLAGS
fi
-LDFLAGS="$LDFLAGS $linkeroptions"; export LDFLAGS
+LDFLAGS="$LDFLAGS $linkeroptions $bitstobuildDefines"; export LDFLAGS
echo
rm -f config.cache
@@ -263,6 +309,7 @@
echo export CXXFLAGS=$CXXFLAGS
echo export CFLAGS=$CFLAGS
echo export LIBS=$LIBS
+echo export BITSTOBUILD=$BITSTOBUILD
echo export LDFLAGS=$LDFLAGS
echo configure
1.15 +2 -1 xml-xerces/c/samples/Makefile.in
Index: Makefile.in
===================================================================
RCS file: /home/cvs/xml-xerces/c/samples/Makefile.in,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- Makefile.in 11 Feb 2002 18:19:18 -0000 1.14
+++ Makefile.in 22 Apr 2002 19:11:07 -0000 1.15
@@ -54,7 +54,7 @@
# <http://www.apache.org/>.
#
#
-# $Id: Makefile.in,v 1.14 2002/02/11 18:19:18 tng Exp $
+# $Id: Makefile.in,v 1.15 2002/04/22 19:11:07 peiyongz Exp $
#
SAXPrint_DIR=SAXPrint
@@ -80,6 +80,7 @@
CXXFLAGS = @cxxflags@
CFLAGS = @cflags@
PREFIX = @prefix@
+BITSTOBUILD = @bitstobuild@
all:: saxprint sax2print saxcount sax2count domprint domcount idomprint idomcount redirect memparse pparse stdinparse enumval senumval createdomdocument
1.17 +3 -0 xml-xerces/c/samples/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/xml-xerces/c/samples/configure.in,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- configure.in 27 Feb 2002 22:37:55 -0000 1.16
+++ configure.in 22 Apr 2002 19:11:07 -0000 1.17
@@ -67,6 +67,9 @@
ldflags=${LDFLAGS}
AC_SUBST(ldflags)
+bitstobuild=${BITSTOBUILD}
+AC_SUBST(bitstobuild)
+
dnl output the Makefiles
AC_OUTPUT([Makefile \
SAXCount/Makefile \
1.19 +3 -0 xml-xerces/c/samples/configure
Index: configure
===================================================================
RCS file: /home/cvs/xml-xerces/c/samples/configure,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- configure 27 Feb 2002 22:37:55 -0000 1.18
+++ configure 22 Apr 2002 19:11:07 -0000 1.19
@@ -1293,6 +1293,8 @@
ldflags=${LDFLAGS}
+bitstobuild=${BITSTOBUILD}
+
trap '' 1 2 15
cat > confcache <<\EOF
@@ -1472,6 +1474,7 @@
s%@cxxflags@%$cxxflags%g
s%@cflags@%$cflags%g
s%@ldflags@%$ldflags%g
+s%@bitstobuild@%$bitstobuild%g
CEOF
EOF
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org