From 15bdd4ad67592014cb526b616d24a5b470a053ea Mon Sep 17 00:00:00 2001 From: Chris Ison Date: Tue, 9 Oct 2001 21:36:57 +0000 Subject: [PATCH] disabled -lm checking for cygwin and mingw32 and added plugin_LDFLAGS and plugin_LIBADD for win32 builds --- configure.ac | 24 +++++++++++++++++++++--- libs/audio/cd/Makefile.am | 20 +++++++++++--------- libs/audio/targets/Makefile.am | 14 ++++++++------ libs/console/Makefile.am | 7 ++++--- 4 files changed, 44 insertions(+), 21 deletions(-) diff --git a/configure.ac b/configure.ac index 9d6677512..567ab06c7 100644 --- a/configure.ac +++ b/configure.ac @@ -346,8 +346,16 @@ if test "x$ac_cv_func_vsnprintf" = "xno" -a \ AC_CHECK_LIB(db,vsnprintf) fi -dnl Checks for working -lm -AC_CHECK_LIB(m, pow,, AC_MSG_ERROR([math library (-lm) appears broken])) +case "$target_os" in + cygwin*) + ;; + mingw32*) + ;; + *) + dnl Checks for working -lm + AC_CHECK_LIB(m, pow,, AC_MSG_ERROR([math library (-lm) appears broken])) + ;; +esac AC_ARG_ENABLE(zlib, [ --disable-zlib disable zlib support], @@ -1210,9 +1218,19 @@ if test "x$GCC" = "xyes"; then fi AS="$CC" -ASFLAGS="\$(DEFS) \$(CFLAGS) \$(CPPFLAGS) \$(DEFAULT_INCLUDES) \$(INCLUDES)" +if test "xSYSTYPE" = "xWIN32"; then + ASFLAGS="\$(DEFS) \$(CFLAGS) \$(CPPFLAGS) \$(DEFAULT_INCLUDES) \$(INCLUDES) -DWIN32" + plugin_LDFLAGS="-no-undefined" + plugin_LIBADD="-luser32 -lgdi32 -lwinmm" +else + ASFLAGS="\$(DEFS) \$(CFLAGS) \$(CPPFLAGS) \$(DEFAULT_INCLUDES) \$(INCLUDES)" + plugin_LDFLAGS= + plugin_LIBADD= +fi AC_SUBST(AS) AC_SUBST(ASFLAGS) +AC_SUBST(plugin_LDFLAGS) +AC_SUBST(plugin_LIBADD) dnl ================================================================== dnl Make sure we link against a working zlib diff --git a/libs/audio/cd/Makefile.am b/libs/audio/cd/Makefile.am index da3326885..d7cfec30a 100644 --- a/libs/audio/cd/Makefile.am +++ b/libs/audio/cd/Makefile.am @@ -6,23 +6,25 @@ XMMS_LIBS = @XMMS_LIBS@ plugin_LTLIBRARIES= @CD_PLUGIN_TARGETS@ EXTRA_LTLIBRARIES= libcd_linux.la libcd_sdl.la libcd_sgi.la libcd_win.la libcd_null.la libcd_xmms.la -libcd_linux_la_LDFLAGS= -version-info 1:0:0 -rpath $(plugindir) -libcd_linux_la_SOURCES= cd_linux.c +libcd_linux_la_LDFLAGS= -version-info 1:0:0 -rpath $(plugindir) +libcd_linux_la_SOURCES= cd_linux.c -libcd_xmms_la_LDFLAGS= -version-info 1:0:0 -rpath $(plugindir) +libcd_xmms_la_LDFLAGS= -version-info 1:0:0 -rpath $(plugindir) libcd_xmms_la_LIBADD= $(XMMS_LIBS) -libcd_xmms_la_SOURCES= cd_xmms.c +libcd_xmms_la_SOURCES= cd_xmms.c -libcd_sdl_la_LDFLAGS= -version-info 1:0:0 -rpath $(plugindir) -libcd_sdl_la_LIBADD= $(SDL_LIBS) +libcd_sdl_la_LDFLAGS= $(plugin_LDFLAGS) -version-info 1:0:0 -rpath $(plugindir) +libcd_sdl_la_LIBADD= $(SDL_LIBS) $(plugin_LIBADD) libcd_sdl_la_SOURCES= cd_sdl.c libcd_sgi_la_LDFLAGS= -version-info 1:0:0 -rpath $(plugindir) libcd_sgi_la_LIBADD= $(SGI_CD_LIBS) libcd_sgi_la_SOURCES= cd_sgi.c -libcd_win_la_LDFLAGS= -version-info 1:0:0 -rpath $(plugindir) +libcd_win_la_LDFLAGS= $(plugin_LDFLAGS) -version-info 1:0:0 -rpath $(plugindir) +libcd_win_la_LIBADD= $(plugin_LIBADD) libcd_win_la_SOURCES= cd_win.c -libcd_null_la_LDFLAGS= -version-info 1:0:0 -rpath $(plugindir) -libcd_null_la_SOURCES= cd_null.c +libcd_null_la_LDFLAGS= $(plugin_LDFLAGS) -version-info 1:0:0 -rpath $(plugindir) +libcd_null_la_LIBADD= $(plugin_LIBADD) +libcd_null_la_SOURCES= cd_null.c diff --git a/libs/audio/targets/Makefile.am b/libs/audio/targets/Makefile.am index 91c449f91..6314b2bac 100644 --- a/libs/audio/targets/Makefile.am +++ b/libs/audio/targets/Makefile.am @@ -4,8 +4,8 @@ SDL_LIBS = @SDL_LIBS@ plugin_LTLIBRARIES = @SND_PLUGIN_TARGETS@ EXTRA_LTLIBRARIES = libsnd_output_sdl.la libsnd_output_alsa0_5.la libsnd_output_alsa0_9.la libsnd_output_oss.la libsnd_output_sgi.la libsnd_output_sun.la libsnd_output_win.la libsnd_output_null.la libsnd_output_disk.la -libsnd_output_sdl_la_LDFLAGS= -version-info 1:0:0 -rpath $(plugindir) -libsnd_output_sdl_la_LIBADD= $(SDL_LIBS) +libsnd_output_sdl_la_LDFLAGS= $(plugin_LDFLAGS) -version-info 1:0:0 -rpath $(plugindir) +libsnd_output_sdl_la_LIBADD= $(SDL_LIBS) $(plugin_LIBADD) libsnd_output_sdl_la_SOURCES= snd_sdl.c libsnd_output_alsa0_5_la_LDFLAGS= -version-info 1:0:0 -rpath $(plugindir) @@ -27,12 +27,14 @@ libsnd_output_sgi_la_SOURCES= snd_sgi.c libsnd_output_sun_la_LDFLAGS= -version-info 1:0:0 -rpath $(plugindir) libsnd_output_sun_la_SOURCES= snd_sun.c -libsnd_output_win_la_LDFLAGS= -version-info 1:0:0 -rpath $(plugindir) -libsnd_output_win_la_LIBADD= $(WINSND_LIBS) +libsnd_output_win_la_LDFLAGS= $(plugin_LDFLAGS) -version-info 1:0:0 -rpath $(plugindir) +libsnd_output_win_la_LIBADD= $(WINSND_LIBS) $(plugin_LIBADD) libsnd_output_win_la_SOURCES= snd_win.c -libsnd_output_disk_la_LDFLAGS= -version-info 1:0:0 -rpath $(plugindir) +libsnd_output_disk_la_LDFLAGS= $(plugin_LDFLAGS) -verison-info 1:0:0 -rpath $(plugindir) +libsnd_output_disk_la_LIBADD= $(plugin_LIBADD) libsnd_output_disk_la_SOURCES= snd_disk.c -libsnd_output_null_la_LDFLAGS= -version-info 1:0:0 -rpath $(plugindir) +libsnd_output_null_la_LDFLAGS= $(plugin_LDFLAGS) -version-info 1:0:0 -rpath $(plugindir) +libsnd_output_disk_la_LIBADD= $(plugin_LIBADD) libsnd_output_null_la_SOURCES= snd_null.c diff --git a/libs/console/Makefile.am b/libs/console/Makefile.am index 7412794fb..316894b72 100644 --- a/libs/console/Makefile.am +++ b/libs/console/Makefile.am @@ -7,12 +7,13 @@ common_sources= buffer.c complete.c console.c inputline.c list.c client_sources= client.c server_sources= server.c -libQFconsole_la_LDFLAGS= -version-info 1:0:0 +libQFconsole_la_LDFLAGS= $(plugin_LDFLAGS) -version-info 1:0:0 +libQFconsole_la_LIBADD= $(plugin_LIBADD) libQFconsole_la_SOURCES= $(common_sources) #libconsole_client_la_LDFLAGS= -version-info 1:0:0 #libconsole_client_la_SOURCES= $(client_sources) -libconsole_server_la_LDFLAGS= -version-info 1:0:0 -libconsole_server_la_LIBADD= $(CURSES_LIBS) +libconsole_server_la_LDFLAGS= $(plugin_LDFLAGS) -version-info 1:0:0 +libconsole_server_la_LIBADD= $(CURSES_LIBS) $(plugin_LIBADD) libconsole_server_la_SOURCES= $(server_sources)