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:19:40 UTC
cvs commit: xml-xerces/c/tests configure configure.in Makefile.incl runConfigure
tng 2002/07/05 09:19:40
Modified: c/tests configure configure.in Makefile.incl runConfigure
Log:
modify *configure files to be more consistent across src, samples and tests
Revision Changes Path
1.19 +6 -3 xml-xerces/c/tests/configure
Index: configure
===================================================================
RCS file: /home/cvs/xml-xerces/c/tests/configure,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- configure 21 May 2002 18:40:34 -0000 1.18
+++ configure 5 Jul 2002 16:19:40 -0000 1.19
@@ -1303,12 +1303,13 @@
case "${host}" in
*-*-solaris*) platform=SOLARIS ;;
+ *-*-sco*) platform=OPENSERVER ;;
*-*-sysv5*) platform=UNIXWARE ;;
*-*-UnixWare*) platform=UNIXWARE ;;
- *-*-*unixware*) platform=UNIXWARE ;;
+ *-*-*unixware*) platform=UNIXWARE ;;
*-*-sysv5uw7*) platform=UNIXWARE ;;
*-*-linux*) platform=LINUX ;;
- *-*-freebsd*) platform=FREEBSD ;;
+ *-*-freebsd*) platform=FREEBSD ;;
*-*-irix*) platform=IRIX ;;
*-*-aix*) platform=AIX ;;
*-*-hp*) platform=HPUX ;
@@ -1320,7 +1321,7 @@
*-*-mvs*) platform=OS390 ;;
*-*-os400*) platform=OS400 ;;
*-*-OS400*) platform=OS400 ;;
- *-*-osf*) platform=TRU64 ;;
+ *-*-osf*) platform=TRU64 ;;
*-apple-*) platform=MACOSX ;;
*) platform=UNKNOWN ;;
esac
@@ -1343,7 +1344,9 @@
threads=${THREADS}
+
bitstobuild=${BITSTOBUILD}
+
extra_libs=${EXTRA_LIBS}
1.23 +4 -3 xml-xerces/c/tests/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/xml-xerces/c/tests/configure.in,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- configure.in 21 May 2002 18:40:34 -0000 1.22
+++ configure.in 5 Jul 2002 16:19:40 -0000 1.23
@@ -31,12 +31,13 @@
dnl Platform-specific Makefile setup
case "${host}" in
*-*-solaris*) platform=SOLARIS ;;
+ *-*-sco*) platform=OPENSERVER ;;
*-*-sysv5*) platform=UNIXWARE ;;
*-*-UnixWare*) platform=UNIXWARE ;;
- *-*-*unixware*) platform=UNIXWARE ;;
+ *-*-*unixware*) platform=UNIXWARE ;;
*-*-sysv5uw7*) platform=UNIXWARE ;;
*-*-linux*) platform=LINUX ;;
- *-*-freebsd*) platform=FREEBSD ;;
+ *-*-freebsd*) platform=FREEBSD ;;
*-*-irix*) platform=IRIX ;;
*-*-aix*) platform=AIX ;;
*-*-hp*) platform=HPUX ;
@@ -48,7 +49,7 @@
*-*-mvs*) platform=OS390 ;;
*-*-os400*) platform=OS400 ;;
*-*-OS400*) platform=OS400 ;;
- *-*-osf*) platform=TRU64 ;;
+ *-*-osf*) platform=TRU64 ;;
*-apple-*) platform=MACOSX ;;
*) platform=UNKNOWN ;;
esac
1.26 +12 -2 xml-xerces/c/tests/Makefile.incl
Index: Makefile.incl
===================================================================
RCS file: /home/cvs/xml-xerces/c/tests/Makefile.incl,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- Makefile.incl 3 Jul 2002 22:24:57 -0000 1.25
+++ Makefile.incl 5 Jul 2002 16:19:40 -0000 1.26
@@ -113,6 +113,16 @@
SHLIBSUFFIX=.so
endif
+#=============== OPENSERVER SPECIFIC OPTIONS =========================
+ifeq (${PLATFORM}, OPENSERVER)
+ CC=${COMPILER} -D${PLATFORM} -fPIC
+ CMP=-c ${CXXFLAGS}
+ LINK=${CC} ${LDFLAGS}
+ EXTRA_LINK_OPTIONS=-lc -lsocket ${EXTRA_LIBS}
+ PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
+ SHLIBSUFFIX=.so
+endif
+
#=============== UNIXWARE SPECIFIC OPTIONS =========================
ifeq (${PLATFORM}, UNIXWARE)
CMP= -O2 -c ${CXXFLAGS} -pthread
@@ -250,7 +260,7 @@
endif
LINK = ${CC} ${LDFLAGS}
PLATFORM_LIB_LINK_OPTIONS=
-EXTRA_LINK_OPTIONS =${EXTRA_LIBS}
+EXTRA_LINK_OPTIONS=${EXTRA_LIBS}
SHLIBSUFFIX=.dll
OS390SIDEDECK=.x
## OS390BATCH
1.21 +84 -63 xml-xerces/c/tests/runConfigure
Index: runConfigure
===================================================================
RCS file: /home/cvs/xml-xerces/c/tests/runConfigure,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- runConfigure 3 Jul 2002 22:24:57 -0000 1.20
+++ runConfigure 5 Jul 2002 16:19:40 -0000 1.21
@@ -60,20 +60,35 @@
#
#
-# 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()
{
echo "runConfigure: Helper script to run \"configure\" for one of the supported platforms"
echo "Usage: runConfigure \"options\""
echo " where options may be any of the following:"
- echo " -p <platform> (accepts 'aix', 'unixware', 'linux', 'freebsd', 'solaris',
-'hp-10', 'hp-11', '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)"
+ 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, 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' (only used on aix, HP-11 and solaris) or 'sproc' (only on IRIX) or 'none'"
+ 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:b:l:z:h $*`
+getoptErr=`getopt p:c:x:d:r:b:l:z:h $*`
else
-getoptErr=`getopts p:c:x:dm:n:t:r:b:l:z:h `$*``
+getoptErr=`getopts p:c:x:d:r:b:l:z:h `$*``
fi
if [ $? != 0 ]
then
@@ -116,19 +131,16 @@
# Now get the command line parameters
if test -x /usr/bin/getopt; then
-set -- `getopt p:c:x:dm:n:t:r:b:l:z:h $*`
+set -- `getopt p:c:x:d:r:b:l:z:h $*`
else
-set -- `getopts p:c:x:dm:n:t:r:b:l: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
transcoder=native # by default use native transcoder
-msgloader=iconv # by default use native transcoder
-netaccessor=fileonly # by default use fileonly
thread=pthread # by default use POSIX threads
-compileroptions=""
-bitsToBuild=32 # by default 32 bit build assumed
+bitsToBuild=32 # by default 32 bit build assumed
while [ $# -gt 0 ]
do
@@ -171,27 +183,20 @@
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 "Extra compile options: $compileroptions"
-echo "Extra link options: $linkeroptions"
echo "Thread option: $thread"
echo "bitsToBuild option: $bitsToBuild"
+echo "Extra compile options: $compileroptions"
+echo "Extra link options: $linkeroptions"
#
# Now check if the options are correct or not, bail out if incorrect
#
case $platform in
- aix | unixware | linux | freebsd | solaris | hp-10 | hp-11 | os400 | irix | ptx | tru64 | macosx)
+ aix | openserver | unixware | linux | freebsd | solaris | hp-10 | hp-11 | os400 | irix | ptx | tru64 | macosx)
# platform has been recognized
;;
*)
@@ -223,8 +228,8 @@
#
if test $thread = "none"; then
THREADS=none
- threadingLibs=""
threadingDefines="-DAPP_NO_THREADS -DXML_USE_NO_THREADS"
+ threadingLibs=""
else
THREADS=pthread
threadingDefines="-DXML_USE_PTHREADS"
@@ -243,9 +248,22 @@
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"
+ 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
@@ -286,7 +304,7 @@
threadingLibs="-lcma"
threadingDefines="-DXML_USE_DCE"
elif test $platform = "unixware"; then
- threadingLibs="" ## Linkflags control the use of threads on UnixWare
+ threadingLibs="" ## Linkflags control the use of threads on UnixWare
elif test $platform = "solaris"; then
if test $thread; then
case $thread in
@@ -297,7 +315,7 @@
threadingLibs="-ldce";
threadingDefines="-DXML_USE_DCE";;
*)
- echo "I do not recognize the thread option '$thread'. Please type '${0} -h' for help."
+ echo "I do not recognize the thread option '$thread'. Please type '${0} -h' for help." ;
exit ${ERROR_EXIT_CODE};;
esac
fi
@@ -306,12 +324,11 @@
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."
+ echo "I do not recognize the thread option '$thread'. Please type '${0} -h' for help." ;
exit ${ERROR_EXIT_CODE};;
esac
fi
@@ -340,8 +357,8 @@
bitstobuildDefines=" $bitstobuildDefines -q64 -qwarn64 "
bitstobuildLink=" -q64 -qwarn64 " ;;
hp-11)
- bitstobuildDefines=" $bitstobuildDefines +DA2.0W"
- bitstobuildLink=" +DA2.0W" ;;
+ bitstobuildDefines=" $bitstobuildDefines +DA2.0W "
+ bitstobuildLink=" +DA2.0W " ;;
linux)
bitstobuildDefines=" $bitstobuildDefines " ;;
*)
@@ -363,23 +380,6 @@
export BITSTOBUILD
#
-# 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
-
# Special test for libiconv necessity under FreeBSD
#
transcodingLibs="" # by default don't suppose the libiconv is necessary
@@ -412,15 +412,33 @@
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 $threadingDefines $transcodingDefines $bitstobuildDefines";
+CXXFLAGS="$CXXFLAGS $compileroptions $debugflag $transcodingDefines $threadingDefines $bitstobuildDefines"
export CXXFLAGS
-CFLAGS="$CFLAGS $compileroptions $debugflag $threadingDefines $transcodingDefines $bitstobuildDefines";
+CFLAGS="$CFLAGS $compileroptions $debugflag $transcodingDefines $threadingDefines $bitstobuildDefines"
export CFLAGS
# gcc crashes if optimisation is turned on in a Tru64 environment
@@ -430,8 +448,11 @@
export CXXFLAGS CFLAGS
fi
-LDFLAGS="$LDFLAGS $linkeroptions $bitstobuildLink"; export LDFLAGS
-EXTRA_LIBS="$threadingLibs $transcodingLibs"; export EXTRA_LIBS
+LDFLAGS="$LDFLAGS $linkeroptions $bitstobuildLink"
+export LDFLAGS
+
+EXTRA_LIBS="$transcodingLibs $threadingLibs"
+export EXTRA_LIBS
echo
rm -f config.cache
@@ -453,13 +474,13 @@
echo In future, you may also directly type the following commands to create the Makefiles.
echo
echo export THREADS=\"$THREADS\"
-echo export CC=$CC
-echo export CXX=$CXX
-echo export CXXFLAGS=$CXXFLAGS
-echo export CFLAGS=$CFLAGS
-echo export EXTRA_LIBS=$EXTRA_LIBS
-echo export LDFLAGS=$LDFLAGS
-echo export BITSTOBUILD=$BITSTOBUILD
+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
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org