diff options
| author | Max Horn | 2005-02-06 17:21:31 +0000 | 
|---|---|---|
| committer | Max Horn | 2005-02-06 17:21:31 +0000 | 
| commit | 8525d73e9b16546a2ceee6c12005811089ba6da2 (patch) | |
| tree | b68dee879a5c54ed0cd145775ac5233de015113d | |
| parent | 683e934908ac90253e25f78d3f8d299d122b136b (diff) | |
| download | scummvm-rg350-8525d73e9b16546a2ceee6c12005811089ba6da2.tar.gz scummvm-rg350-8525d73e9b16546a2ceee6c12005811089ba6da2.tar.bz2 scummvm-rg350-8525d73e9b16546a2ceee6c12005811089ba6da2.zip | |
Configure the plugin prefix/suffix in the configure script; use that setting in plugins.cpp
svn-id: r16739
| -rw-r--r-- | Makefile | 12 | ||||
| -rw-r--r-- | base/plugins.cpp | 2 | ||||
| -rwxr-xr-x | configure | 27 | 
3 files changed, 28 insertions, 13 deletions
| @@ -29,18 +29,6 @@ CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wconversion  CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor  CXXFLAGS+= -Wno-reorder -Wwrite-strings -fcheck-new -Wctor-dtor-privacy  -###################################################################### -# Plugin settings -###################################################################### - -# Plugin prefix. Typically "lib" on Unix, and nothing everywhere else -PLUGIN_PREFIX := lib -# Plugin suffix. For static/shared libs this is typically ".so"/".a" on Unix, -# ".dll"/".lib" on Windows, ".bundle"/".a" on OS X, etc. -PLUGIN_SUFFIX := .so - -PLUGIN_EXTRA_DEPS := $(EXECUTABLE) -  #######################################################################  # Misc stuff - you should never have to edit this                     #  ####################################################################### diff --git a/base/plugins.cpp b/base/plugins.cpp index b5745095d9..05c9ec84b1 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -39,7 +39,7 @@ typedef DetectedGameList (*DetectFunc)(const FSList &fslist);  #ifdef UNIX  #include <dlfcn.h> -#define DYNAMIC_PLUGIN_PATH(name) (name "/lib" name ".so") +#define DYNAMIC_PLUGIN_PATH(name) (name "/" PLUGIN_PREFIX name PLUGIN_SUFFIX)  #else  #ifdef __DC__  #include "dcloader.h" @@ -761,11 +761,19 @@ fi  #  echocheck "Plugin support"  _mak_plugins= +_def_plugin=  if test "$_build_plugins" = yes ; then      case $_host_os in  	linux*) +_def_plugin=' +#define PLUGIN_PREFIX	"lib" +#define PLUGIN_SUFFIX	".so" +'  _mak_plugins='  BUILD_PLUGINS := 1 +PLUGIN_PREFIX := lib +PLUGIN_SUFFIX := .so +PLUGIN_EXTRA_DEPS := $(EXECUTABLE)  CXXFLAGS      += -DDYNAMIC_MODULES  CXXFLAGS        += -fpic  PLUGIN_LDFLAGS  += -shared @@ -775,8 +783,15 @@ LIBS            += -ldl  '  	    ;;  	freebsd*) +_def_plugin=' +#define PLUGIN_PREFIX	"lib" +#define PLUGIN_SUFFIX	".so" +'  _mak_plugins='  BUILD_PLUGINS := 1 +PLUGIN_PREFIX := lib +PLUGIN_SUFFIX := .so +PLUGIN_EXTRA_DEPS := $(EXECUTABLE)  CXXFLAGS      += -DDYNAMIC_MODULES  CXXFLAGS        += -fpic  PLUGIN_LDFLAGS  += -shared @@ -785,8 +800,15 @@ POST_OBJS_FLAGS := -Wl,-no-whole-archive  '  	    ;;  	darwin*) +_def_plugin=' +#define PLUGIN_PREFIX	"" +#define PLUGIN_SUFFIX	".plugin" +'  _mak_plugins='  BUILD_PLUGINS := 1 +PLUGIN_PREFIX :=  +PLUGIN_SUFFIX := .plugin +PLUGIN_EXTRA_DEPS := $(EXECUTABLE)  CXXFLAGS      += -DDYNAMIC_MODULES  PLUGIN_LDFLAGS  += -bundle -bundle_loader $(EXECUTABLE) -exported_symbols_list "$(srcdir)/plugin.exp"  PRE_OBJS_FLAGS  := -all_load @@ -796,6 +818,8 @@ LIBS            += -ldl  	    ;;  	*)  	    _build_plugins=no +		_mak_plugins= +		_def_plugin=  	    ;;      esac  fi @@ -1095,6 +1119,9 @@ $_def_mt32emu  /* Whether we should use i386 assembly routines */  $_def_nasm +/* Plugin settings */ +$_def_plugin +  #endif /* CONFIG_H */  EOF | 
