]> git.pld-linux.org Git - packages/scorched3d.git/blame - scorched3d-openal.patch
- d'oh! install fix; release 6
[packages/scorched3d.git] / scorched3d-openal.patch
CommitLineData
3efce1fc 1--- scorched/configure-al.m4~ 2009-10-02 00:22:31.000000000 +0200
2+++ scorched/configure-al.m4 2010-05-04 13:58:31.557872694 +0200
3@@ -1,109 +1,8 @@
951d6287 4 dnl Checking for OpenAL
5-AC_ARG_WITH([openal-static],
6- AC_HELP_STRING([--with-openal-static],
7- [enable static linking for openal (default no)]),
8- [use_static_openal=${withval}],,)
9-AC_ARG_ENABLE(openaltest,
10- [ --disable-openaltest Do not try to compile and run a test OpenAL program],
11- , enable_openaltest=yes)
12-AC_MSG_CHECKING(for OpenAL support)
13-AC_PATH_PROG(OPENAL_CONFIG, openal-config, no)
14-if test x$OPENAL_CONFIG = xno; then
15- echo "*** The openal-config script installed by OpenAL could not be found"
16- echo "*** Make sure openal-config is in your path, or set the OPENAL_CONFIG"
17- echo "*** environment variable to the full path to openal-config."
18-
19- AC_MSG_ERROR([*** Can't find the openal library. Try: http://www.openal.org/])
20-else
21-
22- if test x"$use_static_openal" = x"yes"; then
23- AL_LIBS="/usr/local/lib/libopenal.a"
24- else
25- AL_LIBS="`$OPENAL_CONFIG --libs`"
26- fi
27-
28- AL_CFLAGS="`$OPENAL_CONFIG --cflags`"
29-
30- AC_MSG_RESULT(yes)
31-fi
32-
33-AC_MSG_CHECKING(for Freealut support)
34-AC_PATH_PROG(FREEALUT_CONFIG, freealut-config, no)
35-if test x$FREEALUT_CONFIG = xno; then
36- echo "*** Warning: The freealut-config script installed by OpenAL could not be found."
37- echo "*** The alut library is required, however some older OpenAL distribitions may include it."
38- echo "*** If Scorched3D fails to link check alut is in the link line."
39- echo "*** Alternatively, make sure freealut-config is in your path, or set the FREEALUT_CONFIG"
40- echo "*** environment variable to the full path to openal-config."
41-else
42-
43- AL_LIBS="$AL_LIBS `$FREEALUT_CONFIG --libs`"
44- AL_CFLAGS="$AL_CFLAGS `$FREEALUT_CONFIG --cflags`"
45-
46- AC_MSG_RESULT(yes)
47-fi
48-
49-AC_MSG_CHECKING(for OpenAL compilation)
50-if test "x$enable_openaltest" = "xyes" ; then
51-
52- ac_save_CFLAGS="$CFLAGS"
53- ac_save_LIBS="$LIBS"
54- CFLAGS="$CFLAGS $AL_CFLAGS"
55- LIBS="$AL_LIBS $LIBS"
56-
57- AC_TRY_COMPILE([
58-#ifdef __APPLE__
59- #include <OpenAL/al.h>
951d6287 60- #include <OpenAL/alc.h>
61-#else
62- #include <AL/al.h>
63- #include <AL/alut.h>
64- #include <AL/alc.h>
65-#endif
66-
67- ],[
68- ],[
69- have_openal=yes
70- ],[
71- echo "*** Failed to compile using the OpenAL library."
72- echo "*** CFLAGS = $AL_CFLAGS";
73- AC_MSG_ERROR([*** Check the OpenAL library is correctly installed.])
74- ])
75-
76- AC_TRY_LINK([
77-#ifdef __APPLE__
78- #include <OpenAL/al.h>
951d6287 79- #include <OpenAL/alc.h>
80-#else
81- #include <AL/al.h>
82- #include <AL/alut.h>
83- #include <AL/alc.h>
84-#endif
85-
86- int main(int argc, char *argv[])
87- {
88- alutInit(argc, argv);
89- return 0;
90- }
91-#undef main
92-#define main K_and_R_C_main
93-
94- ],[
95- ],[
96- have_openal=yes
97- ],[
98- echo "*** Compiled but failed to link using the OpenAL library."
99- echo "*** LIBS = $AL_LIBS";
100- echo "*** Check the OpenAL library is on the LD_LIBRARY_PATH";
101- AC_MSG_ERROR([*** Check the OpenAL library is correctly installed.])
102- ])
103-
104- CFLAGS="$ac_save_CFLAGS"
105- LIBS="$ac_save_LIBS"
106-
107- AC_MSG_RESULT(yes)
108-fi
109-
110+PKG_CHECK_MODULES([OPENAL], [openal])
111+PKG_CHECK_MODULES([FREEALUT], [freealut])
112+AL_CFLAGS="$OPENAL_CFLAGS $FREEALUT_CFLAGS"
113+AL_LIBS="$OPENAL_LIBS $FREEALUT_LIBS"
114 AC_SUBST(AL_CFLAGS)
115 AC_SUBST(AL_LIBS)
116
This page took 0.054193 seconds and 4 git commands to generate.