From 1d6c5c095d1d649e773a6e7f786adf707883d8c7 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Fri, 11 Sep 2009 12:48:00 +0000
Subject: [PATCH] removed HAVE_NO_DLL option

---
 CMakeLists.txt           | 3 ---
 Common/GmshConfig.h.in   | 1 -
 Plugin/PluginManager.cpp | 7 +++++--
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e5680b14ea..3c8371ac10 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -545,9 +545,6 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
   endif(HAVE_OCC)
 endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
 
-set(HAVE_NO_DLL TRUE)
-list(APPEND CONFIG_OPTIONS "NoDll")
-
 include(CheckFunctionExists)
 check_function_exists(vsnprintf HAVE_VSNPRINTF)
 if(NOT HAVE_VSNPRINTF)
diff --git a/Common/GmshConfig.h.in b/Common/GmshConfig.h.in
index 14df86efd5..065909fc38 100644
--- a/Common/GmshConfig.h.in
+++ b/Common/GmshConfig.h.in
@@ -27,7 +27,6 @@
 #cmakedefine HAVE_MPI
 #cmakedefine HAVE_NATIVE_FILE_CHOOSER
 #cmakedefine HAVE_NETGEN
-#cmakedefine HAVE_NO_DLL
 #cmakedefine HAVE_NO_PARSER
 #cmakedefine HAVE_NO_POST
 #cmakedefine HAVE_NO_SOCKLEN_T
diff --git a/Plugin/PluginManager.cpp b/Plugin/PluginManager.cpp
index 5ba35b7155..04be048ba2 100644
--- a/Plugin/PluginManager.cpp
+++ b/Plugin/PluginManager.cpp
@@ -46,7 +46,10 @@
 #include "FiniteElement.h"
 #include "HomologyComputation.h"
 
-#if !defined(HAVE_NO_DLL)
+// for testing purposes only :-)
+#undef HAVE_DLOPEN
+
+#if defined(HAVE_DLOPEN)
 #include <dlfcn.h>
 #endif
 
@@ -241,7 +244,7 @@ void PluginManager::registerDefaultPlugins()
 
 void PluginManager::addPlugin(std::string fileName)
 {
-#if defined(HAVE_NO_DLL) || !defined(HAVE_FLTK)
+#if !defined(HAVE_DLOPEN) || !defined(HAVE_FLTK)
   Msg::Warning("No dynamic plugin loading on this platform");
 #else
   Msg::Info("Opening Plugin '%s'", fileName.c_str());
-- 
GitLab