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
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."
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."
26 - AC_MSG_ERROR([*** Can't find the openal library. Try: http://www.openal.org/])
28 - OPENAL_CONFIG="$PKG_CONFIG openal";
32 -if test x"$use_static_openal" = x"yes"; then
33 - AL_LIBS="/usr/local/lib/libopenal.a"
35 - AL_LIBS="`$OPENAL_CONFIG --libs`"
38 -AL_CFLAGS="`$OPENAL_CONFIG --cflags`"
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."
52 - AL_LIBS="$AL_LIBS `$FREEALUT_CONFIG --libs`"
53 - AL_CFLAGS="$AL_CFLAGS `$FREEALUT_CONFIG --cflags`"
58 -AC_MSG_CHECKING(for OpenAL compilation)
59 -if test "x$enable_openaltest" = "xyes" ; then
61 - ac_save_CFLAGS="$CFLAGS"
62 - ac_save_LIBS="$LIBS"
63 - CFLAGS="$CFLAGS $AL_CFLAGS"
64 - LIBS="$AL_LIBS $LIBS"
68 - #include <OpenAL/al.h>
69 - #include <OpenAL/alc.h>
72 - #include <AL/alut.h>
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.])
87 - #include <OpenAL/al.h>
88 - #include <OpenAL/alc.h>
91 - #include <AL/alut.h>
95 - int main(int argc, char *argv[])
97 - alutInit(argc, argv);
101 -#define main K_and_R_C_main
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.])
113 - CFLAGS="$ac_save_CFLAGS"
114 - LIBS="$ac_save_LIBS"
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"