mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-11 03:01:01 +00:00
Enable plugin support via configure script
svn-id: r12895
This commit is contained in:
parent
3684baeadb
commit
be218fa982
@ -31,36 +31,12 @@ DEPDIR := .deps
|
|||||||
# Plugin settings
|
# Plugin settings
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
# Whether to build plugins or now (TODO: should be set by configure script
|
|
||||||
#BUILD_PLUGINS := 1
|
|
||||||
|
|
||||||
# Plugin prefix. Typically "lib" on Unix, and nothing everywhere else
|
# Plugin prefix. Typically "lib" on Unix, and nothing everywhere else
|
||||||
PLUGIN_PREFIX := lib
|
PLUGIN_PREFIX := lib
|
||||||
# Plugin suffix. For static/shared libs this is typically ".so"/".a" on Unix,
|
# Plugin suffix. For static/shared libs this is typically ".so"/".a" on Unix,
|
||||||
# ".dll"/".lib" on Windows, ".bundle"/".a" on OS X, etc.
|
# ".dll"/".lib" on Windows, ".bundle"/".a" on OS X, etc.
|
||||||
PLUGIN_SUFFIX := .so
|
PLUGIN_SUFFIX := .so
|
||||||
|
|
||||||
ifdef BUILD_PLUGINS
|
|
||||||
# TODO: The following stuff should be controlled by 'configure'
|
|
||||||
|
|
||||||
# Define DYNAMIC_MODULES during building
|
|
||||||
CXXFLAGS += -DDYNAMIC_MODULES
|
|
||||||
|
|
||||||
# Uncomment these for Mac OS X
|
|
||||||
#PLUGIN_LDFLAGS += -bundle -bundle_loader $(EXECUTABLE)
|
|
||||||
#PRE_OBJS_FLAGS := -all_load
|
|
||||||
#POST_OBJS_FLAGS :=
|
|
||||||
#LIBS += -ldl
|
|
||||||
|
|
||||||
# Uncomment these for Linux
|
|
||||||
CXXFLAGS += -fpic
|
|
||||||
PLUGIN_LDFLAGS += -shared
|
|
||||||
PRE_OBJS_FLAGS := -Wl,-export-dynamic -Wl,-whole-archive
|
|
||||||
POST_OBJS_FLAGS := -Wl,-no-whole-archive
|
|
||||||
LIBS += -ldl
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Module settings
|
# Module settings
|
||||||
######################################################################
|
######################################################################
|
||||||
|
@ -10,7 +10,7 @@ ifdef PLUGIN
|
|||||||
# one of several build rules
|
# one of several build rules
|
||||||
PLUGIN-$(MODULE) := $(MODULE)/$(PLUGIN_PREFIX)$(MODULE)$(PLUGIN_SUFFIX)
|
PLUGIN-$(MODULE) := $(MODULE)/$(PLUGIN_PREFIX)$(MODULE)$(PLUGIN_SUFFIX)
|
||||||
$(PLUGIN-$(MODULE)): $(MODULE_OBJS) $(EXECUTABLE)
|
$(PLUGIN-$(MODULE)): $(MODULE_OBJS) $(EXECUTABLE)
|
||||||
$(CXX) $(PLUGIN_LDFLAGS) $(filter-out $(EXECUTABLE),$+) $(LIBS) -o $@
|
$(CXX) $(PLUGIN_LDFLAGS) $(filter-out $(EXECUTABLE),$+) -o $@
|
||||||
PLUGIN:=
|
PLUGIN:=
|
||||||
plugins: $(PLUGIN-$(MODULE))
|
plugins: $(PLUGIN-$(MODULE))
|
||||||
|
|
||||||
|
65
configure
vendored
65
configure
vendored
@ -38,6 +38,7 @@ _build_sword1=yes
|
|||||||
_build_sword2=yes
|
_build_sword2=yes
|
||||||
_build_queen=yes
|
_build_queen=yes
|
||||||
_need_memalign=no
|
_need_memalign=no
|
||||||
|
_build_plugins=no
|
||||||
# more defaults
|
# more defaults
|
||||||
_backend=sdl
|
_backend=sdl
|
||||||
_ranlib=ranlib
|
_ranlib=ranlib
|
||||||
@ -193,19 +194,26 @@ Optional Features:
|
|||||||
--disable-sword1 don't build the Broken Sword I engine
|
--disable-sword1 don't build the Broken Sword I engine
|
||||||
--disable-sword2 don't build the Broken Sword II engine
|
--disable-sword2 don't build the Broken Sword II engine
|
||||||
--disable-queen don't build the Flight of the Amazon Queen engine
|
--disable-queen don't build the Flight of the Amazon Queen engine
|
||||||
|
--enable-plugins build engines as loadable mdoules instead of
|
||||||
|
static linking them
|
||||||
|
|
||||||
Optional Libraries:
|
Optional Libraries:
|
||||||
--with-alsa-prefix=PFX Prefix where alsa is installed (optional)
|
--with-alsa-prefix=PFX Prefix where alsa is installed (optional)
|
||||||
--disable-alsa disable ALSA midi sound support [autodetect]
|
--disable-alsa disable ALSA midi sound support [autodetect]
|
||||||
|
|
||||||
--with-ogg-prefix=PFX Prefix where libogg is installed (optional)
|
--with-ogg-prefix=PFX Prefix where libogg is installed (optional)
|
||||||
--with-vorbis-prefix=PFX Prefix where libvorbis is installed (optional)
|
--with-vorbis-prefix=PFX Prefix where libvorbis is installed (optional)
|
||||||
--disable-vorbis disable Ogg Vorbis support [autodetect]
|
--disable-vorbis disable Ogg Vorbis support [autodetect]
|
||||||
|
|
||||||
--with-mad-prefix=PFX Prefix where libmad is installed (optional)
|
--with-mad-prefix=PFX Prefix where libmad is installed (optional)
|
||||||
--disable-mad disable libmad (MP3) support [autodetect]
|
--disable-mad disable libmad (MP3) support [autodetect]
|
||||||
|
|
||||||
--with-zlib-prefix=PFX Prefix where zlib is installed (optional)
|
--with-zlib-prefix=PFX Prefix where zlib is installed (optional)
|
||||||
--disable-zlib disable zlib (compression) support [autodetect]
|
--disable-zlib disable zlib (compression) support [autodetect]
|
||||||
--disable-mpeg2 disable mpeg2 codec for cutscenes [autodetect]
|
|
||||||
--with-mpeg2-prefix=PFX Prefix where libmpeg2 is installed (optional)
|
--with-mpeg2-prefix=PFX Prefix where libmpeg2 is installed (optional)
|
||||||
|
--disable-mpeg2 disable mpeg2 codec for cutscenes [autodetect]
|
||||||
|
|
||||||
--with-sdl-prefix=PFX Prefix where the sdl-config script is installed
|
--with-sdl-prefix=PFX Prefix where the sdl-config script is installed
|
||||||
|
|
||||||
Some influential environment variables:
|
Some influential environment variables:
|
||||||
@ -240,6 +248,7 @@ for ac_option in $@; do
|
|||||||
--enable-zlib) _zlib=yes ;;
|
--enable-zlib) _zlib=yes ;;
|
||||||
--disable-zlib) _zlib=no ;;
|
--disable-zlib) _zlib=no ;;
|
||||||
--disable-mpeg2) _mpeg2=no ;;
|
--disable-mpeg2) _mpeg2=no ;;
|
||||||
|
--enable-plugins) _build_plugins=yes ;;
|
||||||
--with-mpeg2-prefix=*)
|
--with-mpeg2-prefix=*)
|
||||||
_prefix=`echo $ac_option | cut -d '=' -f 2`
|
_prefix=`echo $ac_option | cut -d '=' -f 2`
|
||||||
MPEG2_CFLAGS="-I$_prefix/include"
|
MPEG2_CFLAGS="-I$_prefix/include"
|
||||||
@ -556,6 +565,44 @@ EOF
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check whether plugin support is requested and possible
|
||||||
|
#
|
||||||
|
echocheck "Plugin support"
|
||||||
|
_mak_plugins=
|
||||||
|
if test "$_build_plugins" = yes ; then
|
||||||
|
case $hosttype in
|
||||||
|
Linux)
|
||||||
|
_mak_plugins='
|
||||||
|
BUILD_PLUGINS := 1
|
||||||
|
CXXFLAGS += -DDYNAMIC_MODULES
|
||||||
|
CXXFLAGS += -fpic
|
||||||
|
PLUGIN_LDFLAGS += -shared
|
||||||
|
PRE_OBJS_FLAGS := -Wl,-export-dynamic -Wl,-whole-archive
|
||||||
|
POST_OBJS_FLAGS := -Wl,-no-whole-archive
|
||||||
|
LIBS += -ldl
|
||||||
|
'
|
||||||
|
;;
|
||||||
|
Darwin)
|
||||||
|
_mak_plugins='
|
||||||
|
BUILD_PLUGINS := 1
|
||||||
|
CXXFLAGS += -DDYNAMIC_MODULES
|
||||||
|
PLUGIN_LDFLAGS += -bundle -bundle_loader $(EXECUTABLE)
|
||||||
|
PRE_OBJS_FLAGS := -all_load
|
||||||
|
POST_OBJS_FLAGS :=
|
||||||
|
LIBS += -ldl
|
||||||
|
'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
_build_plugins=no
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
echo "$_build_plugins"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check for Ogg Vorbis
|
||||||
|
#
|
||||||
echocheck "Ogg Vorbis"
|
echocheck "Ogg Vorbis"
|
||||||
if test "$_vorbis" = auto ; then
|
if test "$_vorbis" = auto ; then
|
||||||
_vorbis=no
|
_vorbis=no
|
||||||
@ -575,6 +622,9 @@ else
|
|||||||
fi
|
fi
|
||||||
echo "$_vorbis"
|
echo "$_vorbis"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check for MAD (MP3 library)
|
||||||
|
#
|
||||||
echocheck "MAD"
|
echocheck "MAD"
|
||||||
if test "$_mad" = auto ; then
|
if test "$_mad" = auto ; then
|
||||||
_mad=no
|
_mad=no
|
||||||
@ -593,6 +643,9 @@ else
|
|||||||
fi
|
fi
|
||||||
echo "$_mad"
|
echo "$_mad"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check for ALSA
|
||||||
|
#
|
||||||
echocheck "ALSA >= 0.9"
|
echocheck "ALSA >= 0.9"
|
||||||
if test "$_alsa" = auto ; then
|
if test "$_alsa" = auto ; then
|
||||||
_alsa=no
|
_alsa=no
|
||||||
@ -611,6 +664,9 @@ else
|
|||||||
fi
|
fi
|
||||||
echo "$_alsa"
|
echo "$_alsa"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check for ZLib
|
||||||
|
#
|
||||||
echocheck "zlib"
|
echocheck "zlib"
|
||||||
if test "$_zlib" = auto ; then
|
if test "$_zlib" = auto ; then
|
||||||
_zlib=no
|
_zlib=no
|
||||||
@ -630,6 +686,9 @@ else
|
|||||||
fi
|
fi
|
||||||
echo "$_zlib"
|
echo "$_zlib"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check for LibMPEG2
|
||||||
|
#
|
||||||
echocheck "libmpeg2 >= 0.3.2"
|
echocheck "libmpeg2 >= 0.3.2"
|
||||||
if test "$_mpeg2" = auto ; then
|
if test "$_mpeg2" = auto ; then
|
||||||
_mpeg2=no
|
_mpeg2=no
|
||||||
@ -659,6 +718,9 @@ fi
|
|||||||
echo "$_mpeg2"
|
echo "$_mpeg2"
|
||||||
rm -f $TMPC $TMPO
|
rm -f $TMPC $TMPO
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check which engines ("frontends") are to be built
|
||||||
|
#
|
||||||
echo
|
echo
|
||||||
echo "Engines:"
|
echo "Engines:"
|
||||||
if test "$_build_scumm" = yes ; then
|
if test "$_build_scumm" = yes ; then
|
||||||
@ -767,6 +829,7 @@ BACKEND := $_backend
|
|||||||
MODULES += $MODULES
|
MODULES += $MODULES
|
||||||
MODULE_DIRS += $MODULE_DIRS
|
MODULE_DIRS += $MODULE_DIRS
|
||||||
|
|
||||||
|
$_mak_plugins
|
||||||
$_make_def_HAVE_GCC3
|
$_make_def_HAVE_GCC3
|
||||||
$_mak_scumm
|
$_mak_scumm
|
||||||
$_mak_simon
|
$_mak_simon
|
||||||
|
Loading…
x
Reference in New Issue
Block a user