[m-rev.] for review: enable default use of MS Visual C runtime

Peter Ross pro at missioncriticalit.com
Fri Apr 2 19:33:13 AEST 2004


On Sun, Mar 28, 2004 at 05:04:06AM +1000, Fergus Henderson wrote:
> On 25-Mar-2004, Peter Ross <pro at missioncriticalit.com> wrote:
> > On Tue, Mar 23, 2004 at 04:40:43PM +0100, Peter Ross wrote:
> > > 
> > > Estimated hours taken: 2
> > > Branches: main
> > > 
> > > Allow at configure time to build the compiler so that it uses the MS
> > > Visual C runtime by default.
> > > 
> > > This is needed here at MC to build some components which require
> > > linking against the MS Visual C runtime versus the standard C runtime.
> > > 
> > > configure.in:
> > > 	Add the option --enable-msvcrt so that the 
> 
> Shouldn't that be --with-msvcrt?
> 
> (See the autoconf documentation on the meaning of "--enable-"
> and "--with-".)
> 
> Also, please document the new configure option in README.MS-VisualC,
> (and update the other parts of that file if they are out-of-date).
> 

diff -u configure.in configure.in
--- configure.in
+++ configure.in
@@ -3616,12 +3616,12 @@
 #-----------------------------------------------------------------------------#
 
 AC_ARG_ENABLE(msvcrt,
-[  --enable-msvcrt
+[  --with-msvcrt
                           use the MS Visual C runtime if using MS C compiler.],
-ac_msvcrt=yes,ac_msvcrt=no)
+mercury_cv_msvcrt=yes,mercury_cv_msvcrt=no)
 
 AC_MSG_CHECKING(whether to use the MS Visual C Runtime)
-if test "$ac_msvcrt" = "yes"; then
+if test "$mercury_cv_msvcrt" = "yes"; then
 	if test "$ac_microsoft" = "yes"; then
 		AC_MSG_RESULT(yes)
 		USE_MSVCRT=yes
diff -u scripts/ml.in scripts/ml.in
--- scripts/ml.in
+++ scripts/ml.in
@@ -259,7 +259,7 @@
 # Set the correct flags if we're to use the MS Visual C runtime.
 use_msvcrt=@USE_MSVCRT@
 if test $use_msvcrt = "yes"; then
-	MSVCRT_OPTS="/MD"
+	MSVCRT_OPTS="/MD" # enable linking with the MS Visual C runtime
 else
 	MSVCRT_OPTS=""
 fi
only in patch2:
--- README.MS-VisualC	31 Oct 2002 16:20:51 -0000	1.6
+++ README.MS-VisualC	2 Apr 2004 08:03:07 -0000
@@ -13,7 +13,11 @@
 
 To use MSVC to build the compiler issue the following configure command.
 
-CC='CL /nologo' CPP='CL /nologo /E' ./configure
+CC='CL /nologo' CPP='CL /nologo /E' ./configure [--with-msvcrt]
+
+Pass the --with-msvcrt flag to configure, and the resulting Mercury
+executables built with the install of Mercury will be linked with MS
+Visual C runtime, instead of the standard libC runtime.
 
 Also ensure that the environment variable TMPDIR exists and is set to
 ".".  This avoids problems with mixing cygwin and windows paths.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list