You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/games-strategy/dunelegacy/files/dunelegacy-0.96.2-build.patch

58 lines
1.6 KiB

Author: hasufell <hasufell@gentoo.org>
Date: Thu Aug 9 18:57:40 2012 +0200
respect flags
use pkg-config
use LDADD instead of LDFLAGS for libs
--- configure.ac
+++ configure.ac
@@ -16,38 +16,13 @@
AC_SUBST(dunelegacydatadir)
-dnl Some flags for gcc
-CXXFLAGS="-O3 -mno-fused-madd -pipe -pedantic -Wall -Wextra -Wno-unused-parameter"
-dnl Additional flags: -Wconversion -Wno-sign-conversion
-
-case "$target_cpu" in
-i*86) CXXFLAGS="$CXXFLAGS -mfpmath=sse -msse";;
-esac
-
-AC_ARG_ENABLE([debug],
- [AS_HELP_STRING([--enable-debug],
- [compile with debug information @<:@default=disabled@:>@])],
- [],
- [])
-
-if test "$enable_debug" = "yes" ; then
- CXXFLAGS="$CXXFLAGS -g"
-fi
-
dnl Check for SDL library
SDL_VERSION=1.2.0
-AM_PATH_SDL($SDL_VERSION, : , AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]))
+PKG_CHECK_MODULES([SDL], [sdl >= 1.2.0 SDL_mixer])
CFLAGS="$CFLAGS $SDL_CFLAGS"
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
-dnl Check for SDL_mixer library.
-AC_CHECK_LIB(SDL_mixer,
- Mix_OpenAudio,
- LIBS="$LIBS -lSDL_mixer",
- AC_MSG_ERROR([*** SDL_mixer library not found!])
-)
-
dnl enet defines
AC_CHECK_FUNC(gethostbyaddr_r, [AC_DEFINE(HAS_GETHOSTBYADDR_R)])
AC_CHECK_FUNC(gethostbyname_r, [AC_DEFINE(HAS_GETHOSTBYNAME_R)])
--- tests/Makefile.am
+++ tests/Makefile.am
@@ -55,4 +55,4 @@
runtests_CXXFLAGS = $(CPPUNIT_CFLAGS) -DTESTSRC=\"$(srcdir)\" -I$(top_srcdir)/include
-runtests_LDFLAGS = $(CPPUNIT_LIBS) -lcppunit
+runtests_LDADD = $(CPPUNIT_LIBS) -lcppunit