]> git.pld-linux.org Git - packages/scorched3d.git/blob - scorched3d-openal.patch
- fix building with wxWidgets 3.0
[packages/scorched3d.git] / scorched3d-openal.patch
1 --- scorched3d-43.3/configure-al.m4~    2011-12-31 15:51:36.000000000 +0100
2 +++ scorched3d-43.3/configure-al.m4     2012-02-14 12:34:50.668902374 +0100
3 @@ -1,118 +1,8 @@
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 -       echo "Trying pkg-config instead."
19 -
20 -       AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
21 -       if test x$PKG_CONFIG = xno; then
22 -               echo "The pkg-config script could not be found"
23 -               echo "Make sure pkg-config is in your path, or set the PKG_CONFIG"
24 -               echo "environment variable to the full path to pkg-config."
25 -
26 -               AC_MSG_ERROR([*** Can't find the openal library. Try: http://www.openal.org/])
27 -       else
28 -               OPENAL_CONFIG="$PKG_CONFIG openal";
29 -       fi
30 -fi
31 -       
32 -if test x"$use_static_openal" = x"yes"; then
33 -       AL_LIBS="/usr/local/lib/libopenal.a"
34 -else
35 -       AL_LIBS="`$OPENAL_CONFIG --libs`"
36 -fi
37 -
38 -AL_CFLAGS="`$OPENAL_CONFIG --cflags`"
39 -
40 -AC_MSG_RESULT(yes)
41 -
42 -AC_MSG_CHECKING(for Freealut support)
43 -AC_PATH_PROG(FREEALUT_CONFIG, freealut-config, no)
44 -if test x$FREEALUT_CONFIG = xno; then
45 -       echo "*** Warning: The freealut-config script installed by OpenAL could not be found."
46 -       echo "*** The alut library is required, however some older OpenAL distribitions may include it."
47 -       echo "*** If Scorched3D fails to link check alut is in the link line."
48 -       echo "*** Alternatively, make sure freealut-config is in your path, or set the FREEALUT_CONFIG"
49 -       echo "*** environment variable to the full path to openal-config."
50 -else
51 -
52 -       AL_LIBS="$AL_LIBS `$FREEALUT_CONFIG --libs`"
53 -       AL_CFLAGS="$AL_CFLAGS `$FREEALUT_CONFIG --cflags`"
54 -
55 -       AC_MSG_RESULT(yes)
56 -fi
57 -
58 -AC_MSG_CHECKING(for OpenAL compilation)
59 -if test "x$enable_openaltest" = "xyes" ; then
60 -
61 -       ac_save_CFLAGS="$CFLAGS"
62 -       ac_save_LIBS="$LIBS"
63 -       CFLAGS="$CFLAGS $AL_CFLAGS"
64 -       LIBS="$AL_LIBS $LIBS"
65 -
66 -       AC_TRY_COMPILE([
67 -#ifdef __APPLE__
68 -               #include <OpenAL/al.h>
69 -               #include <OpenAL/alc.h>
70 -#else
71 -               #include <AL/al.h>
72 -               #include <AL/alut.h>
73 -               #include <AL/alc.h>
74 -#endif
75 -
76 -               ],[
77 -               ],[
78 -               have_openal=yes 
79 -               ],[
80 -               echo "*** Failed to compile using the OpenAL library."
81 -               echo "*** CFLAGS = $AL_CFLAGS";
82 -               AC_MSG_ERROR([*** Check the OpenAL library is correctly installed.])
83 -       ])
84 -
85 -       AC_TRY_LINK([
86 -#ifdef __APPLE__
87 -               #include <OpenAL/al.h>
88 -               #include <OpenAL/alc.h>
89 -#else
90 -               #include <AL/al.h>
91 -               #include <AL/alut.h>
92 -               #include <AL/alc.h>
93 -#endif
94 -
95 -               int main(int argc, char *argv[])
96 -               {
97 -                       alutInit(argc, argv);
98 -                       return 0;
99 -               }
100 -#undef  main
101 -#define main K_and_R_C_main
102 -
103 -               ],[
104 -               ],[
105 -               have_openal=yes 
106 -               ],[
107 -               echo "*** Compiled but failed to link using the OpenAL library."
108 -               echo "*** LIBS = $AL_LIBS";
109 -               echo "*** Check the OpenAL library is on the LD_LIBRARY_PATH";
110 -               AC_MSG_ERROR([*** Check the OpenAL library is correctly installed.])
111 -       ])
112 -
113 -       CFLAGS="$ac_save_CFLAGS"
114 -       LIBS="$ac_save_LIBS"
115 -
116 -       AC_MSG_RESULT(yes)
117 -fi
118 -
119 +PKG_CHECK_MODULES([OPENAL], [openal])
120 +PKG_CHECK_MODULES([FREEALUT], [freealut])
121 +AL_CFLAGS="$OPENAL_CFLAGS $FREEALUT_CFLAGS"
122 +AL_LIBS="$OPENAL_LIBS $FREEALUT_LIBS"
123  AC_SUBST(AL_CFLAGS)
124  AC_SUBST(AL_LIBS)
125  
This page took 0.115641 seconds and 3 git commands to generate.