From 7d93ac4beea04d4579f9b544cdb34ecb321de6ce Mon Sep 17 00:00:00 2001 From: Igor Zlatkovic Date: Mon, 24 May 2004 10:47:38 +0000 Subject: [PATCH] added cruntime option, contributed by Oliver Stoeneberg --- win32/Makefile.msvc | 2 +- win32/configure.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc index 4035656..d6d9bbb 100644 --- a/win32/Makefile.msvc +++ b/win32/Makefile.msvc @@ -51,7 +51,7 @@ CPPFLAGS = /nologo # The compiler and its options. CC = cl.exe -CFLAGS = /nologo /D "WIN32" /D "_WINDOWS" /D "_MBCS" /W3 /MD /D "_REENTRANT" +CFLAGS = /nologo /D "WIN32" /D "_WINDOWS" /D "_MBCS" /W3 $(CRUNTIME) /D "_REENTRANT" CFLAGS = $(CFLAGS) /I$(BASEDIR) /I$(XSLT_SRCDIR) /I$(INCPREFIX) # The linker and its options. diff --git a/win32/configure.js b/win32/configure.js index 73ac3fb..b6442b6 100644 --- a/win32/configure.js +++ b/win32/configure.js @@ -48,6 +48,7 @@ var withZlib = false; /* Win32 build options. */ var dirSep = "\\"; var compiler = "msvc"; +var cruntime = "/MD"; var buildDebug = 0; var buildStatic = 0; var buildPrefix = "."; @@ -102,6 +103,7 @@ function usage() txt += " zlib: Use zlib library (" + (withZlib? "yes" : "no") + ")\n"; txt += "\nWin32 build options, default value given in parentheses:\n\n"; txt += " compiler: Compiler to be used [msvc|mingw] (" + compiler + ")\n"; + txt += " cruntime: C-runtime compiler option (only msvc) (" + cruntime + ")\n"; txt += " debug: Build unoptimised debug executables (" + (buildDebug? "yes" : "no") + ")\n"; txt += " static: Link xsltproc statically to libxslt (" + (buildStatic? "yes" : "no") + ")\n"; txt += " prefix: Base directory for the installation (" + buildPrefix + ")\n"; @@ -176,6 +178,7 @@ function discoverVersion() if (compiler == "msvc") { vf.WriteLine("INCLUDE=$(INCLUDE);" + buildInclude); vf.WriteLine("LIB=$(LIB);" + buildLib); + vf.WriteLine("CRUNTIME=" + cruntime); } else if (compiler == "mingw") { vf.WriteLine("INCLUDE+=;" + buildInclude); vf.WriteLine("LIB+=;" + buildLib); @@ -323,6 +326,8 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) { withZlib = strToBool(arg.substring(opt.length + 1, arg.length)); else if (opt == "compiler") compiler = arg.substring(opt.length + 1, arg.length); + else if (opt == "cruntime") + cruntime = arg.substring(opt.length + 1, arg.length); else if (opt == "static") buildStatic = strToBool(arg.substring(opt.length + 1, arg.length)); else if (opt == "prefix") @@ -427,6 +432,8 @@ txtOut += "\n"; txtOut += "Win32 build configuration\n"; txtOut += "-------------------------\n"; txtOut += " Compiler: " + compiler + "\n"; +if (compiler == "msvc") + txtOut += " C-Runtime option: " + cruntime + "\n"; txtOut += " Debug symbols: " + boolToStr(buildDebug) + "\n"; txtOut += " Static xsltproc: " + boolToStr(buildStatic) + "\n"; txtOut += " Install prefix: " + buildPrefix + "\n"; -- 2.7.4