[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bochs-cvs
Subject:    [Bochs-cvs] [12082] trunk/bochs
From:       vruppert () users ! sourceforge ! net
Date:       2013-12-29 20:04:23
Message-ID: E1VxMb5-0008L4-8l () sfs-ml-3 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 12082
Author:   vruppert
Date:     2013-12-29 20:04:16 +0000 (Sun, 29 Dec 2013)
Log Message:
-----------
The plugin version now uses the native DLL handling code for all Windows ports.
Skip configure checks for libtool / ltdl and no longer link with mingwex.

Modified Paths:
--------------
    trunk/bochs/configure.in
    trunk/bochs/extplugin.h
    trunk/bochs/plugin.cc

Modified: trunk/bochs/configure.in
===================================================================
--- trunk/bochs/configure.in	2013-12-29 12:56:52 UTC (rev 12081)
+++ trunk/bochs/configure.in	2013-12-29 20:04:16 UTC (rev 12082)
@@ -41,11 +41,12 @@
 need_dlcompat_for_plugins=0
 case "$target" in
   *-pc-windows* | *-pc-winnt*)
-    DEFAULT_GUI=win32                 # default to win32 gui
+    DEFAULT_GUI=win32 # default to win32 gui
+    NO_LT=1           # do not use libtool at all
     MSVC_TARGET=1
     ;;
   *-cygwin* | *-mingw32*)
-    NO_LT=1   # do not use libtool at all on cygwin
+    NO_LT=1   # do not use libtool at all
     if test "$with_term" = yes; then
       # ncurses won't compile with -DWIN32
       # also, I can't get it to link without this -DBROKEN_LINKER=1 hack.
@@ -109,7 +110,7 @@
 AC_PROG_CXX
 AC_PROG_MAKE_SET
 
-if test "$MSVC_TARGET" != 1; then
+if test "$NO_LT" != 1; then
   dnl------------ libtool configuration
   dnl Configure libtool, and default to shared libraries.  Libtool will only be
   dnl used for compiling and linking plugins.
@@ -430,16 +431,20 @@
   GUI_PLUGIN_OBJS='$(OBJS_THAT_CAN_BE_PLUGINS)'
   DEFINE_PLUGIN_PATH='-DBX_PLUGIN_PATH="\"${plugdir}\""'
   # and the $(OBJS_THAT_SUPPORT_OTHER_PLUGINS) will be built and linked
-  # by special link rules for the plugins that they support.
-  LIBS="$LIBS $LIBADD_DL"
-  have_ltdl=0
-  AC_CHECK_HEADER(ltdl.h, [AC_CHECK_LIB(ltdl, lt_dlinit, [have_ltdl=1]]))
-  if test "$have_ltdl" = 1; then
-    PLUGIN_LIB="-lltdl"
-    AC_DEFINE(BX_HAVE_LTDL,1)
+  if test "$NO_LT" != 1; then
+    # by special link rules for the plugins that they support.
+    LIBS="$LIBS $LIBADD_DL"
+    have_ltdl=0
+    AC_CHECK_HEADER(ltdl.h, [AC_CHECK_LIB(ltdl, lt_dlinit, [have_ltdl=1]]))
+    if test "$have_ltdl" = 1; then
+      PLUGIN_LIB="-lltdl"
+      AC_DEFINE(BX_HAVE_LTDL,1)
+    else
+      PLUGIN_VAR="ltdl.o"
+      PLUGIN_LIB="ltdl.o"
+    fi
   else
-    PLUGIN_VAR="ltdl.o"
-    PLUGIN_LIB="ltdl.o"
+    RANLIB="echo"
   fi
   PLUGIN_TARGET=bochs_plugins
   INSTALL_PLUGINS_VAR=install_libtool_plugins
@@ -2419,7 +2424,6 @@
     MAKE=nmake
     MAKELIB="lib /nologo /subsystem:console /verbose /out:\$@"
     RMCOMMAND="-del"
-    RANLIB="echo"
     #L_OPT="/debug"    # for debugging
     L_OPT=""           # no debug info
     LINK="link $L_OPT /nologo /subsystem:console /incremental:no /out:\$@ "
@@ -2508,7 +2512,6 @@
     ;;
   *-cygwin* | *-mingw*)
     if test "$bx_plugins" = 1; then
-      AC_CHECK_LIB(mingwex, opendir, LIBS="$LIBS -lmingwex")
       # set variables for building DLL plugins
       PRIMARY_TARGET=".win32_dll_plugin_target"
       PLUGIN_LIBNAME_TRANSFORMATION='%.o=bx_%.dll'

Modified: trunk/bochs/extplugin.h
===================================================================
--- trunk/bochs/extplugin.h	2013-12-29 12:56:52 UTC (rev 12081)
+++ trunk/bochs/extplugin.h	2013-12-29 20:04:16 UTC (rev 12082)
@@ -17,7 +17,7 @@
 #ifndef __EXTPLUGIN_H
 #define __EXTPLUGIN_H
 
-#if BX_PLUGINS && !defined(_MSC_VER)
+#if BX_PLUGINS && !defined(WIN32)
 #if BX_HAVE_LTDL
 #include <ltdl.h>
 #else
@@ -43,7 +43,7 @@
     plugintype_t type;
     int  initialized;
 #if BX_PLUGINS
-#if defined(_MSC_VER)
+#if defined(WIN32)
     HINSTANCE handle;
 #else
     lt_dlhandle handle;

Modified: trunk/bochs/plugin.cc
===================================================================
--- trunk/bochs/plugin.cc	2013-12-29 12:56:52 UTC (rev 12081)
+++ trunk/bochs/plugin.cc	2013-12-29 20:04:16 UTC (rev 12082)
@@ -345,7 +345,7 @@
   if (plugin->initialized)
       plugin->plugin_fini();
 
-#if defined(_MSC_VER)
+#if defined(WIN32)
   FreeLibrary(plugin->handle);
 #else
   lt_dlclose(plugin->handle);
@@ -369,7 +369,7 @@
 void plugin_load(char *name, char *args, plugintype_t type)
 {
   plugin_t *plugin, *temp;
-#if defined(_MSC_VER)
+#if defined(WIN32)
   char dll_path_list[MAX_PATH];
 #endif
 
@@ -404,7 +404,7 @@
   // be called from either dlopen (global constructors) or plugin_init.
   BX_ASSERT(current_plugin_context == NULL);
   current_plugin_context = plugin;
-#if defined(_MSC_VER)
+#if defined(WIN32)
   char *ptr;
   plugin->handle = LoadLibrary(plugin_filename);
   if (!plugin->handle) {
@@ -440,7 +440,7 @@
   } else {
     sprintf(tmpname, PLUGIN_INIT_FMT_STRING, "user");
   }
-#if defined(_MSC_VER)
+#if defined(WIN32)
   plugin->plugin_init = (plugin_init_t) GetProcAddress(plugin->handle, tmpname);
   if (plugin->plugin_init == NULL) {
     pluginlog->panic("could not find plugin_init: error=%d", GetLastError());
@@ -459,7 +459,7 @@
   } else {
     sprintf(tmpname, PLUGIN_FINI_FMT_STRING, "user");
   }
-#if defined(_MSC_VER)
+#if defined(WIN32)
   plugin->plugin_fini = (plugin_fini_t) GetProcAddress(plugin->handle, tmpname);
   if (plugin->plugin_fini == NULL) {
     pluginlog->panic("could not find plugin_fini: error=%d", GetLastError());
@@ -538,7 +538,7 @@
 
   pluginlog = new logfunctions();
   pluginlog->put("PLUGIN");
-#if BX_PLUGINS && !defined(_MSC_VER)
+#if BX_PLUGINS && !defined(WIN32)
   int status = lt_dlinit();
   if (status != 0) {
     BX_ERROR(("initialization error in ltdl library (for loading plugins)"));


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Bochs-cvs mailing list
Bochs-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bochs-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic