amassari 2004/03/15 09:06:58
Modified: c/samples runConfigure
c/src/xercesc runConfigure
c/tests runConfigure
Log:
- Added support for MinGW (bug#23176)
- Look for getopt in more places, and use getops properly if not found (bug#18668)
Revision Changes Path
1.42 +95 -62 xml-xerces/c/samples/runConfigure
Index: runConfigure
===================================================================
RCS file: /home/cvs/xml-xerces/c/samples/runConfigure,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- runConfigure 13 Jan 2004 19:42:18 -0000 1.41
+++ runConfigure 15 Mar 2004 17:06:58 -0000 1.42
@@ -85,7 +85,8 @@
echo " where options may be any of the following:"
echo " -p <platform> (accepts 'aix', 'beos', 'linux', 'freebsd', 'netbsd',
'solaris', 'hp-10', 'hp-11', 'openserver', 'unixware',
- 'os400', 'irix', 'ptx', 'tru64', 'macosx', 'cygwin')
+ 'os400', 'irix', 'ptx', 'tru64', 'macosx', 'cygwin', 'qnx',
+ 'interix', 'mingw-msys')
[required: no default]"
echo " -c <C compiler name> (e.g. gcc, cc, xlc_r, icc or ecc)"
echo " [default is make default; cc for gnu make]"
@@ -126,71 +127,100 @@
exit ${ERROR_EXIT_CODE}
fi
-# Check the command line parameters
-if test -x /usr/bin/getopt; then
-getoptErr=`getopt p:c:x:dr:b:l:z:h $*`
-else
-getoptErr=`getopts p:c:x:dr:b:l:z:h `$*``
-fi
-if [ $? != 0 ]
- then
- usage
- exit ${ERROR_EXIT_CODE}
-fi
-
-# Now get the command line parameters
-if test -x /usr/bin/getopt; then
-set -- `getopt p:c:x:dr:b:l:z:h $*`
-else
-set -- `getopts p:c:x:dr: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
thread=none # by default no need to have threads
bitsToBuild=32 # by default 32 bit build assumed
-while [ $# -gt 0 ]
- do
- case $1 in
- -p)
- platform=$2; shift 2;;
-
- -c)
- ccompiler=$2; shift 2;;
-
- -x)
- cppcompiler=$2; shift 2;;
- -d)
- debug=on; shift;;
-
- -r)
- thread=$2; shift 2;;
-
-
- -b)
- bitsToBuild=$2; shift 2;;
-
- -z)
- compileroptions="$compileroptions $2"; shift 2;;
-
- -l)
- linkeroptions="$linkeroptions $2"; shift 2;;
-
- -h)
- usage
- exit ${ERROR_EXIT_CODE};;
-
- --)
- shift; break;;
-
- *)
- echo "unknown option $1"
- usage
- exit ${ERROR_EXIT_CODE};;
- esac
-done
+# Check the command line parameters
+if test -x /usr/bin/getopt; then
+ getoptErr=`getopt p:c:x:dr:b:l:z:h $*`
+ if [ $? != 0 ]
+ then
+ usage
+ exit ${ERROR_EXIT_CODE}
+ fi
+ # Now get the command line parameters
+ set -- `getopt p:c:x:dr:b:l:z:h $*`
+ while [ $# -gt 0 ]
+ do
+ case $1 in
+ -p)
+ platform=$2; shift 2;;
+
+ -c)
+ ccompiler=$2; shift 2;;
+
+ -x)
+ cppcompiler=$2; shift 2;;
+
+ -d)
+ debug=on; shift;;
+
+ -r)
+ thread=$2; shift 2;;
+
+ -b)
+ bitsToBuild=$2; shift 2;;
+
+ -z)
+ compileroptions="$compileroptions $2"; shift 2;;
+
+ -l)
+ linkeroptions="$linkeroptions $2"; shift 2;;
+
+ -h)
+ usage
+ exit ${ERROR_EXIT_CODE};;
+
+ --)
+ shift; break;;
+
+ *)
+ echo "unknown option $1"
+ usage
+ exit ${ERROR_EXIT_CODE};;
+ esac
+ done
+else
+ while getopts "p:c:x:dr:b:l:z:h" switch; do
+ case $switch in
+ p)
+ platform=$OPTARG;;
+
+ c)
+ ccompiler=$OPTARG;;
+
+ x)
+ cppcompiler=$OPTARG;;
+
+ d)
+ debug=on;;
+
+ r)
+ thread=$OPTARG;;
+
+ b)
+ bitsToBuild=$OPTARG;;
+
+ z)
+ compileroptions="$compileroptions $OPTARG";;
+
+ l)
+ linkeroptions="$linkeroptions $OPTARG";;
+
+ h)
+ usage
+ exit ${ERROR_EXIT_CODE};;
+
+ *)
+ echo "unknown option -$switch $OPTARG"
+ usage
+ exit ${ERROR_EXIT_CODE};;
+ esac
+ done
+fi
echo "Generating makefiles with the following options ..."
echo "Platform: $platform"
@@ -205,7 +235,7 @@
# Now check if the options are correct or not, bail out if incorrect
#
case $platform in
- aix | openserver | unixware | beos | linux | freebsd | netbsd | solaris | hp-10
| hp-11 | os400 | irix | ptx | tru64 | macosx | cygwin)
+ aix | openserver | unixware | beos | linux | freebsd | netbsd | solaris | hp-10
| hp-11 | os400 | irix | ptx | tru64 | macosx | cygwin | qnx | interix | mingw-msys)
# platform has been recognized
;;
*)
@@ -344,6 +374,9 @@
exit ${ERROR_EXIT_CODE};;
esac
fi
+ elif test $platform = "mingw-msys"; then
+ threadingLibs=""
+ threadingDefines=""
fi
fi
1.33 +114 -63 xml-xerces/c/src/xercesc/runConfigure
Index: runConfigure
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/runConfigure,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- runConfigure 4 Feb 2004 13:26:44 -0000 1.32
+++ runConfigure 15 Mar 2004 17:06:58 -0000 1.33
@@ -88,7 +88,7 @@
echo " -p <platform> (accepts 'aix', 'beos', 'linux', 'freebsd',
'netbsd', 'solaris', 'hp-10', 'hp-11', 'openserver', 'unixware',
'os400', 'irix', 'ptx', 'tru64', 'macosx', 'cygwin', 'qnx',
- 'interix')
+ 'interix', 'mingw-msys')
[required; no default]"
echo " -c <C compiler name> (e.g. gcc, cc, xlc_r, qcc, icc or ecc)
[default is make default; cc for gnu make]"
@@ -140,25 +140,6 @@
exit ${ERROR_EXIT_CODE}
fi
-# Check the command line parameters
-if test -x /usr/bin/getopt; then
-getoptErr=`getopt p:c:x:dm:n:t:r:b:l:z:P:C:h $*`
-else
-getoptErr=`getopts p:c:x:dm:n:t:r:b:l:z:P:C:h `$*``
-fi
-if [ $? != 0 ]
- then
- usage
- exit ${ERROR_EXIT_CODE}
-fi
-
-# 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:P:C:h $*`
-else
-set -- `getopts p:c:x:dm:n:t:r:b:l:z:P:C:h `$*``
-fi
-
# Set up the default values for each parameter
debug=off # by default debug is off
transcoder=native # by default use native transcoder
@@ -168,61 +149,125 @@
configureoptions=""
bitsToBuild=32 # by default 32 bit build assumed
-while [ $# -gt 0 ]
- do
- case $1 in
- -p)
- platform=$2; shift 2;;
+# Check the command line parameters
+if test -x /usr/bin/getopt -o -x bin/getopt; then
+ getoptErr=`getopt p:c:x:dm:n:t:r:b:l:z:P:C:h $*`
+ if [ $? != 0 ]
+ then
+ usage
+ exit ${ERROR_EXIT_CODE}
+ fi
+ # Now get the command line parameters
+ set -- `getopt p:c:x:dm:n:t:r:b:l:z:P:C:h $*`
+ while [ $# -gt 0 ]
+ do
+ case $1 in
+ -p)
+ platform=$2; shift 2;;
+
+ -c)
+ ccompiler=$2; shift 2;;
+
+ -x)
+ cppcompiler=$2; shift 2;;
+
+ -d)
+ debug=on; shift;;
+
+ -m)
+ msgloader=$2; shift 2;;
+
+ -n)
+ netaccessor=$2; shift 2;;
+
+ -t)
+ transcoder=$2; shift 2;;
+
+ -r)
+ thread=$2; shift 2;;
+
+ -b)
+ bitsToBuild=$2; shift 2;;
+
+ -z)
+ compileroptions="$compileroptions $2"; shift 2;;
+
+ -l)
+ linkeroptions="$linkeroptions $2"; shift 2;;
+
+ -P)
+ configureoptions="$configureoptions --prefix=$2"; shift 2;;
+
+ -C)
+ configureoptions="$configureoptions $2"; shift 2;;
+
+ -h)
+ usage
+ exit ${ERROR_EXIT_CODE};;
+
+ --)
+ shift; break;;
+
+ *)
+ echo "unknown option $1"
+ usage
+ exit ${ERROR_EXIT_CODE};;
+ esac
+ done
- -c)
- ccompiler=$2; shift 2;;
+else
+ while getopts "p:c:x:dm:n:t:r:b:l:z:P:C:h" switch; do
+ case $switch in
+ p)
+ platform=$OPTARG;;
- -x)
- cppcompiler=$2; shift 2;;
+ c)
+ ccompiler=$OPTARG;;
- -d)
- debug=on; shift;;
+ x)
+ cppcompiler=$OPTARG;;
- -m)
- msgloader=$2; shift 2;;
+ d)
+ debug=on;;
- -n)
- netaccessor=$2; shift 2;;
+ m)
+ msgloader=$OPTARG;;
- -t)
- transcoder=$2; shift 2;;
+ n)
+ netaccessor=$OPTARG;;
- -r)
- thread=$2; shift 2;;
+ t)
+ transcoder=$OPTARG;;
- -b)
- bitsToBuild=$2; shift 2;;
+ r)
+ thread=$OPTARG;;
- -z)
- compileroptions="$compileroptions $2"; shift 2;;
+ b)
+ bitsToBuild=$OPTARG;;
- -l)
- linkeroptions="$linkeroptions $2"; shift 2;;
+ z)
+ compileroptions="$compileroptions $OPTARG";;
- -P)
- configureoptions="$configureoptions --prefix=$2"; shift 2;;
+ l)
+ linkeroptions="$linkeroptions $OPTARG";;
- -C)
- configureoptions="$configureoptions $2"; shift 2;;
+ P)
+ configureoptions="$configureoptions --prefix=$OPTARG";;
- -h)
- usage
- exit ${ERROR_EXIT_CODE};;
+ C)
+ configureoptions="$configureoptions $OPTARG";;
- --)
- shift; break;;
+ h)
+ usage
+ exit ${ERROR_EXIT_CODE};;
- *)
- echo "unknown option $1"
- usage
- exit ${ERROR_EXIT_CODE};;
- esac
-done
+ *)
+ echo "unknown option -$switch $OPTARG"
+ usage
+ exit ${ERROR_EXIT_CODE};;
+ esac
+ done
+fi
echo "Generating makefiles with the following options ..."
echo "Platform: $platform"
@@ -243,7 +288,7 @@
#
case $platform in
- aix | openserver | unixware | beos | linux | freebsd | netbsd | solaris | hp-10
| hp-11 | os400 | irix | ptx | tru64 | macosx | cygwin | qnx | interix)
+ aix | openserver | unixware | beos | linux | freebsd | netbsd | solaris | hp-10
| hp-11 | os400 | irix | ptx | tru64 | macosx | cygwin | qnx | interix | mingw-msys)
# platform has been recognized
;;
*)
@@ -393,6 +438,9 @@
exit ${ERROR_EXIT_CODE};;
esac
fi
+ elif test $platform = "mingw-msys"; then
+ threadingLibs=""
+ threadingDefines=""
fi
fi
@@ -475,6 +523,9 @@
if test $platform = "cygwin"; then
TRANSCODER=Cygwin ;
transcodingDefines="-DXML_USE_CYGWIN_TRANSCODER" ;
+ elif test $platform = "mingw-msys"; then
+ TRANSCODER=Cygwin ;
+ transcodingDefines="-DXML_USE_CYGWIN_TRANSCODER" ;
elif test $platform = "freebsd"; then
TRANSCODER=IconvFBSD ;
fi ;;
@@ -628,7 +679,7 @@
#
# these defines are required when building the DLL
#
-buildDefines="-DPROJ_XMLPARSER -DPROJ_XMLUTIL -DPROJ_PARSERS -DPROJ_SAX4C
-DPROJ_SAX2 -DPROJ_DOM -DPROJ_VALIDATORS"
+buildDefines="-DPROJ_XMLPARSER -DPROJ_XMLUTIL -DPROJ_PARSERS -DPROJ_SAX4C
-DPROJ_SAX2 -DPROJ_DOM -DPROJ_DEPRECATED_DOM -DPROJ_VALIDATORS"
CXXFLAGS="$CXXFLAGS $compileroptions $debugflag $buildDefines $transcodingDefines
$msgloaderDefines $threadingDefines $netaccessorDefines $bitstobuildDefines"
export CXXFLAGS
1.33 +95 -62 xml-xerces/c/tests/runConfigure
Index: runConfigure
===================================================================
RCS file: /home/cvs/xml-xerces/c/tests/runConfigure,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- runConfigure 13 Jan 2004 19:41:37 -0000 1.32
+++ runConfigure 15 Mar 2004 17:06:58 -0000 1.33
@@ -84,7 +84,8 @@
echo " where options may be any of the following:"
echo " -p <platform> (accepts 'aix', 'beos', 'linux', 'freebsd', 'netbsd',
'solaris', 'hp-10', 'hp-11', 'openserver', 'unixware',
- 'os400', 'irix', 'ptx', 'tru64', 'macosx', 'cygwin')
+ 'os400', 'irix', 'ptx', 'tru64', 'macosx', 'cygwin', 'qnx',
+ 'interix', 'mingw-msys')
[required: no default]"
echo " -c <C compiler name> (e.g. gcc, cc, xlc_r, icc or ecc)"
echo " [default is make default; cc for gnu make]"
@@ -125,71 +126,100 @@
exit ${ERROR_EXIT_CODE}
fi
-# Check the command line parameters
-if test -x /usr/bin/getopt; then
-getoptErr=`getopt p:c:x:dr:b:l:z:h $*`
-else
-getoptErr=`getopts p:c:x:dr:b:l:z:h `$*``
-fi
-if [ $? != 0 ]
- then
- usage
- exit ${ERROR_EXIT_CODE}
-fi
-
-# Now get the command line parameters
-if test -x /usr/bin/getopt; then
-set -- `getopt p:c:x:dr:b:l:z:h $*`
-else
-set -- `getopts p:c:x:dr: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
thread=pthread # by default use POSIX threads
bitsToBuild=32 # by default 32 bit build assumed
-while [ $# -gt 0 ]
- do
- case $1 in
- -p)
- platform=$2; shift 2;;
-
- -c)
- ccompiler=$2; shift 2;;
-
- -x)
- cppcompiler=$2; shift 2;;
-
- -d)
- debug=on; shift;;
-
- -r)
- thread=$2; shift 2;;
-
- -b)
- bitsToBuild=$2; shift 2;;
-
- -z)
- compileroptions="$compileroptions $2"; shift 2;;
-
- -l)
- linkeroptions="$linkeroptions $2"; shift 2;;
-
- -h)
- usage
- exit ${ERROR_EXIT_CODE};;
-
- --)
- shift; break;;
-
- *)
- echo "unknown option $1"
- usage
- exit ${ERROR_EXIT_CODE};;
- esac
-done
+# Check the command line parameters
+if test -x /usr/bin/getopt; then
+ getoptErr=`getopt p:c:x:dr:b:l:z:h $*`
+ if [ $? != 0 ]
+ then
+ usage
+ exit ${ERROR_EXIT_CODE}
+ fi
+ # Now get the command line parameters
+ set -- `getopt p:c:x:dr:b:l:z:h $*`
+ while [ $# -gt 0 ]
+ do
+ case $1 in
+ -p)
+ platform=$2; shift 2;;
+
+ -c)
+ ccompiler=$2; shift 2;;
+
+ -x)
+ cppcompiler=$2; shift 2;;
+
+ -d)
+ debug=on; shift;;
+
+ -r)
+ thread=$2; shift 2;;
+
+ -b)
+ bitsToBuild=$2; shift 2;;
+
+ -z)
+ compileroptions="$compileroptions $2"; shift 2;;
+
+ -l)
+ linkeroptions="$linkeroptions $2"; shift 2;;
+
+ -h)
+ usage
+ exit ${ERROR_EXIT_CODE};;
+
+ --)
+ shift; break;;
+
+ *)
+ echo "unknown option $1"
+ usage
+ exit ${ERROR_EXIT_CODE};;
+ esac
+ done
+else
+ while getopts "p:c:x:dr:b:l:z:h" switch; do
+ case $switch in
+ p)
+ platform=$OPTARG;;
+
+ c)
+ ccompiler=$OPTARG;;
+
+ x)
+ cppcompiler=$OPTARG;;
+
+ d)
+ debug=on;;
+
+ r)
+ thread=$OPTARG;;
+
+ b)
+ bitsToBuild=$OPTARG;;
+
+ z)
+ compileroptions="$compileroptions $OPTARG";;
+
+ l)
+ linkeroptions="$linkeroptions $OPTARG";;
+
+ h)
+ usage
+ exit ${ERROR_EXIT_CODE};;
+
+ *)
+ echo "unknown option -$switch $OPTARG"
+ usage
+ exit ${ERROR_EXIT_CODE};;
+ esac
+ done
+fi
echo "Generating makefiles with the following options ..."
echo "Platform: $platform"
@@ -204,7 +234,7 @@
# Now check if the options are correct or not, bail out if incorrect
#
case $platform in
- aix | openserver | unixware | beos | linux | freebsd | netbsd | solaris | hp-10
| hp-11 | os400 | irix | ptx | tru64 | macosx | cygwin | qnx)
+ aix | openserver | unixware | beos | linux | freebsd | netbsd | solaris | hp-10
| hp-11 | os400 | irix | ptx | tru64 | macosx | cygwin | qnx | interix | mingw-msys)
# platform has been recognized
;;
*)
@@ -343,6 +373,9 @@
exit ${ERROR_EXIT_CODE};;
esac
fi
+ elif test $platform = "mingw-msys"; then
+ threadingLibs=""
+ threadingDefines=""
fi
fi
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]