Ticket #918: openal-mac-os-x-part-1.patch

File openal-mac-os-x-part-1.patch, 2.6 KB (added by thorkilnaur, 8 years ago)

Mac OS X related part of openal-mac-os-x.patch

Line 
1
2New patches:
3
4[openal mac os x patch part 1
5Thorkil Naur <[email protected]>**20070210151407
6 This is the first and main part of the patch
7   [Fix building problem for Mac OS X
8   shelarcy <[email protected]>**20060907023009]
9 provided as an attachment to GHC trac ticket 918 (file
10 openal-mac-os-x.patch). This first part deals with the Mac OS X
11 building problem.
12] {
13hunk ./aclocal.m4 171
14+
15+# FP_CHECK_OPENAL
16+# -------------
17+AC_DEFUN([FP_CHECK_OPENAL],
18+[AC_REQUIRE([AC_CANONICAL_TARGET])
19+AL_CFLAGS=
20+case $target_os in
21+darwin*)
22+  AL_LIBS=
23+  AL_FRAMEWORKS=OpenAL
24+  ;;
25+*)
26+  AC_SEARCH_LIBS([alGenSources], [openal openal32], [AL_LIBS="$ac_cv_search_alGenSources"])
27+  test x"$AL_LIBS" = x"none required" && AL_LIBS=
28+  AC_SUBST([AL_LIBS])
29+  AL_FRAMEWORKS=
30+  ;;
31+esac
32+AC_SUBST([AL_CFLAGS])
33+AC_SUBST([AL_FRAMEWORKS])
34+])# FP_CHECK_OPENAL
35+
36hunk ./configure.ac 11
37-# Shall we build this package at all?
38-FP_ARG_OPENAL
39hunk ./configure.ac 13
40-if test x"$enable_openal" = xyes; then
41-
42hunk ./configure.ac 15
43-# The following test for the OpenAL library is a bit of a hack, but gives nice
44-# feedback even for the case when no additional library is needed. (Mac OS X?)
45-AL_LIBS=no
46-AC_SEARCH_LIBS([alGenSources], [openal openal32], [AL_LIBS="$ac_cv_search_alGenSources"])
47-test x"$AL_LIBS" = x"none required" && AL_LIBS=
48-AC_SUBST([AL_LIBS])
49+# Shall we build this package at all?
50+FP_ARG_OPENAL
51+
52+if test x"$enable_openal" = xyes; then
53+
54+# Check for ALUT include paths and libraries
55+FP_CHECK_OPENAL
56hunk ./configure.ac 27
57-# Ugly...
58-AL_FRAMEWORKS=
59-case $host_os in
60-darwin*)
61-  AL_FRAMEWORKS=OpenAL
62-  ;;
63-esac
64-AC_SUBST([AL_FRAMEWORKS])
65-
66+# check for ALUT include files
67hunk ./configure.ac 30
68-if test -z "$AL_FRAMEWORKS" && test x"$fp_found_al_header$fp_found_alc_header" != xyesyes; then
69+
70+if test x"$fp_found_al_header" = xno || test x"$fp_found_alc_header" = xno; then
71}
72
73Context:
74
75[includes -> install-includes
76Ross Paterson <[email protected]>**20060829123744]
77[exclude Setup.hs even if not building package
78Ross Paterson <[email protected]>**20060825222702]
79[exclude Setup.hs from build
80Ross Paterson <[email protected]>**20060824183534]
81[add boilerplate Setup.hs
82Ross Paterson <[email protected]>**20060824115102]
83[add files used by configure
84Ross Paterson <[email protected]>**20060518174356]
85[Fixed bug #715 (OpenAL package fails to compile with older headers)
86Sven Panne <[email protected]>**20060507164755]
87[TAG Initial conversion from CVS complete
88John Goerzen <[email protected]>**20060112154136]
89Patch bundle hash:
9021a011b552d165ce0aea5ddea7650515c34dcdb0