diff --git a/config/Makefile.in b/config/Makefile.in index 734a834965ecda13086f99f6c927495fb51d6493..3da035d27dc73ca74c5880a5bcd89646607cce5c 100644 --- a/config/Makefile.in +++ b/config/Makefile.in @@ -3,13 +3,14 @@ # Makefile definitions included by the top Makefile ARCH := @architecture@ -ROOTBUILD := @rootbuild@ +@rootbuild@ USECONFIG := @useconfig@ MKLIBOPTIONS := @mkliboption@ EXTRA_CFLAGS := -Iinclude @cflags@ EXTRA_CXXFLAGS := -Iinclude @cflags@ EXTRA_LDFLAGS := @ldflags@ +WINRTDEBUG := @winrtdebug@ GLBPATCHFLAGS := @glbpatchcflags@ EXTRA_AUTHFLAGS:= @srpextracflags@ @krb5extracflags@ @glbextracflags@ @sslextracflags@ diff --git a/config/Makefile.win32 b/config/Makefile.win32 index b66a77ef3523f684da340c45a66a930e43ee379b..a37f7b42bbfa8929d7565927a912feffb688ddfc 100644 --- a/config/Makefile.win32 +++ b/config/Makefile.win32 @@ -19,7 +19,7 @@ endif # these define the build compatibility -ifeq (debug,$(findstring debug,$(ROOTBUILD))) +ifeq (yes,$(WINRTDEBUG)) BLDCXXFLAGS = -MDd -GR BLDCFLAGS = -MDd BLDF77FLAGS = -MDd @@ -49,7 +49,7 @@ endif endif endif -ifeq (debug,$(findstring debug,$(ROOTBUILD))) +ifeq (yes,$(WINRTDEBUG)) OPT = $(DEBUGFLAGS) LDOPT = -debug F77OPT = -debug -nopdbfile -MDd diff --git a/config/root-config.in b/config/root-config.in index d3a58bc7bc180678455f938cc521fa7ede3e9a39..586c4aae66927d0cb65475532a2c22f7ccfe0328 100755 --- a/config/root-config.in +++ b/config/root-config.in @@ -339,12 +339,11 @@ hiux) win32) # Win32 auxcflags="-MD" - ROOTBUILD="@rootbuild@" - if [ "`echo $ROOTBUILD | sed 's,debug,,'`" != "$ROOTBUILD" ]; then + if test "x@winrtdebug@" = "xyes"; then auxcflags="-MDd" fi VC_MAJOR=`unset VS_UNICODE_OUTPUT; cl.exe 2>&1 | awk '{ if (NR==1) print $8 }' | cut -d'.' -f1` - if [ "$VC_MAJOR" != "" -a $VC_MAJOR -gt 13 ]; then + if test "$VC_MAJOR" != "" -a $VC_MAJOR -gt 13; then auxcflags="$auxcflags -EHs -GR" else auxcflags="$auxcflags -GX -G5" diff --git a/configure b/configure index 872546943b4aad7e0123aab22de5d9c038ca63f0..d2371ba41a94578acae5c5dffa6edf76a46b429b 100755 --- a/configure +++ b/configure @@ -21,7 +21,6 @@ show_pkglist=no noact="no" nohowto="no" logfile=config.log -rootbuild=$ROOTBUILD options=" \ enable_afs \ @@ -69,6 +68,7 @@ options=" \ enable_table \ enable_thread \ enable_venus \ + enable_winrtdebug \ enable_xml \ enable_xrootd \ " @@ -95,6 +95,7 @@ enable_shadowpw= enable_soversion=no enable_table=no enable_thread= # must be set explicitely via --enable-thread +enable_winrtdebug= enable_xrootd= # must be set explicitely via --enable-xrootd # Remove old log file @@ -836,6 +837,7 @@ enable/disable options, prefix with either --enable- or --disable- table Build libTable contrib library thread Thread support venus Venus EG support, requires libVenus + winrtdebug Link against the Windows debug runtime library xml XML parser interface xrootd Build xrootd file server and its client (if supported) @@ -1093,7 +1095,7 @@ if test $# -gt 0 ; then # # Build steering option # - --build=*) rootbuild=$optarg ;; + --build=*) rootbuild="ROOTBUILD := $optarg" ;; ################################################################ # # Install path options @@ -1219,6 +1221,19 @@ if test "x$e" = "x1" ; then enable_exceptions=no fi +###################################################################### +# +### echo %%% Windows Debug Runtime (-MDd) +# +if test "x$enable_winrtdebug" = "x" ; then + e=`echo $rootbuild | sed 's/.*debug.*/1/'` + if test "x$e" = "x1"; then + enable_winrtdebug=yes + else + enable_winrtdebug=no + fi +fi + ###################################################################### # ### echo %%% Posix Thread Library @@ -3673,6 +3688,7 @@ sed -e "s|@srcdir@|$srcdir|" \ -e "s|@tutdir@|$tutdir|" \ -e "s|@venuslib@|$venuslib|" \ -e "s|@venuslibdir@|$venuslibdir|" \ + -e "s|@winrtdebug@|$enable_winrtdebug|" \ -e "s|@xmlincdir@|$xmlincdir|" \ -e "s|@xmllib@|$xmllib|" \ -e "s|@xmllibdir@|$xmllibdir|" \ @@ -3765,7 +3781,6 @@ for f in $options ; do features="$features $feat" fi done - sed -e "s|@architecture@|$arch|" \ -e "s|@platform@|$platform|" \ -e "s|@prefix@|$prefix2|" \ @@ -3773,7 +3788,7 @@ sed -e "s|@architecture@|$arch|" \ -e "s|@libdir@|$libdir2|" \ -e "s|@incdir@|$incdir2|" \ -e "s|@features@|$features|" \ - -e "s|@rootbuild@|$rootbuild|" \ + -e "s|@winrtdebug@|$enable_winrtdebug|"\ -e "s|@configargs@|$configargs|" \ -e "s|@dicttype@|$dicttype|" \ < root-config.tmp > $RCONFOUT