--- a/ChangeLog Fri May 07 16:07:52 2010 +0000
+++ b/ChangeLog Sat May 08 11:24:36 2010 +0000
@@ -1,4 +1,8 @@
-2010-0507 Gilles Dauphin
+2010-05-08 Milan Jurik <[email protected]>
+
+ * SFEscorched3d.spec: update to 43.1c
+
+2010-05-07 Gilles Dauphin
* SFEosg.spec
* SFER-car.spec
--- a/SFEscorched3d.spec Fri May 07 16:07:52 2010 +0000
+++ b/SFEscorched3d.spec Sat May 08 11:24:36 2010 +0000
@@ -8,23 +8,38 @@
%include Solaris.inc
%define SFEfreetype %(/usr/bin/pkginfo -q SFEfreetype && echo 1 || echo 0)
+%define SFEsdl %(/usr/bin/pkginfo -q SFEsdl && echo 1 || echo 0)
+%define SFEwxwidgets %(/usr/bin/pkginfo -q SFEwxwidgets && echo 1 || echo 0)
+
+
+%define src_version 43.1c
Name: SFEscorched3d
Summary: A 3D game based on the classic DOS game, Scorched Earth
-Version: 41.3
-Source: %{sf_download}/scorched3d/Scorched3D-%{version}-src.tar.gz
+Version: 43.1.0.3
+Source: %{sf_download}/scorched3d/Scorched3D-%{src_version}-src.tar.gz
Source1: scorched3d.png
Source2: scorched3d.desktop
+URL: http://www.scorched3d.co.uk/
+License: GPL
+Group: Amusements/Games
Patch1: scorched3d-01-securid.diff
Patch2: scorched3d-02-sunpro.diff
Patch3: scorched3d-03-const.diff
Patch4: scorched3d-04-prototype.diff
+Patch5: scorched3d-05-openal.diff
SUNW_BaseDir: %{_basedir}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%include default-depend.inc
+
+%if %SFEsdl
BuildRequires: SFEsdl-devel
Requires: SFEsdl
+%else
+BuildRequires: SUNWlibsdl-devel
+Requires: SUNWlibsdl
+%endif
BuildRequires: SFEsdl-mixer-devel
Requires: SFEsdl-mixer
Requires: SUNWogg-vorbis
@@ -40,8 +55,13 @@
%endif
Requires: SFEfftw
BuildRequires: SFEfftw-devel
+%if %SFEwxwidgets
Requires: SFEwxwidgets
BuildRequires: SFEwxwidgets-devel
+%else
+BuildRequires: SUNWwxwidgets-devel
+Requires: SUNWwxwidgets
+%endif
Requires: SFEfreealut
BuildRequires: SFEfreealut-devel
Requires: SFEsdl-net
@@ -52,7 +72,8 @@
%patch1 -p1
%patch2 -p1
%patch3 -p1
-%patch4 -p1
+#%patch4 -p1
+%patch5 -p1
%build
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
@@ -60,24 +81,23 @@
CPUS=1
fi
-export CPPFLAGS="-D__C99FEATURES__"
export CXXFLAGS="%cxx_optflags"
-export CFLAGS="%optflags -I%{sfw_inc} -std=c99"
-export ACLOCAL_FLAGS="-I m4"
+export CFLAGS="%optflags -I%{sfw_inc}"
export MSGFMT="/usr/bin/msgfmt"
export LD=/usr/ccs/bin/ld
export LDFLAGS="%{_ldflags} -z ignore -z combreloc -z direct -lsocket -lnsl %{sfw_lib_path}"
export LIBS=${LDFLAGS}
+aclocal
+automake --foreign
+autoconf
+
./configure --prefix=%{_prefix} \
--mandir=%{_mandir} \
--libdir=%{_libdir} \
--libexecdir=%{_libexecdir} \
--sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} \
- --disable-nls \
- --enable-shared \
- --disable-static \
--with-wx-config=%{_prefix}/bin/wx-config
make -j$CPUS
@@ -105,6 +125,8 @@
%{_datadir}/*
%changelog
+* Sat May 08 2010 - Milan Jurik
+- update to 43.1c
* Fri Feb 22 2008 - [email protected]
- Use SFEwxwidgets instead of SFEwxwidgets-gnu
- Fix linking
--- a/patches/scorched3d-01-securid.diff Fri May 07 16:07:52 2010 +0000
+++ b/patches/scorched3d-01-securid.diff Sat May 08 11:24:36 2010 +0000
@@ -1,39 +1,38 @@
---- scorched/src/net/SecureID.cpp.orig 2008-02-10 19:32:09.798176874 +0530
-+++ scorched/src/net/SecureID.cpp 2008-02-10 19:49:01.902395952 +0530
-@@ -36,6 +36,11 @@
-
- #else
-
-+#if defined(__sun) || defined (__sun__)
-+#include <sys/sockio.h>
-+#endif
-+
-+#include <unistd.h>
- #include <sys/ioctl.h>
- #include <net/if.h>
-
-@@ -73,7 +78,12 @@
- if_freenameindex(NameList); //free the memory
-
- strcpy (dev.ifr_name, InterfaceName.c_str()); //select from the name
-+
-+#if defined(__sun) || defined (__sun__)
-+ if (ioctl(sock, SIOCGENADDR, &dev) < 0) //get the interface data
-+#else
- if (ioctl(sock, SIOCGIFHWADDR, &dev) < 0) //get the interface data
-+#endif
- {
- close(sock);
- return ""; //cannot list the interfaces
-@@ -81,7 +91,11 @@
-
- for (int i=0; i<6; i++)
- {
-+#if defined(__sun) || defined (__sun__)
-+ Key += (((unsigned int)dev.ifr_ifru.ifru_enaddr[i])&255);
-+#else
- Key += (((unsigned int)dev.ifr_hwaddr.sa_data[i])&255);
-+#endif
- if (i != 5) Key += ':';
- }
- close(sock);
+--- scorched/src/client/client/SecureID.cpp Sun Mar 2 19:47:36 2008
++++ scorched-patch/src/client/client/SecureID.cpp Sat May 8 12:28:54 2010
+@@ -38,6 +38,11 @@
+
+ #include <sys/ioctl.h>
+ #include <net/if.h>
++#if defined(__sun) || defined (__sun__)
++#include <sys/sockio.h>
++#include <unistd.h>
++#include <stropts.h>
++#endif
+
+ std::string SecureID::GetPrivateKey(void)
+ {
+@@ -73,7 +78,11 @@
+ if_freenameindex(NameList); //free the memory
+
+ strcpy (dev.ifr_name, InterfaceName.c_str()); //select from the name
++#if defined(__sun) || defined (__sun__)
++ if (ioctl(sock, SIOCGENADDR, &dev) < 0) //get the interface data
++#else
+ if (ioctl(sock, SIOCGIFHWADDR, &dev) < 0) //get the interface data
++#endif
+ {
+ close(sock);
+ return ""; //cannot list the interfaces
+@@ -81,7 +90,11 @@
+
+ for (int i=0; i<6; i++)
+ {
++#if defined(__sun) || defined (__sun__)
++ Key += (((unsigned int)dev.ifr_ifru.ifru_enaddr[i])&255);
++#else
+ Key += (((unsigned int)dev.ifr_hwaddr.sa_data[i])&255);
++#endif
+ if (i != 5) Key += ':';
+ }
+ close(sock);
--- a/patches/scorched3d-02-sunpro.diff Fri May 07 16:07:52 2010 +0000
+++ b/patches/scorched3d-02-sunpro.diff Sat May 08 11:24:36 2010 +0000
@@ -1,22 +1,22 @@
---- scorched/src/wxdialogs/Display.cpp.orig Thu Dec 6 10:43:53 2007
-+++ scorched/src/wxdialogs/Display.cpp Fri Feb 22 16:45:17 2008
+--- scorched/src/launcher/wxdialogs/Display.cpp Sat May 8 11:35:35 2010
++++ scorched-patch/src/launcher/wxdialogs/Display.cpp Sat May 8 11:37:39 2010
@@ -146,16 +146,13 @@
- loadSizer->Add(new wxStaticText(parent, -1, wxT("Load the normal starting settings for Scorched3D. (FAST machines)")),
- 0, wxALL, 2);
- loadSizer->Add(IDC_LOADMEDIUM_CTRL, 0, wxALL, 2);
-- loadSizer->Add(new wxStaticText(parent, -1, wxT("Load a faster set of settings for Scorched3D. (MEDIUM machines)\n"
-- "Note: This will result in a slightly reduced graphical experience.")),
-+ loadSizer->Add(new wxStaticText(parent, -1, wxT("Load a faster set of settings for Scorched3D. (MEDIUM machines)\nNote: This will result in a slightly reduced graphical experience.")),
- 0, wxALL, 2);
- loadSizer->Add(IDC_LOADFASTEST_CTRL, 0, wxALL, 2);
-- loadSizer->Add(new wxStaticText(parent, -1, wxT("Load the fastest settings for Scorched3D. (SLOW machines)\n"
-- "Note: This will result in a greatly reduced graphical and audio experience.")),
-+ loadSizer->Add(new wxStaticText(parent, -1, wxT("Load the fastest settings for Scorched3D. (SLOW machines)\nNote: This will result in a greatly reduced graphical and audio experience.")),
- 0, wxALL, 2);
- loadSizer->Add(IDC_LOADSAFE_CTRL, 0, wxALL, 2);
-- loadSizer->Add(new wxStaticText(parent, -1, wxT("Load the safest settings for Scorched3D.\n"
-- "Note: This will result in a greatly reduced overall experience but may prevent crashes.")),
-+ loadSizer->Add(new wxStaticText(parent, -1, wxT("Load the safest settings for Scorched3D.\nNote: This will result in a greatly reduced overall experience but may prevent crashes.")),
- 0, wxALL, 2);
-
- speedSizer->Add(loadSizer, 0, wxGROW);
+ loadSizer->Add(new wxStaticText(parent, -1, wxT("Load the normal starting settings for Scorched3D. (FAST machines)")),
+ 0, wxALL, 2);
+ loadSizer->Add(IDC_LOADMEDIUM_CTRL, 0, wxALL, 2);
+- loadSizer->Add(new wxStaticText(parent, -1, wxT("Load a faster set of settings for Scorched3D. (MEDIUM machines)\n"
+- "Note: This will result in a slightly reduced graphical experience.")),
++ loadSizer->Add(new wxStaticText(parent, -1, wxT("Load a faster set of settings for Scorched3D. (MEDIUM machines)\nNote: This will result in a slightly reduced graphical experience.")),
+ 0, wxALL, 2);
+ loadSizer->Add(IDC_LOADFASTEST_CTRL, 0, wxALL, 2);
+- loadSizer->Add(new wxStaticText(parent, -1, wxT("Load the fastest settings for Scorched3D. (SLOW machines)\n"
+- "Note: This will result in a greatly reduced graphical and audio experience.")),
++ loadSizer->Add(new wxStaticText(parent, -1, wxT("Load the fastest settings for Scorched3D. (SLOW machines)\nNote: This will result in a greatly reduced graphical and audio experience.")),
+ 0, wxALL, 2);
+ loadSizer->Add(IDC_LOADSAFE_CTRL, 0, wxALL, 2);
+- loadSizer->Add(new wxStaticText(parent, -1, wxT("Load the safest settings for Scorched3D.\n"
+- "Note: This will result in a greatly reduced overall experience but may prevent crashes.")),
++ loadSizer->Add(new wxStaticText(parent, -1, wxT("Load the safest settings for Scorched3D.\nNote: This will result in a greatly reduced overall experience but may prevent crashes.")),
+ 0, wxALL, 2);
+
+ speedSizer->Add(loadSizer, 0, wxGROW);
--- a/patches/scorched3d-03-const.diff Fri May 07 16:07:52 2010 +0000
+++ b/patches/scorched3d-03-const.diff Sat May 08 11:24:36 2010 +0000
@@ -1,87 +1,107 @@
---- scorched/src/server/ServerNewGameState.cpp.orig Wed Dec 26 19:44:53 2007
-+++ scorched/src/server/ServerNewGameState.cpp Fri Feb 22 17:17:34 2008
-@@ -573,7 +573,7 @@
- {
- unsigned int startTime = (unsigned int)
- current->getScore().getStartTime();
-- ais_.insert(std::pair<unsigned int, unsigned int>
-+ ais_.insert(std::pair<const unsigned int, unsigned int>
- (startTime, current->getPlayerId()));
- }
- }
-@@ -585,7 +585,7 @@
- {
- if (aiItor != ais_.rend())
- {
-- std::pair<unsigned int, unsigned int> item = *aiItor;
-+ std::pair<const unsigned int, unsigned int> item = *aiItor;
- ServerMessageHandler::instance()->destroyPlayer(
- item.second, "Auto-kick");
- aiItor++;
-@@ -606,7 +606,7 @@
- Tank *current = (*mainitor).second;
- if (current->getDestinationId() == 0)
- {
-- ais_.insert(std::pair<std::string, unsigned int>
-+ ais_.insert(std::pair<const std::string, unsigned int>
- (current->getTankAI()->getName(),
- current->getPlayerId()));
- }
---- scorched/src/tankai/TankAICurrentTarget.cpp.orig Sun Sep 2 18:48:52 2007
-+++ scorched/src/tankai/TankAICurrentTarget.cpp Fri Feb 22 17:36:36 2008
+--- scorched/src/server/tankai/TankAICurrentTarget.cpp Sat May 8 12:57:53 2010
++++ scorched-patch/src/server/tankai/TankAICurrentTarget.cpp Sat May 8 12:57:40 2010
@@ -179,20 +179,20 @@
-
- if (damageTaken_.find(currentTank) != damageTaken_.end())
- {
-- damageTakenSorted.insert(std::pair<float, Tank *>(
-+ damageTakenSorted.insert(std::pair<const float, Tank *>(
- damageTaken_[currentTank], currentTank));
- }
- if (damageGiven_.find(currentTank) != damageGiven_.end())
- {
-- damageGivenSorted.insert(std::pair<float, Tank *>(
-+ damageGivenSorted.insert(std::pair<const float, Tank *>(
- damageGiven_[currentTank], currentTank));
- }
- if (shotAt_.find(currentTank) != shotAt_.end())
- {
-- shotAtSorted.insert(std::pair<float, Tank *>(
-+ shotAtSorted.insert(std::pair<const float, Tank *>(
- shotAt_[currentTank], currentTank));
- }
-- distanceSorted.insert(std::pair<float, Tank *>(
-+ distanceSorted.insert(std::pair<const float, Tank *>(
- ((currentTank->getPosition().getTankPosition() -
- thisTank->getPosition().getTankPosition()).Magnitude()).asFloat(), currentTank));
- }
+
+ if (damageTaken_.find(currentTank) != damageTaken_.end())
+ {
+- damageTakenSorted.insert(std::pair<float, Tank *>(
++ damageTakenSorted.insert(std::pair<const float, Tank *>(
+ damageTaken_[currentTank], currentTank));
+ }
+ if (damageGiven_.find(currentTank) != damageGiven_.end())
+ {
+- damageGivenSorted.insert(std::pair<float, Tank *>(
++ damageGivenSorted.insert(std::pair<const float, Tank *>(
+ damageGiven_[currentTank], currentTank));
+ }
+ if (shotAt_.find(currentTank) != shotAt_.end())
+ {
+- shotAtSorted.insert(std::pair<float, Tank *>(
++ shotAtSorted.insert(std::pair<const float, Tank *>(
+ shotAt_[currentTank], currentTank));
+ }
+- distanceSorted.insert(std::pair<float, Tank *>(
++ distanceSorted.insert(std::pair<const float, Tank *>(
+ ((currentTank->getPosition().getTankPosition() -
+ thisTank->getPosition().getTankPosition()).Magnitude()).asFloat(), currentTank));
+ }
@@ -233,7 +233,7 @@
- damagetakenScore * damagetaken_ +
- damagedoneScore * damagedone_ +
- distanceScore * distance_;
-- weightedTanks.insert(std::pair<float, Tank *>(weight, currentTank));
-+ weightedTanks.insert(std::pair<const float, Tank *>(weight, currentTank));
- }
-
- // Form the final list
---- scorched/src/tankai/TankAIWeaponSets.cpp.orig Sat Oct 6 18:49:04 2007
-+++ scorched/src/tankai/TankAIWeaponSets.cpp Fri Feb 22 17:38:23 2008
-@@ -113,7 +113,7 @@
- if (weapon.weaponValid(tank, lastRound))
- {
- potentialWeapons.insert(
-- std::pair<unsigned int, WeaponSetEntry *>
-+ std::pair<const unsigned int, WeaponSetEntry *>
- (weapon.prioritybuy, &weapon));
- }
- }
---- scorched/src/landscapemap/HeightMap.cpp.orig Sun Sep 2 18:48:51 2007
-+++ scorched/src/landscapemap/HeightMap.cpp Fri Feb 22 18:54:37 2008
-@@ -39,7 +39,7 @@
- delete [] backupMap_;
- }
-
--void HeightMap::create(const int width, const int height)
-+void HeightMap::create(int width, int height)
- {
- width_ = width;
- height_ = height;
+ damagetakenScore * damagetaken_ +
+ damagedoneScore * damagedone_ +
+ distanceScore * distance_;
+- weightedTanks.insert(std::pair<float, Tank *>(weight, currentTank));
++ weightedTanks.insert(std::pair<const float, Tank *>(weight, currentTank));
+ }
+
+ // Form the final list
+--- scorched/src/server/tankai/TankAIWeaponSets.cpp Sat May 8 12:58:13 2010
++++ scorched-patch/src/server/tankai/TankAIWeaponSets.cpp Sat May 8 12:58:07 2010
+@@ -126,7 +126,7 @@
+ if (weapon.weaponValid(tankAccessories, lastRound))
+ {
+ potentialWeapons.insert(
+- std::pair<unsigned int, WeaponSetEntry *>
++ std::pair<const unsigned int, WeaponSetEntry *>
+ (weapon.prioritybuy, &weapon));
+ }
+ }
+--- scorched/src/server/server/ServerStateEnoughPlayers.cpp Sat May 8 12:58:32 2010
++++ scorched-patch/src/server/server/ServerStateEnoughPlayers.cpp Sat May 8 12:58:28 2010
+@@ -171,7 +171,7 @@
+ {
+ unsigned int startTime = (unsigned int)
+ current->getScore().getStartTime();
+- ais_.insert(std::pair<unsigned int, unsigned int>
++ ais_.insert(std::pair<const unsigned int, unsigned int>
+ (startTime, current->getPlayerId()));
+ }
+ }
+@@ -182,7 +182,7 @@
+ noPlayers > requiredPlayers && aiItor != ais_.rend();
+ aiItor++, noPlayers--)
+ {
+- std::pair<unsigned int, unsigned int> item = *aiItor;
++ std::pair<const unsigned int, unsigned int> item = *aiItor;
+ ServerMessageHandler::instance()->destroyPlayer(
+ item.second, "Auto-kick");
+ }
+@@ -205,7 +205,7 @@
+ if (current->getDestinationId() == 0 &&
+ !current->getTankAI()->removedPlayer())
+ {
+- ais_.insert(std::pair<std::string, unsigned int>
++ ais_.insert(std::pair<const std::string, unsigned int>
+ (current->getTankAI()->getName(),
+ current->getPlayerId()));
+ }
+--- scorched/src/client/console/ConsoleRules.cpp Sat May 8 12:58:46 2010
++++ scorched-patch/src/client/console/ConsoleRules.cpp Sat May 8 12:58:42 2010
+@@ -38,7 +38,7 @@
+
+ std::string addName = rule->getName();
+ _strlwr((char *) addName.c_str());
+- rules_.insert(std::pair<std::string, ConsoleRule *>(addName, rule));
++ rules_.insert(std::pair<const std::string, ConsoleRule *>(addName, rule));
+ }
+
+ void ConsoleRules::removeRule(ConsoleRule *rule)
+@@ -189,7 +189,7 @@
+ {
+ ConsoleRule *rule = itor->second;
+ matchedRules.insert(
+- std::pair<int, ConsoleRule *>(
++ std::pair<const int, ConsoleRule *>(
+ (int) rule->getParams().size(), rule));
+ }
+
+--- scorched/src/common/landscapemap/HeightMap.cpp Sat May 8 12:59:03 2010
++++ scorched-patch/src/common/landscapemap/HeightMap.cpp Sat May 8 12:58:56 2010
+@@ -36,7 +36,7 @@
+ delete [] heightData_;
+ }
+
+-void HeightMap::create(const int width, const int height)
++void HeightMap::create(int width, int height)
+ {
+ width_ = width;
+ height_ = height;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/scorched3d-05-openal.diff Sat May 08 11:24:36 2010 +0000
@@ -0,0 +1,116 @@
+--- scorched/configure-al.m4 Fri Oct 2 00:22:31 2009
++++ scorched-patch/configure-al.m4 Sat May 8 11:22:36 2010
+@@ -1,109 +1,8 @@
+ dnl Checking for OpenAL
+-AC_ARG_WITH([openal-static],
+- AC_HELP_STRING([--with-openal-static],
+- [enable static linking for openal (default no)]),
+- [use_static_openal=${withval}],,)
+-AC_ARG_ENABLE(openaltest,
+- [ --disable-openaltest Do not try to compile and run a test OpenAL program],
+- , enable_openaltest=yes)
+-AC_MSG_CHECKING(for OpenAL support)
+-AC_PATH_PROG(OPENAL_CONFIG, openal-config, no)
+-if test x$OPENAL_CONFIG = xno; then
+- echo "*** The openal-config script installed by OpenAL could not be found"
+- echo "*** Make sure openal-config is in your path, or set the OPENAL_CONFIG"
+- echo "*** environment variable to the full path to openal-config."
+-
+- AC_MSG_ERROR([*** Can't find the openal library. Try: http://www.openal.org/])
+-else
+-
+- if test x"$use_static_openal" = x"yes"; then
+- AL_LIBS="/usr/local/lib/libopenal.a"
+- else
+- AL_LIBS="`$OPENAL_CONFIG --libs`"
+- fi
+-
+- AL_CFLAGS="`$OPENAL_CONFIG --cflags`"
+-
+- AC_MSG_RESULT(yes)
+-fi
+-
+-AC_MSG_CHECKING(for Freealut support)
+-AC_PATH_PROG(FREEALUT_CONFIG, freealut-config, no)
+-if test x$FREEALUT_CONFIG = xno; then
+- echo "*** Warning: The freealut-config script installed by OpenAL could not be found."
+- echo "*** The alut library is required, however some older OpenAL distribitions may include it."
+- echo "*** If Scorched3D fails to link check alut is in the link line."
+- echo "*** Alternatively, make sure freealut-config is in your path, or set the FREEALUT_CONFIG"
+- echo "*** environment variable to the full path to openal-config."
+-else
+-
+- AL_LIBS="$AL_LIBS `$FREEALUT_CONFIG --libs`"
+- AL_CFLAGS="$AL_CFLAGS `$FREEALUT_CONFIG --cflags`"
+-
+- AC_MSG_RESULT(yes)
+-fi
+-
+-AC_MSG_CHECKING(for OpenAL compilation)
+-if test "x$enable_openaltest" = "xyes" ; then
+-
+- ac_save_CFLAGS="$CFLAGS"
+- ac_save_LIBS="$LIBS"
+- CFLAGS="$CFLAGS $AL_CFLAGS"
+- LIBS="$AL_LIBS $LIBS"
+-
+- AC_TRY_COMPILE([
+-#ifdef __APPLE__
+- #include <OpenAL/al.h>
+- #include <OpenAL/alc.h>
+-#else
+- #include <AL/al.h>
+- #include <AL/alut.h>
+- #include <AL/alc.h>
+-#endif
+-
+- ],[
+- ],[
+- have_openal=yes
+- ],[
+- echo "*** Failed to compile using the OpenAL library."
+- echo "*** CFLAGS = $AL_CFLAGS";
+- AC_MSG_ERROR([*** Check the OpenAL library is correctly installed.])
+- ])
+-
+- AC_TRY_LINK([
+-#ifdef __APPLE__
+- #include <OpenAL/al.h>
+- #include <OpenAL/alc.h>
+-#else
+- #include <AL/al.h>
+- #include <AL/alut.h>
+- #include <AL/alc.h>
+-#endif
+-
+- int main(int argc, char *argv[])
+- {
+- alutInit(argc, argv);
+- return 0;
+- }
+-#undef main
+-#define main K_and_R_C_main
+-
+- ],[
+- ],[
+- have_openal=yes
+- ],[
+- echo "*** Compiled but failed to link using the OpenAL library."
+- echo "*** LIBS = $AL_LIBS";
+- echo "*** Check the OpenAL library is on the LD_LIBRARY_PATH";
+- AC_MSG_ERROR([*** Check the OpenAL library is correctly installed.])
+- ])
+-
+- CFLAGS="$ac_save_CFLAGS"
+- LIBS="$ac_save_LIBS"
+-
+- AC_MSG_RESULT(yes)
+-fi
+-
++PKG_CHECK_MODULES([OPENAL], [openal])
++PKG_CHECK_MODULES([FREEALUT], [freealut])
++AL_CFLAGS="$OPENAL_CFLAGS $FREEALUT_CFLAGS"
++AL_LIBS="$OPENAL_LIBS $FREEALUT_LIBS"
+ AC_SUBST(AL_CFLAGS)
+ AC_SUBST(AL_LIBS)
+