Blob Blame History Raw
--- configure.ac.orig	2006-02-05 01:48:05.000000000 +0100
+++ configure.ac	2006-02-05 01:46:52.000000000 +0100
@@ -35,8 +35,11 @@
 
 # Checks for libraries. (not perfect yet)
 AC_SEARCH_LIBS([pthread_self], [pthread])
-AC_SEARCH_LIBS([alGetError], [openal32 openal])
 
+
+PKG_CHECK_MODULES(openal,openal)
+AC_SUBST(openal_CFLAGS)
+AC_SUBST(openal_LIBS)
 ################################################################################
 # Checks for header files.
 ################################################################################
--- examples/Makefile.am.orig	2006-02-05 01:49:09.000000000 +0100
+++ examples/Makefile.am	2006-02-05 01:50:40.000000000 +0100
@@ -1,8 +1,11 @@
+OPENAL_LIBS = @openal_LIBS@
+OPENAL_CFLAGS = @openal_CFLAGS@
+
 # Build, but do not install the following test programs:
 noinst_PROGRAMS = hello_world playfile
 
 # We need to link against our *own* libalut.
-LDADD = ../src/libalut.la
+LDADD = ../src/libalut.la $(OPENAL_LIBS)
 
 # Specifying the following path is needed to find <AL/alut.h>.
-AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include $(OPENAL_CFLAGS)
--- src/Makefile.am.orig	2006-05-08 05:28:07.000000000 -0400
+++ src/Makefile.am	2018-10-30 19:28:36.214575682 -0400
@@ -1,3 +1,6 @@
+OPENAL_LIBS = @openal_LIBS@
+OPENAL_CFLAGS = @openal_CFLAGS@
+
 # The following files should be in our source distribution in addition to the
 # standard ones included by automake itself:
 EXTRA_DIST = helloworld.wav README
@@ -20,7 +23,7 @@ libalut_la_SOURCES =		\
 	alutWaveform.c
 
 # We use sin and floor, so we might need -lm, autoconf takes care of this.
-libalut_la_LIBADD = $(LIBM)
+libalut_la_LIBADD = $(LIBM) $(OPENAL_LIBS)
 
 # The following libtool flag is neccessary for building DLLs on Windows.
 libalut_la_LDFLAGS = -no-undefined
@@ -29,4 +32,4 @@ libalut_la_LDFLAGS = -no-undefined
 libalut_la_LDFLAGS += -version-info @VERSIONINFO@
 
 # Specifying the following path is needed to find <AL/alut.h>.
-libalut_la_CPPFLAGS = -I$(top_srcdir)/include
+libalut_la_CPPFLAGS = -I$(top_srcdir)/include $(OPENAL_CFLAGS)
--- test_suite/Makefile.am.orig	2006-02-05 02:08:56.000000000 +0100
+++ test_suite/Makefile.am	2006-02-05 02:10:13.000000000 +0100
@@ -1,3 +1,6 @@
+OPENAL_LIBS = @openal_LIBS@
+OPENAL_CFLAGS = @openal_CFLAGS@
+
 # The following files should be in our source distribution in addition to the
 # standard ones included by automake itself:
 EXTRA_DIST =			\
@@ -15,10 +18,10 @@
 	test_waveforms
 
 # We need to link against our *own* libalut.
-LDADD = ../src/libalut.la
+LDADD = ../src/libalut.la $(OPENAL_LIBS)
 
 # Specifying the following path is needed to find <AL/alut.h>.
-AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include $(OPENAL_CFLAGS)
 
 # test_retrostuff tests deprecated functions, but we don't want to get compiler
 # warnings because of that.