patches/xpilot-ng-01-freealut.diff
author jurikm
Sun, 12 Feb 2012 14:04:10 +0000
changeset 8245 383896da4129
parent 610 f9420916cc03
permissions -rw-r--r--
SFEsauerbraten.spec: add IPS package name

--- xpilot-ng-4.7.2.orig/configure.ac	Thu Sep 15 19:35:33 2005
+++ xpilot-ng-4.7.2/configure.ac	Sat Oct 27 21:14:25 2007
@@ -314,21 +314,31 @@
 dnl OpenAL client sound support.
 if test x$enable_sound = xyes; then
 	have_openal=no
+	have_alut=no
+	have_sound=no
 	AC_CHECK_LIB(
 		openal, 
-		alutInit, 
+		main, 
 		[have_openal=yes],
 		[])
+	AC_CHECK_LIB(
+		alut, 
+		main, 
+		[have_alut=yes],
+		[])
 	if test x$have_openal = xyes; then
-		SOUND_LIBS=-lopenal
-		AC_DEFINE([SOUND], 1, [Define to 1 if you want OpenAL sound.])
-	else
-		echo "*** Client sound disabled. Check that you have OpenAL installed."
+		if test x$have_alut = xyes; then
+			have_sound=yes
+			SOUND_LIBS="-lopenal -lalut"
+			AC_DEFINE([SOUND], 1, [Define to 1 if you want OpenAL sound.])
+		else
+			echo "*** Client sound disabled. Check that you have OpenAL installed."
+		fi
 	fi
 	AC_SUBST(SOUND_LIBS)
 fi
 
-AM_CONDITIONAL([COND_SOUND], [test x$have_openal = xyes])
+AM_CONDITIONAL([COND_SOUND], [test x$have_sound = xyes])
 
 dnl  Checks for header files.
 dnl AC_HEADER_STDC