tAdded --enable-plugins configure option to control whether to build plugins or… | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit a9fce5f09c8198b66ee1afc830dc448edd3e5653 | |
parent bcd618d514ac79115f96ea2f3affcffe4a2bb7de | |
Author: Ben Webb <[email protected]> | |
Date: Mon, 13 May 2002 15:24:27 +0000 | |
Added --enable-plugins configure option to control whether to build plugins | |
or to statically link them in; separated LDFLAGS for each plugin so that | |
(e.g.) the ESD plugin does not get linked against SDL. | |
Diffstat: | |
M configure.in | 25 ++++++++++++++++++++++++- | |
1 file changed, 24 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/configure.in b/configure.in | |
t@@ -170,6 +170,7 @@ else | |
if test "$ESD" = "yes"; then | |
SOUND_CFLAGS="$SOUND_CFLAGS $ESD_CFLAGS" | |
SOUND_LIBS="$SOUND_LIBS $ESD_LIBS" | |
+ AC_SUBST(ESD_LIBS) | |
AC_DEFINE(HAVE_ESD, 1, [Do we have the ESD sound library?]) | |
fi | |
t@@ -184,7 +185,9 @@ else | |
if test "$libs" = "yes"; then | |
if test "$headers" = "yes"; then | |
SOUND_CFLAGS="$SOUND_CFLAGS $SDL_CFLAGS" | |
- SOUND_LIBS="$SOUND_LIBS $SDL_LIBS -lSDL_mixer" | |
+ SDL_LIBS="$SDL_LIBS -lSDL_mixer" | |
+ SOUND_LIBS="$SOUND_LIBS $SDL_LIBS" | |
+ AC_SUBST(SDL_LIBS) | |
AC_DEFINE(HAVE_SDL_MIXER, 1, [Do we have the SDL_mixer sound library?… | |
fi | |
fi | |
t@@ -251,6 +254,26 @@ AC_FUNC_SETVBUF_REVERSED | |
AC_FUNC_STRFTIME | |
AC_CHECK_FUNCS(strdup strstr getopt getopt_long fork) | |
+dnl Enable plugins only if we can find the dlopen function, and | |
+dnl the user does not disable them | |
+AC_ARG_ENABLE(plugins, | |
+[ --enable-plugins use dynamically-loaded sound modules], | |
+[ plugins="$enableval" ],[ plugins="probe" ]) | |
+ | |
+if test "$plugins" != "no" ; then | |
+ AC_SEARCH_LIBS(dlopen, dl) | |
+ AC_CHECK_FUNC(dlopen, [plugins="yes"], [plugins="no"]) | |
+fi | |
+ | |
+if test "$plugins" = "yes" ; then | |
+ AC_DEFINE(PLUGINS, 1, [Define if using dynamically-loaded sound modules]) | |
+else | |
+ PLUGOBJS="plugins/sound_sdl.o plugins/sound_esd.o plugins/sound_winmm.o" | |
+ AC_SUBST(PLUGOBJS) | |
+ PLUGLIBS="$SOUND_LIBS" | |
+ AC_SUBST(PLUGLIBS) | |
+fi | |
+ | |
dnl Enable networking by default under Win32, but on Unix systems | |
dnl make it dependent on the availability of select and socket | |
network="no" |