From 3163bf87d7b955d08dedd5ebaccb1b2a86ffdcb9 Mon Sep 17 00:00:00 2001
From: Simon Howard <fraggle@soulsphere.org>
Date: Thu, 25 Feb 2016 22:55:04 -0500
Subject: [PATCH] configure: Switch to pkg-config macros.
All dependency libraries install pkg-config .pc files nowadays, which
makes the process of looking them up a lot simpler. Get rid of the SDL
workaround macro as it's not needed.
[Backported from upstream commit 3163bf87d7b955d08dedd5ebaccb1b2a86ffdcb9.
Fixes static linking issues with SDL_mixer.]
Signed-off-by: Rodrigo Rebello <rprebello@gmail.com>
configure.ac | 117 ++++++++++++++--------------------------
opl/examples/Makefile.am | 2 +-
textscreen/Makefile.am | 2 +-
textscreen/examples/Makefile.am | 2 +-
5 files changed, 49 insertions(+), 81 deletions(-)
diff --git a/configure.ac b/configure.ac
index 7b03485..48f83ef 100644
CFLAGS="-O$OPT_LEVEL -g $WARNINGS $orig_CFLAGS"
-# Add the SDL compiler flags to the default compiler flag variables.
-# It is important to do this now, before checking for headers and
-# library functions. The reason being that on Windows, sdl-config
-# sets the -mno-cygwin compiler option in order to generate MinGW
-# executables. If we don't do this now, we might end up discovering
-# header files that are not actually available to us when we come
-CFLAGS="$CFLAGS $SDL_CFLAGS"
-LDFLAGS="$LDFLAGS $SDL_LIBS"
-# On some platforms, SDL renames main() to SDL_main() using a #define,
-# so that its own main, stored in the SDLmain library, can be run first.
-# Unfortunately, this causes problems for autoconf, which builds
-# test programs to probe the system. All library/header/symbol checks
-# must be run in this block, that performs a workaround for the problem.
-AC_SDL_MAIN_WORKAROUND([
- AC_CHECK_LIB(SDL_mixer,Mix_LoadMUS,[
- SDLMIXER_LIBS="$SDLMIXER_LIBS -lSDL_mixer"
- echo "*** Could not find SDL_mixer. Please install it."