incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arie...@apache.org
Subject svn commit: r1388579 - in /incubator/ooo/trunk/main: configure.in extensions/source/activex/main/makefile.mk set_soenv.in
Date Fri, 21 Sep 2012 17:29:25 GMT
Author: arielch
Date: Fri Sep 21 17:29:25 2012
New Revision: 1388579

URL: http://svn.apache.org/viewvc?rev=1388579&view=rev
Log:
Hack to build with VS2008 Express and ATL/ActiveX enabled

Modified:
    incubator/ooo/trunk/main/configure.in
    incubator/ooo/trunk/main/extensions/source/activex/main/makefile.mk
    incubator/ooo/trunk/main/set_soenv.in

Modified: incubator/ooo/trunk/main/configure.in
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/configure.in?rev=1388579&r1=1388578&r2=1388579&view=diff
==============================================================================
--- incubator/ooo/trunk/main/configure.in (original)
+++ incubator/ooo/trunk/main/configure.in Fri Sep 21 17:29:25 2012
@@ -167,13 +167,62 @@ AC_ARG_ENABLE(directx,
 AC_ARG_ENABLE(activex,
 [  --disable-activex       Disable the use of ActiveX for windows build.
                           This switch is mandatory when using VC++ 2005/2008 Express.
+                          Alternatively you can use the Windows Driver Kit (WDK) and
+                          configure with the following switches:
+                          --with-atl-include-dir=$WDK_HOME\inc\atl71
+                          --with-atl-lib-dir=$WDK_HOME\lib\ATL\i386
+                          --with-mfc-include-dir=$WDK_HOME\inc\mfc42
+                          --with-mfc-lib-dir=$WDK_HOME\lib\Mfc\i386
 ],,)
 
 AC_ARG_ENABLE(atl,
 [  --disable-atl          Disable the use of ATL for windows build.
                           This switch is mandatory when using VC++ 2005/2008 Express.
+                          Alternatively you can use the Windows Driver Kit (WDK) and
+                          configure with the following switches:
+                          --with-atl-include-dir=$WDK_HOME\inc\atl71
+                          --with-atl-lib-dir=$WDK_HOME\lib\ATL\i386
+                          --with-mfc-include-dir=$WDK_HOME\inc\mfc42
+                          --with-mfc-lib-dir=$WDK_HOME\lib\Mfc\i386
+],,)
+
+AC_ARG_WITH(atl-include-dir,
+[  --with-atl-include-dir      Path to ATL include directory for windows build.
+                          This switch is mandatory when using VC++ 2008 Express
+                          and configuring with ATL/ActiveX enabled.
+                          You can use the Windows Driver Kit (WDK) and
+                          configure with the following switch:
+                          --with-atl-include-dir=$WDK_HOME\inc\atl71
+],,)
+
+AC_ARG_WITH(atl-lib-dir,
+[  --with-atl-lib-dir          Path to ATL libraries directory for windows build.
+                          This switch is mandatory when using VC++ 2008 Express
+                          and configuring with ATL/ActiveX enabled.
+                          You can use the Windows Driver Kit (WDK) and
+                          configure with the following switch:
+                          --with-atl-lib-dir=$WDK_HOME\lib\ATL\i386
+],,)
+
+AC_ARG_WITH(mfc-include-dir,
+[  --with-mfc-include-dir       Path to MFC include directory for windows build.
+                          This switch is mandatory when using VC++ 2008 Express
+                          and configuring with ATL/ActiveX enabled.
+                          You can use the Windows Driver Kit (WDK) and
+                          configure with the following switch:
+                          --with-mfc-include-dir=$WDK_HOME\inc\mfc42
+],,)
+
+AC_ARG_WITH(mfc-lib-dir,
+[  --with-mfc-lib-dir          Path to MFC libraries directory for windows build.
+                          This switch is mandatory when using VC++ 2008 Express
+                          and configuring with ATL/ActiveX enabled.
+                          You can use the Windows Driver Kit (WDK) and
+                          configure with the following switch:
+                          --with-mfc-lib-dir=$WDK_HOME\lib\Mfc\i386
 ],,)
 
+
 AC_ARG_ENABLE(symbols,
 [  --enable-symbols        Include debugging symbols in output.
                           WARNING - a complete build needs 8 Gb of space and
@@ -5694,6 +5743,97 @@ AC_SUBST(ENABLE_DIRECT_DRAW)
 AC_SUBST(DIRECTXSDK_HOME)
 AC_SUBST(DIRECTXSDK_LIB)
 
+
+dnl ============================================
+dnl Check for ATL and MFC
+dnl ============================================
+if test \( "$_os" = "WINNT" \) ; then
+    AC_MSG_CHECKING([for ATL and MFC])
+    if test "$DISABLE_ATL" = "TRUE" -o "$DISABLE_ACTIVEX" = "TRUE" ; then
+        AC_MSG_RESULT([ATL/MFC disabled])
+    else
+        AC_MSG_NOTICE([testing ATL/MFC libs and includes])
+        if test -z "$with_atl_include_dir"; then
+            ATL_INCLUDE=$COMPATH/atlmfc/include
+        else
+            ATL_INCLUDE=`cygpath -u "$with_atl_include_dir"`
+        fi
+        if test -z "$with_atl_lib_dir"; then
+            ATL_LIB=$COMPATH/atlmfc/lib
+        else
+            ATL_LIB=`cygpath -u "$with_atl_lib_dir"`
+        fi
+        if test -z "$with_mfc_include_dir"; then
+            MFC_INCLUDE=$COMPATH/atlmfc/include
+        else
+            MFC_INCLUDE=`cygpath -u "$with_mfc_include_dir"`
+        fi
+        if test -z "$with_mfc_lib_dir"; then
+            MFC_LIB=$COMPATH/atlmfc/lib
+        else
+            MFC_LIB=`cygpath -u "$with_mfc_lib_dir"`
+        fi
+
+        ATL_INCLUDE=`echo $ATL_INCLUDE | $SED 's/\/$//'`
+        ATL_LIB=`echo $ATL_LIB | $SED 's/\/$//'`
+        MFC_INCLUDE=`echo $MFC_INCLUDE | $SED 's/\/$//'`
+        MFC_LIB=`echo $MFC_LIB | $SED 's/\/$//'`
+
+        if test -f "$ATL_INCLUDE/atlase.h"; then
+            HAVE_ATL_H="yes"
+        else
+            HAVA_ATL_H="no"
+        fi
+        if test -f "$MFC_INCLUDE/afx.h"; then
+            HAVE_MFC_H="yes"
+        else
+            HAVA_MFC_H="no"
+        fi
+        if test -f "$ATL_LIB/atls.lib"; then
+            HAVE_ATL_LIB="yes"
+            if test -f "$ATL_LIB/atlthunk.lib"; then
+                HAVE_ATLTHUNK="YES"
+            else
+                HAVE_ATLTHUNK="NO"
+            fi
+        else
+            HAVE_ATL_LIB="no"
+        fi
+
+        dnl TODO check also MFC libraries, they seem to have diferent names
+        dnl mfc42.lib mfc90.lib
+        if test -d "$MFC_LIB"; then
+            HAVE_MFC_LIB="yes"
+        else
+            HAVE_MFC_LIB="no"
+        fi
+
+        if test "$HAVE_ATL_H" = "no" -o "$HAVE_MFC_H" = "no" -o "$HAVE_ATL_LIB" = "no" -o
"$HAVE_MFC_LIB" = "no"; then
+            ATL_INCLUDE=
+            ATL_LIB=
+            MFC_INCLUDE=
+            MFC_LIB=
+            HAVE_ATL_LIB=
+            dnl TODO shouldn't this be an error?
+            DISABLE_ACTIVEX="TRUE"
+            DISABLE_ATL="TRUE"
+            AC_MSG_RESULT([ATL/MFC disabled])
+        else
+            ATL_INCLUDE=`cygpath -dm "$ATL_INCLUDE"`
+            ATL_LIB=`cygpath -dm "$ATL_LIB"`
+            MFC_INCLUDE=`cygpath -dm "$MFC_INCLUDE"`
+            MFC_LIB=`cygpath -dm "$MFC_LIB"`
+            AC_MSG_RESULT([ATL/MFC enabled])
+        fi
+    fi
+fi
+AC_SUBST(ATL_INCLUDE)
+AC_SUBST(ATL_LIB)
+AC_SUBST(HAVE_ATLTHUNK)
+AC_SUBST(MFC_INCLUDE)
+AC_SUBST(MFC_LIB)
+
+
 dnl ============================================
 dnl Check for Nullsoft Scriptable Install System
 dnl ============================================

Modified: incubator/ooo/trunk/main/extensions/source/activex/main/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/extensions/source/activex/main/makefile.mk?rev=1388579&r1=1388578&r2=1388579&view=diff
==============================================================================
--- incubator/ooo/trunk/main/extensions/source/activex/main/makefile.mk (original)
+++ incubator/ooo/trunk/main/extensions/source/activex/main/makefile.mk Fri Sep 21 17:29:25
2012
@@ -80,9 +80,11 @@ SHL1STDLIBS=\
 .IF "$(COM)"!="GCC"
 .IF "$(CCNUMVER)" > "001300000000"
     SHL1STDLIBS+= $(ATL_LIB)$/atls.lib
+.IF "$(HAVE_ATLTHUNK)" == "YES"
     SHL1STDLIBS+= $(ATL_LIB)$/atlthunk.lib
 .ENDIF
 .ENDIF
+.ENDIF
 
 
 #    $(KERNEL32LIB) \

Modified: incubator/ooo/trunk/main/set_soenv.in
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/set_soenv.in?rev=1388579&r1=1388578&r2=1388579&view=diff
==============================================================================
--- incubator/ooo/trunk/main/set_soenv.in (original)
+++ incubator/ooo/trunk/main/set_soenv.in Fri Sep 21 17:29:25 2012
@@ -107,7 +107,7 @@ my ( $oldPATH, $SRC_ROOT, $SO_HOME, $JAV
      $PATH, $SOLAREXTRAINC, $SOLAREXTRALIB, $SOLARLIB, 
      $SOLARINC, $LOCALINI, $FRAMEWORKSHOME, $COMEX, $PERL, 
      $COMP_ENV, $ILIB, $JAVAHOME, $PSDK_HOME, $DIRECTXSDK_LIB, $USE_NEW_SDK, $FRAME_HOME,

-     $USE_DIRECTX5, $ATL_LIB, $ATL_INCLUDE, $MFC_LIB, $MFC_INCLUDE, $TMPDIR,
+     $USE_DIRECTX5, $ATL_LIB, $HAVE_ATLTHUNK, $ATL_INCLUDE, $MFC_LIB, $MFC_INCLUDE, $TMPDIR,
      $COMMON_BUILD_TOOLS, $WIN_GREP, $WIN_FIND, $WIN_LS,
      $WIN_GNUCOPY, $WIN_TOUCH, $STLPORT4, $MOZILLA_VERSION, $MOZILLA_TOOLKIT, $PREBUILD_MOZAB,
$MOZILLABUILD,
 	 $PROEXT, $TARFILE_LOCATION,
@@ -701,10 +701,6 @@ elsif ( $platform =~ m/cygwin/ ) 
       $COMEX          = '@COMEX@';
       if ( "@COMEX@" eq "10" ) { # .NET 2003 needs M1310
           $CVER        = "M1310";
-          $ATL_LIB     = $COMPATH.$ds."atlmfc".$ds."lib";
-          $ATL_INCLUDE = $COMPATH.$ds."atlmfc".$ds."include";
-          $MFC_LIB     = "";
-          $MFC_INCLUDE = "";
       } elsif ( "@COMEX@" ge "11" ) { # .NET 2005 needs M1400
 	  if ( "@COMEX@" eq "11" ) {
 	      $CVER        = "M1400";
@@ -713,17 +709,6 @@ elsif ( $platform =~ m/cygwin/ ) 
 	  } else {                   # Unsupported
 	      die "Unsupported value for COMEX variable.\n";
 	  }
-          if ( "@DISABLE_ACTIVEX@" ) {
-              $ATL_LIB     = $PSDK_HOME.$ds."lib"; # Doesn't exist for VSE
-              $ATL_INCLUDE = $PSDK_HOME.$ds."include".$ds."atl";
-              $MFC_LIB     = $PSDK_HOME.$ds."lib"; # Doesn't exist for VSE
-              $MFC_INCLUDE = $PSDK_HOME.$ds."include".$ds."mfc";
-          } else {
-              $ATL_LIB     = $COMPATH.$ds."atlmfc".$ds."lib";
-              $ATL_INCLUDE = $COMPATH.$ds."atlmfc".$ds."include";
-              $MFC_LIB     = $COMPATH.$ds."atlmfc".$ds."lib";
-              $MFC_INCLUDE = $PSDK_HOME.$ds."include".$ds."mfc";
-          }
       }
 	  print "Setting W32 build with bash shell specific values... ";
 	  # No speacial treatment for CC an CXX anymore.
@@ -1782,15 +1767,14 @@ if ( $platform =~ m/cygwin/ )
    ToFile( "WINDOWS_VISTA_PSDK","@WINDOWS_VISTA_PSDK@","e" );
    ToFile( "DIRECTXSDK_LIB",    $DIRECTXSDK_LIB,    "e" );
    ToFile( "USE_DIRECTX5",      $USE_DIRECTX5,      "e" );
-   ToFile( "ATL_LIB",           $ATL_LIB,         "e" );
-   if ( $MINGW ne "yes" )
-   {  ToFile( "ATL_INCLUDE",       $ATL_INCLUDE,       "e" );
-   }
-   ToFile( "MFC_LIB",           $MFC_LIB,         "e" );
-   ToFile( "MFC_INCLUDE",       $MFC_INCLUDE,       "e" );
+   ToFile( "ATL_LIB",           "@ATL_LIB@",        "e" );
+   ToFile( "ATL_INCLUDE",       "@ATL_INCLUDE@",    "e" );
+   ToFile( "HAVE_ATLTHUNK",     "@HAVE_ATLTHUNK@",  "e" );
+   ToFile( "MFC_LIB",           "@MFC_LIB@",        "e" );
+   ToFile( "MFC_INCLUDE",       "@MFC_INCLUDE@",    "e" );
    ToFile( "NSIS_PATH",         $NSIS_PATH,         "e" );
    ToFile( "DISABLE_ACTIVEX",   "@DISABLE_ACTIVEX@","e" );
-   ToFile( "DISABLE_ATL",   "@DISABLE_ATL@","e" );
+   ToFile( "DISABLE_ATL",       "@DISABLE_ATL@",    "e" );
    ToFile( "USE_NEW_SDK",       $USE_NEW_SDK,       "e" );
 
    # Hack around dmake's mktmp not generating DOS paths.



Mime
View raw message