diff -p -up freealut-1.1.0/configure.ac.orig freealut-1.1.0/configure.ac --- freealut-1.1.0/configure.ac.orig 2008-08-01 22:18:00.000000000 -0300 +++ freealut-1.1.0/configure.ac 2008-08-01 22:18:31.000000000 -0300 @@ -83,7 +83,10 @@ AC_DEFINE([ALUT_BUILD_LIBRARY], [1], [De # 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. diff -p -up freealut-1.1.0/src/Makefile.am.orig freealut-1.1.0/src/Makefile.am --- freealut-1.1.0/src/Makefile.am.orig 2008-08-01 22:20:21.000000000 -0300 +++ freealut-1.1.0/src/Makefile.am 2008-08-01 22:22:27.000000000 -0300 @@ -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)