We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 954

Summary: sdl-mixer flac test is not cross-compile friendly
Product: SDL_mixer Reporter: Mike Frysinger <vapier>
Component: miscAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: unspecified   
Hardware: Other   
OS: Linux   

Description Mike Frysinger 2010-02-17 03:28:55 UTC
the current flac test uses AC_TRY_RUN for no real reason.  the same exact result can be found via a simple compile test.

--- configure.in
+++ configure.in
@@ -417,16 +417,14 @@ if test x$enable_music_flac = xyes; then
         LIBS_SAVED="$LIBS"
         LIBS="-lFLAC"
         AC_MSG_CHECKING([for libflac so-name version >= $libflac_ver])
-        AC_TRY_RUN([
+        AC_TRY_COMPILE([
 #include "FLAC/export.h"
 #include "stdio.h"
-int main( int argc, char *argv[] ) {
+],[
 #if defined(FLAC_API_VERSION_CURRENT) && (FLAC_API_VERSION_CURRENT >= $libflac_ver)
-    return 0;
 #else
-    return 1;
+#error "old-flac"
 #endif
-}
 ], have_flac_ver=yes, have_flac_ver=no)
         LIBS="$LIBS_SAVED"
         AC_MSG_RESULT($have_flac_ver)
Comment 1 Sam Lantinga 2011-02-17 13:23:06 UTC
This change is in, thanks!
http://hg.libsdl.org/SDL_mixer/rev/209152025a0e